/* Green Runway, "Horizon" design. One stylesheet and no scripts: the site loads nothing
   but its own files, so the CSP in deploy/_headers needs no exceptions. Light and dark
   follow the visitor's system setting. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque-latin-opsz.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Figtree";
  src: url("/fonts/figtree-latin-wght.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  color-scheme: light dark;

  --display: "Bricolage Grotesque", ui-rounded, system-ui, sans-serif;
  --text: Figtree, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* 20px at 390px wide, 120px at 1440px wide. */
  --gutter: clamp(20px, 9.52vw - 17px, 120px);
  --nav-h: 80px;

  /* Landscape */
  --sky: #CFEAF9;
  --cloud: #FFFFFF;
  --cloud-shade: #E4F2FB;
  --hill-far: #A6D98A;
  --hill-near: #86C766;
  --field: #62B34B;
  --runway: #127A3E;
  --paint: #FFFFFF;

  /* Surfaces and text */
  --meadow: #F3F8EC;
  --card: #FFFFFF;
  --card-line: transparent;
  --sky-card: #FFFFFF;
  --sky-card-line: transparent;
  --ink: #12391F;
  --muted: #3F5A48;
  --prose: #36503F;
  --accent: #127A3E;
  --rule: #E3EBDD;
  --focus: #127A3E;
  --shadow: rgba(18, 57, 31, 0.5);

  /* Controls */
  --chip: #FFFFFF;
  --chip-ink: #12391F;
  --check: #127A3E;
  --price-chip: #12391F;
  --price-chip-ink: #FFFFFF;
  --button: #12391F;
  --button-ink: #FFFFFF;
  --tag: #DDF0CF;
  --tag-ink: #12391F;
  --tint-sky: #CFEAF9;
  --tint-sky-ink: #12391F;
  --tint-grass: #DDF0CF;
  --tint-grass-ink: #12391F;
  --tint-sun: #FFF1C2;
  --tint-sun-ink: #12391F;

  /* The price band is runway green in both themes. */
  --band: #127A3E;
  --band-ink: #FFFFFF;
  --band-soft: #E3F4E8;
  --band-terms: #F0FAF3;
  --band-button: #FFFFFF;
  --band-button-ink: #12391F;

  --footer: #12391F;
  --footer-ink: #BFD8C6;
  --footer-link: #FFFFFF;
  --bezel: #0E1512;
  --bezel-line: transparent;
  --code: #DDF0CF;
  --summary: #CFEAF9;
  --contact: #F3F8EC;

  /* The app's own badge colours. Dark text on both: white on #34C759 fails contrast. */
  --safe: #34C759;
  --safe-ink: #0A2E14;
  --warn: #FFCC00;
  --warn-ink: #3A2E00;
}

@media (prefers-color-scheme: dark) {
  :root {
    --sky: #0C1B2E;
    --cloud: #1A2D45;
    --cloud-shade: #16273D;
    --hill-far: #16372A;
    --hill-near: #1B4431;
    --field: #143524;
    --runway: #1D5A38;
    --paint: rgba(255, 255, 255, 0.5);

    --meadow: #0F1F17;
    --card: #11271A;
    --card-line: #1F3A2B;
    --sky-card: #13263A;
    --sky-card-line: #22364F;
    --ink: #EAF3EE;
    --muted: #A9BDB0;
    --prose: #B9CCBF;
    --accent: #7EDC8F;
    --rule: #1F3A2B;
    --focus: #7EDC8F;
    --shadow: rgba(0, 0, 0, 0.6);

    --chip: #13263A;
    --chip-ink: #EAF3EE;
    --check: #7EDC8F;
    --price-chip: #7EDC8F;
    --price-chip-ink: #0C1B2E;
    --button: #7EDC8F;
    --button-ink: #0C1B2E;
    --tag: #17331F;
    --tag-ink: #7EDC8F;
    --tint-sky: #13263A;
    --tint-sky-ink: #9ED6F5;
    --tint-grass: #17331F;
    --tint-grass-ink: #7EDC8F;
    --tint-sun: #2E2A12;
    --tint-sun-ink: #FFD95A;

    --footer: #081410;
    --footer-ink: #A9BDB0;
    --footer-link: #EAF3EE;
    --bezel: #000000;
    --bezel-line: #22364F;
    --code: #17331F;
    --summary: #13263A;
    --contact: #0F1F17;
  }
}

/* ---------- Base ---------- */

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--meadow);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

main { flex-grow: 1; }

h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); }

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: min(1200px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.accent { color: var(--accent); }

/* ---------- Header and footer ---------- */

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
}

.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
}

.brand img { width: 36px; height: 36px; border-radius: 9px; }

.nav__links { display: flex; align-items: center; gap: 28px; }

.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}

.nav__link:hover { text-decoration: underline; text-underline-offset: 4px; }

.site-footer {
  background: var(--footer);
  color: var(--footer-ink);
  font-size: 0.9375rem;
}

.site-footer .container {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer__copy { display: flex; align-items: center; gap: 12px; }
.footer__copy img { width: 28px; height: 28px; border-radius: 7px; }

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--footer-link);
  text-decoration: none;
}

.site-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Controls ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--button);
  color: var(--button-ink);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

.btn:hover { filter: brightness(1.12); }
.btn:focus-visible { border-radius: 999px; }
.btn svg { width: 16px; height: 16px; flex: none; }

.btn--large {
  gap: 10px;
  min-height: 60px;
  padding: 0 30px;
  font-size: 1.0625rem;
}

.btn--large svg { width: 18px; height: 18px; }

.btn--band { background: var(--band-button); color: var(--band-button-ink); }

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: transform 0.15s ease, filter 0.15s ease; }
  .btn:hover { transform: translateY(-1px); }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--chip-ink);
  font-size: 0.875rem;
  font-weight: 600;
}

.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--safe); }

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--tag);
  color: var(--tag-ink);
  font-size: 0.875rem;
  font-weight: 600;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 16px 0 12px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--chip-ink);
  font-size: 0.9375rem;
  font-weight: 600;
}

.pill svg { width: 16px; height: 16px; stroke: var(--check); }
.pill--price { padding: 0 16px; background: var(--price-chip); color: var(--price-chip-ink); }

.badges { display: flex; flex-wrap: wrap; gap: 8px; }

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
}

.badge--safe { background: var(--safe); color: var(--safe-ink); }
.badge--warn { background: var(--warn); color: var(--warn-ink); }

/* ---------- Landscape: clouds, stars, hills and the runway ---------- */

.sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cloud { position: absolute; width: 240px; height: auto; aspect-ratio: 240 / 96; }
.cloud .puff { fill: var(--cloud); }
.cloud .base { fill: var(--cloud-shade); }

.stars { display: none; position: absolute; left: 0; top: 0; width: 100%; height: 160px; }
.stars circle { fill: #6E86A6; }

/* The scene is drawn 1440 wide. Below that it crops at the sides; above it the height
   grows with the width so the hills are never cut off at the top. */
.scene {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: max(var(--scene-h), 32.64vw);
}

.scene .far { fill: var(--hill-far); }
.scene .near { fill: var(--hill-near); }
.scene .field { fill: var(--field); }
.scene .strip { fill: var(--runway); }
.scene .paint { fill: var(--paint); }
.scene .flower-a { fill: #F6A94A; }
.scene .flower-b { fill: #FFFFFF; }
.scene .edge-light { fill: #FFE7A3; }
.scene .threshold-light { fill: #4BE37A; }

.scene .designator {
  fill: var(--paint);
  font-family: var(--display);
  font-weight: 800;
  font-size: 120px;
  letter-spacing: -0.02em;
}

.night { display: none; }

@media (prefers-color-scheme: dark) {
  .stars { display: block; }
  .night { display: inline; }
  .day { display: none; }
}

/* ---------- Home: hero ---------- */

.hero {
  --scene-h: 470px;
  --hero-pb: 221px;
  position: relative;
  overflow: hidden;
  background: var(--sky);
  padding: calc(var(--nav-h) + 64px) 0 max(var(--hero-pb), 15.35vw);
}

.hero .cloud--1 { left: 4.2%; top: 170px; width: 240px; }
.hero .cloud--2 { right: 4.2%; top: 100px; width: 260px; }
.hero .cloud--3 { left: 82.6%; top: 480px; width: 160px; }
.hero .cloud--4 { left: 8.3%; top: 580px; width: 180px; }

.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero h1 {
  margin-top: 24px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.5rem, 1.28rem + 5.52vw, 6.25rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.lede {
  margin-top: 28px;
  max-width: 660px;
  font-size: clamp(1.0625rem, 0.97rem + 0.38vw, 1.3125rem);
  line-height: 1.55;
  color: var(--muted);
}

.hero .pills { margin-top: 28px; }
.hero .btn--large { margin-top: 32px; }

.note { margin-top: 14px; font-size: 0.9375rem; color: var(--muted); }

.device {
  width: min(1040px, 100%);
  margin-top: 64px;
  padding: 12px;
  border: 1px solid var(--bezel-line);
  border-radius: 40px;
  background: var(--bezel);
  box-shadow: 0 50px 80px -40px var(--shadow);
}

.device img { width: 100%; height: auto; border-radius: 29px; }

/* ---------- Home: sections ---------- */

.stats { padding-top: clamp(32px, 5vw, 72px); }

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 26px 28px;
  border: 1px solid var(--card-line);
  border-radius: 24px;
  background: var(--card);
}

.stat__value {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.5rem, 2.13rem + 1.52vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat__label { font-size: 0.9375rem; font-weight: 500; color: var(--muted); }

.section { padding-block: clamp(56px, 8vw, 112px); }

.section-title {
  max-width: 760px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.125rem, 1.52rem + 2.48vw, 3.75rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.tag + .section-title { margin-top: 20px; }

.cards {
  margin-top: clamp(28px, 4vw, 56px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.card {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 2.5vw, 36px);
  border: 1px solid var(--card-line);
  border-radius: 28px;
  background: var(--card);
}

.card__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.card__icon svg { width: 26px; height: 26px; }
.card__icon--sky { background: var(--tint-sky); color: var(--tint-sky-ink); }
.card__icon--grass { background: var(--tint-grass); color: var(--tint-grass-ink); }
.card__icon--sun { background: var(--tint-sun); color: var(--tint-sun-ink); }

.card h3 {
  margin-top: 24px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.3125rem, 1.24rem + 0.29vw, 1.5rem);
  letter-spacing: -0.01em;
}

.card p { margin-top: 10px; font-size: 1.0625rem; line-height: 1.6; color: var(--muted); }
.card .badges { margin-top: 18px; }

.diff { position: relative; overflow: hidden; background: var(--sky); }
.diff .cloud--5 { right: var(--gutter); top: 70px; width: 220px; }
.diff .container { position: relative; z-index: 1; }
.diff .card { background: var(--sky-card); border-color: var(--sky-card-line); }
.diff .card h3 { margin-top: 16px; }

.numeral {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.75rem, 2.47rem + 1.14vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
}

/* The price band reads as the runway seen from its end: edge lines down both sides and
   centreline dashes above and below. */
.price {
  position: relative;
  overflow: hidden;
  padding-block: clamp(48px, 7vw, 96px);
  background: var(--band);
  color: var(--band-ink);
  text-align: center;
}

.price::before,
.price::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: clamp(5px, 0.55vw, 8px);
  background: #FFFFFF;
}

.price::before { left: var(--gutter); }
.price::after { right: var(--gutter); }

.price__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-inline: 24px;
}

.dashes { display: flex; flex-direction: column; align-items: center; gap: clamp(20px, 2vw, 28px); }
.dashes span { width: clamp(8px, 0.7vw, 10px); height: clamp(32px, 3vw, 44px); background: #FFFFFF; }
.dashes--end { margin-top: clamp(28px, 3vw, 40px); }

.price h2 {
  margin-top: clamp(28px, 3vw, 40px);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.125rem, 1.61rem + 2.1vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.price__amount {
  margin-top: clamp(8px, 1vw, 12px);
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(7.5rem, 5.64rem + 7.62vw, 12.5rem);
  line-height: 0.9;
  letter-spacing: -0.045em;
}

.price__terms {
  margin-top: 16px;
  font-size: clamp(1rem, 0.94rem + 0.29vw, 1.1875rem);
  font-weight: 500;
  line-height: 1.5;
  color: var(--band-terms);
}

.price .btn--large { margin-top: 36px; }
.price .note { color: var(--band-soft); }

/* ---------- Privacy ---------- */

.legal-hero {
  --hills-h: max(170px, 11.8vw);
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-h) + 56px) 0 calc(var(--hills-h) + 50px);
  background: var(--sky);
  text-align: center;
}

.legal-hero .cloud--a { left: 10.4%; top: 190px; width: 240px; }
.legal-hero .cloud--b { left: 76.4%; top: 150px; width: 200px; }

.legal-hero .hills {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: var(--hills-h);
}

.legal-hero .hills .far { fill: var(--hill-far); }
.legal-hero .hills .near { fill: var(--hill-near); }
.legal-hero .hills .field { fill: var(--field); }

.legal-hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.legal-hero h1 {
  margin-top: 20px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.75rem, 1.73rem + 4.19vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.035em;
}

.legal-hero .date { margin-top: 16px; font-size: 1.0625rem; font-weight: 500; color: var(--muted); }

.legal-wrap { padding-bottom: clamp(56px, 8vw, 112px); }

.legal {
  position: relative;
  z-index: 2;
  width: min(880px, 100% - 2 * var(--gutter));
  margin: -80px auto 0;
  padding: clamp(24px, 4.4vw, 64px);
  border: 1px solid var(--card-line);
  border-radius: 32px;
  background: var(--card);
  box-shadow: 0 30px 60px -40px var(--shadow);
}

.summary { padding: 28px 32px; border-radius: 20px; background: var(--summary); }

.summary p {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem);
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.legal section { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--rule); }
.legal section:first-of-type { padding-top: 0; border-top: 0; }

.legal h2 {
  margin-bottom: 12px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.legal p { font-size: 1.125rem; line-height: 1.7; color: var(--prose); }
.legal p + p { margin-top: 16px; }

.legal code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--code);
  color: var(--ink);
  white-space: nowrap;
}

.contact { padding: 22px 26px; border-radius: 16px; background: var(--contact); }
.contact a { font-weight: 600; text-underline-offset: 3px; overflow-wrap: anywhere; }

/* ---------- 404 ---------- */

.hero--lost {
  --scene-h: 470px;
  min-height: calc(100vh - 96px);
  min-height: calc(100svh - 96px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: calc(max(var(--scene-h), 32.64vw) + 32px);
}

/* ---------- Narrower screens ---------- */

@media (max-width: 900px) {
  .hero { --scene-h: 380px; --hero-pb: 240px; }
  .hero--lost { --scene-h: 380px; }
  .hero .cloud--3, .hero .cloud--4 { display: none; }
  .stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cards { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}

@media (max-width: 600px) {
  :root { --nav-h: 64px; }

  .brand { gap: 10px; font-size: 1.1875rem; }
  .brand img { width: 32px; height: 32px; border-radius: 8px; }
  .nav .btn { display: none; }

  .hero { --scene-h: 300px; --hero-pb: 220px; padding-top: calc(var(--nav-h) + 32px); }
  .hero--lost { --scene-h: 300px; }
  .hero .cloud--1 { left: -40px; top: 70px; width: 140px; }
  .hero .cloud--2 { left: auto; right: -40px; top: 76px; width: 130px; }
  .hero h1 { margin-top: 20px; }
  .lede { margin-top: 20px; }
  .hero .pills { margin-top: 24px; gap: 8px; }
  .pill { min-height: 36px; padding: 0 14px 0 10px; font-size: 0.875rem; }
  .pill svg { width: 15px; height: 15px; }
  .pill--price { padding: 0 14px; }
  .hero .btn--large,
  .price .btn--large { align-self: stretch; min-height: 56px; margin-top: 24px; font-size: 1rem; }
  .note { margin-top: 12px; font-size: 0.875rem; }
  .device { margin-top: 40px; padding: 8px; border-radius: 26px; }
  .device img { border-radius: 19px; }

  .stat { gap: 6px; padding: 20px; border-radius: 20px; }
  .stat__label { font-size: 0.875rem; }
  .card { border-radius: 24px; }
  .card__icon { width: 48px; height: 48px; }
  .card__icon svg { width: 23px; height: 23px; }
  .card h3 { margin-top: 18px; }
  .card p { margin-top: 8px; font-size: 1rem; }
  .card .badges { margin-top: 16px; }
  .diff .card h3 { margin-top: 12px; }
  .diff .cloud--5 { display: none; }
  .tag + .section-title { margin-top: 18px; }

  .price__inner { padding-inline: 24px; }
  .price__terms { margin-top: 12px; }

  .legal-hero { --hills-h: 110px; padding: calc(var(--nav-h) + 32px) 0 calc(var(--hills-h) + 30px); }
  .legal-hero .cloud { display: none; }
  .legal-hero h1 { margin-top: 16px; }
  .legal-hero .date { margin-top: 12px; font-size: 1rem; }
  .legal { margin-top: -48px; border-radius: 24px; }
  .summary { padding: 20px 22px; border-radius: 16px; }
  .legal section { margin-top: 32px; padding-top: 32px; }
  .legal p { font-size: 1.0625rem; }
  .contact { padding: 18px 20px; }

  .site-footer .container {
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 24px 0 28px;
  }
  .footer__copy img { display: none; }
}
