/*
  RYTZ Co-Parenting site. One stylesheet, no framework.
  Tokens are the Steady system, copied from design/tokens/steady-tokens.json (v0.5):
  paper ground, ink text, one emerald brand band, gold only for overlines, clay (never red) for care.
  Fonts are self-hosted (SIL OFL, see assets/fonts); nothing loads from another origin.
*/

@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/Inter-Regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/Inter-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/Fraunces-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 700; font-style: normal; font-display: swap; src: url("/assets/fonts/Fraunces-Bold.woff2") format("woff2"); }

:root {
  color-scheme: light dark;

  --ground: #FBFAF6;
  --surface: #FFFFFF;
  --ink: #1E2A24;
  --body: #41514A;
  --muted: #5D6B65;
  --line: #E7EDE9;
  --primary: #0D5F3C;
  --primary-fill: #0D5F3C;
  --on-primary: #FFFFFF;
  --primary-soft: #E4F0EA;
  --gold: #8C6008;
  --care: #AA4E3A;
  --care-bg: #FBEDE9;
  --shadow: 0 1px 3px rgba(30, 42, 36, 0.04);
  --focus: #0D5F3C;

  /* Brand band: welcome-style surfaces only. Same in light and dark. */
  --band: linear-gradient(150deg, #03271C 0%, #0A3D2C 45%, #0E4A36 80%, #11553E 100%);
  --band-bg: #0A3D2C;
  --cream: #FBF8F0;
  --on-band-soft: #BFE3CF;
  --kicker: #D7B665;

  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0F1311;
    --surface: #171C19;
    --ink: #F2F5F2;
    --body: #C6D0CA;
    --muted: #9AA79F;
    --line: #2A322D;
    --primary: #6FCF97;
    --primary-fill: #1E7350;
    --on-primary: #F2F5F2;
    --primary-soft: #22302A;
    --gold: #E0B84A;
    --care: #E89B85;
    --care-bg: #2A1B17;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    --focus: #6FCF97;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--body);
  font: 400 16px/24px var(--font-text);
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

.wrap { width: min(100% - 40px, 42rem); margin-inline: auto; }

a { color: var(--primary); text-underline-offset: 3px; }

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

.skip {
  position: absolute; left: 20px; top: -80px; z-index: 10;
  padding: 12px 16px; border-radius: 999px;
  background: var(--cream); color: #0A3D2C; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---- Brand band ---- */
.band { background: var(--band-bg) var(--band); color: var(--cream); }
.band :focus-visible { outline-color: var(--cream); }
.band-row { display: flex; align-items: center; justify-content: space-between; padding-block: 16px; }
.wordmark { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.wordmark img { display: block; width: auto; height: 34px; }
.exit {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1px solid rgba(251, 248, 240, 0.4); border-radius: 999px;
  color: var(--cream); font: 600 14px/20px var(--font-text); text-decoration: none;
}
.exit:hover { background: rgba(251, 248, 240, 0.1); }

.hero { padding-block: 24px 48px; }
.kicker { margin: 0 0 12px; color: var(--kicker); font: 600 12px/16px var(--font-text); letter-spacing: 0.14em; text-transform: uppercase; }
.hero h1 { margin-bottom: 16px; color: var(--cream); }
.lede { margin: 0; color: var(--on-band-soft); font-size: 17px; line-height: 26px; }
.lede + .lede { margin-top: 12px; }

/* ---- The brand page (landing) ----
   One emerald surface from the top to the bottom, like the app's welcome: no paper band under it.
   The same in light and dark: these colours are the brand's, not the appearance's. */
body.brand { background: var(--band-bg) var(--band); background-attachment: fixed; color: var(--on-band-soft); }
body.brand .band { background: transparent; }
body.brand :focus-visible { outline-color: var(--cream); }
body.brand main { display: flex; align-items: center; padding-block: 24px 40px; }
body.brand .hero { padding-block: 0; }
body.brand .hero h1 { margin-bottom: 20px; }
body.brand .lede { text-wrap: balance; }
body.brand .kicker { margin-bottom: 20px; }
body.brand .soon { margin-top: 40px; color: var(--kicker); font-size: 14px; line-height: 20px; letter-spacing: 0.02em; }
body.brand .stores { margin-top: 40px; }
body.brand .foot, body.brand .foot a { color: var(--on-band-soft); }
body.brand .foot a:hover { color: var(--cream); }

/* ---- Type ---- */
h1, h2 { margin: 0; color: var(--ink); font-family: var(--font-display); }
h1 { font-size: 34px; line-height: 40px; font-weight: 700; letter-spacing: -0.8px; text-wrap: balance; }
h2 { font-size: 22px; line-height: 29px; font-weight: 600; letter-spacing: -0.2px; }
.overline { margin: 0 0 8px; color: var(--gold); font: 600 12px/16px var(--font-text); letter-spacing: 0.1em; text-transform: uppercase; }
.small { font-size: 14px; line-height: 21px; color: var(--muted); }
p { margin: 0; }
.nowrap { white-space: nowrap; }

/* ---- Layout ---- */
main { flex: 1; padding-block: 28px 12px; }
main > .wrap > * + * { margin-top: 28px; }
.stack > * + * { margin-top: 12px; }
.page-title { padding-block: 8px 0; }
.page-title h1 { margin-bottom: 12px; font-size: 27px; line-height: 33px; letter-spacing: -0.5px; }

.card {
  padding: 20px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
}
.card > h2 { margin-bottom: 12px; }

/* ---- Centred pages ----
   Every page but Privacy, whose running text stays left-aligned for reading.
   A centred paragraph is capped near 34rem so its lines stay short enough to read. */
.centred { text-align: center; }
.centred p { max-width: 34rem; margin-inline: auto; text-wrap: pretty; }
.centred .btn { margin-inline: auto; }
.centred .stores { justify-content: center; }

/* ---- Quiet pages (invite, confirm, 404) ----
   One message, one action. The content sits in the middle of the space under the band,
   with the headline at full size and nothing else competing for the eye. */
main.quiet { display: flex; align-items: center; padding-block: 40px; }
.quiet .wrap > * + * { margin-top: 32px; }
.quiet h1 { margin-bottom: 0; }
.quiet .stack > * + * { margin-top: 16px; }
.quiet .stack > p:not(.small) { font-size: 17px; line-height: 26px; }
.quiet .stores { margin-top: 0; }

/* ---- Buttons ---- */
.btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; max-width: 24rem; min-height: 52px; padding: 0 28px;
  border: 0; border-radius: 999px; background: var(--primary-fill); color: var(--on-primary);
  font: 600 16px/24px var(--font-text); text-decoration: none; text-align: center;
  transition: transform 170ms cubic-bezier(0, 0, 0.2, 1), opacity 170ms;
}
.btn:hover { opacity: 0.92; }
.btn:active { transform: scale(0.97); }

/* Store buttons. An <a> with no href is a placeholder link: shown, not tappable, until site.js has a URL. */
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; padding: 0; list-style: none; }
.store {
  display: flex; flex-direction: column; justify-content: center;
  min-width: 11.5rem; min-height: 56px; padding: 6px 24px;
  border: 1px solid rgba(251, 248, 240, 0.4); border-radius: 999px;
  color: var(--cream); text-decoration: none;
}
.store-note { font-size: 12px; line-height: 16px; color: var(--on-band-soft); }
.store-name { font-size: 17px; line-height: 22px; font-weight: 600; }
a.store[href]:hover { background: rgba(251, 248, 240, 0.1); }
a.store[href]:active { transform: scale(0.97); }
/* On paper (invite page), the same buttons take ink colours. */
.on-paper .store { border-color: var(--line); background: var(--surface); color: var(--ink); }
.on-paper .store-note { color: var(--muted); }

/* Show the "coming soon" words until site.js finds real store URLs, then show the "live" words. */
:root[data-stores="live"] [data-when="soon"], :root:not([data-stores="live"]) [data-when="live"] { display: none; }

/* ---- Notices ---- */
.notice { padding: 16px 20px; border-radius: 16px; background: var(--care-bg); color: var(--care); }
.notice strong { display: block; font-weight: 600; }
.notice p + p { margin-top: 4px; }

/* ---- Footer ---- */
.foot { padding-block: 28px 32px; color: var(--muted); font-size: 14px; line-height: 21px; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
.foot a:hover { color: var(--primary); }

.privacy-sections h2 { font-size: 18px; line-height: 25px; margin-top: 24px; }
.privacy-sections h2 + p { margin-top: 4px; }

@media (min-width: 640px) {
  .wordmark img { height: 38px; }
  .hero { padding-block: 40px 72px; }
  .band-row { padding-block: 20px; }
  .hero h1 { font-size: 44px; line-height: 50px; letter-spacing: -1px; }
  .lede { font-size: 19px; line-height: 28px; }
  main { padding-block: 40px 16px; }
  .card { padding: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn, .store { transition: none; }
  .btn:active, a.store[href]:active { transform: none; }
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
