/* ─── Fonts ─── */
@font-face { font-family:'Axiforma'; font-weight:400; src:url('fonts/axiforma/axiforma_book-webfont.woff2') format('woff2'); }
@font-face { font-family:'Axiforma'; font-weight:500; src:url('fonts/axiforma/axiforma_medium-webfont.woff2') format('woff2'); }
@font-face { font-family:'Axiforma'; font-weight:600; src:url('fonts/axiforma/axiforma_semibold-webfont.woff2') format('woff2'); }
@font-face { font-family:'Axiforma'; font-weight:700; src:url('fonts/axiforma/axiforma_bold-webfont.woff2') format('woff2'); }
@font-face { font-family:'Axiforma'; font-weight:800; src:url('fonts/axiforma/axiforma_heavy-webfont.woff2') format('woff2'); }
@font-face { font-family:'Axiforma'; font-weight:900; src:url('fonts/axiforma/axiforma_black-webfont.woff2') format('woff2'); }

/* ─── Tokens ─── */
:root {
  --bg:            #F5F3EE;
  --bg-warm:       #EFEBE2;
  --surface:       #FFFFFF;
  --ink:           #1C1C1E;
  --ink-2:         #4B4F56;
  --ink-3:         #6B6F76;
  --ink-4:         #9CA0A8;
  --line:          #E6E1D8;
  --line-2:        #D6CFC0;
  --orange:        #FF6A1A;
  --orange-dark:   #D85410;
  --orange-soft:   #FFE4D2;
  --teal:          #4FC3C8;
  --teal-soft:     #DFF4F5;
  --night:         #0F1B2E;
  --yellow:        #FFC857;
  --green:         #2A9D6F;

  /* ─── INK: an accent used as TEXT, never as a fill ───────────────
     Taken verbatim from the app's css/branding.css, where each value
     is measured against white, --surface-2 and its own -soft ground.
     An accent used as a fill and an accent used as text are two
     different colours: #FF6A1A as text on white is only 2.84:1.
     ⚠ These are not fills. Do not paint anything with them. */
  --orange-ink:  #A8380A;   /* on --orange-soft 5.34:1, on white 6.49:1 */
  --teal-ink:    #14595C;   /* on --teal-soft   7.04:1, on white 8.04:1 */
  --gold-ink:    #8A5A00;   /* on --gold-soft   5.37:1                  */
  --blue-ink:    #0F55A8;   /* on --blue-soft   6.02:1                  */
  --violet-ink:  #5D2A9E;   /* on --violet-soft 7.42:1                  */
  --green-ink:   #0B5B3C;   /* on --green-soft  6.92:1                  */
  --red-ink:     #A32D2D;   /* on --red-soft    5.81:1                  */

  /* ─── The palette, extended ─────────────────────────────────── */
  --gold:        #FFC857;   /* was --yellow; --yellow kept as an alias  */
  --gold-soft:   #FFF3D6;
  --blue:        #2F7BD1;
  --blue-soft:   #DCEBFE;
  --violet:      #8B5CD6;
  --violet-soft: #EDE3FC;
  --green-soft:  #DEF1E6;   /* was a raw hex in three rules             */
  --red:         #E63946;
  --red-soft:    #FCE3E5;

  /* ─── MEMBER COLOURS ─────────────────────────────────────────
     The eight identity colours the app assigns to family members,
     copied from branding.css so the swatches on the Calendar page
     are literally the product's own. -bg is the fill, -fg the ink
     and the edge. Every pair is 5.90:1 or better.
     Used on the Calendar page's colour key and nowhere else — these
     are identity, not decoration. Do not reach for one because it
     looks nice in a card. */
  --member-1-bg:#FBE3E3; --member-1-fg:#99242A;
  --member-2-bg:#FCE9D6; --member-2-fg:#8A480C;
  --member-3-bg:#F2F0CB; --member-3-fg:#5B5406;
  --member-4-bg:#DDF2DB; --member-4-fg:#216018;
  --member-5-bg:#D6F0F0; --member-5-fg:#08565A;
  --member-6-bg:#DCEBFE; --member-6-fg:#0F55A8;
  --member-7-bg:#EDE3FC; --member-7-fg:#5D2A9E;
  --member-8-bg:#FBE2F3; --member-8-fg:#93186F;

  /* ─── PLACEHOLDER ─────────────────────────────────────────────
     Every image slot on the site until the screenshots are shot.
     The app's --page-backdrop, which is the warm grey the desktop
     letterbox already uses. */
  --ph:        #DBD6CA;
  --ph-2:      #CFC9BB;   /* the hatch stripe                          */
  --ph-ink:    #6B6F76;   /* the glyph inside a placeholder; decorative
                             only (3.48:1 on --ph) — the accessible
                             label is the figcaption, which sits on the
                             page ground at 4.55:1 */

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 32px;

  --font: 'Axiforma', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;

  --shadow-sm: 0 2px 6px rgba(15,27,46,.05), 0 0 0 1px rgba(15,27,46,.04);
  --shadow-md: 0 12px 32px -8px rgba(15,27,46,.12), 0 4px 10px -4px rgba(15,27,46,.06);
  --shadow-lg: 0 32px 80px -20px rgba(15,27,46,.25), 0 12px 28px -12px rgba(15,27,46,.12);
}

/* ═══════════ THE ACCENT SYSTEM ═══════════
   Four pages, four accents, one mechanism. inc/head.php puts
   accent-orange | accent-teal | accent-gold | accent-blue on <body>
   from the page registry in inc/config.php.

   THE RULE, and it is not negotiable:
   The accent TINTS the page. ORANGE IS ALWAYS THE ACTION.
   .btn-primary, the CTA band, ::selection and every link that leads
   somewhere stay ember on all four pages, so "the orange thing is
   the thing to press" survives the split.

   --accent      a fill or a stroke. Never text on a light ground.
   --accent-soft a tint ground.
   --accent-ink  text or a glyph sitting on --accent-soft or white.
   ═══════════════════════════════════════════════════════════ */
:root,
body.accent-orange { --accent:#FF6A1A; --accent-soft:#FFE4D2; --accent-ink:#A8380A; }
body.accent-teal   { --accent:#4FC3C8; --accent-soft:#DFF4F5; --accent-ink:#14595C; }
body.accent-gold   { --accent:#FFC857; --accent-soft:#FFF3D6; --accent-ink:#8A5A00; }
body.accent-blue   { --accent:#2F7BD1; --accent-soft:#DCEBFE; --accent-ink:#0F55A8; }

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin:0; padding:0; }
html { scroll-padding-top: 80px; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  font-family: var(--font);
  font-weight: 400;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  font-size: 17px;
  text-rendering: optimizeLegibility;
}
img { max-width:100%; display:block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--orange); color: #fff; }

/* ─── Layout ─── */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.wrap-narrow { max-width: 820px; margin: 0 auto; padding: 0 28px; }
section { padding: 92px 0; }
@media (max-width: 720px) {
  section { padding: 64px 0; }
  body { font-size: 16px; }
  .wrap, .wrap-narrow { padding: 0 20px; }
}

/* ─── Type ─── */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.08; margin: 0; color: var(--ink); }
h1 { font-size: clamp(40px, 6vw, 76px); font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: clamp(30px, 4.2vw, 52px); letter-spacing: -0.028em; }
h3 { font-size: clamp(22px, 2.4vw, 28px); }
h4 { font-size: 18px; font-weight: 600; }
p  { margin: 0; color: var(--ink-2); }
.lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); line-height: 1.55; text-wrap: pretty; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent-ink); padding: 6px 12px; border-radius: 100px;
  background: var(--accent-soft);
}
/* .eyebrow.teal deleted — the page's accent class does that job now. */
.eyebrow.ink  { color: var(--ink-2); background: var(--bg-warm); }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 26px;
  border-radius: 100px;
  font-weight: 600; font-size: 16px;
  border: 1.5px solid transparent;
  transition: transform .12s, background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-dark { background: var(--night); color: #fff; }
.btn-dark:hover { background: #1c2c47; }
.btn svg { width: 18px; height: 18px; }

/* ─── Nav ─── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245,243,238,.85);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, background .2s;
}
.nav.scrolled { border-color: var(--line); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 8px; object-fit: cover;
  box-shadow: 0 2px 8px rgba(216,84,16,.25);
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 15px; font-weight: 500; color: var(--ink-2); transition: color .15s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.nav-cta .btn { height: 42px; padding: 0 18px; font-size: 14px; }
/* Current page. Subtle — this is a brochure, not an app. The rule sits
   on the baseline rather than under the descenders, and it is ember on
   every page: the nav is chrome, not page content, so it does not take
   the accent. */
.nav-links a.is-current {
  color: var(--ink); font-weight: 600;
  position: relative;
}
.nav-links a.is-current::after {
  content: ''; position: absolute;
  left: 0; right: 0; bottom: -6px; height: 2px;
  border-radius: 2px;
  background: var(--orange);
}

/* ─── Nav: burger + mobile drawer (session 01) ───
   Below 820px .nav-links is display:none, so this drawer is the only
   navigation on a phone. Full-width panel sliding down under the
   sticky header, not a side sheet — the header is already sticky and
   a top drawer needs no scrim gymnastics.
   Session 02 may restyle these; the ids and classes are contracts
   with js/site.js and inc/nav.php. */
.nav-burger {
  display: none;
  place-items: center;
  width: 44px; height: 44px; padding: 0;   /* 44 is the minimum tap target */
  background: transparent;
  border: 1.5px solid var(--line-2);
  border-radius: 100px;
  color: var(--ink);
}
.nav-burger:hover { border-color: var(--ink); }
.nav-burger-bars { display: block; width: 18px; }
.nav-burger-bars span {
  display: block; height: 2px; border-radius: 2px;
  background: currentColor;
  transition: transform .18s, opacity .18s;
}
.nav-burger-bars span + span { margin-top: 4px; }
.nav-burger[aria-expanded="true"] .nav-burger-bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-burger[aria-expanded="true"] .nav-burger-bars span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] .nav-burger-bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Sibling of .nav, never a child — see the note in inc/nav.php. */
.nav-scrim {
  position: fixed; inset: 72px 0 0 0; z-index: 44;
  background: rgba(15,27,46,.25);
}
.nav-scrim[hidden] { display: none; }

.nav-drawer {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 45;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.nav-drawer[hidden] { display: none; }
.nav-drawer-inner { display: flex; flex-direction: column; padding-top: 10px; padding-bottom: 20px; }
.nav-drawer-link {
  display: flex; align-items: center;
  min-height: 52px; padding: 0 2px;
  font-size: 18px; font-weight: 600; color: var(--ink);
}
.nav-drawer-link.is-current { color: var(--orange-ink); }  /* 6.49:1 on --surface */
.nav-drawer-rule { width: 100%; height: 1px; margin: 10px 0; border: 0; background: var(--line); }
.nav-drawer-sub {
  display: block; padding: 10px 2px;
  font-size: 15px; font-weight: 500; color: var(--ink-2);
}
.nav-drawer-cta { margin-top: 16px; width: 100%; }

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-burger { display: grid; }
  /* The desktop Log in button lives in the drawer on a phone. */
  .nav-cta .btn-ghost { display: none; }
}
@media (min-width: 821px) {
  .nav-scrim, .nav-drawer { display: none; }
}

/* The drawer itself cannot transition — it is toggled with [hidden],
   and display:none is not animatable. Only the burger morph moves, so
   that is all there is to gate. If a slide is ever wanted, animate a
   wrapper's max-height; do not try to transition from [hidden]. */
@media (prefers-reduced-motion: reduce) {
  .nav-burger-bars span { transition: none; }
}
