/* Palette taken verbatim from the app's design tokens (lib/src/design_system/
   tokens.dart) so the site and the App Store listing read as one product.
   Dark is the brand home — the app icon is a near-black plate with a lime
   accent — so dark is the default and light is the explicit opt-in. The lime
   cannot be used raw on light surfaces (about 1.2:1 against white), which is
   why the light palette carries a deepened olive instead. Every pair here is
   the app's, and the app's are contrast-tested. */
:root {
  color-scheme: dark;
  --paper: #0b0c0d;
  --elevated: #141619;
  --surface: #1a1d20;
  --ink: #f3f5ee;
  --muted: #a7aca0;
  --faint: #757a6e;
  --accent: #d2fc06;
  --accent-soft: #2c3606;
  --on-accent: #0b0c0d;
  --line: #26292c;
  --focus: #d2fc06;
  --shadow: 0 1.5rem 4rem rgb(0 0 0 / 55%);

  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --paper: #f4f5f0;
    --elevated: #ffffff;
    --surface: #ffffff;
    --ink: #14160f;
    --muted: #565b4e;
    --faint: #82877a;
    --accent: #4f6b00;
    --accent-soft: #edf7c2;
    --on-accent: #ffffff;
    --line: #e1e3dc;
    --focus: #4f6b00;
    --shadow: 0 1.25rem 3rem rgb(20 22 15 / 10%);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  /* Two very wide, very soft lime washes. They give the page depth without a
     background image, and sit under everything at low opacity so text
     contrast is unaffected. */
  background-image:
    radial-gradient(70rem 40rem at 78% -8%, rgb(210 252 6 / 7%), transparent 65%),
    radial-gradient(52rem 32rem at 4% 12%, rgb(210 252 6 / 4%), transparent 60%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

@media (prefers-color-scheme: light) {
  body {
    background-image:
      radial-gradient(70rem 40rem at 78% -8%, rgb(79 107 0 / 6%), transparent 65%),
      radial-gradient(52rem 32rem at 4% 12%, rgb(79 107 0 / 4%), transparent 60%);
  }
}

a { color: var(--accent); text-underline-offset: .18em; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: .25rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: .6rem 1rem;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}
.skip-link:focus { left: 1rem; z-index: 3; }

header, main, footer { width: min(100% - 2rem, 74rem); margin-inline: auto; }

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.025em;
  text-decoration: none;
  color: var(--ink);
}
.brand img {
  width: 2rem;
  height: 2rem;
  border-radius: .5rem;
  /* The icon is a dark plate; a hairline keeps its edge visible in light mode. */
  box-shadow: 0 0 0 1px var(--line);
}
nav { display: flex; flex-wrap: wrap; gap: 1.4rem; font-size: .95rem; }
nav a { color: var(--muted); text-decoration: none; transition: color .15s ease; }
nav a:hover { color: var(--ink); }

main { padding: 3rem 0 4rem; }
.content { max-width: 46rem; }

.eyebrow {
  display: inline-block;
  margin-bottom: .35rem;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1, h2, h3 { line-height: 1.12; letter-spacing: -.03em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 6.2vw, 4.4rem); margin: .2rem 0 1.1rem; }
h2 { margin-top: 3rem; font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
h3 { margin-top: 1.6rem; font-size: 1.12rem; letter-spacing: -.02em; }
.lede { color: var(--muted); font-size: 1.16rem; line-height: 1.6; max-width: 40rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .9rem;
  padding: 1.35rem 1.5rem;
  margin: 1.5rem 0;
}
li { margin: .5rem 0; }
dt { font-weight: 700; margin-top: 1rem; }
dd { margin: .2rem 0 0; color: var(--muted); }
.small { color: var(--muted); font-size: .9rem; }

footer {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  color: var(--faint);
  font-size: .9rem;
}
footer nav { margin-top: .75rem; }

/* ---------- Landing page ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(18rem, .95fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 5.5rem);
  min-height: 34rem;
  padding: 3.5rem 0 4.5rem;
}
.hero-copy { min-width: 0; }
.hero-copy .lede { max-width: 37rem; }
.concept-label {
  margin: 0 0 .75rem;
  color: var(--faint);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin: 2rem 0 1.15rem; }

.button {
  display: inline-block;
  border: 0;
  border-radius: .6rem;
  padding: .85rem 1.45rem;
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 700;
  letter-spacing: -.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}
.button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.button:active { transform: none; }
.text-link { color: var(--ink); font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--accent); }
.text-link:hover { color: var(--accent); }

.hero-visual { min-width: 0; }
.visual-window {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  padding: clamp(1.15rem, 4vw, 1.9rem);
  background: var(--elevated);
  box-shadow: var(--shadow);
}
.visual-window::before {
  content: "";
  display: block;
  width: 2.75rem;
  height: .2rem;
  margin-bottom: 1.9rem;
  border-radius: 1rem;
  background: var(--accent);
}
.visual-topline {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--faint);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
}
.visual-title { margin: .5rem 0 1.4rem; font-size: 1.5rem; font-weight: 700; letter-spacing: -.03em; }
.setup-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin: 0; }
.setup-grid div {
  min-width: 0;
  padding: .7rem .75rem;
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: var(--surface);
}
.setup-grid dt { overflow-wrap: anywhere; margin: 0; color: var(--faint); font-size: .7rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.setup-grid dd { margin: .3rem 0 0; overflow-wrap: anywhere; color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.visual-rule { height: 1px; margin: 1.4rem 0; background: var(--line); }
.visual-performance, .visual-target { display: flex; justify-content: space-between; gap: 1rem; font-size: .88rem; font-variant-numeric: tabular-nums; }
.visual-performance span { color: var(--muted); }
.visual-target { margin-top: .8rem; color: var(--accent); font-weight: 700; }
.visual-target strong { color: var(--ink); text-align: right; }
.visual-caption { margin: 1rem 0 0; color: var(--faint); font-size: .85rem; text-align: center; }

.recognition-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .55rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: .84rem;
}
.recognition-strip span {
  padding: .3rem .85rem;
  border: 1px solid var(--line);
  border-radius: 99rem;
  background: var(--surface);
}

.section { padding: 5.5rem 0; }
.section-bordered { border-top: 1px solid var(--line); }
.section > h2 { max-width: 32rem; margin-top: .4rem; }

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 2.5rem; }
.feature-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .9rem;
  padding: 1.5rem;
  transition: border-color .15s ease;
}
.feature-card:hover { border-color: var(--accent); }
.feature-card h3 { margin-top: .5rem; }
.feature-card p:last-child { margin-bottom: 0; color: var(--muted); }
.feature-number { margin: 0; color: var(--accent); font-size: .72rem; font-weight: 700; letter-spacing: .16em; font-variant-numeric: tabular-nums; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.25rem; margin-top: 2.5rem; }
.step { position: relative; min-width: 0; }
.step:not(:last-child)::after { content: "→"; position: absolute; top: .1rem; right: -1.15rem; color: var(--accent); font-size: 1.3rem; }
.step-index {
  display: inline-grid;
  width: 2.15rem;
  height: 2.15rem;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.step h3 { margin-top: 1rem; }
.step p { color: var(--muted); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, .7fr); gap: clamp(2rem, 8vw, 6rem); align-items: center; }
.split > div { min-width: 0; }

.quote-card {
  border: 1px solid var(--line);
  border-left: .2rem solid var(--accent);
  border-radius: .3rem .9rem .9rem .3rem;
  padding: 1.65rem 1.85rem;
  background: var(--surface);
}
.quote-card p:first-of-type { margin-top: 0; font-size: 1.3rem; font-weight: 700; line-height: 1.35; letter-spacing: -.02em; }
.quote-card p:last-child { margin-bottom: 0; color: var(--muted); }
.quote-mark { display: none; }

.status { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.status p:last-child { max-width: 42rem; color: var(--muted); font-size: 1.06rem; }

.faq { max-width: 52rem; }
.faq details { border-top: 1px solid var(--line); padding: 1.2rem 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; letter-spacing: -.01em; }
.faq summary::marker { color: var(--accent); }
.faq details p { max-width: 44rem; margin-bottom: 0; color: var(--muted); }

.not-found { padding: 5rem 0; }

/* ---------- Contact form ---------- */
.contact-form { margin-top: 1.5rem; display: grid; gap: 1.15rem; }
.contact-form .field { display: grid; gap: .4rem; }
.contact-form label { font-weight: 600; font-size: .95rem; }
.contact-form .optional { font-weight: 400; color: var(--faint); }
.contact-form input,
.contact-form textarea {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: .6rem;
  padding: .7rem .8rem;
  transition: border-color .15s ease;
}
.contact-form input:hover,
.contact-form textarea:hover { border-color: var(--faint); }
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--accent); outline: none; }
.contact-form input:focus-visible,
.contact-form textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.contact-form textarea { resize: vertical; min-height: 8.5rem; }
.contact-form .small { margin: 0; color: var(--faint); }
.contact-form button { justify-self: start; }
.contact-form button[disabled] { opacity: .55; cursor: progress; transform: none; }
/* Off-screen rather than display:none — some bots skip hidden inputs. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status:empty { display: none; }
.form-status { margin: 0; font-size: .95rem; font-weight: 600; }
.form-status.is-ok { color: var(--accent); }
.form-status.is-error { color: #ff6b63; }
@media (prefers-color-scheme: light) {
  .form-status.is-error { color: #b3271e; }
}

/* ---------- Responsive ---------- */
@media (max-width: 48rem) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 2rem; }
  .hero-visual { max-width: 38rem; }
  .feature-grid, .steps { grid-template-columns: 1fr; gap: 1.25rem; }
  .step:not(:last-child)::after { content: "↓"; top: auto; right: auto; bottom: -.95rem; left: .6rem; font-size: 1.1rem; }
  .split { grid-template-columns: 1fr; }
  .section { padding: 4rem 0; }
}

@media (max-width: 38rem) {
  header { align-items: flex-start; flex-direction: column; }
  main { padding-top: 2rem; }
}

@media (max-width: 22rem) {
  .visual-topline, .visual-performance, .visual-target { align-items: flex-start; flex-direction: column; gap: .25rem; }
  .visual-target strong { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .button:hover { transform: none; }
}
