/* Grounded Family: warm paper, the sun's four shades, the family on the ground. */
:root {
  --page: #fbf3e2;
  --paper: #fffaf0;
  --ink: #2a1a10;
  --muted: #6f5a48;
  --line: #e7d8bb;
  --sun: #f1ab56;
  --rim: #c3895a;
  --q1: #f6c37f; /* Coaching */
  --q2: #f3b466; /* Community */
  --q3: #ec9e44; /* Common Ground */
  --q4: #e48d34; /* Camaraderie */
  --grass: #1b6a2d;
  --band: #2d1f17;
  --btn: #2d1f17;
  --btn-ink: #fff8ec;
  --focus: #2d1f17;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #1e1915; --paper: #28211b; --ink: #f3e9dc; --muted: #bba891; --line: #3d332a;
    --btn: #f1ab56; --btn-ink: #2a1a10; --focus: #f1ab56;
  }
}
:root[data-theme="dark"] {
  --page: #1e1915; --paper: #28211b; --ink: #f3e9dc; --muted: #bba891; --line: #3d332a;
  --btn: #f1ab56; --btn-ink: #2a1a10; --focus: #f1ab56;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 17px/1.6 "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 3px;
}
h1, h2, h3, .wordmark { font-family: "Josefin Sans", "Nunito Sans", sans-serif; letter-spacing: .02em; line-height: 1.15; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 600; margin: 0 0 .4em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 600; margin: 0 0 .5em; }
h3 { font-size: 1.3rem; font-weight: 600; margin: 0 0 .35em; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--page) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 34px; height: 34px; }
.wordmark { font-size: 1.05rem; letter-spacing: .22em; text-transform: uppercase; font-weight: 600; }
/* "Fam" leads, "ily" steps back: a quiet nod to groundedfam.com. */
.wordmark .fam { font-weight: 700; }
.wordmark .ily { font-weight: 400; opacity: .55; }
.nav { display: flex; gap: 18px; align-items: center; font-size: .95rem; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.nav .nav-parts { display: flex; gap: 18px; }
@media (max-width: 720px) { .nav .nav-parts { display: none; } }

.btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 22px; font: 700 1rem "Nunito Sans", sans-serif; background: var(--btn); color: var(--btn-ink); text-decoration: none; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.small { padding: 8px 16px; font-size: .9rem; }

/* hero: the logo, split into its four quarters */
.hero { padding: 56px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; text-align: center; } .hero .ctas { justify-content: center; } }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 34em; }
@media (max-width: 860px) { .hero p.lead { margin-left: auto; margin-right: auto; } }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.logo-stage { position: relative; width: min(100%, 420px); aspect-ratio: 1 / 1.08; margin: 0 auto; }
.logo-stage svg.sun { position: absolute; inset: 0 0 auto 0; width: 100%; height: auto; overflow: visible; }
.logo-stage .q { transition: transform 1100ms cubic-bezier(.65,0,.25,1), fill 900ms ease; fill: var(--sun); }
.logo-stage.split .q1 { transform: translate(-7px, -7px); fill: var(--q1); }
.logo-stage.split .q2 { transform: translate(7px, -7px); fill: var(--q2); }
.logo-stage.split .q3 { transform: translate(-7px, 7px); fill: var(--q3); }
.logo-stage.split .q4 { transform: translate(7px, 7px); fill: var(--q4); }
/* Positions follow the app's launch: the family stands on the sun's lower half, the band sits under the grass. */
.logo-stage .family { position: absolute; left: 18.9%; width: 81.6%; top: 16.5%; }
.logo-stage .grass { position: absolute; left: 0; right: 0; top: 79.2%; height: 2.4%; background: var(--grass); }
.logo-stage .band { position: absolute; left: 0; right: 0; top: 81.3%; height: 12.3%; display: grid; place-items: center; background: var(--band); color: #fff; font: 400 clamp(.85rem, 2.4vw, 1.15rem)/1 "Josefin Sans", sans-serif; letter-spacing: .34em; padding-left: .34em; }
.hero .northstar { margin-top: 26px; font-family: Georgia, "Times New Roman", serif; font-style: italic; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .logo-stage .q { transition: none; } }

/* sections */
section { padding: 64px 0; }
section.alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kicker { font: 700 .78rem "Nunito Sans", sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }

/* the four parts, laid out like the sun's quarters */
/* Hero, centred over the logo the story picks up. */
.hero .wrap.hero-center { display: block; text-align: center; max-width: 800px; }
.hero-center .lead { margin: 0 auto; }
.hero-center .ctas { justify-content: center; }

/* ---------- The story: the headline and logo, then the logo pins and becomes the four parts ---------- */
.story { position: relative; height: 380vh; border-bottom: 3px solid var(--grass); }
.nowrap { white-space: nowrap; }
.how-anchor { position: absolute; top: 34%; }
.story-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
/* The opening: the logo stands on a horizon across the whole page, and the words live in the ground below.
   --D is the sun's size; --hz0 is where the horizon (the logo's grass line) starts. */
.story-pin { --D: min(30svh, 300px, 68vw); --hz0: calc(70px + .855 * var(--D)); --ground: #221813; background: var(--page); }
.sky-sun { position: absolute; z-index: 1; left: 50%; width: var(--D); aspect-ratio: 1; margin-left: calc(var(--D) / -2);
  top: calc(var(--hz0) - .855 * var(--D)); transform-origin: 50% 85.5%; will-change: transform; }
/* The sunset: a warm glow on the horizon that swells and fades as the sun goes down. */
.sky-glow { position: absolute; z-index: 1; left: 0; right: 0; top: calc(var(--hz0) - 90vh); height: 90vh; opacity: 0; pointer-events: none;
  background: radial-gradient(ellipse 70% 60% at 50% 100%, rgba(236, 140, 60, .55), rgba(241, 171, 86, .22) 45%, transparent 75%); }
.sky-sun .disc { position: absolute; inset: 0; border-radius: 50%; background: var(--sun); box-shadow: inset 0 0 0 1.5px var(--rim); }
.sky-sun img { position: absolute; left: 18.9%; top: 17.7%; width: 81.6%; }
.ground { position: absolute; z-index: 2; left: 0; right: 0; top: var(--hz0); height: 420vh;
  /* The logo's band, carried out to both edges: a strip of lighter dirt under the grass, then the deeper ground. */
  background: linear-gradient(var(--band) calc(.132 * var(--D)), var(--ground) calc(.132 * var(--D)));
  border-top: calc(.026 * var(--D)) solid var(--grass); will-change: transform; }
/* Short, quiet tufts along the horizon, like the few in the logo. */
.ground::before { content: ""; position: absolute; left: 0; right: 0; height: 8px; pointer-events: none;
  top: calc(-.026 * var(--D) - 7px);
  background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='137' height='8' viewBox='0 0 137 8'><path fill='%23237a37' d='M58.6 8 60.0 5.6 60.2 8ZM60.2 8 61.3 4.0 61.8 8ZM61.8 8 62.2 5.2 63.4 8Z'/></svg>") repeat-x 37px 100% / 137px 8px,
              url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='211' height='8' viewBox='0 0 211 8'><path fill='%231b6a2d' d='M15.6 8 17.0 5.0 17.2 8ZM17.2 8 18.3 3.0 18.8 8ZM18.8 8 19.2 4.5 20.4 8Z'/><path fill='%23145424' d='M93.6 8 95.0 5.9 95.2 8ZM95.2 8 96.3 4.5 96.8 8ZM96.8 8 97.2 5.6 98.4 8Z'/><path fill='%231b6a2d' d='M147.6 8 149.0 4.7 149.2 8ZM149.2 8 150.3 2.5 150.8 8ZM150.8 8 151.2 4.2 152.4 8Z'/></svg>") repeat-x 0 100% / 211px 8px; }
/* The wordmark sits on the dirt, centred under the sun. */
.ground .g-band { position: absolute; z-index: 1; left: 0; right: 0; top: 0; height: calc(.132 * var(--D));
  color: #fff; display: grid; place-items: center; white-space: nowrap;
  font: 400 min(calc(.085 * var(--D)), 5.4vw)/1 "Josefin Sans", sans-serif; letter-spacing: .34em; padding-left: .34em; overflow: hidden; }
.ground .g-band span { display: block; will-change: transform; }
.story-hero {
  position: absolute; z-index: 4; left: 50%; top: calc(var(--hz0) + .158 * var(--D)); padding-top: 44px; transform: translateX(-50%); transform-origin: 50% 0;
  width: min(820px, calc(100% - 32px)); text-align: center; will-change: opacity, transform;
  /* The ground's own colour: the logo hides behind the words at first and rises out from under them. */
  padding-bottom: 44px; color: #f8efe2;
  /* Solid behind the words, with a short soft edge: the sun comes out from under it as the part that has set. */
  --f: 36px;
  background: linear-gradient(to bottom, var(--ground) calc(100% - var(--f)), rgba(34, 24, 19, .6) calc(100% - var(--f) * .5), transparent);
}
.story-hero h1 { font-size: min(3.3rem, 5.5vw); white-space: nowrap; margin: 0 0 .4em; }   /* one line */
.story-hero .lead { font-size: clamp(1rem, 1.6vw, 1.18rem); color: #cdb89f; max-width: 40em; margin: 0 auto; }
.story-hero .ctas { justify-content: center; margin-top: 16px; }
.story-hero .btn { background: #f1ab56; color: #2a1a10; }
.story-hero .btn.ghost { background: transparent; color: #f8efe2; box-shadow: inset 0 0 0 1.5px rgba(248, 239, 226, .35); }
.story-hero a:focus-visible { outline-color: #f1ab56; }
.story-head {
  position: absolute; top: 66px; left: 16px; right: 16px; height: 64px;
  display: grid; place-content: center; text-align: center; opacity: 0; will-change: opacity, transform; z-index: 4; color: #f8efe2;
}
.story-head .kicker { margin-bottom: 2px; color: #c4ad93; }
.story-head h2 { margin: 0; font-size: clamp(1.1rem, 2.6vw, 1.7rem); }
.stage {
  --gap: 12px;
  --S: min(calc(100svh - 196px), 92vw, 760px);
  position: absolute; left: 50%; width: var(--S); height: var(--S);
  top: calc(132px + (100svh - 148px - var(--S)) / 2); margin-left: calc(var(--S) / -2);
  container-type: inline-size; transform-origin: 50% 19%; will-change: transform, opacity; z-index: 3;
}
/* A warm glow behind the sun that blooms as the logo arrives. */
.stage .glow { position: absolute; left: 4%; top: 4%; width: 92%; height: 92%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(241,171,86,.55) 0%, rgba(241,171,86,.18) 38%, transparent 66%); opacity: 0; }
/* Each quarter's finished place: together they make the sun, with seams between. */
.q {
  position: absolute; width: calc((100% - var(--gap)) / 2); aspect-ratio: 1 / 1;
  container-type: inline-size; overflow: hidden; color: #2a1a10;
  background: var(--sun); will-change: transform;
  --words: 0;
}
.q1 { left: 0; top: 0; border-top-left-radius: 100%; transform-origin: 100% 100%; }
.q2 { right: 0; top: 0; border-top-right-radius: 100%; transform-origin: 0 100%; }
.q3 { left: 0; bottom: 0; border-bottom-left-radius: 100%; transform-origin: 100% 0; }
.q4 { right: 0; bottom: 0; border-bottom-right-radius: 100%; transform-origin: 0 0; }
/* The arc: an invisible float shaped like everything outside the curve, so lines stop inside it. */
.q .arc { width: 100%; height: 100cqw; shape-margin: 4cqw; }
.q1 .arc { float: left; shape-outside: radial-gradient(circle at 100% 100%, transparent 100cqw, #000 100cqw); }
.q2 .arc { float: right; shape-outside: radial-gradient(circle at 0 100%, transparent 100cqw, #000 100cqw); }
.q3 .arc { float: left; shape-outside: radial-gradient(circle at 100% 0, transparent 100cqw, #000 100cqw); }
.q4 .arc { float: right; shape-outside: radial-gradient(circle at 0 0, transparent 100cqw, #000 100cqw); }
/* Right-aligned quarters: stop the float short of the straight edge (circle still centred on the corner),
   otherwise Chrome lets the lines run into the padding beside it. */
.q1 .arc { width: calc(100% - 7cqw); shape-outside: radial-gradient(circle at calc(100% + 7cqw) 100%, transparent 100cqw, #000 100cqw); }
.q3 .arc { width: calc(100% - 7cqw); shape-outside: radial-gradient(circle at calc(100% + 7cqw) 0, transparent 100cqw, #000 100cqw); }
.q .body {
  padding: 7cqw; font-size: clamp(.78rem, 3.9cqw, 1.02rem); line-height: 1.45;
  opacity: var(--words); transform: translateY(calc((1 - var(--words)) * 14px));
}
/* What each part is for: a short aim, then what it does, flowing inside the curve. */
.q .aim { font: 600 clamp(.86rem, 4.5cqw, 1.2rem)/1.25 "Josefin Sans", sans-serif; margin: 0 0 .5em; color: #2a1a10; }
.q .desc { margin: 0 0 .5em; }
.q1 .body, .q2 .body { padding-top: 16cqw; }
.q3 .body, .q4 .body { padding-top: 7cqw; }
/* Common Ground: icon beside a two-line name, so the name sits level with Camaraderie and the words fit the curve. */
/* Both top-aligned, then the icon drops by half the difference, so it sits on the centre of the two lines. */
.q3 .icon { vertical-align: top; margin-right: 3cqw; margin-top: calc(1.02 * clamp(1rem, 7.4cqw, 2.6rem) - 6.5cqw); }
.q3 h3 { display: inline-block; vertical-align: top; text-align: left; margin: 0 0 .25em; }
.q1 .body, .q3 .body { text-align: right; }
.q .icon { display: inline-block; width: 13cqw; height: 13cqw; vertical-align: bottom; overflow: visible; }
.q h3 { font: 700 clamp(1rem, 7.4cqw, 2.6rem)/1.02 "Josefin Sans", sans-serif; text-transform: uppercase; letter-spacing: .03em; margin: .15em 0 .35em; }
.q .desc { color: #4a3424; margin: 0 0 .6em; }

/* ---------- Live app cards: a glimpse of each part, tucked into the corner by the sun's centre ---------- */
.q .card {
  position: absolute; width: 72cqw; padding: 3.2cqw 3.6cqw; border-radius: 4cqw;
  font-size: max(10px, 3.5cqw); line-height: 1.3; color: #2a1a10;
  background: rgba(255, 251, 243, .74); border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: 0 2.4cqw 6cqw rgba(110, 55, 10, .18), inset 0 1px 0 rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: blur(8px) saturate(1.2); backdrop-filter: blur(8px) saturate(1.2);
  opacity: var(--words); transform: translateY(calc((1 - var(--words)) * 18px)) scale(calc(.94 + var(--words) * .06));
  transition: box-shadow .3s ease, translate .3s ease;
}
.q1 .card { right: 6cqw; bottom: 6cqw; } .q2 .card { left: 6cqw; bottom: 6cqw; }
.q3 .card { right: 6cqw; top: 6cqw; }    .q4 .card { left: 6cqw; top: 6cqw; }
.q:hover .card { translate: 0 -3px; box-shadow: 0 3.6cqw 8cqw rgba(110, 55, 10, .26), inset 0 1px 0 rgba(255, 255, 255, .8); }
.card .c-label { display: flex; align-items: center; gap: .5em; font: 700 .72em "Nunito Sans", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #7a5532; }
.card .dot { width: .7em; height: .7em; border-radius: 50%; background: #2f9a4a; }
.live .card .dot { animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(47, 154, 74, .5); } 80%, 100% { box-shadow: 0 0 0 .6em rgba(47, 154, 74, 0); } }
.card .c-title { font: 600 1.12em/1.2 "Josefin Sans", sans-serif; margin: .25em 0 .1em; }
.card .c-sub { color: #6b4e34; font-size: .86em; }
.card .c-big { font: 600 1.25em/1.1 "Josefin Sans", sans-serif; }
.card .c-big b { font-variant-numeric: tabular-nums; font-size: 1.3em; }
.card .c-main { min-width: 0; }
/* Coaching: a check-in that taps itself. */
.c-coach .chips { display: flex; gap: .35em; margin-top: .5em; }
.c-coach .chip { display: inline-flex; align-items: center; gap: .25em; padding: .3em .6em; border-radius: 99px; font-size: .8em; font-weight: 700; white-space: nowrap;
  background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 1px rgba(122, 85, 50, .25); color: #5a3e26;
  transition: background .35s ease, color .35s ease, transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.c-coach .chip svg { width: 0; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: width .3s ease; }
.live .c-coach .chip.pick { background: #2d1f17; color: #fff8ec; box-shadow: none; transform: scale(1.06); transition-delay: .7s; }
.live .c-coach .chip.pick svg { width: 1em; transition-delay: .8s; }
/* Community: an event card with a date block and a growing "I'd go". */
.c-event { display: flex; align-items: center; gap: .7em; }
.c-event .date { flex: none; width: 2.8em; border-radius: .6em; overflow: hidden; text-align: center; background: #fff; box-shadow: 0 1px 3px rgba(80, 40, 10, .15); }
.c-event .date small { display: block; background: #e48d34; color: #fff; font: 700 .62em/1.6 "Nunito Sans", sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.c-event .date b { display: block; font: 600 1.35em/1.35 "Josefin Sans", sans-serif; }
.c-event .c-main { flex: 1; }
.c-event .pill { flex: none; padding: .35em .65em; border-radius: 99px; font-size: .8em; font-weight: 700; white-space: nowrap;
  background: rgba(255, 255, 255, .75); box-shadow: inset 0 0 0 1px rgba(122, 85, 50, .25); transition: background .4s ease, color .4s ease; }
.live .c-event .pill { background: #1b6a2d; color: #fff; box-shadow: none; transition-delay: .5s; }
/* Common Ground: the circles drift together as the overlap grows. */
/* The Venn on the left, the shared things stacked beside it: a shorter card, closer to the others. */
.c-venn { display: flex; align-items: center; gap: 3cqw; padding-top: 2.4cqw; padding-bottom: 2.4cqw; }
.c-venn .venn { display: block; flex: 0 0 40cqw; width: 40cqw; height: auto; overflow: visible; }
.c-venn .kid { fill: rgba(236, 158, 68, .55); stroke: #c9782a; stroke-width: 1.2; }
.c-venn .you { fill: rgba(27, 106, 45, .28); stroke: #1b6a2d; stroke-width: 1.2; }
.c-venn .vl { font: 700 11px "Nunito Sans", sans-serif; fill: #5a3e26; letter-spacing: .04em; }
/* The shared things pop into the overlap one at a time. */
.c-venn .sh { opacity: 0; transform-box: fill-box; transform-origin: center; scale: .2; transition: opacity .3s ease, scale .5s cubic-bezier(.34, 1.56, .64, 1); }
.c-venn .s1 { opacity: 1; scale: 1; }
.live .c-venn .sh { opacity: 1; scale: 1; }
.live .c-venn .s2 { transition-delay: .55s; } .live .c-venn .s3 { transition-delay: 1.1s; }
.c-venn .bolt { fill: #f7c534; stroke: #2a1a10; stroke-width: 1; stroke-linejoin: round; }
.c-venn .ball { fill: #fffaf0; stroke: #2a1a10; stroke-width: 1; }
.c-venn .seam { fill: none; stroke: #c0392b; stroke-width: 1; }
.c-venn .brick, .c-venn .stud { fill: #d94a3a; stroke: #2a1a10; stroke-width: .9; }
.c-venn .shared { display: flex; flex-direction: column; align-items: flex-start; gap: .35em; margin: 0; }
.c-venn .chip { padding: .2em .6em; border-radius: 99px; font-size: .78em; font-weight: 700; white-space: nowrap; background: #2d1f17; color: #fff8ec;
  opacity: 0; translate: 0 4px; transition: opacity .3s ease, translate .4s cubic-bezier(.34, 1.56, .64, 1); }
.c-venn .chip.s1, .live .c-venn .chip { opacity: 1; translate: 0 0; }
.live .c-venn .chip.s2 { transition-delay: .6s; } .live .c-venn .chip.s3 { transition-delay: 1.15s; }
/* Camaraderie: faces join one by one. */
.c-people { display: flex; align-items: center; gap: .7em; }
.c-people .faces { display: flex; flex: none; }
.c-people .faces i { width: 2em; height: 2em; margin-left: -.6em; border-radius: 50%; display: grid; place-items: center; font: 700 .78em "Nunito Sans", sans-serif; font-style: normal; color: #fff; border: 2px solid #fffaf0;
  opacity: 0; transform: translateX(-6px) scale(.7); transition: opacity .35s ease, transform .45s cubic-bezier(.34, 1.56, .64, 1); }
.c-people .faces i:first-child { margin-left: 0; opacity: 1; transform: none; }
.c-people .faces i:nth-child(1) { background: #c0692a; }
.c-people .faces i:nth-child(2) { background: #1b6a2d; transition-delay: .15s; }
.c-people .faces i:nth-child(3) { background: #8a5a3a; transition-delay: .3s; }
.c-people .faces i:nth-child(4) { background: #d9902f; transition-delay: .45s; }
.live .c-people .faces i { opacity: 1; transform: none; }
/* Narrower quarters drop the sentence and keep the card. */
@container (max-width: 330px) {
  .q .d2 { display: none; }
  .q .card { width: 80cqw; font-size: max(9.5px, 3.9cqw); }
  .q1 .card, .q3 .card { right: 4cqw; } .q2 .card, .q4 .card { left: 4cqw; }
  .c-coach .chip:last-child { display: none; }
}

/* Small quarters (phones) keep just the icon and name; the words follow below the story. */
@container (max-width: 200px) {
  .q .desc, .q .aim, .q .card { display: none; }
  .q3 .body, .q4 .body { padding-top: 7cqw; }
  .q3 .body { padding-top: 7cqw; }
  .q .body { font-size: 1rem; }
  .q1 .body, .q2 .body { padding-top: 34cqw; }
  .q h3 { font-size: 9.4cqw; }
  .q .icon { width: 16cqw; height: 16cqw; }
}
/* The logo's frill, placed on the sun as it sits at the start (62% of the stage, centred). */
.stage .rim { position: absolute; left: 19%; top: 19%; width: 62%; height: 62%; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--rim); pointer-events: none; }
.stage .family { position: absolute; left: 30.7%; top: 30%; width: 50.6%; pointer-events: none; transform-origin: 50% 85%; }
/* The sun's centre sits 38.1% across and 45.8% down the family picture; --seam (set by the script) cuts the cross through it. */
.stage .family { --seam: 0px;
  -webkit-mask-image: linear-gradient(to right, #000 calc(38.1% - var(--seam) / 2), transparent 0, transparent calc(38.1% + var(--seam) / 2), #000 0),
                      linear-gradient(to bottom, #000 calc(45.8% - var(--seam) / 2), transparent 0, transparent calc(45.8% + var(--seam) / 2), #000 0);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, #000 calc(38.1% - var(--seam) / 2), transparent 0, transparent calc(38.1% + var(--seam) / 2), #000 0),
              linear-gradient(to bottom, #000 calc(45.8% - var(--seam) / 2), transparent 0, transparent calc(45.8% + var(--seam) / 2), #000 0);
  mask-composite: intersect; }
.stage .grass { position: absolute; left: 19%; width: 62%; top: 72%; height: 1.6%; background: var(--grass); transform-origin: 50% 0; }
.stage .band { position: absolute; left: 19%; width: 62%; top: 73.4%; height: 8.2%; display: grid; place-items: center; background: var(--ground); color: #fff; font: 400 3.6cqw/1 "Josefin Sans", sans-serif; letter-spacing: .34em; padding-left: .34em; white-space: nowrap; transform-origin: 50% 0; }
.story-hint { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; margin: 0; font: 700 .72rem "Nunito Sans", sans-serif; letter-spacing: .2em; text-transform: uppercase; color: #c4ad93; z-index: 4; }
.story-hint::after { content: ""; display: block; width: 1px; height: 22px; margin: 6px auto 0; background: #c4ad93; }


/* Reduced motion: no pinning, just the finished sun. */
.story.still { height: auto; }
.story.still .story-pin { position: static; height: auto; overflow: visible; display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 76px 16px 48px; }
.story.still .story-hero, .story.still .story-head, .story.still .stage { position: static; transform: none; margin: 0; opacity: 1; }
.story.still .story-head { height: auto; }
.story.still .story-pin { background: var(--ground); }
.story.still .sky-sun, .story.still .sky-glow, .story.still .ground, .story.still .rim, .story.still .family, .story.still .grass, .story.still .band, .story.still .story-hint { display: none; }
.story.still .q1 { background: var(--q1); } .story.still .q2 { background: var(--q2); }
.story.still .q3 { background: var(--q3); } .story.still .q4 { background: var(--q4); }

/* The words for each part, shown under the story on phones only. */
.parts-list { display: none; padding: 8px 0 48px; }
.parts-list .pl { border-radius: 18px; padding: 16px 18px; margin-bottom: 10px; color: #2a1a10; }
.parts-list .pl h3 { margin: 0 0 .2em; font-size: 1.15rem; }
.parts-list .pl p { margin: 0; color: #4a3424; font-size: .97rem; }
.parts-list .c-venn { gap: 14px; justify-content: center; }
.parts-list .c-venn .venn { flex: 0 1 180px; width: 180px; margin: 0; }
.parts-list .pl .card { position: relative; width: auto; margin-top: 12px; font-size: 13px; padding: 10px 12px; border-radius: 14px; inset: auto; opacity: 1; transform: none; }
.parts-list .pl1 { background: var(--q1); } .parts-list .pl2 { background: var(--q2); }
.parts-list .pl3 { background: var(--q3); } .parts-list .pl4 { background: var(--q4); }
@media (max-width: 640px) { .parts-list { display: block; } .story { height: 340vh; } }
.parts-list .pl .aim { font: 600 1rem/1.3 "Josefin Sans", sans-serif; color: #2a1a10; margin: 0 0 .35em; }

/* promises */
.promises { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 24px; }
.promise { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
section.alt .promise { background: var(--page); }
.promise h3 { font-size: 1.08rem; }
.promise p { margin: 0; color: var(--muted); font-size: .97rem; }

/* join form */
form.join { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
@media (max-width: 640px) { form.join { grid-template-columns: 1fr; } }
form.join .full { grid-column: 1 / -1; }
label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 6px; }
input[type=text], input[type=email], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 13px;
}
textarea { min-height: 96px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 5px; }
.hidden { position: absolute; left: -9999px; }
.fine { font-size: .88rem; color: var(--muted); }

/* long-form pages */
.doc { padding: 48px 0 64px; }
.doc h2 { margin-top: 1.6em; font-size: 1.45rem; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: .45em; }
.doc table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .96rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 700; }
@media (max-width: 640px) { .doc table, .doc thead, .doc tbody, .doc tr, .doc th, .doc td { display: block; } .doc thead { display: none; } .doc td { border: 0; padding: 4px 0; } .doc tr { border-bottom: 1px solid var(--line); padding: 8px 0; } .doc td:first-child { font-weight: 700; } }

/* footer */
footer { padding: 36px 0 48px; border-top: 1px solid var(--line); font-size: .93rem; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
footer a { color: var(--muted); }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- The parts' icons come alive once their words are in ---------- */
/* Coaching: the bulb strobes on, then glows. */
.i-bulb .bulb { fill: transparent; }
.i-bulb .rays { opacity: 0; }
.live .i-bulb { animation: bulb-glow 3.6s ease-in-out infinite; }
.live .i-bulb .bulb { animation: bulb-fill 3.6s ease-in-out infinite; }
.live .i-bulb .rays { animation: bulb-rays 3.6s ease-in-out infinite; }
@keyframes bulb-fill { 0%, 3%, 7%, 11%, 88%, 100% { fill: transparent; } 5%, 9%, 14%, 80% { fill: #fff4c2; } }
@keyframes bulb-rays { 0%, 3%, 7%, 11%, 88%, 100% { opacity: 0; } 5%, 9%, 14%, 80% { opacity: 1; } }
@keyframes bulb-glow { 0%, 3%, 7%, 11%, 88%, 100% { filter: none; } 5%, 9% { filter: drop-shadow(0 0 4px rgba(255, 236, 160, .9)); }
  14%, 80% { filter: drop-shadow(0 0 7px rgba(255, 236, 160, .95)) drop-shadow(0 0 16px rgba(255, 210, 110, .7)); } 47% { filter: drop-shadow(0 0 4px rgba(255, 236, 160, .8)); } }
/* Community: the plan gets checked off, again and again. */
.i-cal .chk { stroke-dasharray: 12; stroke-dashoffset: 12; }
.live .i-cal .chk { animation: cal-check 2.8s ease-in-out infinite; }
.live .i-cal .rings { animation: cal-rings 2.8s ease-in-out infinite; }
@keyframes cal-check { 0%, 15% { stroke-dashoffset: 12; } 40%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -12; } }
@keyframes cal-rings { 0%, 100% { transform: none; } 10% { transform: translateY(-1px); } 20% { transform: none; } }
/* Common Ground: the two circles lean into each other; the overlap shades in. */
.i-venn { transform-origin: 100% 50%; }
.i-venn circle { fill: rgba(42, 26, 16, .08); }
.i-venn .mid { fill: #f7c534; stroke-width: 2.4; opacity: 0; }
.live .i-venn { animation: venn-grow 4.4s ease-in-out infinite; }
.live .i-venn .l { animation: venn-l 4.4s ease-in-out infinite; }
.live .i-venn .r { animation: venn-r 4.4s ease-in-out infinite; }
.live .i-venn .mid { animation: venn-mid 4.4s ease-in-out infinite; }
/* Lean in, then grow into a full-colour Venn with something shared in the middle, then shrink back. */
@keyframes venn-grow { 0%, 22% { transform: none; } 38%, 64% { transform: scale(2.1); } 80%, 100% { transform: none; } }
@keyframes venn-l { 0%, 100% { transform: none; fill: rgba(42, 26, 16, .08); } 16% { transform: translateX(1.4px); fill: rgba(42, 26, 16, .16); }
  38%, 64% { transform: translateX(1.4px); fill: rgba(236, 140, 50, .8); } 82% { transform: none; fill: rgba(42, 26, 16, .08); } }
@keyframes venn-r { 0%, 100% { transform: none; fill: rgba(42, 26, 16, .08); } 16% { transform: translateX(-1.4px); fill: rgba(42, 26, 16, .16); }
  38%, 64% { transform: translateX(-1.4px); fill: rgba(27, 106, 45, .55); } 82% { transform: none; fill: rgba(42, 26, 16, .08); } }
@keyframes venn-mid { 0%, 36%, 72%, 100% { opacity: 0; } 44%, 62% { opacity: 1; } }
/* Camaraderie: the parents wave hello, one after another. */
/* Camaraderie: 3 parents, then 6, then a row as wide as the title (built by the script), then back to 3. Each one bobs hello. */
.i-people .pb, .i-people .pc { opacity: 0; }
.live .i-people .pb { animation: crowd-b 6s ease-in-out infinite; }
.live .i-people .pc { animation: crowd-c 6s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes crowd-b { 0%, 16% { opacity: 0; transform: translateY(3px); } 22%, 84% { opacity: 1; transform: none; } 90%, 100% { opacity: 0; transform: translateY(3px); } }
@keyframes crowd-c { 0%, 38% { opacity: 0; transform: translateY(3px); } 44%, 84% { opacity: 1; transform: none; } 90%, 100% { opacity: 0; transform: translateY(3px); } }
.live .i-people .bob { animation: people-bob 2.4s ease-in-out infinite; animation-delay: var(--b, 0s); }
@keyframes people-bob { 0%, 40%, 100% { transform: none; } 18% { transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .q .icon, .q .icon * { animation: none !important; } }
