/* =========================================================================
   Twenty4 — How it works
   The page is a timeline: it opens in the camera-roll chaos, crosses TODAY,
   and ends in the future. Paper, pen and film; coral is the line of life.
   Loads AFTER site.css (tokens, nav, footer, .rv, .kicker come from there).
   ========================================================================= */

/* ---------- shared beat scaffolding ---------- */
.beat { position: relative; }

.beat-chip {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--pen);
  border: 1.5px solid rgba(46, 77, 156, .35);
  padding: .38rem .9rem .34rem; border-radius: 999px;
  transform: rotate(-1.2deg);
  background: rgba(251, 248, 242, .7);
  margin-bottom: 1.2rem;
}
.bc-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.55rem; height: 1.55rem; border-radius: 50%;
  background: var(--coral); color: #fff;
  font-size: .72rem; letter-spacing: 0;
}
.bc-night { background: rgba(20, 18, 16, .55); border-color: rgba(255, 255, 255, .25); color: var(--night-soft); }

.beat-h {
  font-family: var(--serif);
  font-weight: 800; letter-spacing: -.02em; line-height: 1.04;
  font-size: clamp(2.3rem, 1.2rem + 4.6vw, 4.4rem);
  margin: 0 0 1.1rem;
}
.beat-lead {
  max-width: 34rem; color: var(--ink-soft);
  font-size: clamp(1.02rem, .95rem + .35vw, 1.18rem);
}

/* the coral spine segments that make the page read as one line */
.spine, .life-spine, .start-spine { pointer-events: none; }

/* ---------- HERO ---------- */
.hiw-hero {
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: clip;
  padding: 7rem 0 5rem;
}
.hero-core { position: relative; z-index: 2; max-width: 860px; }
.hero-h {
  font-family: var(--serif); font-weight: 800;
  letter-spacing: -.025em; line-height: 1.02;
  font-size: clamp(2.7rem, 1.4rem + 6vw, 5.6rem);
  margin: 0 0 1.3rem;
}
.hero-lead {
  max-width: 36rem; margin: 0 auto 2.6rem;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem);
}
.hero-scroll {
  display: inline-flex; flex-direction: column; align-items: center; gap: .4rem;
  font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--coral-deep);
}
.hero-scroll img { width: 26px; height: auto; }
@keyframes hero-bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(7px) } }
@media (prefers-reduced-motion: no-preference) {
  .hero-scroll img { animation: hero-bob 2.2s ease-in-out infinite; }
}
/* drifting polaroids behind the headline */
.hero-drift { position: absolute; inset: 0; z-index: 1; }
.hd {
  position: absolute; width: clamp(120px, 16vw, 220px);
  background: #fff; padding: 8px 8px 26px;
  box-shadow: 0 24px 60px -28px rgba(31, 29, 26, .45);
  border-radius: 4px;
}
.hd img { aspect-ratio: 1 / 1.05; object-fit: cover; width: 100%; }
.hd-a { left: 4%;  top: 14%; transform: rotate(-9deg); }
.hd-b { right: 5%; top: 10%; transform: rotate(6deg); }
.hd-c { left: 9%;  bottom: 12%; transform: rotate(5deg); }
.hd-d { right: 8%; bottom: 16%; transform: rotate(-6deg); }
@media (max-width: 760px) {
  .hd { width: 108px; opacity: .85; }
  .hd-a { left: -3%; top: 9%; } .hd-b { right: -3%; top: 7%; }
  .hd-c { left: -4%; bottom: 9%; } .hd-d { right: -4%; bottom: 12%; }
}
/* the line begins under the hero */
.spine-hero {
  position: absolute; left: 50%; bottom: 0; translate: -50% 0;
  width: 3px; height: 88px; border-radius: 3px;
  background: linear-gradient(to bottom, transparent, var(--coral));
}

/* ---------- 01 · CAPTURE ---------- */
.b-capture { background: linear-gradient(to bottom, var(--paper), var(--paper-deep)); }
/* the pin must FIT one viewport: head compressed, stage takes the rest */
.cap-pin {
  height: 100svh; width: 100%;
  display: flex; flex-direction: column; justify-content: center;
  padding: 5.2rem 0 1.6rem; overflow: clip;
}
.cap-head { text-align: center; }
.cap-head .beat-lead { margin: 0 auto; }
@media (max-height: 760px) {
  .cap-head .beat-h { font-size: clamp(1.7rem, 1rem + 3vw, 2.6rem); margin-bottom: .6rem; }
  .cap-head .beat-lead { font-size: .95rem; }
  .cap-head .beat-chip { margin-bottom: .7rem; }
}
/* landscape phones / very short panes: the visual carries the beat alone */
@media (max-height: 540px) {
  .cap-head .beat-lead { display: none; }
}
.cap-stage {
  position: relative;
  flex: 1 1 auto; min-height: 240px;
  max-width: 900px; width: 100%;
  margin: 1.4rem auto 0;
}
.cap-scatter { position: absolute; inset: 0; }
.cs {
  position: absolute; width: clamp(64px, 9vw, 118px); aspect-ratio: 1; object-fit: cover;
  border-radius: 8px; filter: grayscale(.85) contrast(.92) brightness(1.04);
  box-shadow: 0 14px 30px -16px rgba(31, 29, 26, .4);
}
.cs-lg { width: clamp(84px, 12vw, 150px); }
.cs:nth-child(1)  { left: 6%;  top: 4%;  transform: rotate(-8deg); }
.cs:nth-child(2)  { left: 28%; top: 0;   transform: rotate(5deg); }
.cs:nth-child(3)  { left: 52%; top: 6%;  transform: rotate(-4deg); }
.cs:nth-child(4)  { left: 76%; top: 2%;  transform: rotate(9deg); }
.cs:nth-child(5)  { left: 2%;  top: 38%; transform: rotate(6deg); }
.cs:nth-child(6)  { left: 80%; top: 34%; transform: rotate(-7deg); }
.cs:nth-child(7)  { left: 10%; top: 70%; transform: rotate(-5deg); }
.cs:nth-child(8)  { left: 30%; top: 76%; transform: rotate(8deg); }
.cs:nth-child(9)  { left: 56%; top: 78%; transform: rotate(-9deg); }
.cs:nth-child(10) { left: 78%; top: 70%; transform: rotate(4deg); }
.cs:nth-child(11) { left: 42%; top: 40%; transform: rotate(-3deg); opacity: .9; }
.cs:nth-child(12) { left: 64%; top: 44%; transform: rotate(7deg); opacity: .9; }
@media (max-width: 760px) {
  .cs:nth-child(11), .cs:nth-child(12) { display: none; }
}

/* the one moment card the chaos becomes */
.moment-card {
  position: relative;
  width: min(420px, 82vw);
  background: #fff; border-radius: 20px; overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(31, 29, 26, .5);
}
.moment-card .mc-cover { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.mc-meta {
  display: flex; flex-direction: column; gap: .5rem;
  padding: 1rem 1.15rem 1.15rem;
}
.mc-title { font-weight: 700; font-size: 1.12rem; letter-spacing: -.01em; }
.mc-sub { display: flex; flex-wrap: wrap; gap: .45rem; }
.mc-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .78rem; font-weight: 600; color: var(--ink-soft);
  background: var(--paper); border: 1px solid rgba(31, 29, 26, .08);
  padding: .28rem .6rem; border-radius: 999px;
}
.mc-chip img { width: 13px; height: 13px; }
.mc-count { color: var(--coral-deep); }
.cap-card {
  position: absolute; left: 50%; top: 50%;
  translate: -50% -50%;
  /* sized by viewport HEIGHT too so the pinned stage always contains it */
  width: min(420px, 82vw, 52vh);
  opacity: 0; scale: .82;
}
@media (max-height: 600px) {
  .cap-card .mc-cover { aspect-ratio: 16 / 9; }
}
/* static / reduced-motion: show the outcome, calm the chaos */
.no-motion .cap-card, .no-js .cap-card { opacity: 1; scale: 1; }
.no-motion .cs, .no-js .cs { opacity: .28; }
.no-motion .cap-pin, .no-js .cap-pin { height: auto; min-height: 0; padding-bottom: 3rem; }

/* ---------- 02 · THE 24 ---------- */
.b-roll { padding: 7rem 0 6rem; overflow: clip; }
.roll-head { text-align: center; }
.roll-head .beat-lead { margin: 0 auto; }
.roll-pin { padding: 3rem 0 0; width: 100%; }
.roll-counter-row {
  display: flex; align-items: baseline; justify-content: center; gap: .6rem;
  margin-bottom: 1.6rem;
}
.roll-big {
  font-family: var(--serif); font-weight: 800; letter-spacing: -.03em;
  font-size: clamp(4rem, 2.4rem + 8vw, 8rem); line-height: 1;
  color: var(--coral);
  font-variant-numeric: tabular-nums;
}
.roll-of { font-weight: 700; color: var(--ink-soft); font-size: 1.05rem; letter-spacing: .06em; text-transform: uppercase; }
.dev-strip { overflow: hidden; padding: 1.2rem 0; }
.dev-film {
  display: flex; gap: 14px; width: max-content;
  padding: 0 6vw;
  background:
    repeating-linear-gradient(to right, transparent 0 10px, rgba(31,29,26,.12) 10px 14px) top / 100% 8px no-repeat,
    repeating-linear-gradient(to right, transparent 0 10px, rgba(31,29,26,.12) 10px 14px) bottom / 100% 8px no-repeat;
  padding-top: 18px; padding-bottom: 18px;
}
.df {
  position: relative; flex: none;
  width: clamp(120px, 16vw, 190px); aspect-ratio: 1;
  border-radius: 10px; overflow: hidden;
  background: var(--paper-deep);
  border: 2px dashed rgba(31, 29, 26, .18);
}
.df img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; scale: 1.12; filter: grayscale(1);
  transition: opacity .45s ease, scale .6s ease, filter .8s ease;
}
.df.is-dev { border-color: transparent; }
.df.is-dev img { opacity: 1; scale: 1; filter: grayscale(0); }
.df-n {
  position: absolute; left: 8px; bottom: 6px;
  font-size: .68rem; font-weight: 700; color: rgba(31, 29, 26, .4);
  background: rgba(251, 248, 242, .8); border-radius: 6px; padding: .1rem .38rem;
}
.df.is-dev .df-n { color: #fff; background: rgba(20, 18, 16, .45); }
.roll-note {
  text-align: center; margin: 2rem auto 0;
  font-weight: 600; color: var(--ink-soft);
  opacity: 0; transform: translateY(12px);
}
/* landscape phones: shrink the pinned roll so it fits above the fold */
@media (max-height: 540px) {
  .roll-big { font-size: 3.2rem; }
  .df { width: 96px; }
  .roll-note { margin-top: 1rem; }
}
.roll-note.is-on { opacity: 1; transform: none; transition: all .6s ease; }
.no-motion .roll-note, .no-js .roll-note { opacity: 1; transform: none; }

/* ---------- 03 · TOGETHER ---------- */
.b-together { background: var(--paper-deep); padding: 7.5rem 0; overflow: clip; }
.tg-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
@media (max-width: 900px) { .tg-grid { grid-template-columns: 1fr; gap: 3rem; } }
.tg-stage { position: relative; min-height: 480px; display: flex; align-items: center; justify-content: center; }
.tg-card { rotate: 1.5deg; }
.tg-avatars { position: absolute; top: 12px; right: 12px; display: flex; }
.tga {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: .95rem;
  border: 3px solid #fff; margin-left: -10px;
  box-shadow: 0 8px 18px -8px rgba(31, 29, 26, .5);
}
.tga-1 { background: #7C3AED; }
.tga-2 { background: #30A46C; }
.tga-3 { background: var(--pen); }
.tg-bubble {
  position: absolute;
  max-width: 240px;
  background: #fff; border-radius: 16px;
  padding: .7rem .95rem;
  font-size: .88rem; line-height: 1.45;
  box-shadow: 0 18px 44px -20px rgba(31, 29, 26, .45);
}
.tg-bubble b { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--coral-deep); margin-bottom: .15rem; }
.tg-b1 { left: 0; bottom: 18%; rotate: -2deg; }
.tg-b2 { right: 0; bottom: 4%; rotate: 1.5deg; }
.tg-heart { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; }
.tg-pop {
  position: absolute; width: 84px; aspect-ratio: 1; object-fit: cover;
  border-radius: 10px; border: 3px solid #fff;
  box-shadow: 0 14px 30px -14px rgba(31, 29, 26, .5);
}
.tg-p1 { left: 4%; top: 8%; rotate: -8deg; }
.tg-p2 { right: 6%; top: 20%; rotate: 7deg; }
@media (max-width: 900px) {
  .tg-stage { min-height: 430px; }
  .tg-bubble { max-width: 200px; }
}
/* motion prep (how.js animates these in) */
.js-motion .tga, .js-motion .tg-bubble, .js-motion .tg-pop { opacity: 0; }

/* ---------- 04 · ONE TIMELINE ---------- */
.b-life { background: linear-gradient(to bottom, var(--paper), #fff 30%, var(--paper)); }
.life-head { text-align: center; padding: 7rem 0 3rem; }
.life-head .beat-lead { margin: 0 auto; }
.life-pin {
  position: relative; height: 100svh; width: 100%;
  overflow: clip;
}
.life-spine {
  position: absolute; left: 50%; top: 0; bottom: 0; translate: -50% 0;
  width: 3px; border-radius: 3px;
  background: linear-gradient(to bottom, transparent, var(--coral) 12%, var(--coral) 88%, transparent);
}
.life-today {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  z-index: 3; display: flex; flex-direction: column; align-items: center; gap: .5rem;
}
.lt-ring {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 6px rgba(250, 93, 74, .22);
}
@keyframes lt-pulse { 0%,100% { box-shadow: 0 0 0 6px rgba(250,93,74,.22) } 50% { box-shadow: 0 0 0 14px rgba(250,93,74,.1) } }
@media (prefers-reduced-motion: no-preference) { .lt-ring { animation: lt-pulse 2.4s ease-in-out infinite; } }
.lt-chip {
  font-size: .72rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase;
  color: #fff; background: var(--ink);
  padding: .3rem .7rem .26rem; border-radius: 999px;
}
.life-flow { position: absolute; left: 0; right: 0; top: 100svh; }
.life-card {
  position: relative;
  width: min(340px, 40vw);
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 26px 60px -26px rgba(31, 29, 26, .45);
  margin: 0 0 5.5rem;
}
.life-card img { width: 100%; aspect-ratio: 4 / 2.9; object-fit: cover; }
.life-card figcaption { padding: .8rem 1rem .95rem; display: flex; flex-direction: column; gap: .15rem; }
.life-card b { font-weight: 700; letter-spacing: -.01em; }
.life-card span { font-size: .82rem; color: var(--ink-soft); font-weight: 600; }
.lc-l { margin-right: auto; margin-left: calc(50% - min(340px, 40vw) - clamp(1.2rem, 4vw, 4rem)); }
.lc-r { margin-left: auto; margin-right: calc(50% - min(340px, 40vw) - clamp(1.2rem, 4vw, 4rem)); }
/* connector ticks to the spine */
.life-card::after {
  content: ""; position: absolute; top: 50%;
  width: clamp(1.2rem, 4vw, 4rem); height: 2px; background: rgba(250, 93, 74, .5);
}
.lc-l::after { right: calc(-1 * clamp(1.2rem, 4vw, 4rem)); }
.lc-r::after { left: calc(-1 * clamp(1.2rem, 4vw, 4rem)); }
.lc-future { background: rgba(255, 255, 255, .55); border: 2px dashed rgba(46, 77, 156, .4); box-shadow: none; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lc-future figcaption { padding: 1.3rem 1.1rem; }
.lc-count { color: var(--pen); }
.life-beats { position: absolute; left: 0; right: 0; top: 9%; text-align: center; z-index: 4; pointer-events: none; }
.lb {
  position: absolute; left: 0; right: 0;
  font-family: var(--serif); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(1.4rem, 1rem + 2.4vw, 2.4rem);
  opacity: 0;
  text-shadow: 0 2px 18px rgba(251, 248, 242, .9);
}
@media (max-width: 700px) {
  .life-card { width: min(300px, 72vw); }
  .lc-l { margin-left: clamp(.6rem, 3vw, 2rem); }
  .lc-r { margin-right: clamp(.6rem, 3vw, 2rem); }
  .life-spine, .life-today { left: 50%; }
}
/* reduced-motion: unpin, show a calm static column */
.no-motion .life-pin, .no-js .life-pin { height: auto; padding: 2rem 0 4rem; }
.no-motion .life-flow, .no-js .life-flow { position: static; }
.no-motion .life-today, .no-js .life-today { position: static; translate: 0 0; margin: 0 auto 3rem; }
.no-motion .life-beats, .no-js .life-beats { display: none; }
.no-motion .life-spine, .no-js .life-spine { background: linear-gradient(to bottom, transparent, var(--coral) 8%, var(--coral) 92%, transparent); }

/* ---------- 05 · RELIVE ---------- */
.b-relive { padding: 8rem 0; overflow: clip; }
.rl-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 4rem; align-items: center; }
@media (max-width: 900px) { .rl-grid { grid-template-columns: 1fr; gap: 2.6rem; } }
.rl-hint {
  display: inline-flex; align-items: center; gap: .55rem;
  margin-top: 1.4rem;
  font-size: .82rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--coral-deep);
}
.rl-hint img { width: 22px; }
.rl-stage { perspective: 1600px; }
.rl-flip {
  position: relative; width: 100%; aspect-ratio: 4 / 3.1;
  transform-style: preserve-3d;
  border-radius: 22px;
}
.rl-face {
  position: absolute; inset: 0; margin: 0;
  border-radius: 22px; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 44px 90px -34px rgba(31, 29, 26, .5);
}
.rl-front img { width: 100%; height: 100%; object-fit: cover; }
.rl-chip {
  position: absolute;
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .8rem; font-weight: 700; color: var(--ink);
  background: rgba(251, 248, 242, .78);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .6);
  padding: .4rem .75rem; border-radius: 999px;
  box-shadow: 0 10px 24px -12px rgba(20, 18, 16, .45);
}
.rl-chip img { width: 14px; height: 14px; }
.rl-c1 { left: 14px; top: 14px; rotate: -1.5deg; }
.rl-c2 { right: 14px; top: 52px; rotate: 1.8deg; }
.rl-c3 { left: 18px; bottom: 16px; rotate: 1deg; }
.rl-back {
  transform: rotateY(180deg);
  background: #fff;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(1.6rem, 4vw, 3rem);
}
.rl-note-k { font-size: .74rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--coral-deep); margin-bottom: 1rem; }
.rl-note-t {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.08rem, 1rem + .7vw, 1.5rem); line-height: 1.5;
  color: var(--ink);
}
.rl-note-sig { margin-top: 1.2rem; font-size: .84rem; font-weight: 600; color: var(--ink-soft); }
.rl-sticker {
  position: absolute; right: 8%; bottom: 10%;
  width: 54px; height: 54px; rotate: 12deg; opacity: .9;
}
.rl-sticker img { width: 100%; height: 100%; }
/* reduced-motion: no 3D — show the journal as a stacked card */
.no-motion .rl-stage, .no-js .rl-stage { perspective: none; }
.no-motion .rl-flip, .no-js .rl-flip { aspect-ratio: auto; }
.no-motion .rl-face, .no-js .rl-face { position: relative; inset: auto; }
.no-motion .rl-front, .no-js .rl-front { margin-bottom: 1.4rem; aspect-ratio: 4 / 3; }
.no-motion .rl-back, .no-js .rl-back { transform: none; min-height: 300px; }
.no-motion .rl-hint, .no-js .rl-hint { display: none; }

/* ---------- 06 · START (night) ---------- */
.b-start {
  background: var(--night); color: #fff;
  text-align: center;
  padding: 9rem 0 7rem;
  position: relative; overflow: clip;
}
.start-spine {
  position: absolute; left: 50%; top: 0; translate: -50% 0;
  width: 3px; height: 160px; border-radius: 3px;
  background: linear-gradient(to bottom, var(--coral), transparent);
}
.start-core { position: relative; z-index: 2; max-width: 820px; }
.start-ghosts { display: flex; flex-direction: column; gap: .9rem; margin: 2.4rem auto 3.4rem; max-width: 460px; }
.sg {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  border: 2px dashed rgba(255, 255, 255, .22);
  border-radius: 14px;
  padding: .95rem 1.2rem;
  font-weight: 600; color: rgba(255, 255, 255, .8);
  text-align: left;
  background: rgba(255, 255, 255, .03);
}
.sg-when { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--night-soft); flex: none; }
.start-h {
  font-family: var(--serif); font-weight: 800;
  letter-spacing: -.025em; line-height: 1.04;
  font-size: clamp(2.6rem, 1.4rem + 5.4vw, 5rem);
  margin: 0 0 1.4rem;
}
.start-lead { max-width: 36rem; margin: 0 auto 2.6rem; color: var(--night-soft); font-size: clamp(1.02rem, .98rem + .35vw, 1.2rem); }
.start-cta { margin-bottom: 1.2rem; }
.start-reassure { font-size: .88rem; color: var(--night-soft); }
.start-mark {
  display: block; width: 44px; margin: 4.5rem auto 0;
  opacity: .85;
}

/* the night footer sits right under the night finale — soften the seam */
.b-start + .footer, .hiw .footer { border-top: none; }

/* ---------- no-JS: the page must read fully with zero scripting ---------- */
.no-js .rv { opacity: 1 !important; transform: none !important; }
.no-js .dev-strip { display: none; }  /* frames are JS-built; hide the empty band */
.no-js .tga, .no-js .tg-bubble, .no-js .tg-pop { opacity: 1; }
