:root {
  --cream: #FEF9ED;
  --ink: #2A1410;
  --logo: #E5483D;   /* wordmark colour (coral, same as the knitted "b"); was deep teal #1F4E54 */
  --ink-soft: #4B3A33;
  --coral: #E5483D;
  --coral-dark: #CC3A30;
  --card: #FFFFFF;
  --shadow: 0 6px 18px rgba(74, 40, 20, 0.14), 0 1px 3px rgba(74, 40, 20, 0.10);
  --gutter: 16px;
  --font-head: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
}

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

html, body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* Never scroll sideways: lock both the page and the body (older iPhones ignore body-only). */
html, body { overflow-x: hidden; }
@supports (overflow-x: clip) { html, body { overflow-x: clip; } }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto;
  padding: 22px clamp(var(--gutter), 4vw, 48px) 0;
}
/* Logo: the knitted coral "hi bubbie" image (media/logo-hi-bubbie.webp). */
.wordmark {
  font-family: var(--font-head); font-weight: 900; font-variation-settings: "SOFT" 100;
  font-size: clamp(1.85rem, 2.8vw, 2.35rem); letter-spacing: -0.015em;
  color: var(--logo); text-decoration: none; line-height: 1; white-space: nowrap;
}
.logo-bubbie {
  height: 0.98em; width: auto; display: inline-block;
  vertical-align: -0.08em;
  mix-blend-mode: multiply; /* its white background melts into the cream page */
}
.nav { display: flex; align-items: center; gap: 24px; }
.nav-link { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.98rem; }
.nav-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border-radius: 999px; text-decoration: none; cursor: pointer;
  font-family: var(--font-head); font-weight: 800; font-variation-settings: "SOFT" 100;
  border: 2px solid transparent; transition: transform .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-coral { background: var(--coral); color: #fff; }
.btn-coral:hover { background: var(--coral-dark); }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: #fff6ea; }
.btn-small { font-family: var(--font-body); font-weight: 500; font-size: 1rem; padding: 10px 22px; }
.btn-big { font-size: 1.25rem; padding: 16px 34px; }
.btn-block { width: 100%; font-size: 1.15rem; padding: 16px; }

/* ---------- Hero ---------- */
.hero {
  max-width: 1200px; margin: 0 auto;
  padding: clamp(6px, 1.2vw, 14px) var(--gutter) 40px;
  text-align: center;
}

.headline {
  font-family: var(--font-head); font-weight: 900; font-variation-settings: "SOFT" 100;
  font-size: clamp(2.5rem, 6vw, 5rem); line-height: 1.04; letter-spacing: -0.02em;
  margin: 0;
}
.hl-line { display: inline; }
.hl-team-line { display: block; }

/* The knitted word. Letters are absolutely sized from em so they scale with the headline. */
.team-slot {
  position: relative; display: inline-block; vertical-align: -0.16em;
  height: 1.12em; margin-right: 0.12em;
}
.team-slot .letters { display: inline-flex; align-items: flex-end; gap: 0.01em; height: 100%; position: relative; }
.team-slot .letter {
  height: 100%; width: auto; display: block;
  mix-blend-mode: multiply;
  opacity: 0; transform: translateY(-140%) rotate(-10deg);
}
.team-slot .letter.landed { animation: letter-drop .62s cubic-bezier(.3,1.4,.5,1) forwards; }
.team-slot .letter:nth-child(2n).landed { animation-name: letter-drop-r; }
@keyframes letter-drop {
  0%   { opacity: 0; transform: translateY(-140%) rotate(-12deg); }
  25%  { opacity: 1; }
  70%  { transform: translateY(4%) rotate(3deg); }
  100% { opacity: 1; transform: none; }
}
@keyframes letter-drop-r {
  0%   { opacity: 0; transform: translateY(-140%) rotate(12deg); }
  25%  { opacity: 1; }
  70%  { transform: translateY(4%) rotate(-3deg); }
  100% { opacity: 1; transform: none; }
}
.subhead {
  font-size: clamp(1.05rem, 1.7vw, 1.4rem); color: var(--ink-soft);
  margin: clamp(10px, 1.4vw, 16px) auto 0; max-width: 34em; line-height: 1.4;
  text-wrap: balance;
}
.m-only { display: none; }

/* ---------- Stage ---------- */
.stage {
  position: relative; margin: clamp(10px, 2vw, 24px) auto 0;
  /* width/height set from JS */
}
/* Phones: the crew's image boxes (mostly blank padding) reach past the screen edges, so
   clip the stage sideways only. */
@media (max-width: 720px) { .stage { overflow-x: clip; } }
.slot {
  position: absolute; bottom: 0;
  mix-blend-mode: multiply;   /* white background disappears into the cream page */
  pointer-events: none;
}
.mover { position: absolute; inset: 0; will-change: transform; }
.actor { position: absolute; inset: 0; transform-origin: 50% 92%; }
.layer {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; display: block;
}
video.layer { opacity: 0; }

video.layer.on { opacity: 1; }

/* still-image stand-ins for clips that don't exist yet */
.actor.waddle { animation: waddle .32s ease-in-out infinite alternate; }
@keyframes waddle {
  from { transform: translateY(0) rotate(-3deg); }
  to   { transform: translateY(-3%) rotate(3deg); }
}
.actor.breathe { animation: breathe 3.6s ease-in-out infinite; }
@keyframes breathe {
  0%, 100% { transform: scale(1, 1); }
  50%      { transform: scale(1.006, 1.014); }
}
.actor.nod { animation: nod .7s ease-in-out; }
@keyframes nod {
  0%, 100% { transform: none; }
  35% { transform: translateY(-4%) rotate(-2deg); }
  65% { transform: translateY(0) rotate(1.5deg); }
}

/* speech bubble + task tags */
.bubble, .tag {
  position: absolute; z-index: 50; /* always above the characters (they use 8–10) */ white-space: nowrap;
  background: var(--card); color: var(--ink); box-shadow: var(--shadow);
  font-family: var(--font-body); font-weight: 500;
  font-size: clamp(0.78rem, 1.2vw, 0.98rem);
  padding: 0.55em 0.95em; border-radius: 999px;
  opacity: 0; transform: translate(-50%, 0) scale(.6);
  transition: opacity .3s ease, transform .45s cubic-bezier(.3,1.5,.5,1);
}
/* Bubbie's speech bubble: rounder and a bit bigger than the tags, with quote marks and a
   real comic tail pointing down at her. Drop-shadow (not box-shadow) so the tail gets it too. */
.bubble {
  border-radius: 24px; padding: 0.7em 1.15em;
  font-size: clamp(0.9rem, 1.35vw, 1.1rem);
  box-shadow: none;
  filter: drop-shadow(0 6px 12px rgba(74, 40, 20, 0.14)) drop-shadow(0 1px 2px rgba(74, 40, 20, 0.10));
}
.bubble::after {
  content: ""; position: absolute; top: calc(100% - 2px); left: var(--tail, 60%);
  width: 26px; height: 22px; background: var(--card);
  transform: translateX(-30%);
  clip-path: polygon(0 0, 100% 0, 78% 100%);
}
.bubble .q {
  font-family: var(--font-head); font-weight: 900; font-variation-settings: "SOFT" 100;
  color: var(--coral); font-size: 1.5em; line-height: 0; vertical-align: -0.28em;
  margin-right: 0.08em;
}
.bubble .q-close { margin: 0 0 0 0.04em; }
/* words appear one at a time, like she's saying them */
.bubble .w { opacity: 0; transition: opacity .18s ease; transition-delay: calc(var(--i) * 110ms + 200ms); }
.bubble.show .w { opacity: 1; }
.bubble:not(.show) .w { transition-delay: 0s; }
.bubble.show, .tag.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.bubble.fly {
  transition: transform .65s cubic-bezier(.5,0,.6,1), opacity .65s ease;
  opacity: 0;
}
.tag .check, .caption .check { color: #2E8B57; font-weight: 700; margin-left: 2px; }

/* Phones: round badges above heads + one caption line under the crew (instead of tags). */
.badge, .caption { display: none; }
.stage.compact .tag { display: none; }
.stage.compact .badge {
  display: grid; place-items: center;
  position: absolute; z-index: 50; /* always above the characters (they use 8–10) */
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--card); box-shadow: var(--shadow); font-size: 17px;
  opacity: 0; transform: translate(-50%, 0) scale(.4);
  transition: opacity .25s ease, transform .45s cubic-bezier(.3,1.6,.5,1);
}
.stage.compact .badge.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.badge .badge-check {
  position: absolute; right: -4px; bottom: -3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #2E8B57; color: #fff; font-size: 10px; font-weight: 700;
  display: grid; place-items: center; box-shadow: 0 0 0 2px var(--card);
}
.stage.compact .caption {
  display: block; position: absolute; z-index: 50; /* always above the characters (they use 8–10) */ white-space: nowrap;
  background: var(--card); color: var(--ink); box-shadow: var(--shadow);
  font-family: var(--font-body); font-weight: 500; font-size: 0.98rem;
  padding: 0.55em 1em; border-radius: 999px;
  opacity: 0; transform: translate(-50%, 6px);
}
.stage.compact .caption.show { animation: caption-in .35s ease forwards; }
@keyframes caption-in {
  from { opacity: 0; transform: translate(-50%, 6px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.tag .tag-icon, .caption .tag-icon { margin-right: 0.4em; }

/* ---------- CTAs ---------- */
.ctas {
  display: flex; justify-content: center; gap: 16px; flex-wrap: wrap;
  margin-top: clamp(4px, 0.8vw, 10px);
}
.sticky-cta { display: none; }

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  .topbar { padding-top: 16px; }
  .headline { font-size: clamp(2.3rem, 11vw, 3.4rem); line-height: 1.06; }
  .hl-line { display: block; }
  .m-only { display: inline; }
  .subhead { font-size: 1.02rem; }

  .hero { padding-bottom: 32px; }
  /* the sign-up button sits right under the crew... */
  .ctas { margin-top: 6px; }
  .ctas .btn-big { width: 100%; font-size: 1.15rem; padding: 16px; }
  /* ...and the sticky bar only slides in once you've scrolled past it */
  .sticky-cta {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, var(--cream) 70%, rgba(254,249,237,0));
    transform: translateY(110%); transition: transform .3s ease;
  }
  .sticky-cta.show { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .team-slot .letter { opacity: 1; transform: none; }
  .actor { animation: none !important; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid #EADFCB; margin-top: 56px; }
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 24px clamp(var(--gutter), 4vw, 48px) 32px;
  display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center;
  font-size: 0.92rem; color: var(--ink-soft);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { color: var(--ink-soft); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 720px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
  /* leave room so the sticky sign-up bar never covers the footer */
  .has-sticky .footer-inner { padding-bottom: 110px; }
}

/* ---------- Legal pages (privacy, terms) ---------- */
.legal {
  max-width: 720px; margin: 0 auto;
  padding: 40px clamp(var(--gutter), 4vw, 48px) 0;
  font-size: 1.02rem; line-height: 1.65; color: var(--ink);
}
.legal h1 {
  font-family: var(--font-head); font-weight: 900; font-variation-settings: "SOFT" 100;
  font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.1; margin: 0 0 8px;
}
.legal-date { color: var(--ink-soft); margin: 0 0 28px; }
.legal h2 { font-size: 1.15rem; font-weight: 700; margin: 32px 0 8px; }
.legal p, .legal ul { margin: 0 0 14px; }
.legal ul { padding-left: 1.3em; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--coral-dark); }
