/* Cairn: shared styles for all four pages.
   One file on purpose: the pages used to duplicate their inline styles, which is
   how the palette drifted a whole generation behind the app. Tokens below are
   lifted from lib/core/theme/app_colors.dart. The contrast ratios there were
   engineered, so don't nudge them by eye. */

:root {
  /* Light: "daylight stone" */
  --bg: #E0D7C3;
  --surface: #FBF8F1;
  --raised: #FFFDF9;
  --divider: #D2C6B0;
  --ink: #29261F;
  --muted: #554E45;
  --accent: #4E5F41;
  --accent-pressed: #3D4A33;
  --on-accent: #FBF8F1;
  --sage: #6E8063;
  --clay: #B5503C;
}
@media (prefers-color-scheme: dark) {
  :root {
    /* Dark: "stone at dusk". The accent flips role: the moss lifts and dark ink
       sits on top of it. */
    --bg: #121009;
    --surface: #282419;
    --raised: #322D20;
    --divider: #3E3729;
    --ink: #F2EDE3;
    --muted: #A89F8F;
    --accent: #9DB281;
    --accent-pressed: #B4C79A;
    --on-accent: #15130E;
    --sage: #8AA07D;
    --clay: #D06A54;
  }
}

/* Self-hosted, subsetted, pinned to the one weight the site uses. No font CDN:
   a page claiming to make no third-party requests shouldn't make one for type. */
@font-face {
  font-family: 'Newsreader';
  src: url('font/newsreader.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 62rem; margin: 0 auto; padding: 0 1.5rem; }
.reading { max-width: 34rem; }
.center { text-align: center; }
.center .reading { margin: 0 auto; }

h1, h2, h3, .tagline, .brand, .price {
  font-family: 'Newsreader', Georgia, 'Times New Roman', serif;
  font-weight: 400;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.6rem, 8vw, 4.2rem); line-height: 1.04; letter-spacing: -0.02em; margin: 0 0 0.6rem; }
h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1.15; margin: 0 0 0.8rem; }
h3 { font-size: 1.25rem; line-height: 1.25; margin: 0 0 0.4rem; }
p { margin: 0 0 1rem; }
.lead { font-size: 1.12rem; color: var(--ink); }
.muted, .micro { color: var(--muted); }
.micro { font-size: 0.92rem; }
.tagline { font-style: italic; font-size: clamp(1.2rem, 3.4vw, 1.55rem); color: var(--accent); margin: 0 0 1.4rem; }
.eyebrow {
  font-family: system-ui, sans-serif;
  font-size: 0.76rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 0.5rem;
}
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px;
}

/* Header + footer */
header { border-bottom: 1px solid var(--divider); }
.bar { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 0; gap: 1rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font-size: 1.3rem; color: var(--ink); text-decoration: none; }
.brand svg { width: 17px; height: 20px; }
.brand svg rect { fill: currentColor; }
nav a { margin-left: 1.4rem; font-size: 0.95rem; text-decoration: none; color: var(--muted); }
nav a:hover { color: var(--ink); }
footer { border-top: 1px solid var(--divider); margin-top: 4rem; padding: 2rem 0 3rem; color: var(--muted); font-size: 0.95rem; }
footer .row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
footer .links a { margin-left: 1.2rem; text-decoration: none; color: var(--muted); }
footer .links a:first-child { margin-left: 0; }
footer .links a:hover { color: var(--ink); }

/* Sections */
section { padding: 3.4rem 0; border-top: 1px solid var(--divider); }
section:first-of-type { border-top: 0; }
.hero { padding: 3.6rem 0 3.2rem; }
.band { background: var(--surface); border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); }
.band section { border-top: 0; }

/* The ground sits a real margin below the cards. That gap is the whole sense of
   depth, especially in dark mode where shadow does nothing. Don't flatten it. */
.card, .tier {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 14px;
  padding: 1.3rem 1.4rem;
}
.tiers { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 1.6rem; }
.tier.top { background: var(--raised); border-color: var(--accent); }
.step { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 0.35rem; }
.tier p { margin: 0; color: var(--muted); }

.ways { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.4rem; }
.chip { background: var(--surface); border: 1px solid var(--divider); border-radius: 999px; padding: 0.42rem 0.9rem; font-size: 0.9rem; color: var(--ink); }

.limits { list-style: none; padding: 0; margin: 1.2rem 0 0; max-width: 38rem; }
.limits li { padding: 0.75rem 0; border-top: 1px solid var(--divider); color: var(--muted); }
.limits li:first-child { border-top: 0; }
.limits b { color: var(--ink); font-weight: 600; }

.price { font-size: clamp(2.2rem, 6vw, 3rem); line-height: 1; margin: 0 0 0.8rem; }

/* CTA + form */
.cta {
  display: inline-block; background: var(--accent); color: var(--on-accent);
  text-decoration: none; font-weight: 600; font-size: 1rem;
  padding: 0.85rem 1.6rem; border-radius: 12px; border: 0; cursor: pointer;
}
.cta:hover { background: var(--accent-pressed); }
.notify { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; margin: 1.6rem 0 0.7rem; }
.notify input {
  flex: 1 1 18rem; max-width: 22rem; font: inherit; padding: 0.85rem 1rem;
  border-radius: 12px; border: 1px solid var(--divider);
  background: var(--raised); color: var(--ink);
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Long-form legal / support pages */
.doc { padding: 2.6rem 0 1rem; max-width: 40rem; }
.doc h2 { font-size: 1.3rem; margin-top: 2.2rem; }
.doc .updated { color: var(--muted); font-size: 0.92rem; }
.doc .summary { background: var(--surface); border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; padding: 1rem 1.2rem; margin: 1.4rem 0 2rem; }
.doc .summary p { margin: 0; }
.qa { border-top: 1px solid var(--divider); padding: 1.2rem 0; }
.qa h3 { margin-bottom: 0.35rem; }
.qa p { color: var(--muted); margin: 0; }

/* The stones stack upward. They settle into place and stop. Nothing bounces. */
.glyph { width: 74px; height: 89px; display: block; margin: 0 0 1.6rem; }
.glyph rect { fill: var(--ink); }
@media (prefers-reduced-motion: no-preference) {
  .glyph rect { opacity: 0; transform: translateY(8px); transform-box: fill-box; transform-origin: center; animation: settle 0.7s cubic-bezier(0.16,0.84,0.44,1) forwards; }
  .glyph .s0 { animation-delay: 0.05s; }
  .glyph .s1 { animation-delay: 0.22s; }
  .glyph .s2 { animation-delay: 0.39s; }
  .glyph .s3 { animation-delay: 0.56s; }
  @keyframes settle { to { opacity: 1; transform: none; } }
}

@media (max-width: 640px) {
  .tiers { grid-template-columns: 1fr; }
  nav a { margin-left: 1rem; }
  section { padding: 2.6rem 0; }
}
