:root {
  --bg: #f5f5ed;
  --soft: #e8ede3;
  --surface: #fbfbf6;
  --ink: #172b25;
  --muted: #52645b;
  --line: #cbd4c8;
  --green: #234f3b;
  --on-green: #f5f5ed;
  --deep: #18392c;
  --on-deep: #e6eee8;
  --deep-line: #3a5042;
  --radius: 16px;
  --max: 1180px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111d19;
    --soft: #1a2b23;
    --surface: #16241e;
    --ink: #e6eee8;
    --muted: #b2c3b7;
    --line: #3a5042;
    --green: #bad9b4;
    --on-green: #111d19;
    --deep: #20362a;
    --on-deep: #e6eee8;
    --deep-line: #3f5a49;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -0.02em; }
p { margin: 0; }
[hidden] { display: none !important; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--green);
  color: var(--on-green);
  padding: 10px 16px;
  z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow-light { color: #bad9b4; }

/* ---------- header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.12em;
  font-size: 13px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--green);
  color: var(--on-green);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0;
}
.brand-name { display: inline-flex; align-items: baseline; gap: 8px; }
.brand-sub {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--muted);
  padding-left: 8px;
  border-left: 1px solid var(--line);
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14px;
}
.site-nav a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s ease;
}
.site-nav a:hover,
.site-nav a.is-current { color: var(--ink); }
.nav-cta {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink) !important;
}
.nav-cta:hover { border-color: var(--green); }

/* ---------- buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.button:active { transform: translateY(1px); }
.button-primary {
  background: var(--green);
  color: var(--on-green);
}
.button-primary:hover { opacity: 0.9; }
.button-light {
  background: #f5f5ed;
  color: #18392c;
}
.button-quiet,
.button-ghost {
  border-color: var(--line);
  color: var(--ink);
}
.button-ghost {
  border-color: var(--deep-line);
  color: var(--on-deep);
}
.button-quiet:hover,
.button-ghost:hover { border-color: var(--green); }
.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- hero ---------- */
.hero { padding: 88px 0 64px; }
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.75rem, 7vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 18px 0 0;
}
.hero h1 em {
  font-style: italic;
  color: var(--green);
}
.hero-sub {
  max-width: 46ch;
  margin-top: 22px;
  font-size: 17px;
  color: var(--muted);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  margin: 56px 0 0;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.stats div { display: flex; flex-direction: column-reverse; gap: 2px; }
.stats dt {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.stats dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1;
}

/* ---------- featured ---------- */
.featured { padding: 8px 0 72px; }
.featured-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
  background: var(--deep);
  color: var(--on-deep);
  border-radius: 24px;
  overflow: hidden;
}
.featured-left { padding: 44px 44px 42px; }
.featured-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
}
.featured-head h2 {
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1.05;
}
.featured-tag { color: #c2d4bd; font-size: 15px; }
.featured-copy {
  max-width: 52ch;
  margin-top: 20px;
  color: #c2d4bd;
  font-size: 15px;
}
.featured-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.featured-right {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 28px;
  border-left: 1px solid var(--deep-line);
  background:
    radial-gradient(120% 80% at 80% 0%, rgba(186, 217, 180, 0.18), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
}
.featured-letter {
  font-family: var(--serif);
  font-size: clamp(120px, 16vw, 210px);
  line-height: 0.72;
  color: rgba(186, 217, 180, 0.35);
  align-self: flex-end;
}
.featured-meta {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #76977e;
}

/* ---------- marks ---------- */
.mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
}
.mark-lg { width: 60px; height: 60px; border-radius: 16px; font-size: 32px; }
.mark-xl { width: 76px; height: 76px; border-radius: 20px; font-size: 40px; }

/* ---------- catalog ---------- */
.catalog { padding: 0 0 96px; }
.catalog-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.catalog-head h2 {
  font-family: var(--serif);
  font-size: 30px;
}
.catalog-head p { font-size: 13px; color: var(--muted); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 28px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.chip span { font-size: 11px; opacity: 0.65; }
.chip:hover { border-color: var(--green); color: var(--ink); }
.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
.chip.is-active span { opacity: 0.6; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -22px rgba(17, 29, 25, 0.55);
}
.card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.card-arrow { color: var(--muted); font-size: 15px; }
.card:hover .card-arrow { color: var(--green); }
.card-body h3 { font-size: 20px; letter-spacing: -0.01em; }
.card-body p { margin-top: 6px; font-size: 14px; color: var(--muted); }
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.tag-group { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  white-space: nowrap;
}
.card-cta {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
  white-space: nowrap;
}
.card-cta.is-soon { color: var(--muted); }
.empty { margin-top: 28px; color: var(--muted); }

/* ---------- app page ---------- */
.app-page { padding: 40px 28px 96px; }
.back {
  display: inline-block;
  margin-bottom: 34px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}
.back:hover { color: var(--ink); }
.app-head {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}
.app-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.app-head h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1;
}
.status {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}
.app-tagline { margin: 12px 0 16px; font-size: 17px; color: var(--muted); max-width: 52ch; }

.app-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 56px;
  margin-top: 44px;
  align-items: start;
}
.prose p { margin-bottom: 16px; max-width: 62ch; color: var(--ink); font-size: 16px; }
.prose p:last-child { margin-bottom: 0; }

.section { margin-top: 56px; }
.section > h2 {
  font-family: var(--serif);
  font-size: 26px;
  margin-bottom: 22px;
}
.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.features li {
  background: var(--surface);
  padding: 22px;
}
.features h3 { font-size: 15px; margin-bottom: 6px; }
.features p { font-size: 14px; color: var(--muted); }
.notes { margin: 0; padding-left: 18px; color: var(--muted); }
.notes li { margin-bottom: 8px; }

.app-side { position: sticky; top: 96px; }
.dl-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}
.dl-title {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.2;
}
.dl-title span {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
}
.dl-sub { margin-top: 4px; font-size: 13px; color: var(--muted); }
.dl-card .button { width: 100%; margin-top: 18px; }
.dl-note { margin-top: 12px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.dl-meta {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}
.dl-meta div { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; }
.dl-meta dt { color: var(--muted); }
.dl-meta dd { margin: 0; text-align: right; }

.more { padding-top: 8px; border-top: 1px solid var(--line); }

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--line);
  background: var(--soft);
  padding: 46px 0 30px;
}
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 28px;
}
.foot-brand { display: flex; gap: 12px; }
.foot-brand p { font-size: 13px; line-height: 1.5; }
.foot-brand strong { font-size: 14px; letter-spacing: 0.02em; }
.foot-brand span { color: var(--muted); }
.foot-links { display: flex; flex-wrap: wrap; gap: 22px; font-size: 13px; }
.foot-links a {
  text-decoration: none;
  color: var(--muted);
}
.foot-links a:hover { color: var(--ink); }
.foot-legal {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  max-width: 78ch;
}

/* ---------- extra downloads & screenshots ---------- */
.dl-more {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.dl-more a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
  text-decoration: none;
}
.dl-more a:hover { border-color: var(--green); }
.dl-more span { font-size: 12px; color: var(--muted); }

.shot { margin: 40px 0 0; }
.shot img {
  display: block;
  margin: 0 auto;
  width: auto;
  max-width: 100%;
  max-height: 620px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--soft);
}
.shot figcaption {
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .featured-panel { grid-template-columns: 1fr; }
  .featured-right { display: none; }
  .app-layout { grid-template-columns: 1fr; gap: 36px; }
  .app-side { position: static; order: -1; }
}
@media (max-width: 620px) {
  .wrap { padding: 0 20px; }
  .app-page { padding: 28px 20px 72px; }
  .hero { padding: 56px 0 44px; }
  .featured-left { padding: 30px 26px 32px; }
  .featured-head h2 { font-size: 30px; }
  .site-nav { gap: 16px; font-size: 13px; }
  .site-nav a:nth-child(2) { display: none; }
  .catalog-head { flex-direction: column; gap: 6px; }
  .app-head { flex-direction: column; gap: 18px; }
  .stats { gap: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .button { transition: none; }
}
