/* =========================================================
   St. Louis Tutoring Co. — design system + components
   ========================================================= */

:root {
  /* Brand */
  --navy: #020C45;
  --gold: #EEBA2B;
  --royal: #0663C4;
  --cream: #FFF6E3;
  --white: #FFFFFF;
  --gold-tint: #FDF1CF;
  --sky: #BFDDF7;
  --brick: #D9573B;
  --sage: #A9C9A4;
  --ink-soft: #3A4170;

  /* Type */
  --f-display: "Bowlby One", "Rubik", "Arial Black", system-ui, sans-serif;
  --f-script: "Yellowtail", "Brush Script MT", cursive;
  --f-body: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Fluid scale: min + delta * ((100vw - 375px) / 1305), clamped 375 → 1680 */
  --fluid: ((100vw - 375px) / 1305);
  --fs-h1: clamp(48px, calc(48px + 36 * var(--fluid)), 84px);
  --fs-h2: clamp(34px, calc(34px + 22 * var(--fluid)), 56px);
  --fs-h3: clamp(21px, calc(21px + 7 * var(--fluid)), 28px);
  --fs-body: clamp(17px, calc(17px + 2 * var(--fluid)), 19px);
  --fs-small: clamp(14px, calc(14px + 1 * var(--fluid)), 15px);
  --fs-btn: clamp(14px, calc(14px + 3 * var(--fluid)), 17px);

  --sp-xs: clamp(8px, calc(8px + 4 * var(--fluid)), 12px);
  --sp-s: clamp(12px, calc(12px + 8 * var(--fluid)), 20px);
  --sp-m: clamp(20px, calc(20px + 16 * var(--fluid)), 36px);
  --sp-l: clamp(40px, calc(40px + 40 * var(--fluid)), 80px);
  --sp-xl: clamp(72px, calc(72px + 78 * var(--fluid)), 150px);
  --gutter: clamp(16px, calc(16px + 48 * var(--fluid)), 64px);

  --r-s: clamp(14px, calc(14px + 6 * var(--fluid)), 20px);
  --r-m: clamp(24px, calc(24px + 12 * var(--fluid)), 36px);
  --r-tile: clamp(28px, calc(28px + 12 * var(--fluid)), 40px);
  --r-card: clamp(40px, calc(40px + 20 * var(--fluid)), 60px);
  --r-card-hover: clamp(20px, calc(20px + 8 * var(--fluid)), 28px);

  --shadow-c: var(--navy);
  --ease: cubic-bezier(.4, 0, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.is-locked { overflow: hidden; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font: 400 var(--fs-body)/1.6 var(--f-body);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 400;
  line-height: 1.04;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { margin: 0; }
a { color: var(--royal); }
button { font: inherit; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--royal);
  outline-offset: 3px;
}
.on-dark :focus-visible { outline-width: 4px; outline-color: var(--royal); box-shadow: 0 0 0 7px var(--white); }

.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;
}
.skip {
  position: fixed; left: 12px; top: -80px; z-index: 300;
  background: var(--gold); color: var(--navy); padding: 10px 18px; border-radius: 999px;
  border: 3px solid var(--royal); font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { max-width: 1320px; margin-inline: auto; }
.section { padding: var(--sp-xl) var(--gutter); }
.center { text-align: center; }
.lede { color: var(--ink-soft); max-width: 46ch; }
.center .lede { margin-inline: auto; }

/* Script accents. Gold script only appears on navy/royal (rule: never gold on cream). */
.script {
  font-family: var(--f-script);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--royal);
  font-size: 1.14em;
  line-height: .9;
  padding-right: .06em;
}
.on-dark .script, .script--gold { color: var(--gold); }
/* A navy "sticker tag" so the gold script can sit on light backgrounds */
.script-tag {
  display: inline-block;
  font-family: var(--f-script);
  font-size: 1.08em;
  line-height: 1;
  color: var(--gold);
  background: var(--navy);
  padding: .06em .34em .16em .28em;
  border-radius: .32em;
  box-shadow: .07em .07em 0 var(--royal);
  transform: rotate(-3deg);
  white-space: nowrap;
}

.eyebrow {
  display: inline-block;
  font: 700 var(--fs-small)/1 var(--f-body);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--brick);
  padding: .55em 1em;
  border-radius: 999px;
  border: 2px solid var(--navy);
  transform: rotate(-2deg);
}

/* ---------- Buttons (sticker) ---------- */
.btn {
  --lift: 4px;
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  font: 400 var(--fs-btn)/1 var(--f-display);
  text-transform: uppercase;
  letter-spacing: .08em;
  text-decoration: none;
  padding: 1.05em 1.75em;
  border-radius: 999px;
  border: 3px solid var(--royal);
  box-shadow: var(--lift) var(--lift) 0 var(--shadow-c);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease, color 120ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { --lift: 6px; transform: translate(-2px, -2px); }
.btn:active { --lift: 0px; transform: translate(4px, 4px); }
.btn--primary { background: var(--gold); color: var(--navy); }
.btn--secondary { background: var(--navy); color: var(--gold); }
.btn--secondary:hover { background: var(--royal); }
.btn--sm { padding: .85em 1.3em; font-size: clamp(13px, calc(13px + 2 * var(--fluid)), 15px); }
.on-dark { --shadow-c: var(--royal); }
.on-dark .btn--primary { border-color: var(--royal); }
.btn svg { width: 1.1em; height: 1.1em; }

/* Glassy round + pill nav controls */
.round, .pill {
  display: inline-grid; place-items: center;
  height: 50px;
  border: 0;
  background: rgba(255, 255, 255, .5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--navy);
  cursor: pointer;
  transition: background-color 150ms ease, box-shadow 150ms ease, transform 120ms ease;
}
.round { width: 50px; border-radius: 50%; padding: 0; }
.round svg { width: 22px; height: 22px; }
.pill {
  padding: 0 22px; border-radius: 999px; text-decoration: none;
  font: 400 14px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase;
}
.round:hover, .pill:hover { background: rgba(255, 255, 255, .88); box-shadow: inset 0 0 0 3px var(--royal); }
.round:active, .pill:active { transform: scale(.94); }
.round--white { background: var(--white); }
.pill--gold { background: var(--gold); box-shadow: inset 0 0 0 3px var(--royal); }
.pill--gold:hover { background: var(--gold); box-shadow: inset 0 0 0 3px var(--royal), 4px 4px 0 var(--royal); }
.dots { font-size: 22px; letter-spacing: 1px; line-height: 1; transform: translateY(-3px); }

/* ---------- Progress bar ---------- */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 6px; z-index: 400;
  background: var(--gold);
  transform: scaleX(0); transform-origin: 0 50%;
  opacity: 0; pointer-events: none;
  transition: transform 400ms var(--ease), opacity 300ms ease;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: var(--sp-xs) var(--gutter);
  transition: transform 350ms var(--ease), box-shadow 350ms ease, background-color 350ms ease;
}
.nav.is-hidden { transform: translateY(-115%); }
.nav.is-scrolled {
  background: rgba(255, 246, 227, .78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px -12px rgba(2, 12, 69, .35);
}
.nav__logo { display: block; border-radius: 12px; flex-shrink: 0; }
.nav__logo img { height: clamp(46px, calc(46px + 22 * var(--fluid)), 68px); width: auto; }
.nav__actions { display: flex; align-items: center; gap: 10px; }
@media (max-width: 400px) { #nav .pill { display: none; } .overlay__top .nav__logo img { height: 40px; } .overlay__top .nav__actions { gap: 6px; } }

/* ---------- Page container (transitions) ---------- */
#main { transition: opacity 240ms ease; }
#main:focus { outline: none; }
#main.is-leaving, #main.is-entering { opacity: 0; }

/* ---------- Scroll reveal ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 650ms var(--ease), transform 650ms var(--ease);
  transition-delay: var(--d, 0ms);
}
.js [data-reveal].in { opacity: 1; transform: none; }
.js [data-reveal="pop"] { transform: rotate(var(--rot, 0deg)) scale(.3); transition: none; }
.js [data-reveal="pop"].in { animation: pop 750ms var(--d, 0ms) both; }
@keyframes pop {
  0%   { opacity: 0; transform: rotate(var(--rot)) scale(.3) translateY(30px); }
  55%  { opacity: 1; transform: rotate(var(--rot)) scale(1.12) translateY(-6px); }
  75%  { transform: rotate(var(--rot)) scale(.95); }
  100% { opacity: 1; transform: rotate(var(--rot)) scale(1); }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  /* time-of-day palette (overridden per data-tod) */
  --sky-c: #BFDDF7; --band-c: #FDF1CF; --far-c: #FFFFFF; --win-c: #BFDDF7;
  --sun-c: #EEBA2B; --sun-x: 1450px; --sun-y: 300px; --sun-r: 1; --sun-o: 1;
  --moon-o: 0; --moon-x: 1430px; --moon-y: 160px;
  --cloud-c: #FFFFFF; --cloud-o: 1; --dim: 0; --lit: 0; --star-o: 0;

  --scene-h: 62svh;
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column;
  background: var(--cream);
}
.hero[data-tod="midday"] {
  --sky-c: #0663C4; --band-c: #BFDDF7; --far-c: #BFDDF7; --win-c: #BFDDF7;
  --sun-x: 1360px; --sun-y: 120px;
}
.hero[data-tod="afternoon"] {
  --sky-c: #EEBA2B; --band-c: #D9573B; --far-c: #FDF1CF; --win-c: #FDF1CF;
  --sun-c: #FFF6E3; --sun-x: 1470px; --sun-y: 470px; --sun-r: 1.5;
  --cloud-c: #FFF6E3; --cloud-o: .9; --dim: .06; --lit: .35;
}
.hero[data-tod="evening"] {
  --sky-c: #020C45; --band-c: #0663C4; --far-c: #3A4170; --win-c: #3A4170;
  --sun-o: 0; --moon-o: 1; --cloud-o: .12; --dim: .38; --lit: 1; --star-o: 1;
}
.hero[data-tod="night"] {
  --sky-c: #01061F; --band-c: #020C45; --far-c: #3A4170; --win-c: #3A4170;
  --sun-o: 0; --moon-o: 1; --moon-x: 1250px; --moon-y: 110px;
  --cloud-o: .06; --dim: .55; --lit: 1; --star-o: 1;
}

.hero__scene {
  --scene-w: max(100%, calc(var(--scene-h) * 1.7778));
  position: relative;
  height: var(--scene-h);
  min-height: 360px;
  overflow: hidden;
  background: var(--sky-c);
  border-bottom: 3px solid var(--navy);
  transition: background-color 600ms ease;
}
.hero__scene svg {
  position: absolute; bottom: 0;
  height: 100%;
  width: var(--scene-w);
  max-width: none;
  /* keep the Arch + clock tower in view on narrow screens */
  left: clamp(calc(100% - var(--scene-w)), calc(50% - var(--scene-w) * .66), 0px);
}
.scene .sky { fill: var(--sky-c); transition: fill 600ms ease; }
.scene .band { fill: var(--band-c); }
.scene .far { fill: var(--far-c); }
.scene .win { fill: var(--win-c); }
.scene .lit { fill: var(--gold); opacity: var(--lit); }
.scene .dim { fill: var(--navy); opacity: var(--dim); pointer-events: none; }
.scene .stars { opacity: var(--star-o); }
.scene .clouds { fill: var(--cloud-c); opacity: var(--cloud-o); }
.scene .sun {
  fill: var(--sun-c); opacity: var(--sun-o);
  transform-box: view-box;
  transform: translate(var(--sun-x), var(--sun-y)) scale(var(--sun-r));
}
.scene .moon { opacity: var(--moon-o); transform-box: view-box; transform: translate(var(--moon-x), var(--moon-y)); }
.scene .moon .bite { fill: var(--sky-c); }
.scene .twinkle { animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .35; } }

/* Live clock */
.clock-hand {
  transform-box: view-box;
  transform-origin: 890px 425px;
  transition: transform 450ms cubic-bezier(.1, 2.7, .58, 1);
}
.clock-hand.no-anim { transition: none; }

.hero__copy {
  position: relative; z-index: 2;
  padding: 0 var(--gutter) var(--sp-l);
  margin-top: -64px;
}
.blob {
  position: relative;
  background: var(--cream);
  border: 3px solid var(--royal);
  box-shadow: 6px 6px 0 var(--navy);
  border-radius: 46px 58px 50px 42px / 52px 44px 56px 48px;
  padding: var(--sp-m) var(--sp-m) calc(var(--sp-m) + 6px);
  max-width: 640px;
  margin-inline: auto;
}
.blob .eyebrow { margin-bottom: var(--sp-s); }
.blob h1 { margin-bottom: var(--sp-s); }
.blob h1 .script-tag { margin-top: .12em; }
.blob .lede { margin-bottom: var(--sp-m); }

@media (min-width: 1100px) {
  /* Copy sits in normal flow: always clears the fixed nav, centres when there's room,
     and the hero grows taller instead of overlapping on short windows. */
  .hero { --scene-h: 100svh; justify-content: center; }
  .blob h1 { font-size: min(var(--fs-h1), 5vw, 8.6svh); }
  .hero__scene { position: absolute; inset: 0; height: auto; border-bottom: 0; }
  .hero__scene svg { left: clamp(calc(100% - var(--scene-w)), calc(50% - var(--scene-w) * .5), 0px); }
  .hero__copy {
    position: relative; z-index: 2;
    margin: 0;
    padding: calc(clamp(46px, calc(46px + 22 * var(--fluid)), 68px) + 2 * var(--sp-xs) + var(--sp-m)) 0 var(--sp-l) var(--gutter);
    width: calc(min(50vw, 900px) + var(--gutter));
  }
  .blob {
    margin: 0;
    max-width: none;
    padding: min(var(--sp-l), 7svh) var(--sp-l) calc(min(var(--sp-l), 7svh) + 4px);
    border-radius: 120px 160px 130px 110px / 120px 110px 150px 130px;
  }
}

/* =========================================================
   NAVY BAND
   ========================================================= */
.band {
  background: var(--navy); color: var(--white);
  padding: var(--sp-l) var(--gutter);
}
.band__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: var(--sp-m); text-align: center;
}
.band p { font: 700 var(--fs-h3)/1.25 var(--f-body); max-width: 30ch; }
@media (min-width: 900px) { .band__inner { justify-content: space-between; text-align: left; } .band p { max-width: none; } }

/* =========================================================
   PROGRAM CARDS
   ========================================================= */
.section-head { margin-bottom: var(--sp-l); }
.section-head h2 { margin-bottom: var(--sp-s); }
.programs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: var(--sp-m) var(--sp-m);
}
.card {
  display: block;
  color: var(--navy);
  text-decoration: none;
  padding: 10px 10px 16px;
  border-radius: calc(var(--r-card) + 10px);
  transition: background-color 120ms ease;
  -webkit-tap-highlight-color: transparent;
  scroll-margin-top: 110px;
}
.card__art {
  aspect-ratio: 1.4;
  background: var(--bg, var(--gold));
  border-radius: var(--r-card);
  border: 3px solid transparent;
  overflow: hidden;
  transition: border-radius 250ms cubic-bezier(.4, 0, .2, 1), border-color 250ms cubic-bezier(.4, 0, .2, 1), box-shadow 250ms cubic-bezier(.4, 0, .2, 1);
}
.card__art svg { width: 100%; height: 100%; }
.card__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 6px 4px; }
.card__meta h3 { font-size: clamp(20px, calc(20px + 6 * var(--fluid)), 26px); }
.card__arrow { width: 30px; height: 30px; flex-shrink: 0; transition: transform 250ms cubic-bezier(.4, 0, .2, 1); }
.card__desc { margin: 0 6px; color: var(--ink-soft); font-size: var(--fs-small); }
.card:hover .card__art, .card:focus-visible .card__art {
  border-radius: var(--r-card-hover);
  border-color: var(--royal);
  box-shadow: 4px 4px 0 var(--navy);
}
.card:hover .card__arrow, .card:focus-visible .card__arrow { transform: translateX(6px); }
.card:active { background: var(--gold-tint); }
.card:focus-visible { outline-offset: 0; }

/* =========================================================
   WHERE WE MEET
   ========================================================= */
.ways { display: grid; gap: var(--sp-m); }
@media (min-width: 800px) { .ways { grid-template-columns: 1fr 1fr; } }
.way {
  background: var(--white);
  border: 3px solid var(--royal);
  border-radius: var(--r-card);
  box-shadow: 6px 6px 0 var(--navy);
  padding: 12px 12px var(--sp-m);
  display: grid; gap: var(--sp-xs); align-content: start;
}
.way__art { aspect-ratio: 400 / 280; border-radius: calc(var(--r-card) - 12px); overflow: hidden; border: 3px solid var(--navy); }
.way__art svg { width: 100%; height: 100%; }
.way h3 { margin: var(--sp-xs) var(--sp-s) 0; }
.way p { margin: 0 var(--sp-s); color: var(--ink-soft); }
.way .way__note { font-size: 13px; font-style: italic; }

/* =========================================================
   WHY US
   ========================================================= */
.why__grid { display: grid; gap: var(--sp-l); align-items: center; }
@media (min-width: 960px) { .why__grid { grid-template-columns: 1.05fr 1fr; } }
.why__copy > * + * { margin-top: var(--sp-m); }
.badges { display: flex; flex-wrap: wrap; gap: var(--sp-s); padding: var(--sp-s) 0; }
.badge {
  --rot: 0deg;
  width: clamp(128px, calc(128px + 42 * var(--fluid)), 170px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--gold);
  border: 3px solid var(--royal);
  box-shadow: 4px 4px 0 var(--navy);
  display: grid; place-content: center; text-align: center;
  transform: rotate(var(--rot));
  padding: 10px;
}
.badge strong { display: block; font: 400 clamp(28px, calc(28px + 12 * var(--fluid)), 40px)/1 var(--f-display); }
.badge span { font-weight: 700; font-size: var(--fs-small); line-height: 1.2; }
.why__art {
  background: var(--sky);
  border-radius: var(--r-card);
  border: 3px solid var(--royal);
  box-shadow: 6px 6px 0 var(--navy);
  overflow: hidden;
  aspect-ratio: 1.15;
}
.why__art svg { width: 100%; height: 100%; }

/* =========================================================
   TESTIMONIALS
   ========================================================= */
.stories { background: var(--sky); }
.carousel { position: relative; }
.carousel__track {
  display: flex; gap: var(--sp-m);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 8px 10px 18px;
  margin: 0 -10px;
  overscroll-behavior-x: contain;
}
.carousel__track::-webkit-scrollbar { display: none; }
.quote {
  flex: 0 0 min(86%, 460px);
  scroll-snap-align: start;
  background: var(--cream);
  border: 3px solid var(--royal);
  border-radius: var(--r-m);
  box-shadow: 4px 4px 0 var(--navy);
  padding: var(--sp-m);
  display: flex; flex-direction: column; gap: var(--sp-s);
}
.quote__mark {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--navy); color: var(--gold);
  font: 400 64px/1 var(--f-display);
  display: grid; place-items: center;
  padding-top: 28px;
  transform: rotate(-6deg);
}
.quote blockquote { margin: 0; font-size: clamp(18px, calc(18px + 4 * var(--fluid)), 22px); font-weight: 600; line-height: 1.45; flex: 1; }
.quote figcaption { color: var(--ink-soft); font-weight: 700; }
.carousel__dots { display: flex; justify-content: center; gap: 12px; margin-top: var(--sp-m); }
.carousel__dots button {
  width: 16px; height: 16px; border-radius: 50%; padding: 0; cursor: pointer;
  background: var(--white); border: 3px solid var(--royal);
  transition: background-color 200ms ease, transform 200ms var(--spring);
}
.carousel__dots button[aria-current="true"] { background: var(--gold); transform: scale(1.25); }

/* =========================================================
   BRAND BLOCK
   ========================================================= */
.brandblock {
  background: var(--navy); color: var(--white);
  text-align: center;
  padding: var(--sp-xl) var(--gutter) calc(var(--sp-xl) + 20px);
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-m);
}
.brandblock__logo { width: min(560px, 84vw); height: auto; }
.brandblock__tag { font-size: clamp(36px, calc(36px + 28 * var(--fluid)), 64px); line-height: 1.1; color: var(--gold); }
.underline-link {
  color: var(--white);
  font: 400 var(--fs-btn)/1 var(--f-display);
  letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none;
  padding-bottom: 6px;
  transition: box-shadow 200ms ease, color 200ms ease;
}
.underline-link:hover { box-shadow: 0 3px 0 0 var(--gold); }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  position: relative;
  background: var(--navy); color: var(--white);
  padding: 0 var(--gutter) var(--sp-m);
}
.footer__arch { width: 100%; height: clamp(80px, calc(80px + 50 * var(--fluid)), 130px); transform: translateY(-1px); }
.footer__arch path { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.footer__grid { display: grid; gap: var(--sp-l); padding: var(--sp-l) 0; }
@media (min-width: 860px) { .footer__grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer__logo img { width: 220px; height: auto; margin-bottom: var(--sp-s); }
.footer p { color: #D6DAF0; max-width: 34ch; }
.footer__h { font: 400 16px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin-bottom: var(--sp-s); }
.areas { display: flex; flex-wrap: wrap; gap: 8px; }
.areas li { border: 2px solid var(--royal); border-radius: 999px; padding: 4px 14px; font-weight: 600; font-size: var(--fs-small); }
.footer .footer__note { margin-top: var(--sp-s); font-weight: 600; color: var(--white); }
.contact-lines a { display: block; color: var(--white); text-decoration: none; font-weight: 600; margin-bottom: 6px; width: fit-content; }
.contact-lines a:hover { box-shadow: 0 3px 0 0 var(--gold); }
.social { display: flex; gap: 10px; margin-top: var(--sp-s); }
.social a {
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--royal); color: var(--white);
  display: grid; place-items: center;
  transition: background-color 150ms ease, color 150ms ease, transform 150ms var(--spring);
}
.social a:hover { background: var(--gold); color: var(--navy); transform: translateY(-3px) rotate(-6deg); }
.social svg { width: 22px; height: 22px; }
.footer__bottom {
  display: flex; flex-wrap: wrap; gap: var(--sp-s); align-items: center; justify-content: space-between;
  border-top: 2px solid rgba(191, 221, 247, .2);
  padding-top: var(--sp-m);
  font-size: var(--fs-small);
}
.footer__ctas { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.footer .pill { background: rgba(255, 255, 255, .12); color: var(--white); }
.footer .pill:hover { background: rgba(255, 255, 255, .22); }

/* =========================================================
   OVERLAYS (menu, search, quiz)
   ========================================================= */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  opacity: 0;
  transition: opacity 300ms var(--ease);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.overlay[hidden] { display: none; }
.overlay.is-open { opacity: 1; }

/* Menu */
.menu { background: var(--navy); color: var(--white); padding: var(--sp-xs) var(--gutter) var(--sp-l); }
.overlay__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.overlay__top .nav__actions .round:not(.round--white) { background: rgba(255, 255, 255, .14); color: var(--white); }
.menu__groups {
  display: grid; gap: var(--sp-l);
  margin-top: var(--sp-l);
}
@media (min-width: 900px) { .menu__groups { grid-template-columns: repeat(3, 1fr); margin-top: var(--sp-xl); } }
.menu__label { font: 700 var(--fs-small)/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--sky); margin-bottom: var(--sp-s); }
.menu__groups a {
  display: inline-block;
  color: var(--white);
  text-decoration: none;
  font: 400 clamp(32px, calc(32px + 26 * var(--fluid)), 58px)/1.18 var(--f-display);
  transition: color 200ms ease, transform 200ms var(--ease);
}
.menu__groups a:hover, .menu__groups a:focus-visible { color: var(--gold); transform: translateX(8px); }
.menu__foot { margin-top: var(--sp-l); display: flex; flex-wrap: wrap; gap: var(--sp-s); align-items: center; justify-content: space-between; }
.menu__foot .script { font-size: clamp(30px, calc(30px + 14 * var(--fluid)), 44px); }

/* Search */
.search { background: rgba(2, 12, 69, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); padding: var(--sp-l) var(--gutter); }
.search__panel {
  max-width: 720px; margin: 0 auto;
  background: var(--cream);
  border: 3px solid var(--royal); box-shadow: 6px 6px 0 var(--navy);
  border-radius: var(--r-m);
  padding: var(--sp-m);
  transform: translateY(-20px); transition: transform 300ms var(--ease);
}
.search.is-open .search__panel { transform: none; }
.search__row { display: flex; gap: 10px; align-items: center; }
.search input {
  flex: 1; min-width: 0;
  font: 600 20px/1.2 var(--f-body); color: var(--navy);
  padding: 14px 20px; border-radius: 999px; border: 3px solid var(--royal); background: var(--white);
}
.search input:focus-visible { outline-offset: 2px; }
.search .round { background: var(--white); box-shadow: inset 0 0 0 3px var(--royal); }
.search__results { margin-top: var(--sp-s); display: grid; gap: 6px; }
.search__results a {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-radius: 16px; text-decoration: none; color: var(--navy); font-weight: 700;
}
.search__results a small { color: var(--ink-soft); font-weight: 400; }
.search__results a:hover, .search__results a:focus-visible { background: var(--gold-tint); }
.search__empty { color: var(--ink-soft); padding: 12px 16px; }

/* Quiz */
.quiz { background: var(--cream); scroll-padding-bottom: 110px; }
.quiz__panel {
  position: relative;
  min-height: 100%;
  max-width: 1120px; margin: 0 auto;
  display: flex; flex-direction: column;
  padding: var(--sp-s) var(--gutter) var(--sp-m);
  transform: translateY(-100%);
  transition: transform 520ms cubic-bezier(.2, .8, .2, 1);
}
.quiz.is-open .quiz__panel { transform: none; }
.quiz__head { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; }
.quiz__status { text-align: center; padding: 0 6px; }
.quiz__step-label { font: 400 14px/1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 10px; }
.quiz__bar { height: 14px; border-radius: 999px; border: 3px solid var(--royal); background: var(--white); overflow: hidden; max-width: 420px; margin: 0 auto; }
.quiz__bar span { display: block; height: 100%; width: 16.66%; background: var(--gold); border-right: 3px solid var(--royal); transition: width 450ms var(--ease); }
.quiz .round { background: var(--white); box-shadow: inset 0 0 0 3px var(--royal), 3px 3px 0 var(--navy); }
.quiz .round:hover { background: var(--gold-tint); }
.quiz .round:disabled { opacity: .35; cursor: default; box-shadow: inset 0 0 0 3px var(--royal); }
/* Viewport height follows the active step (set in JS) so Next sits right under the options */
.quiz__viewport { overflow: hidden; margin: 0 -8px; transition: height 480ms cubic-bezier(.65, 0, .35, 1); }
.quiz__track { display: flex; align-items: flex-start; transition: transform 480ms cubic-bezier(.65, 0, .35, 1); }
.quiz__step { flex: 0 0 100%; min-width: 0; padding: var(--sp-m) 8px var(--sp-s); }
.quiz__step h2 { margin-bottom: var(--sp-xs); }
.quiz__step h2:focus { outline: none; }
.quiz__step .lede { margin-bottom: var(--sp-m); }
/* Stays pinned to the bottom of the screen if a step is taller than the window */
.quiz__foot {
  position: sticky; bottom: 0; z-index: 2;
  display: flex; justify-content: flex-end;
  padding: var(--sp-s) 0;
  background: var(--cream);
}
.quiz__foot[hidden] { display: none; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 170px), 1fr)); gap: var(--sp-s); }
.tile {
  cursor: pointer;
  background: var(--white);
  border: 3px solid var(--royal);
  border-radius: var(--r-tile);
  box-shadow: 4px 4px 0 var(--navy);
  padding: 14px 12px 16px;
  display: grid; justify-items: center; gap: 10px;
  font: 400 clamp(15px, calc(15px + 3 * var(--fluid)), 18px)/1.1 var(--f-display);
  text-align: center;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 150ms ease;
}
.tile:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--navy); }
.tile:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--navy); }
.tile[aria-pressed="true"] { background: var(--gold); }
.tile__art { width: 100%; max-width: 120px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 3px solid var(--navy); }
.tile__art svg { width: 100%; height: 100%; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--white);
  border: 3px solid var(--royal);
  border-radius: 999px;
  padding: .6em 1.15em;
  font-weight: 700;
  transition: background-color 150ms ease, transform 120ms ease;
}
.chip:hover { background: var(--gold-tint); }
.chip:active { transform: scale(.95); }
.chip svg { width: 0; height: 18px; overflow: visible; transition: width 150ms ease; }
.chip[aria-pressed="true"] { background: var(--gold); }
.chip[aria-pressed="true"] svg { width: 18px; animation: check-pop 360ms var(--spring); }
@keyframes check-pop { 0% { transform: scale(0); } 70% { transform: scale(1.35); } 100% { transform: scale(1); } }

.quiz__other { max-width: 520px; margin-top: var(--sp-m); animation: other-in 260ms var(--ease); }
@keyframes other-in { from { opacity: 0; transform: translateY(-8px); } }
.slider { max-width: 640px; }
.slider__labels { display: flex; justify-content: space-between; font: 400 14px/1.2 var(--f-display); letter-spacing: .06em; margin-bottom: 14px; gap: 12px; }
.slider__labels span:last-child { text-align: right; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 40px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 16px; border-radius: 999px; background: var(--sky); border: 3px solid var(--royal); }
input[type="range"]::-moz-range-track { height: 10px; border-radius: 999px; background: var(--sky); border: 3px solid var(--royal); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 38px; height: 38px; margin-top: -14px; border-radius: 50%;
  background: var(--gold); border: 3px solid var(--royal); box-shadow: 3px 3px 0 var(--navy);
}
input[type="range"]::-moz-range-thumb { width: 32px; height: 32px; border-radius: 50%; background: var(--gold); border: 3px solid var(--royal); box-shadow: 3px 3px 0 var(--navy); }
.stamps { display: flex; flex-wrap: wrap; gap: var(--sp-s); margin-top: var(--sp-m); }
.stamp {
  cursor: pointer;
  background: var(--white);
  border: 3px dashed var(--royal);
  outline: 3px solid var(--white); outline-offset: -9px;
  border-radius: 14px;
  padding: 16px 22px;
  font: 400 15px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase;
  transform: rotate(var(--rot, -2deg));
  transition: transform 150ms var(--spring), background-color 150ms ease;
}
.stamp:nth-child(2) { --rot: 2deg; }
.stamp:nth-child(3) { --rot: -1deg; }
.stamp:hover { transform: rotate(0deg) scale(1.04); background: var(--gold-tint); }
.stamp[aria-pressed="true"] { background: var(--gold); border-style: solid; outline-color: transparent; }
.stamp:focus-visible { outline: 3px solid var(--royal); outline-offset: 3px; }

.vibes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 180px), 1fr)); gap: var(--sp-s); }
@media (min-width: 700px) { .vibes { grid-template-columns: repeat(3, 1fr); } }
.vibe {
  cursor: pointer;
  background: var(--white);
  border: 3px solid transparent;
  border-radius: 40px;
  padding: 16px 12px 12px;
  display: grid; justify-items: center; gap: 4px;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.vibe:hover { background: var(--gold-tint); border-color: var(--royal); }
.vibe[aria-pressed="true"] { background: var(--gold); border-color: var(--royal); box-shadow: 4px 4px 0 var(--navy); animation: bounce 380ms ease; }
@keyframes bounce { 0% { transform: scale(1); } 45% { transform: scale(1.06); } 100% { transform: scale(1); } }
.vibe svg { width: 84px; height: 84px; }
.vibe span { font: 400 clamp(26px, calc(26px + 6 * var(--fluid)), 32px)/1.1 var(--f-script); color: var(--royal); }
.vibe[aria-pressed="true"] span { color: var(--navy); }

.field label, .field__label { display: block; font-weight: 700; margin-bottom: 8px; }
.field + .field { margin-top: var(--sp-s); }
textarea, .field input, .field select {
  width: 100%;
  font: 400 var(--fs-body)/1.5 var(--f-body); color: var(--navy);
  background: var(--white);
  border: 3px solid var(--royal);
  border-radius: 22px;
  padding: 14px 18px;
}
textarea { min-height: 200px; resize: vertical; border-radius: var(--r-m); }
textarea:focus-visible, .field input:focus-visible, .field select:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; box-shadow: 4px 4px 0 var(--navy); }

.quiz__done { text-align: center; display: grid; justify-items: center; gap: var(--sp-s); padding-top: var(--sp-m); }
.quiz__done svg { width: min(260px, 60vw); height: auto; }
.quiz__done .actions { display: flex; flex-wrap: wrap; gap: var(--sp-s); justify-content: center; margin-top: var(--sp-s); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 150; overflow: hidden; }
.confetti i { position: absolute; left: 50%; top: 45%; width: 12px; height: 18px; border-radius: 3px; }

/* =========================================================
   INNER PAGES (contact / about)
   ========================================================= */
.page-top { padding-top: calc(var(--sp-xl) + 40px); }
.page-title { margin-bottom: var(--sp-s); }
.choices {
  display: grid; gap: var(--sp-m);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  margin-top: var(--sp-l);
  text-align: left;
}
.choice {
  cursor: pointer;
  background: transparent; border: 0; padding: 10px; text-align: left;
  border-radius: calc(var(--r-card) + 10px);
  color: var(--navy);
  transition: background-color 120ms ease;
}
.choice:active { background: var(--gold-tint); }
.choice__art {
  aspect-ratio: 1.3; border-radius: var(--r-card); overflow: hidden;
  border: 3px solid transparent;
  background: var(--bg);
  transition: border-radius 250ms cubic-bezier(.4, 0, .2, 1), border-color 250ms, box-shadow 250ms;
}
.choice__art svg { width: 100%; height: 100%; }
.choice:hover .choice__art, .choice[aria-expanded="true"] .choice__art { border-radius: var(--r-card-hover); border-color: var(--royal); box-shadow: 4px 4px 0 var(--navy); }
.choice[aria-expanded="true"] .card__meta h3 { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 4px; text-underline-offset: 6px; }
.choice:hover .card__arrow { transform: translateX(6px); }

.contact-panel {
  max-width: 720px; margin: var(--sp-l) auto 0;
  text-align: left;
  background: var(--white);
  border: 3px solid var(--royal);
  border-radius: var(--r-m);
  box-shadow: 6px 6px 0 var(--navy);
  padding: var(--sp-m);
}
.contact-panel[hidden] { display: none; }
.contact-panel h2 { font-size: var(--fs-h3); margin-bottom: var(--sp-s); }
.contact-panel .btn { margin-top: var(--sp-m); }
.form-grid { display: grid; gap: var(--sp-s); }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .field--full { grid-column: 1 / -1; } }
.form-grid .field + .field { margin-top: 0; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.opt { font-weight: 400; color: var(--ink-soft); }
.form-error {
  margin-top: var(--sp-s);
  background: var(--gold-tint);
  border: 2px solid var(--brick);
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 600;
}
.form-error[hidden] { display: none; }
.form-note { margin-top: var(--sp-s); font-size: var(--fs-small); color: var(--ink-soft); }
.form-grid .form-note { margin-top: 0; }
.footer__bottom p { margin: 0; }
.footer .footer__link { color: var(--white); font-weight: 600; }
.footer .footer__link:hover { box-shadow: 0 3px 0 0 var(--gold); text-decoration: none; }
.footer .footer__legal { flex-basis: 100%; max-width: none; font-size: 13px; color: #AEB5DA; }
.form-grid .form-error { margin-top: 0; }
.thanks { display: grid; gap: 10px; justify-items: start; }
.thanks strong { font: 400 var(--fs-h3)/1.1 var(--f-display); }

.about-hero { background: var(--royal); color: var(--white); border-bottom: 3px solid var(--navy); }
.about-hero .lede { color: #E6F0FB; }
.split { display: grid; gap: var(--sp-l); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }
.art-frame { border-radius: var(--r-card); border: 3px solid var(--royal); box-shadow: 6px 6px 0 var(--navy); overflow: hidden; aspect-ratio: 1.3; background: var(--bg); }
.art-frame svg { width: 100%; height: 100%; }
.stack > * + * { margin-top: var(--sp-m); }
.posts { display: grid; gap: var(--sp-m); grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.post { background: var(--white); border: 3px solid var(--royal); border-radius: var(--r-m); box-shadow: 4px 4px 0 var(--navy); padding: var(--sp-m); display: grid; gap: 10px; align-content: start; }
.tag-new { justify-self: start; background: var(--brick); color: var(--white); font: 400 12px/1 var(--f-display); letter-spacing: .1em; padding: 6px 10px; border-radius: 999px; transform: rotate(-3deg); }
a.post { color: var(--navy); text-decoration: none; transition: transform 120ms ease, box-shadow 120ms ease; }
a.post:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--navy); }
a.post:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--navy); }
.post__more { font: 400 13px/1 var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: var(--royal); margin-top: 4px; }

/* ---------- Blog article ---------- */
.article { max-width: 820px; margin: 0 auto; }
.article__head { display: grid; justify-items: start; gap: var(--sp-s); margin-bottom: var(--sp-m); }
.article__head h1 { font-size: clamp(36px, calc(36px + 24 * var(--fluid)), 60px); }
.article__back { font-weight: 700; text-decoration: none; }
.article__back:hover { box-shadow: 0 3px 0 0 var(--gold); }
.article__meta { color: var(--ink-soft); font-size: var(--fs-small); font-weight: 600; }
.article__art { aspect-ratio: 1.6; margin-bottom: var(--sp-l); }
.prose { max-width: 68ch; }
.prose > * + * { margin-top: var(--sp-s); }
.prose h2 { font-size: var(--fs-h3); margin-top: var(--sp-l); }
.prose__lede { font-size: clamp(19px, calc(19px + 3 * var(--fluid)), 22px); font-weight: 600; line-height: 1.5; }
.prose ul { list-style: disc; padding-left: 1.3em; display: grid; gap: 8px; }
.cite { font-size: .8em; font-weight: 700; text-decoration: none; vertical-align: super; line-height: 0; padding: 0 1px; }
.cite:hover { text-decoration: underline; }
.callout {
  margin-top: var(--sp-l);
  background: var(--gold-tint);
  border: 3px solid var(--royal);
  border-radius: var(--r-m);
  box-shadow: 4px 4px 0 var(--navy);
  padding: var(--sp-m);
  display: grid; gap: var(--sp-s); justify-items: start;
}
.refs { margin-top: var(--sp-xl); padding-top: var(--sp-m); border-top: 3px solid var(--royal); }
.refs h2 { font-size: var(--fs-h3); margin-bottom: var(--sp-s); }
.refs ol { padding-left: 1.4em; display: grid; gap: 10px; font-size: var(--fs-small); color: var(--ink-soft); }
.refs li { scroll-margin-top: 110px; padding-left: 4px; }
.refs li:target { background: var(--gold-tint); border-radius: 8px; color: var(--navy); }
.refs cite { font-style: italic; }
.post h3 { font-size: clamp(19px, calc(19px + 4 * var(--fluid)), 23px); }
.post p { color: var(--ink-soft); font-size: var(--fs-small); }

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }
  .js [data-reveal], .js [data-reveal="pop"] { opacity: 1; transform: rotate(var(--rot, 0deg)); }
}
