/* Plot Twist site. Tokens from Design/direction-design.md: a surface shows at most two brand
   colours plus Ink/White; reveal lines are caps on snug fills sharing a left edge. */
@font-face { font-family: Display; src: url(fonts/PlotTwistDisplay-Black.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Mark; src: url(fonts/PlotTwistDisplay-ExtraBold.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: Voice; src: url(fonts/PlotTwistSemiCondensed-ExtraBold.woff2) format("woff2"); font-display: swap; }

:root {
  --ink: #000; --white: #fff; --cobalt: #2B2EFF; --blush: #FFD9E2; --butter: #FFE14D; --cherry: #FF2A3D;
  --rec: #E0001B;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 5vw, 72px);
  --measure: 34rem;
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { background: var(--ink); color: var(--white); font: 400 18px/1.5 var(--body); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:focus-visible, button:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Reveal lines: the app's type on snug fills. Corners facing each other are squared. */
.lines { display: flex; flex-direction: column; align-items: flex-start; font: 400 var(--cap, 64px)/1 Display, Impact, sans-serif;
  text-transform: uppercase; letter-spacing: -.01em; color: var(--ink); }
.lines > span { background: var(--fill, var(--white)); padding: .14em .14em .03em; border-radius: .12em; white-space: nowrap; }
.lines > span + span { margin-top: -1px; }
.lines > span:not(:last-child) { border-bottom-left-radius: 0; }
.lines > span:not(:first-child) { border-top-left-radius: 0; }
.voice { font-family: Voice, var(--body); font-weight: 400; letter-spacing: 0; }

/* Header */
.top { position: absolute; z-index: 20; inset: 0 0 auto; display: flex; justify-content: space-between; align-items: center;
  padding: 20px var(--gutter); }
.mark { display: inline-flex; gap: .22em; font: 400 26px/1 Mark, var(--body); text-decoration: none; color: var(--white); }
.mark span:last-child { background: var(--cobalt); color: var(--white); padding: .06em .16em .02em; border-radius: .14em; }
.top:not(.solid) .mark span:last-child { background: var(--ink); }
.top .lang { font: 400 17px/1 Voice, var(--body); color: var(--white); padding: 14px 0; }

/* Hero: the page plays the trap. Bait (what the guests see), 3-2-1, the bait shatters, the reveal. */
.hero { position: relative; min-height: 100svh; overflow: hidden; background: var(--cobalt); --fill: var(--blush); isolation: isolate; }
.trap { position: absolute; inset: 0; z-index: 5; cursor: pointer; }
.bait, .shard { position: absolute; inset: 0; background: #222 url(img/bait-1400.webp) center 38% / cover no-repeat; }
.shard { display: none; will-change: transform; }
.dim { position: absolute; inset: 0; background: #000; opacity: 0; transition: opacity .25s; }
.digit { position: absolute; inset: 0; display: grid; place-items: center; font: 400 min(72svh, 80vw)/1 Display, Impact, sans-serif;
  color: var(--white); opacity: 0; }
.digit.beat { animation: land .8s cubic-bezier(.2,.9,.3,1) both; }
@keyframes land { 0% { transform: scale(1.25); opacity: 0; } 12% { opacity: 1; } 80% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1); } }
.flash { position: absolute; inset: 0; background: var(--white); opacity: 0; }
.cue { position: absolute; left: var(--gutter); bottom: clamp(28px, 7svh, 64px); font-size: clamp(22px, 3.2vw, 34px); line-height: 1.1;
  background: rgba(0,0,0,.72); padding: .3em .55em .26em; border-radius: .3em; transition: opacity .3s; }

/* A poster: the reveal lines own the frame, the pitch and the badge sit bottom right. Sized so the
   badge stays above the fold on a 1440x900 laptop. */
.reveal { position: relative; z-index: 2; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 30rem);
  grid-template-rows: 1fr auto; gap: 32px 48px; padding: 104px var(--gutter) 64px; }
.title { grid-column: 1 / -1; align-self: center; }
.reveal h1 { --cap: clamp(56px, min(16.5vw, 19svh), 232px); }
.kicker { font: 400 clamp(19px, 1.8vw, 24px)/1.2 Voice, var(--body); margin-bottom: 18px; }
.info { grid-column: 2; }
.pitch { font-size: clamp(20px, 1.9vw, 25px); line-height: 1.3; }
.get { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 28px; }
.badge { display: inline-block; padding: 0; line-height: 0; }
.badge img { height: 54px; width: auto; }
.needs { font-size: 17px; line-height: 1.35; max-width: 22rem; }
.again { position: absolute; z-index: 6; left: var(--gutter); bottom: 20px; font: 400 16px/1 Voice, var(--body); color: var(--white);
  background: none; border: 0; padding: 12px 0; cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }

/* Before the trap has played (JS on, motion allowed), the reveal waits under the bait. */
html:not(.js) .trap { display: none; }
.js .hero.landing .reveal h1 > span { animation: pop .5s cubic-bezier(.2,1.4,.4,1) both; }
.js .hero.landing .reveal h1 > span + span { animation-delay: .08s; }
.js .hero.landing .pitch { animation: fade .5s .35s both; }
@keyframes pop { from { transform: scale(.86); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.hero:not(.done) .again { visibility: hidden; }

/* Sections */
section { padding: clamp(72px, 12vw, 160px) var(--gutter); }
section h2 { --cap: clamp(44px, 8.4vw, 120px); margin-bottom: clamp(28px, 4vw, 56px); }
.lede { max-width: var(--measure); font-size: clamp(19px, 1.7vw, 22px); }
.paper { background: var(--white); color: var(--ink); --fill: var(--blush); }
.ink { background: var(--ink); color: var(--white); --fill: var(--white); }
.cherry { background: var(--cherry); color: var(--ink); --fill: var(--white); }
.butter { background: var(--butter); color: var(--ink); --fill: var(--white); }

/* How it works: a real sequence, so it is numbered. Screens shown as captured, no fake bezels. */
.steps { list-style: none; padding: 0; display: grid; gap: clamp(40px, 5vw, 72px); grid-template-columns: repeat(3, minmax(0, 1fr)); counter-reset: step; }
.steps li { counter-increment: step; }
.steps .screen { aspect-ratio: 1398 / 1630; border-radius: 22px; overflow: hidden; background: var(--ink); }
.steps .screen img { width: 100%; height: 100%; object-fit: cover; }
.steps h3 { display: flex; gap: .5em; align-items: baseline; font: 400 clamp(24px, 2.4vw, 32px)/1.1 Voice, var(--body); margin: 24px 0 8px; }
.steps h3::before { content: counter(step); font-family: Display; color: var(--cobalt); }
.steps p { max-width: 26rem; }
.who { display: inline-block; font: 400 15px/1 Voice, var(--body); background: var(--butter); color: var(--ink); padding: .4em .7em .35em; border-radius: 99px; margin-top: 14px; }

/* Ideas: one reveal card at a time (the outer display, 466x678), chosen from the occasions. */
.ideas-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 420px); gap: clamp(40px, 6vw, 96px); align-items: start; }
.occasions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; padding: 0; list-style: none; }
.occasions button { font: 400 19px/1 Voice, var(--body); color: var(--white); background: none; border: 2px solid rgba(255,255,255,.35);
  padding: .55em .9em .5em; border-radius: 99px; cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.occasions button:hover { border-color: var(--white); }
.occasions button[aria-pressed="true"] { background: var(--white); color: var(--ink); border-color: var(--white); }
.own { margin-top: 24px; color: rgba(255,255,255,.75); }
.all-title { font: 400 clamp(24px, 2.4vw, 30px)/1.1 Voice, var(--body); margin: clamp(56px, 8vw, 96px) 0 20px; }
.all-ideas { list-style: none; padding: 0; columns: 3 16rem; column-gap: 40px; font-size: 16px; color: rgba(255,255,255,.75); }
.all-ideas li { break-inside: avoid; padding: 7px 0; border-top: 1px solid rgba(255,255,255,.16); }
.all-ideas strong { display: block; font: 400 17px/1.2 Voice, var(--body); color: var(--white); }

.card { container-type: inline-size; position: relative; aspect-ratio: 466 / 678; border-radius: 28px; overflow: hidden;
  background: var(--field); }
/* Container units measure the content box, so the padding lives on an inner box. */
.card-in { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 6cqi; }
.card .lines { --cap: 18cqi; }
.card .sub { font: 400 6.6cqi/1.15 Voice, var(--body); margin-top: 4cqi; color: var(--subc); }
.card .stamp { display: none; position: absolute; right: 6cqi; bottom: 6cqi; transform: rotate(-6deg); font: 400 7.4cqi/1 Mark, var(--body);
  color: var(--ink); border: .7cqi solid var(--ink); padding: .12em .3em .06em; }
.card[data-tone="party"] { --field: var(--cobalt); --fill: var(--blush); --subc: var(--white); }
.card[data-tone="sweet"] { --field: var(--butter); --fill: var(--white); --subc: var(--ink); }
.card[data-tone="prank"] { --field: var(--cherry); --fill: var(--white); --subc: var(--ink); }
.card[data-tone="prank"] .stamp { display: block; }
.card.swap .lines, .card.swap .sub { animation: pop .35s cubic-bezier(.2,1.3,.4,1) both; }
.card-label { font: 400 16px/1 Voice, var(--body); color: rgba(255,255,255,.75); margin-top: 14px; }

/* The reel */
.reel-grid { display: grid; grid-template-columns: minmax(220px, 380px) minmax(0, 1fr); gap: clamp(40px, 7vw, 120px); align-items: center; }
.reel { position: relative; aspect-ratio: 9 / 16; border-radius: 24px; overflow: hidden; background: var(--ink); }
.reel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel img + img { animation: endcard 7s infinite; }
@keyframes endcard { 0%, 55% { opacity: 0; } 62%, 92% { opacity: 1; } 100% { opacity: 0; } }
.facts { list-style: none; padding: 0; display: grid; gap: 22px; max-width: var(--measure); }
.facts li { font-size: clamp(19px, 1.7vw, 22px); }
.facts strong { display: block; font: 400 clamp(24px, 2.4vw, 30px)/1.1 Voice, var(--body); margin-bottom: 4px; }

/* Private + FAQ */
.faq { max-width: 44rem; margin-top: clamp(56px, 8vw, 96px); }
.faq h3 { font: 400 clamp(26px, 2.6vw, 34px)/1.1 Voice, var(--body); margin-bottom: 8px; }
.faq details { border-top: 2px solid var(--ink); padding: 18px 0; }
.faq details:last-child { border-bottom: 2px solid var(--ink); }
.faq summary { font: 400 21px/1.25 Voice, var(--body); cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: Display; font-size: 26px; line-height: .9; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; max-width: var(--measure); }

/* Closer + footer */
.closer { text-align: left; --fill: var(--butter); }
.closer h2 { margin-bottom: 28px; }
.closer .get { margin-top: 0; }
.qr { display: none; align-items: center; gap: 14px; font-size: 15px; color: rgba(255,255,255,.75); }
.qr img { width: 92px; height: 92px; background: var(--white); padding: 6px; border-radius: 8px; }
@media (hover: hover) and (min-width: 900px) { .qr { display: flex; } }
footer { padding: 40px var(--gutter) 48px; border-top: 1px solid rgba(255,255,255,.18); font-size: 15px; color: rgba(255,255,255,.75); }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 20px 0; font: 400 18px/1 Voice, var(--body); color: var(--white); }
footer nav a { padding: 13px 0; }
footer .guides { font-size: 16px; margin-top: -8px; }
footer .legal { max-width: 44rem; font-size: 13px; color: rgba(255,255,255,.6); }

/* Text pages (support, privacy) */
.page { background: var(--white); color: var(--ink); min-height: 100svh; }
.top.solid { position: static; background: var(--ink); }
.page footer { background: var(--ink); }
.doc { max-width: 42rem; padding: clamp(48px, 8vw, 96px) var(--gutter) 96px; }
.doc h1 { --cap: clamp(44px, 9vw, 96px); --fill: var(--blush); margin-bottom: 28px; }
.doc h2 { font: 400 26px/1.15 Voice, var(--body); margin: 40px 0 8px; }
.doc h3 { font: 400 21px/1.25 Voice, var(--body); margin: 28px 0 0; }
.doc p, .doc li { margin-top: 8px; }
.doc .updated { color: #555; font-size: 15px; }
.doc a { color: var(--cobalt); }
.doc .faq-title { margin-top: 56px; }
.doc .after { margin-top: 40px; }
/* Guides */
.guide { max-width: 40rem; }
.guide-title { font: 400 clamp(36px, 5.4vw, 60px)/1.04 Voice, var(--body); letter-spacing: -.01em; }
.byline { color: #555; font-size: 15px; margin: 18px 0 8px; }
.guide h2 { font: 400 clamp(26px, 3vw, 32px)/1.12 Voice, var(--body); margin: 48px 0 6px; }
.guide h3 { margin-top: 28px; }
.guide p, .guide li { font-size: 19px; line-height: 1.6; }
.guide ul, .guide ol { padding-left: 1.2em; margin-top: 10px; }
.guide li + li { margin-top: 6px; }
.guide strong { font-weight: 650; }
.cta { background: var(--cobalt); color: var(--white); --fill: var(--blush); --cap: clamp(36px, 6vw, 56px); border-radius: 24px;
  padding: clamp(24px, 4vw, 40px); margin: 32px 0; }
.cta p { color: var(--white); font-size: 18px; margin-top: 18px; max-width: 32rem; }
.doc .cta a { color: var(--white); }
.cta .get { margin-top: 20px; }
.contact { font: 400 clamp(22px, 3vw, 30px)/1.2 Voice, var(--body); margin-top: 16px; }
.doc .contact a { color: var(--ink); }

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; max-width: 420px; }
  .ideas-grid, .reel-grid, .reveal { grid-template-columns: 1fr; }
  .info { grid-column: 1; }
  .reveal { grid-template-rows: 1fr auto auto; padding-bottom: 72px; }
  .again { left: auto; right: var(--gutter); }
  .ideas-grid .card-wrap { max-width: 300px; }
  .reel-grid .reel { max-width: 320px; }
  .badge img { height: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reel img + img { animation: none; opacity: 0; }
  .again { display: none; }
  .card.swap .lines, .card.swap .sub { animation: fade .25s both; }
}
