@font-face { font-family: "Instrument Sans"; src: url("assets/fonts/InstrumentSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("assets/fonts/InstrumentSans-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("assets/fonts/InstrumentSans-SemiBold.ttf") format("truetype"); font-weight: 600 700; font-display: swap; }

/* =========================================================
   Moai Social website
   One continuous page: night (tonight) → day (for life) → night again.
   Colours, radii and spacing come from the Moai Social design system.
   ========================================================= */

:root {
  /* Colour */
  --espresso: #3b2b23;     /* night */
  --cocoa: #694f41;        /* dusk, primary buttons */
  --cream: #f9f1e8;        /* text and logo on dark */
  --paper: #fcfaf6;        /* day */
  --surface: #ffffff;
  --sand: #efe7db;
  --line: #e6ddcc;
  --ink: #382b24;
  --muted-strong: #73635a;

  /* Shape */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  /* The route: a dashed line that runs down the light part of the page */
  --route-x: 50%;

  /* Type: Instrument Sans, the app's typeface */
  --font-sans: "Instrument Sans", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--espresso); color: var(--ink);
  font-family: var(--font-sans); font-size: 17px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.1; }
p, figure { margin: 0; }
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; position: relative; }
.narrow { max-width: 820px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px; border-radius: var(--radius-pill);
  border: 1.5px solid transparent; font: 600 16px/1 var(--font-sans);
  text-decoration: none; cursor: pointer; transition: transform .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--cocoa); outline-offset: 3px; }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 15px; }
.btn-primary { background: var(--cocoa); color: var(--surface); }
.btn-cream { background: var(--cream); color: var(--espresso); }
.btn-cream:focus-visible, .btn-ghost:focus-visible { outline-color: var(--cream); }
.btn-ghost { border-color: rgba(249, 241, 232, .45); color: var(--cream); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ---------- Type helpers ---------- */
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--cream); opacity: .75; margin-bottom: 18px; }
.eyebrow-dark { color: var(--muted-strong); opacity: 1; }
.title { font-size: clamp(30px, 4vw, 46px); letter-spacing: -0.03em; }
.body-lg { font-size: 19px; line-height: 1.55; }

/* ---------- Header: transparent over the night ---------- */
.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 76px; }
.brand img { width: 84px; }
.nav { display: flex; gap: 28px; }
.nav a { text-decoration: none; font-size: 15px; color: var(--cream); opacity: .8; }
.nav a:hover { opacity: 1; }

/* ---------- Chat bubbles: the thread that runs through the page ---------- */
.bubble {
  display: inline-block; width: max-content; padding: 10px 16px;
  background: var(--cream); color: var(--ink);
  font-size: 16px; font-weight: 600; line-height: 1.2;
  border-radius: 20px 20px 20px 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
.bubble-me { background: var(--cocoa); color: var(--surface); border-radius: 20px 20px 6px 20px; }
.day .bubble { box-shadow: 0 8px 24px rgba(59, 43, 35, .10); background: var(--surface); border: 1px solid var(--line); }
.day .bubble-me { background: var(--cocoa); border-color: var(--cocoa); }

@keyframes drift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.bubbles .bubble { position: absolute; animation: drift 6s ease-in-out infinite; }

/* ================= NIGHT ================= */
.night {
  color: var(--cream);
  /* starts warming up early, so the night fades slowly into dusk */
  background: linear-gradient(180deg, var(--espresso) 0%, var(--espresso) 30%, #47342b 55%, #57402f 78%, var(--cocoa) 100%);
  background: linear-gradient(in oklab 180deg, var(--espresso) 0%, var(--espresso) 30%, #47342b 55%, #57402f 78%, var(--cocoa) 100%);
}

.hero-inner { position: relative; text-align: center; padding-top: 172px; padding-bottom: 40px; }
.hero h1 { font-size: clamp(48px, 7.4vw, 100px); line-height: .95; letter-spacing: -0.04em; margin: 0 auto 24px; }
.lede { font-size: clamp(17px, 1.7vw, 20px); line-height: 1.5; max-width: 500px; margin: 0 auto 32px; opacity: .9; }
.fineprint { margin-top: 20px; font-size: 14px; opacity: .65; }

.hero .bubbles { position: absolute; inset: 0; pointer-events: none; }
.b1 { left: 5%;  top: 132px; animation-delay: 0s; }
.b2 { right: 8%; top: 118px; animation-delay: 1.2s; }
.b3 { left: 7%;  top: 440px; animation-delay: 2.1s; }
.b4 { right: 5%; top: 480px; animation-delay: .6s; }

/* Photo fan */
.fan { position: relative; display: flex; justify-content: center; align-items: flex-end; margin-top: 80px; height: 520px; }
.polaroid {
  position: relative; background: var(--cream); padding: 12px 12px 44px;
  border-radius: 4px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); width: 280px;
}
.polaroid img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; border-radius: 2px; }
.datestamp {
  position: absolute; right: 22px; bottom: 56px;
  font: 600 14px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .08em;
  color: var(--cream); text-shadow: 0 0 6px rgba(0, 0, 0, .55);
}
.phone {
  border-radius: 36px; border: 7px solid #1d1511; overflow: hidden;
  background: #1d1511; box-shadow: 0 30px 70px rgba(0, 0, 0, .4); width: 250px;
}
.fan-left  { transform: rotate(-9deg) translate(40px, -10px); z-index: 1; }
.fan-mid   { position: relative; z-index: 2; margin-bottom: -40px; }
.fan-right { transform: rotate(8deg) translate(-40px, -30px); z-index: 1; }

/* Manifesto */
.manifesto { text-align: center; padding: 140px 0 56px; }
.manifesto h2 { font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -0.03em; margin-bottom: 28px; }
.manifesto .body-lg { opacity: .88; max-width: 620px; margin: 0 auto 14px; }
.statement { margin-top: 40px; font-size: clamp(20px, 2.3vw, 26px); font-weight: 700; letter-spacing: -0.02em; }

/* ================= DUSK → DAY ================= */
.dusk {
  position: relative; height: 200px;
  /* soft dusk: the last part of the fade carries on under the next heading */
  background: linear-gradient(180deg, var(--cocoa) 0%, #7a604f 22%, #8e7462 44%, #a58c79 66%, #bda792 86%, #c9b5a0 100%);
  background: linear-gradient(in oklab 180deg, var(--cocoa) 0%, #7a604f 22%, #8e7462 44%, #a58c79 66%, #bda792 86%, #c9b5a0 100%);
}
.dusk::after { /* the route starts here */
  content: ""; position: absolute; left: var(--route-x); top: 90px; bottom: 0;
  border-left: 2px dashed rgba(105, 79, 65, .45);
}
.dusk-bubble { position: absolute; left: calc(var(--route-x) + 20px); top: 36px; }

/* ================= DAY ================= */
.day {
  color: var(--ink); position: relative;
  background: linear-gradient(180deg, #c9b5a0 0px, #d8c9b7 120px, #e9e0d3 240px, var(--paper) 380px, var(--paper) 100%);
  background: linear-gradient(in oklab 180deg, #c9b5a0 0px, #d8c9b7 120px, #e9e0d3 240px, var(--paper) 380px, var(--paper) 100%);
}
.route::before { /* one dashed route line through every light section */
  content: ""; position: absolute; left: var(--route-x); top: var(--route-start, 230px); bottom: 0;
  border-left: 2px dashed rgba(105, 79, 65, .45);
}
.route-head { position: relative; text-align: center; max-width: 760px; margin: 0 auto; background: var(--paper); padding: 24px 0; }
.route-head .body-lg { color: var(--muted-strong); margin-top: 16px; }

.pin {
  position: relative; z-index: 1; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: var(--radius-pill);
  background: var(--cocoa); color: var(--surface); font-weight: 700; font-size: 17px;
  box-shadow: 0 0 0 8px var(--paper);
}
.pin-dot { width: 18px; height: 18px; margin: 0 auto 28px; }
.pin-cream { background: var(--cream); box-shadow: 0 0 0 8px var(--espresso); }

/* How it works: steps alternate either side of the route */
.how { padding: 48px 0 40px; }
.how .route-head { background: transparent; }
.how .eyebrow-dark { color: var(--ink); }
.steps { list-style: none; margin: 56px 0 0; padding: 0; display: grid; gap: 72px; }
.step { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); align-items: center; column-gap: 56px; }
.step .pin { grid-column: 2; grid-row: 1; }
.step .phone { grid-column: 1; grid-row: 1; justify-self: end; width: 240px; border-color: var(--espresso); background: var(--espresso); box-shadow: 0 20px 50px rgba(59, 43, 35, .18); }
.step-text { grid-column: 3; grid-row: 1; max-width: 380px; }
.step:nth-child(even) .phone { grid-column: 3; justify-self: start; }
.step:nth-child(even) .step-text { grid-column: 1; justify-self: end; text-align: right; }
.step h3 { font-size: clamp(24px, 2.6vw, 32px); margin-bottom: 10px; }
.step p { color: var(--muted-strong); font-size: 18px; margin-bottom: 20px; }

/* Campus */
.campus { padding: 96px 0 40px; }
.pills { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pill { padding: 10px 20px; border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 16px; }
.pill-on { background: var(--cocoa); border-color: var(--cocoa); color: var(--surface); }

/* Partners */
.partners { padding: 96px 0 0; position: relative; z-index: 2; }
.partner-grid {
  position: relative; z-index: 1; margin-top: 48px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 40px;
}
.partner-copy h3 { font-size: 24px; margin-bottom: 14px; }
.partner-copy h3 + .ticks { margin-bottom: 32px; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 28px; color: var(--muted-strong); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: 14px; height: 8px;
  border-left: 2px solid var(--cocoa); border-bottom: 2px solid var(--cocoa); transform: rotate(-45deg);
}
.form { display: grid; gap: 16px; }
.form h3 { font-size: 24px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 15px; font-weight: 600; }
.optional { font-weight: 400; color: var(--muted-strong); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; font: 400 16px/1.4 var(--font-sans); color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--cocoa); outline-offset: 1px; border-color: var(--cocoa); }
.form .btn { justify-self: start; }
.form-status { font-size: 15px; color: var(--muted-strong); min-height: 1.5em; }

/* ================= DAY → NIGHT ================= */
.dawn {
  position: relative; z-index: 1; height: 300px; margin-top: -120px;
  background: linear-gradient(180deg, var(--paper) 0%, #f2ebe1 14%, #e0d3c3 28%, #c4af9b 42%, #a38a77 56%, #826856 70%, #5c4537 85%, var(--espresso) 100%);
  background: linear-gradient(in oklab 180deg, var(--paper) 0%, #f2ebe1 14%, #e0d3c3 28%, #c4af9b 42%, #a38a77 56%, #826856 70%, #5c4537 85%, var(--espresso) 100%);
}
.dawn::before { content: ""; position: absolute; left: var(--route-x); top: 140px; height: 110px; border-left: 2px dashed rgba(105, 79, 65, .45); }

.closing { background: var(--espresso); color: var(--cream); text-align: center; padding: 0 0 104px; }
.closing-inner { position: relative; }
.closing h2 { font-size: clamp(40px, 6.5vw, 84px); letter-spacing: -0.045em; line-height: .95; margin-bottom: 48px; }
.bubbles-closing { position: absolute; inset: 0; pointer-events: none; }
.thread { width: 100%; max-width: 440px; margin: 0 auto; display: grid; gap: 10px; text-align: left; }
.thread-row { display: flex; align-items: flex-end; gap: 10px; }
.thread-out { justify-content: flex-end; }
.avatar { width: 32px; height: 32px; flex: none; border-radius: var(--radius-pill); background: url("assets/logo/favicon.png") center / cover; box-shadow: 0 0 0 2px rgba(249, 241, 232, .25); }
.thread .bubble { font-size: 18px; padding: 12px 18px; }
.bubble-cta { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 18px; padding: 14px 20px; transition: transform .15s ease, background .15s ease; }
.bubble-cta:hover { transform: translateY(-2px); background: #7a5d4d; }
.bubble-cta:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }
.thread-meta { text-align: right; font-size: 13px; opacity: .6; margin-top: 4px; }

/* Footer: same night as the closing, no seam */
.site-footer { background: var(--espresso); color: var(--cream); padding: 0 0 40px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 24px; padding-top: 32px; border-top: 1px solid rgba(249, 241, 232, .15); }
.footer-inner img { width: 80px; }
.footer-slogan { margin-top: 10px; opacity: .75; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { text-decoration: none; opacity: .75; font-size: 15px; }
.footer-links a:hover { opacity: 1; }
.copyright { width: 100%; font-size: 14px; opacity: .6; }

/* ================= Phone and tablet ================= */
@media (max-width: 860px) {
  :root { --route-x: 42px; }
  .nav { display: none; }
  .hero-inner { padding-top: 120px; }
  .b1 { left: 20px; top: 650px; } .b2 { right: 20px; top: 700px; left: auto; }
  .b3, .b4 { display: none; }
  .fan { height: 400px; margin-top: 56px; }
  .polaroid { width: 170px; padding: 8px 8px 30px; }
  .datestamp { right: 14px; bottom: 38px; font-size: 11px; }
  .phone { width: 180px; border-radius: 28px; border-width: 5px; }
  .fan-left { transform: rotate(-9deg) translate(50px, -10px); }
  .fan-right { transform: rotate(8deg) translate(-50px, -30px); }
  .manifesto { padding: 110px 0 48px; }

  .route-head { text-align: left; padding-left: 56px; }
  .closing .pin-dot { display: none; }
  .route-head .pin-dot { margin: 0 0 24px; position: absolute; left: calc(var(--route-x) - 9px - 20px); top: 32px; }
  .pills { justify-content: flex-start; }
  .steps { gap: 56px; }
  .step { grid-template-columns: 44px minmax(0, 1fr); column-gap: 20px; row-gap: 20px; align-items: start; }
  .step .pin { grid-column: 1; grid-row: 1; margin-left: -2px; }
  .step .phone, .step:nth-child(even) .phone { grid-column: 2; grid-row: 2; justify-self: start; width: 200px; }
  .step-text, .step:nth-child(even) .step-text { grid-column: 2; grid-row: 1; text-align: left; justify-self: start; }
  .partner-grid { grid-template-columns: 1fr; padding: 24px; margin-left: 36px; }
  .field-row { grid-template-columns: 1fr; }
  .dusk-bubble { left: calc(var(--route-x) + 20px); }
  :root { --route-start: 0px; }
  .thread { max-width: 340px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bubbles .bubble { animation: none; }
  .btn { transition: none; }
}

/* =========================================================
   Scroll motion (only when JavaScript runs and the visitor
   hasn't asked for reduced motion; otherwise everything is static)
   ========================================================= */
.motion .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.motion .reveal.is-in { opacity: 1; transform: none; }

/* Photo fan: starts stacked behind the phone, then spreads out */
.motion .fan .polaroid, .motion .fan .phone { transition: transform 1s cubic-bezier(.2, .8, .2, 1), opacity .8s ease; }
.motion .fan:not(.is-in) .fan-left  { transform: rotate(0deg) translate(160px, 60px); opacity: 0; }
.motion .fan:not(.is-in) .fan-right { transform: rotate(0deg) translate(-160px, 60px); opacity: 0; }
.motion .fan:not(.is-in) .fan-mid   { transform: translateY(60px) scale(.96); opacity: 0; }
.motion .fan .fan-left, .motion .fan .fan-right { transition-delay: .25s; }

/* Chat bubbles arrive like messages */
.motion .pop { opacity: 0; transform: translateY(10px) scale(.85); transform-origin: left bottom; transition: opacity .45s ease, transform .5s cubic-bezier(.3, 1.4, .5, 1); }
.motion .bubble-me.pop { transform-origin: right bottom; }
.motion .pop.is-in { opacity: 1; transform: none; }

/* Route pins pop onto the line */
.motion .step .pin { transform: scale(0); transition: transform .5s cubic-bezier(.3, 1.5, .5, 1) .15s; }
.motion .step.is-in .pin { transform: scale(1); }

/* The route line draws itself as you scroll (JS sets --draw from 0 to 1) */
.motion .route::before, .motion .dusk::after { transform-origin: top; transform: scaleY(var(--draw, 0)); }

@media (prefers-reduced-motion: reduce) {
  .motion .reveal, .motion .pop, .motion .fan .polaroid, .motion .fan .phone, .motion .step .pin { opacity: 1 !important; transform: none !important; transition: none !important; }
  .motion .fan .fan-left  { transform: rotate(-9deg) translate(40px, -10px) !important; }
  .motion .fan .fan-right { transform: rotate(8deg) translate(-40px, -30px) !important; }
  .motion .route::before, .motion .dusk::after { transform: none !important; }
}

/* the reply arrives a beat after the question */
.motion .thread-out.pop { transform-origin: right bottom; transition-delay: .7s; }

[hidden] { display: none !important; }

/* Form extras */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 14px; color: var(--muted-strong); }
.form-note a { color: var(--ink); }

/* ---------- Legal pages (privacy) ---------- */
.legal { background: var(--paper); color: var(--ink); min-height: 100vh; }
.legal-header { background: var(--espresso); padding: 20px 0; }
.legal-header img { width: 84px; }
.legal-body { max-width: 720px; padding-top: 56px; padding-bottom: 96px; }
.legal-body h1 { font-size: clamp(36px, 5vw, 52px); letter-spacing: -0.03em; margin-bottom: 8px; }
.legal-body .updated { color: var(--muted-strong); margin-bottom: 40px; }
.legal-body h2 { font-size: 22px; margin: 40px 0 12px; }
.legal-body p, .legal-body li { color: #4a3b33; line-height: 1.65; }
.legal-body p + p { margin-top: 12px; }
.legal-body ul { padding-left: 22px; display: grid; gap: 6px; }
.legal-body a { color: var(--cocoa); }

/* ---------- App legal pages: section index and numbered headings ---------- */
.legal-note { padding: 14px 18px; border-radius: var(--radius-md); background: var(--sand); }
.toc { list-style: none; padding: 0 !important; margin: 28px 0 8px; display: flex !important; flex-wrap: wrap; gap: 8px !important; }
.toc a { display: inline-block; padding: 6px 12px; border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--line); text-decoration: none; font-size: 14px; color: var(--muted-strong) !important; }
.toc a:hover { color: var(--ink) !important; }
.legal-body section { scroll-margin-top: 24px; }
.legal-body section h2 { display: flex; gap: 10px; align-items: baseline; }
.legal-body section h2 span { flex: none; color: var(--cocoa); font-size: 16px; }

/* =========================================================
   Added 28 Oct: real app footage, tonight's plans, moai pass
   ========================================================= */
.phone video { display: block; width: 100%; height: auto; background: var(--espresso); }

/* Tonight: real photos as polaroids drifting past */
.tonight { padding: 110px 0 0; overflow: hidden; text-align: center; }
.marquee { margin-top: 10px; mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.marquee-track { display: flex; gap: 26px; width: max-content; padding: 26px 0 40px; animation: drift-x 70s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes drift-x { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 13px)); } }
.snap { --r: -2deg; flex: none; width: 236px; margin: 0; padding: 10px 10px 0; background: #fbf6ee; border-radius: 5px; text-align: left; box-shadow: 0 24px 50px -18px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .18); transform: rotate(var(--r)); transition: transform .5s cubic-bezier(.2, .8, .2, 1), box-shadow .5s ease; }
.snap:nth-child(2n) { --r: 1.8deg; } .snap:nth-child(3n) { --r: -.6deg; } .snap:nth-child(5n) { --r: 2.6deg; }
.snap:hover { transform: rotate(0deg) translateY(-8px) scale(1.03); box-shadow: 0 34px 60px -20px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .18); }
.snap img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 2px; background: var(--sand); }
.snap figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 12px 4px 15px; color: var(--ink); }
.snap b { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; }
.snap span { font-size: 13px; color: var(--muted-strong); white-space: nowrap; }

/* moai pass */
.pass { padding: 96px 0 20px; }
.pass-fan { position: relative; z-index: 1; height: 440px; max-width: 900px; margin: 40px auto 0; }
.pass-fan img { --x: 0px; --r: 0deg; --y: 0px; position: absolute; left: 50%; top: 10px; width: 220px; height: auto; border-radius: 22px; box-shadow: 0 26px 50px -18px rgba(59, 43, 35, .55); transform-origin: 50% 120%;
  transform: translateX(-50%) translateX(calc(var(--x) * var(--s, 1))) translateY(calc(var(--y) * var(--s, 1))) rotate(calc(var(--r) * var(--s, 1))); }
.pass-fan img:nth-child(1) { --x: -290px; --r: -14deg; }
.pass-fan img:nth-child(2) { --x: -145px; --r: -7deg; z-index: 2; }
.pass-fan img:nth-child(3) { --y: -12px; z-index: 3; }
.pass-fan img:nth-child(4) { --x: 145px; --r: 7deg; z-index: 2; }
.pass-fan img:nth-child(5) { --x: 290px; --r: 14deg; }

/* See yours: a live pass preview in the school's colours */
.maker { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: center; margin-top: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 40px; }
.maker h3 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -0.03em; margin-bottom: 10px; }
.maker > div > p { color: var(--muted-strong); font-size: 18px; margin-bottom: 22px; max-width: 30em; }
.maker .field { margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chips button { padding: 8px 14px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 600 14px/1 var(--font-sans); cursor: pointer; }
.chips button:hover, .chips button[aria-pressed="true"] { background: var(--cocoa); border-color: var(--cocoa); color: var(--surface); }
.maker-note { margin-top: 16px; font-size: 14px; color: var(--muted-strong); min-height: 1.4em; }

.pass-card { --card: #6E4E3F; --accent: #D9B79A; --on: #FFFFFF; position: relative; overflow: hidden; border-radius: 26px; padding: 26px 22px 30px; background: var(--card); color: var(--on); text-align: center; box-shadow: 0 30px 60px -24px rgba(59, 43, 35, .55); transform: perspective(1000px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)); }
.pass-card.ready { transition: background .5s ease, color .5s ease, transform .5s cubic-bezier(.2, .8, .2, 1); }
.pass-card.ready.tracking { transition: background .5s ease, color .5s ease, transform .12s linear; }
.pass-card.swap { animation: card-swap .55s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes card-swap { 0% { scale: 1; } 35% { scale: .965; } 100% { scale: 1; } }
.pass-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at var(--mx, 25%) var(--my, 15%), rgba(255, 255, 255, .24), rgba(255, 255, 255, 0) 55%); pointer-events: none; transition: background .2s; }
.pass-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 7px; background: var(--accent); }
.pc-mark { display: flex; justify-content: center; align-items: baseline; gap: 5px; font-weight: 700; font-size: 19px; letter-spacing: -0.03em; }
.pc-mark svg { height: 15px; width: auto; }
.pc-name { margin-top: 14px; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; display: flex; justify-content: center; align-items: center; gap: 7px; }
.pc-name svg { width: 19px; height: 19px; }
.pc-line { margin-top: 4px; font-size: 13px; opacity: .78; }
.pc-qr { margin: 18px auto 0; width: 100%; max-width: 236px; aspect-ratio: 1; background: #fff; border-radius: 22px; padding: 16px; }
.pc-qr svg { display: block; width: 100%; height: 100%; color: var(--card); }
.ready .pc-qr svg { transition: color .5s ease; }
.pass-card.ready::after { transition: background .5s ease; }
.pc-code-label { margin-top: 16px; font-size: 11px; letter-spacing: .18em; opacity: .7; }
.pc-code { font-size: 30px; font-weight: 600; letter-spacing: .14em; margin-top: 2px; }
.pc-timer { width: 46%; height: 3px; margin: 10px auto 0; border-radius: 3px; background: rgba(255, 255, 255, .28); overflow: hidden; }
.pc-timer i { display: block; height: 100%; width: 40%; background: var(--accent); animation: timer 30s linear infinite; }
@keyframes timer { from { width: 100%; } to { width: 0; } }

/* At the counter */
.counter { position: relative; z-index: 1; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 56px; align-items: center; margin: 56px auto 0; max-width: 900px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 40px; }
.counter .phone { width: 230px; border-color: var(--espresso); background: var(--espresso); box-shadow: 0 20px 50px rgba(59, 43, 35, .18); }
.counter h3 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -0.03em; margin-bottom: 12px; }
.counter-text > p { color: var(--muted-strong); font-size: 18px; }
.mini-steps { list-style: none; margin: 24px 0 26px; padding: 0; display: grid; gap: 12px; }
.mini-steps li { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.mini-steps b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--sand); color: var(--cocoa); font-size: 14px; }

@media (max-width: 860px) {
  .tonight { padding-top: 80px; }
  .snap { width: 176px; padding: 8px 8px 0; }
  .snap b { font-size: 14px; }
  .snap span { font-size: 12px; }
  .pass-fan { height: 270px; margin-left: 0; }
  .pass-fan img { width: 112px; border-radius: 12px; }
  .pass-fan img:nth-child(1) { --x: -88px; --r: -11deg; }
  .pass-fan img:nth-child(2) { --x: -46px; --r: -5.5deg; }
  .pass-fan img:nth-child(4) { --x: 46px; --r: 5.5deg; }
  .pass-fan img:nth-child(5) { --x: 88px; --r: 11deg; }
  .maker, .counter { grid-template-columns: 1fr; gap: 32px; padding: 24px; margin-left: 36px; }
  .pass-card { max-width: 320px; }
  .counter .phone { width: 200px; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .pass-card, .pc-qr svg { transition: none; }
  .pass-fan { --s: 1 !important; }
  .pc-timer i { animation: none; }
}


/* =========================================================
   Motion pass (28 Oct): depth, words that rise, scroll-scrubbed fan
   ========================================================= */
/* Words rise out of a mask, one after another */
.split .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding: 0 .02em .1em; margin-bottom: -.1em; }
.motion .split .w > span { display: inline-block; transform: translateY(108%); transition: transform 1s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i) * 70ms + var(--d, 0ms)); }
.motion .split.words-in .w > span { transform: none; }
.motion .hero h1.split { --d: 120ms; }

/* Hero depth: the photos spread and lift as you scroll, the phone follows more slowly */
.fan { transform: perspective(1400px) rotateX(var(--ty, 0deg)) rotateY(var(--tx, 0deg)); transition: transform .6s cubic-bezier(.2, .8, .2, 1); transform-style: preserve-3d; }
.motion .fan-left  { translate: calc(var(--hp, 0) * -40px) calc(var(--hp, 0) * -70px); rotate: calc(var(--hp, 0) * -5deg); }
.motion .fan-right { translate: calc(var(--hp, 0) * 40px) calc(var(--hp, 0) * -90px); rotate: calc(var(--hp, 0) * 5deg); }
.motion .fan-mid   { translate: 0 calc(var(--hp, 0) * -30px); }
.motion .hero .bubbles { translate: 0 calc(var(--hp, 0) * -60px); }

/* Steps: phones settle upright as they reach the middle of the screen */
.motion .step .phone { transform: translateY(calc((1 - var(--p, 1)) * 46px)) rotate(calc((1 - var(--p, 1)) * var(--tilt, -4deg))) scale(calc(.94 + var(--p, 1) * .06)); }
.motion .step:nth-child(even) .phone { --tilt: 4deg; }

/* Someone is typing... */
.typing { display: none; gap: 4px; align-items: center; height: 1.2em; padding: 0 2px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .4; animation: blink 1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: .8; transform: translateY(-3px); } }
.motion .thread-in .typing { display: inline-flex; }
.motion .thread-in .said { display: none; }
.motion .thread-in.typed .typing { display: none; }
.motion .thread-in.typed .said { display: inline; }
.motion .thread-out.pop { transition-delay: 1.9s; }

/* Buttons: a soft lift */
.btn { transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.btn-cream:hover { box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .45); }
.btn-primary:hover { box-shadow: 0 10px 24px -12px rgba(59, 43, 35, .6); }

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

@media (hover: none), (max-width: 860px) {
  .fan { transform: none; }
  .motion .fan-left, .motion .fan-right, .motion .fan-mid, .motion .hero .bubbles { translate: none; rotate: none; }
}
@media (prefers-reduced-motion: reduce) {
  .motion .split .w > span, .motion .step .phone { transform: none !important; transition: none !important; }
  .snap { transition: none; }
  .fan { transform: none !important; }
  .typing i { animation: none; }
}
