/* ==========================================================================
   positivesum.academy: page styles
   Shared colours and fonts live in ../shared/base.css
   Sections appear in the same order as in index.html.
   ========================================================================== */


/* ---------------------------------------------------------------------------
   0. PUZZLE BACKGROUND
   Fixed behind everything. The pieces are drawn by ../shared/js/puzzle.js
   --------------------------------------------------------------------------- */
.puzzle {
  position: fixed; inset: 0; z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.puzzle svg { width: 100%; height: auto; overflow: visible; }
.puzzle__piece {
  stroke: rgba(29, 21, 48, 0.22); /* soft ink outline */
  stroke-width: 1.5;
  stroke-linejoin: round;
}

main { position: relative; z-index: 1; } /* page content sits above the puzzle */



/* ---------------------------------------------------------------------------
   1. LOADING INTRO
   Hidden unless the <html> tag has the "intro-on" class (set in index.html).
   --------------------------------------------------------------------------- */
.intro { display: none; }

.intro-on body { overflow: hidden; } /* no scrolling while the intro plays */

.intro-on .intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: fixed; inset: 0; z-index: 100;
  overflow: hidden;
  background:
    radial-gradient(closest-side at 50% 44%, var(--yellow-soft), transparent),  /* warm sunny centre */
    var(--paper);
  /* Safety net: if the animation script fails, hide the intro after 10s anyway */
  animation: intro-failsafe 0.4s ease 10s forwards;
}
@keyframes intro-failsafe { to { opacity: 0; visibility: hidden; } }

.intro__art {
  width: min(80vw, 360px);
  height: auto;
  overflow: visible;
}
.intro__drop, .intro__segments, .intro__ring, .intro__shine, #squiggle { opacity: 0; } /* the script fades them in */

.intro__title { display: flex; flex-direction: column; align-items: center; }
.intro__wordmark {
  margin: 4px 0 6px;
  font-size: clamp(1.25rem, 5vw, 1.9rem); /* sets the size of the whole logo */
  opacity: 0; /* the script reveals it */
}
.intro__squiggle { width: min(60vw, 240px); height: auto; margin-top: 2px; }

/* Colour circles: start as a dot on the core, grow to fill the screen */
.intro__wipe {
  position: absolute; left: 50%; top: 50%;
  width: 100px; height: 100px; margin: -50px 0 0 -50px;
  border-radius: 50%;
  transform: scale(0);
  pointer-events: none;
}

.intro__skip {
  position: absolute; right: 16px; bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 2;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 0.85rem; font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink); /* chunky sticker-style shadow */
  transition: transform 0.15s, box-shadow 0.15s;
}
.intro__skip:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }


/* ---------------------------------------------------------------------------
   HEADER
   --------------------------------------------------------------------------- */
.site-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) var(--gutter) 14px;
}
.site-header__brand {
  font-size: 0.82rem; /* sets the size of the whole logo */
  background: var(--paper); padding: 5px 12px 5px 8px; border-radius: 12px; /* stays readable over puzzle pieces */
}
/* "Play intro" pill at the top right (shown on every screen size) */
.site-header__link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.9rem; font-weight: 700; color: var(--ink);
  background: var(--paper); padding: 6px 14px; border-radius: 999px;
  border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
  white-space: nowrap; cursor: pointer;
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
}
.site-header__link:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.site-header__link span { font-size: 0.75em; color: var(--purple); }


/* ---------------------------------------------------------------------------
   SHARED BUILDING BLOCKS: stickers, buttons, draft marks, placeholder art
   --------------------------------------------------------------------------- */

/* PRIMARY LOGO LOCKUP: the head icon with "Positive / Sum / Academy" stacked beside it.
   The icon and the words scale together with the font size set on each use. */
.logo-lockup {
  display: inline-flex; align-items: center; gap: 0.45em;
  color: var(--ink); text-decoration: none;
}
.logo-lockup__icon { height: 3.5em; width: auto; flex: none; }
.logo-lockup__words {
  display: flex; flex-direction: column;
  font-family: "Anton", var(--font-body); /* bold condensed, close to the logo's own lettering */
  font-size: 1em; line-height: 1.02; letter-spacing: 0.02em; text-align: left;
}

/* Tilted sticker tag (a nod to the KraftedX tags), hand-written font */
.sticker {
  display: inline-block;
  font-family: "Gochi Hand", var(--font-body);
  font-size: 1.35rem; line-height: 1.1;
  color: var(--ink);
  padding: 6px 16px 8px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-5deg);
  margin: 0;
}
.sticker--pink   { background: var(--pink-piece); }
.sticker--yellow { background: var(--yellow); }

/* A sticker that is also a button: lifts and straightens a little on hover */
.sticker--button {
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
a:hover > .sticker--button,
a:focus-visible > .sticker--button { transform: rotate(-2deg) translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
a:active > .sticker--button { transform: rotate(-3deg) translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }
.sticker__arrow { display: inline-block; margin-left: 2px; font-family: var(--font-body); font-weight: 700; font-size: 1rem; }
@media (prefers-reduced-motion: no-preference) {
  /* the little arrow nods downwards now and then, hinting "tap me" */
  .sticker__arrow { animation: arrow-nod 2.4s ease-in-out infinite; }
}
@keyframes arrow-nod { 0%, 70%, 100% { transform: translateY(0); } 80% { transform: translateY(3px); } 90% { transform: translateY(0); } }

.hero__sticker { display: inline-block; text-decoration: none; border-radius: 12px; }

/* Chunky, friendly buttons with a sticker-style shadow */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 12px 24px;
  font-weight: 700; font-size: 1rem; text-decoration: none; text-align: center;
  border: 2px solid var(--ink); border-radius: 999px;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s var(--ease-out);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn--primary { background: var(--purple); color: #FFFFFF; }

/* Second chunky button (yellow), sits beside the purple one */
.btn--pop { background: var(--yellow); color: var(--ink); gap: 8px; }
.btn__arrow { display: inline-block; font-size: 1.1em; }
@media (prefers-reduced-motion: no-preference) {
  /* the arrow nods downwards now and then, hinting "this way" */
  .btn__arrow { animation: arrow-nod 2.4s ease-in-out infinite; }
  .btn--pop:hover .btn__arrow { animation-duration: 0.9s; }
}

/* DRAFT COPY: dashed underline plus a small tag. DELETE the tag once approved. */
.draft { text-decoration: underline dashed var(--purple); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.draft-tag {
  display: inline-block; vertical-align: middle;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--purple); border: 1.5px dashed var(--purple); border-radius: 6px;
  padding: 1px 6px; margin-left: 4px; background: var(--paper);
}



/* ---------------------------------------------------------------------------
   2. HERO
   --------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 28px;
  padding: 104px var(--gutter) 72px;
  text-align: center;
}
.hero__inner {
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  max-width: 900px;
}
.hero__title {
  font-size: clamp(2.7rem, 10.5vw, 6.4rem);
  line-height: 1.02;
  color: var(--ink);
  max-width: 13ch;
  letter-spacing: -0.01em;
}
.hero__title .w { display: inline-block; } /* lets each word animate on its own */

/* "nobody" gets a hand-drawn orange underline */
.hero__nobody { position: relative; }
.hero__underline {
  position: absolute; left: -2%; bottom: -0.12em;
  width: 104%; height: 0.32em;
  overflow: visible;
}
.hero__underline path {
  fill: none; stroke: var(--orange); stroke-width: 5; stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 100; stroke-dashoffset: 0; /* the script draws it in */
}

.hero__lead {
  margin: 0;
  max-width: 34ch;
  font-size: clamp(1.05rem, 2.6vw, 1.25rem);
  color: var(--ink);
  background: rgba(255, 248, 236, 0.88); /* soft paper behind text, for readability over the puzzle */
  border-radius: 14px; padding: 10px 14px;
}

.hero__actions {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 20px;
}


/* Before the entrance animation runs, hide the parts that will animate in.
   (Only when JavaScript is on, and never for reduced motion.) */
.js .hero [data-enter], .js .site-header[data-enter], .js .hero__title .w { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .js .hero [data-enter], .js .site-header[data-enter], .js .hero__title .w { opacity: 1; }
}


/* ---------------------------------------------------------------------------
   FLOATING "HEAR FIRST" BUTTON
   Hidden below the screen until the script slides it up.
   --------------------------------------------------------------------------- */
.float-cta {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 80;
  transform: translate(-50%, 160%);
  max-width: calc(100% - 32px);
  text-decoration: none;
}
.float-cta__inner {
  display: block;
  padding: 13px 22px;
  font-weight: 700; font-size: 0.98rem; text-align: center; white-space: nowrap;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink); border-radius: 999px;
  box-shadow: 4px 4px 0 var(--ink);
  animation: soft-glow 4s ease-in-out infinite; /* a slow, warm glow. Never flashing. */
}
@keyframes soft-glow {
  0%, 100% { box-shadow: 4px 4px 0 var(--ink), 0 0 0 0 rgba(255, 201, 60, 0); }
  50%      { box-shadow: 4px 4px 0 var(--ink), 0 0 26px 6px rgba(255, 201, 60, 0.55); }
}
@media (max-width: 360px) { .float-cta__inner { white-space: normal; } }
@media (prefers-reduced-motion: reduce) { .float-cta__inner { animation: none; } }


/* ---------------------------------------------------------------------------
   3. THE MANIFESTO
   A paper sheet taped onto the puzzle table. Text reveals line by line.
   --------------------------------------------------------------------------- */
.manifesto {
  padding: 18vh var(--gutter) 22vh;
  display: flex; justify-content: center;
}
.manifesto__sheet {
  position: relative;
  width: 100%; max-width: 880px;
  padding: clamp(36px, 7vw, 80px) clamp(22px, 6vw, 72px) clamp(40px, 7vw, 84px);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 6px 10px 8px 12px / 10px 6px 12px 8px; /* slightly uneven, like cut paper */
  box-shadow: 8px 10px 0 rgba(29, 21, 48, 0.9);
  transform: rotate(-0.8deg);
}

/* Washi tape strips at the top corners */
.manifesto__tape {
  position: absolute; top: -16px;
  width: clamp(90px, 18vw, 140px); height: 32px;
  opacity: 0.85;
  border-left: 2px dashed rgba(255, 255, 255, 0.6);
  border-right: 2px dashed rgba(255, 255, 255, 0.6);
}
.manifesto__tape--left  { left: 8%;  background: var(--pink-piece);   transform: rotate(-7deg); }
.manifesto__tape--right { right: 8%; background: var(--yellow-piece); transform: rotate(6deg); }

.manifesto__block { display: flex; flex-direction: column; align-items: flex-start; gap: 0.9em; }
.manifesto__label { font-size: clamp(1.2rem, 3.6vw, 1.6rem); margin-bottom: 0.3em; }
.sticker--sky { background: var(--sky-piece); }
.manifesto__block:nth-of-type(2) .manifesto__label { transform: rotate(3deg); } /* tilt the other way */

.manifesto__text {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 4.2vw, 2.35rem);
  line-height: 1.28;
  color: var(--ink);
}
.manifesto__text--last { font-size: clamp(1.7rem, 5.2vw, 3rem); line-height: 1.15; margin-top: 0.3em; }

/* Each word gets wrapped in a span by the script so lines can fill in word by word */
.manifesto__text .mw { display: inline-block; }

/* Hand-drawn divider between the two parts */
.manifesto__divider { width: 100%; height: 20px; margin: clamp(28px, 5vw, 48px) 0; overflow: visible; }
.manifesto__divider path {
  fill: none; stroke: var(--purple); stroke-width: 3; stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

/* Highlighter marks: a chunky marker stroke behind the words.
   The script sweeps it in from left to right; without the script it is simply shown. */
.hl {
  color: inherit;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: 0 85%;
  background-size: 100% 62%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  padding: 0 0.12em;
  border-radius: 0.3em 0.15em 0.35em 0.2em;
}
.hl--yellow { background-image: linear-gradient(var(--yellow), var(--yellow)); }
.hl--green  { background-image: linear-gradient(var(--green-piece), var(--green-piece)); }
.hl--pink   { background-image: linear-gradient(var(--pink-piece), var(--pink-piece)); }
.hl--orange { background-image: linear-gradient(var(--orange-piece), var(--orange-piece)); }


/* ---------------------------------------------------------------------------
   4. THE SIGNATURE MOMENT: 1 + 1 = 3
   --------------------------------------------------------------------------- */
.oneplus {
  padding: 14vh var(--gutter) 18vh;
  display: flex; flex-direction: column; align-items: center; gap: 28px;
  text-align: center;
}

/* The big sum: 1 + 1 = ? (the ? flips over to 3. after the join) */
.oneplus__sum {
  display: flex; align-items: center; justify-content: center; gap: 0.18em;
  font-size: clamp(4rem, 17vw, 9rem);
  line-height: 1;
  color: var(--ink);
  background: rgba(255, 248, 236, 0.9);
  padding: 0.05em 0.3em 0.12em;
  border-radius: 24px;
}
.oneplus__op { font-family: "Gochi Hand", var(--font-body); color: var(--orange); font-size: 0.8em; }
.oneplus__answer { display: inline-grid; perspective: 600px; }
.oneplus__q, .oneplus__three { grid-area: 1 / 1; backface-visibility: hidden; }
.oneplus__q { font-family: "Gochi Hand", var(--font-body); color: var(--purple); }
.oneplus__three { color: var(--green); }
/* With the script running, start on "?" and hide the "3." until the join */
.js .oneplus__three { opacity: 0; }
.js .oneplus__line, .js .oneplus__why { opacity: 0; }
.no-anim .oneplus__three, .no-anim .oneplus__line, .no-anim .oneplus__why { opacity: 1; }

/* The paper mat the pieces sit on */
.oneplus__mat {
  position: relative;
  width: 100%; max-width: 760px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 12px 8px 14px 10px / 8px 14px 10px 12px;
  box-shadow: 7px 8px 0 rgba(29, 21, 48, 0.9);
  transform: rotate(0.6deg);
  padding: 8px 8px 22px;
  /* faint grid lines, like a cutting mat */
  background-image:
    linear-gradient(rgba(29, 21, 48, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 21, 48, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
}
.oneplus__stage {
  position: relative;
  height: clamp(340px, 52vw, 440px);
  overflow: hidden;
  touch-action: pan-y; /* page can still scroll on phones outside the pieces */
}
.oneplus__defs { position: absolute; }

/* The puzzle pieces (sized and placed by the script) */
.oneplus__piece {
  position: absolute; left: 0; top: 0;
  cursor: grab;
  touch-action: none;
  will-change: transform;
}
.oneplus__piece:active { cursor: grabbing; }
.oneplus__piece svg { width: 100%; height: 100%; overflow: visible; }
.oneplus__piece path {
  stroke: var(--ink); stroke-width: 3; stroke-linejoin: round;
  filter: url(#sketchPiece);
}
.oneplus__piece text {
  font-family: var(--font-display); font-size: 56px;
  text-anchor: middle; fill: var(--ink);
  pointer-events: none; user-select: none;
}
.oneplus__piece--a path { fill: var(--sky); }
.oneplus__piece--b path { fill: var(--yellow); }
.oneplus__piece--three path { fill: var(--green); }
/* The "3" is not draggable: let taps and swipes pass straight through it,
   so the page scrolls normally on phones even when a finger starts on it.
   It is drawn without the wobble effect so it stays crisp when enlarged. */
.oneplus__piece--three { cursor: default; opacity: 0; visibility: hidden; pointer-events: none; touch-action: auto; }
.oneplus__piece--three path,
.oneplus__piece.is-plain path { filter: none; } /* "is-plain": wobble switched off during the balloon */

/* Doodle lines that burst out of the join */
.oneplus__burst {
  position: absolute; left: 0; top: 0; width: 120px; height: 120px;
  overflow: visible; pointer-events: none; opacity: 0;
}
.oneplus__burst path { fill: none; stroke: var(--orange); stroke-width: 4; stroke-linecap: round; }

.oneplus__controls {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.oneplus__hint {
  margin: 0;
  font-family: "Gochi Hand", var(--font-body); font-size: 1.25rem; color: var(--purple);
}
.btn--ghost { background: var(--paper); color: var(--ink); min-height: 46px; padding: 10px 20px; font-size: 0.95rem; }

/* Confetti bits that fly out when the balloon pops (made by the script) */
.oneplus__confetti {
  position: absolute; left: 0; top: 0;
  width: 12px; height: 12px;
  border: 2px solid var(--ink);
  pointer-events: none;
}
.oneplus__confetti--dot  { border-radius: 50%; }
.oneplus__confetti--bar  { width: 18px; height: 8px; border-radius: 3px; }

/* "Why 3?" explanation (draft copy) */
.oneplus__why {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  max-width: 560px;
}
.oneplus__why-title { font-size: 1.5rem; transform: rotate(-3deg); }
.oneplus__why-text {
  margin: 0;
  font-size: clamp(1.1rem, 2.8vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink);
  background: rgba(255, 248, 236, 0.92);
  border-radius: 14px; padding: 12px 16px;
}

/* The approved line that appears last */
.oneplus__line {
  margin: 0;
  max-width: 22ch;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  line-height: 1.15;
  color: var(--ink);
  background: rgba(255, 248, 236, 0.9);
  border-radius: 16px; padding: 8px 14px;
}


/* ---------------------------------------------------------------------------
   5. WHO IT IS FOR
   Three character cards dealt onto the table, then speech bubbles.
   --------------------------------------------------------------------------- */
.who {
  padding: 14vh var(--gutter) 18vh;
  display: flex; flex-direction: column; align-items: center; gap: clamp(36px, 6vw, 64px);
  text-align: center;
}
.who__head {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  background: rgba(255, 248, 236, 0.92); border-radius: 18px; padding: 14px 18px;
}
.who__title { font-size: clamp(2.6rem, 9vw, 5rem); color: var(--ink); }
.who__lead { margin: 0; max-width: 28ch; font-size: clamp(1.15rem, 3vw, 1.45rem); color: var(--ink); }

/* The three cards */
.who__cards {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr; gap: 28px;
  width: 100%; max-width: 1040px;
}
@media (min-width: 820px) { .who__cards { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

.who-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  max-width: 340px; margin: 0 auto;
  padding: 20px 20px 26px;
  background: var(--paper);
  border: 2px solid var(--ink); border-radius: 18px;
  box-shadow: 6px 6px 0 var(--ink);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
/* each card has its own slight tilt, like cards dealt onto a table */
.who-card:nth-child(1) { --tilt: -3deg; }
.who-card:nth-child(2) { --tilt: 2deg; }
.who-card:nth-child(3) { --tilt: -1.5deg; }
.who-card { transform: rotate(var(--tilt)); }
.who-card:hover { transform: rotate(0deg) translateY(-6px); box-shadow: 9px 10px 0 var(--ink); }

/* coloured top band, like a trading card */
.who-card--sky    { background: linear-gradient(var(--sky-piece) 0 46%, var(--paper) 46%); }
.who-card--pink   { background: linear-gradient(var(--pink-piece) 0 46%, var(--paper) 46%); }
.who-card--yellow { background: linear-gradient(var(--yellow-piece) 0 46%, var(--paper) 46%); }

.who-card__art { width: 180px; height: auto; margin-top: -6px; }
.who-card__title { font-size: clamp(1.4rem, 3.6vw, 1.7rem); line-height: 1.1; color: var(--ink); margin-top: 6px; }
.who-card__text { margin: 0; font-size: 1.02rem; color: var(--ink-soft); }

/* What people want: hand-drawn speech bubbles */
.who__wants { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.who__wants-label {
  margin: 0;
  font-family: "Gochi Hand", var(--font-body); font-size: 1.4rem; color: var(--purple);
  background: var(--paper); padding: 2px 10px; border-radius: 8px;
}
.who__bubbles {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 22px 18px;
  max-width: 720px;
}
.bubble {
  position: relative;
  cursor: default;
  transition: box-shadow 0.2s var(--ease-out);
  padding: 12px 20px;
  font-weight: 700; font-size: 1.05rem; color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 26px 22px 28px 20px / 22px 28px 20px 26px; /* wobbly, hand-drawn */
  box-shadow: 3px 3px 0 var(--ink);
}
/* the little tail of the speech bubble */
.bubble::after {
  content: ""; position: absolute; left: 26px; bottom: -11px;
  width: 16px; height: 16px;
  background: inherit;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  transform: skewX(-25deg) rotate(45deg);
}
.bubble:nth-child(even)::after { left: auto; right: 26px; transform: skewX(25deg) rotate(45deg); }
.bubble:hover { box-shadow: 5px 6px 0 var(--ink); z-index: 1; }
.bubble--purple { background: var(--purple-piece); transform: rotate(-3deg); }
.bubble--orange { background: var(--orange-piece); transform: rotate(2deg); }
.bubble--green  { background: var(--green-piece);  transform: rotate(-1deg); }
.bubble--sky    { background: var(--sky-piece);    transform: rotate(3deg); }

.who__close {
  margin: 0; max-width: 20ch;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 6vw, 3.4rem); line-height: 1.12;
  color: var(--ink);
  background: rgba(255, 248, 236, 0.92); border-radius: 18px; padding: 8px 16px;
}


/* ---------------------------------------------------------------------------
   6. HOW WE ARE BUILDING IT
   A board-game path. Stop 1 is inked in (started); stops 2 to 4 are dashed
   pencil sketches, because they are plans.
   --------------------------------------------------------------------------- */
.stages {
  padding: 14vh var(--gutter) 18vh;
  display: flex; flex-direction: column; align-items: center; gap: clamp(40px, 7vw, 72px);
}
.stages__head {
  display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center;
  background: rgba(255, 248, 236, 0.92); border-radius: 18px; padding: 14px 18px;
}
.stages__title { font-size: clamp(2.4rem, 8.5vw, 4.8rem); color: var(--ink); max-width: 14ch; }
.stages__lead { margin: 0; max-width: 30ch; font-size: clamp(1.1rem, 3vw, 1.4rem); color: var(--ink); }

.stages__board { position: relative; width: 100%; max-width: 940px; }

/* The dotted path (sized and drawn by the script) */
.stages__path { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; z-index: 0; }
#stagesRoad {
  stroke: var(--ink); stroke-width: 3.5; stroke-linecap: round;
  stroke-dasharray: 1 12; /* a dotted line, like a path on a board game */
}

/* The little stick figure with a flag (hidden until the script places it) */
.walker { visibility: hidden; }
.walker.is-placed { visibility: visible; }
.walker__line, .walker__pole { stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; }
.walker__pole { stroke-width: 2; }
.walker__head { fill: var(--paper); stroke: var(--ink); stroke-width: 2.6; }
.walker__flag {
  fill: var(--orange); stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round;
  transform-box: fill-box; transform-origin: left center;
}
@media (prefers-reduced-motion: no-preference) {
  .walker__flag { animation: flag-wave 0.8s ease-in-out infinite alternate; } /* flutters in the wind */
}
@keyframes flag-wave {
  from { transform: skewY(-9deg) scaleX(0.88); }
  to   { transform: skewY(7deg) scaleX(1); }
}

.stages__list {
  position: relative; z-index: 1;
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: clamp(48px, 9vw, 90px);
}

/* Phones: dot on the left, card on the right */
.stage { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 16px; }
.stage__dot { grid-column: 1; }
.stage__card { grid-column: 2; }

/* Big screens: dots down the middle, cards alternate left and right */
@media (min-width: 820px) {
  .stage { grid-template-columns: 1fr 84px 1fr; gap: 28px; }
  .stage__dot { grid-column: 2; grid-row: 1; justify-self: center; }
  .stage:nth-child(odd)  .stage__card { grid-column: 3; grid-row: 1; }
  .stage:nth-child(even) .stage__card { grid-column: 1; grid-row: 1; }
}

.stage__dot {
  display: grid; place-items: center;
  width: 64px; height: 64px;
  font-family: var(--font-display); font-size: 1.9rem; color: var(--ink);
  background: var(--paper);
  border: 2.5px dashed var(--ink); border-radius: 50%;
}
.stage--now .stage__dot { background: var(--green); border-style: solid; box-shadow: 3px 3px 0 var(--ink); }

.stage__card {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 18px 20px 20px;
  background: rgba(255, 248, 236, 0.95);
  border: 2px dashed rgba(29, 21, 48, 0.55); /* sketched in pencil: a plan */
  border-radius: 16px 12px 18px 14px / 12px 18px 14px 16px;
  max-width: 400px;
}
.stage:nth-child(2) .stage__card { transform: rotate(1.2deg); }
.stage:nth-child(3) .stage__card { transform: rotate(-1deg); }
.stage:nth-child(4) .stage__card { transform: rotate(0.8deg); }
@media (min-width: 820px) {
  .stage:nth-child(even) .stage__card { justify-self: end; }
}
.stage--now .stage__card {
  border: 2px solid var(--ink); background: var(--paper);
  box-shadow: 5px 5px 0 var(--ink);
  transform: rotate(-1.5deg);
}

.stage__name { font-size: clamp(1.6rem, 4.4vw, 2.1rem); color: var(--ink); }
.stage__text { margin: 0; font-size: 1.02rem; color: var(--ink-soft); }

/* Status chip */
.stage__status {
  margin: 0;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink);
  padding: 3px 10px; border-radius: 999px;
  border: 1.5px dashed var(--ink);
  background: var(--yellow-soft);
}
.stage__status--started { background: var(--green-piece); border-style: solid; }

/* "We are here" sticker on stop 1 */
.stage__here {
  position: absolute; top: -18px; right: -8px;
  font-family: "Gochi Hand", var(--font-body); font-size: 1.1rem; color: var(--ink);
  background: var(--yellow); border: 2px solid var(--ink); border-radius: 10px;
  padding: 2px 10px 4px; box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(6deg);
}


/* ---------------------------------------------------------------------------
   7. HEAR FIRST (sign-up, not open yet)
   --------------------------------------------------------------------------- */
.signup {
  padding: 16vh var(--gutter) 20vh;
  display: flex; justify-content: center;
}
.signup__card {
  position: relative;
  width: 100%; max-width: 640px;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  text-align: center;
  padding: clamp(40px, 7vw, 64px) clamp(20px, 6vw, 56px) clamp(32px, 6vw, 52px);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 10px 14px 12px 16px / 14px 10px 16px 12px;
  box-shadow: 8px 10px 0 var(--ink);
  transform: rotate(-0.6deg);
}
.signup__title { font-size: clamp(2.1rem, 7vw, 3.6rem); max-width: 14ch; color: var(--ink); }

/* The "not open yet" notice: visible before anyone types */
.signup__notice {
  margin: 0;
  display: flex; align-items: center; gap: 10px; text-align: left;
  font-size: 1rem; font-weight: 600; color: var(--ink);
  background: var(--yellow-soft);
  border: 2px dashed var(--ink); border-radius: 12px;
  padding: 10px 14px;
}
.signup__notice-icon {
  flex: none;
  display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--yellow); border: 2px solid var(--ink);
  font-family: var(--font-display); font-size: 1rem;
}

.signup__form { width: 100%; display: flex; flex-direction: column; align-items: stretch; gap: 8px; text-align: left; }
.signup__label { font-weight: 700; font-size: 0.95rem; color: var(--ink); }
.signup__row { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 560px) { .signup__row { flex-direction: row; } }
.signup__input {
  flex: 1; min-width: 0; min-height: 52px;
  padding: 12px 16px;
  font: inherit; font-size: 1.05rem; color: var(--ink);
  background: #FFFFFF;
  border: 2px solid var(--ink); border-radius: 14px;
  box-shadow: inset 2px 2px 0 rgba(29, 21, 48, 0.08);
}
.signup__input::placeholder { color: rgba(29, 21, 48, 0.45); }
.signup__input:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }
.signup__input[aria-invalid="true"] { border-color: #C8261C; }
.signup__button { white-space: nowrap; }

.signup__message { margin: 4px 0 0; min-height: 1.5em; font-size: 0.98rem; color: var(--ink); }
.signup__message.is-error { color: #B3241B; font-weight: 600; }
.signup__message.is-info {
  font-weight: 600;
  background: var(--sky-soft); border: 2px solid var(--ink); border-radius: 12px;
  padding: 10px 14px;
}


/* ---------------------------------------------------------------------------
   8. FOOTER
   --------------------------------------------------------------------------- */
.site-footer {
  position: relative; z-index: 1;
  background: var(--ink); color: var(--paper);
  padding: 56px var(--gutter) max(110px, calc(env(safe-area-inset-bottom) + 96px)); /* room for the floating button */
  /* wavy top edge, like torn paper */
  -webkit-mask: radial-gradient(14px at 50% 0, transparent 98%, #000) 50% 0 / 28px 100% repeat-x;
          mask: radial-gradient(14px at 50% 0, transparent 98%, #000) 50% 0 / 28px 100% repeat-x;
}
.site-footer__inner {
  max-width: 1040px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center;
}
/* Secondary logo: "PSA" letters with the full name underneath */
.site-footer__logo-secondary { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.site-footer__logo-secondary img { width: clamp(150px, 30vw, 200px); height: auto; }
.site-footer__wordmark {
  font-family: "Anton", var(--font-body); font-size: clamp(1.15rem, 3.6vw, 1.45rem);
  letter-spacing: 0.02em; line-height: 1;
}
.site-footer__brand { display: flex; align-items: center; gap: 14px; }
.site-footer__logo { width: 56px; height: 56px; border-radius: 12px; border: 2px solid var(--paper); object-fit: cover; }
.site-footer__line { margin: 0; font-size: 1rem; }
.site-footer__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; }
.site-footer__nav a {
  color: var(--paper); font-weight: 600; font-size: 0.95rem;
  text-decoration: underline; text-decoration-color: var(--orange);
  text-decoration-thickness: 2px; text-underline-offset: 4px;
}
.site-footer__nav a:focus-visible { outline-color: var(--yellow); }
.site-footer__replay { min-height: 46px; padding: 10px 20px; font-size: 0.95rem; box-shadow: 4px 4px 0 var(--paper); border-color: var(--paper); }
.site-footer__replay:hover { box-shadow: 6px 6px 0 var(--paper); }
