/* Zemingo Halloween 2026 — "Zemingo after dark"
   Layout concept: the zemingo.com grid with the lights switched off; a flashlight finds the work. */
:root {
  --night: #0e0d0b;
  --surface: #161510;
  --raised: #1f1d17;
  --line: #2f2c23;
  --control: #716b57;
  --sand: #f2f0d9;
  --muted: #a8a38a;
  --faint: #6f6a58;
  --sun: #fff282;
  --sun-deep: #e8d940;
  --neon: #ff8fb0;
  --ember: #e8742c;
  --ghost: #24221b;

  --font-text: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Frank Ruhl Libre", Georgia, "Times New Roman", serif;

  --max: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
html, body { background: var(--night); }
body {
  margin: 0;
  color: var(--sand);
  font-family: var(--font-text);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img, video, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; }
::selection { background: var(--sun); color: #000; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; text-wrap: balance; letter-spacing: -0.02em; line-height: 1.05; }
p { margin: 0; }

.skip { position: absolute; inset-inline-start: 8px; top: 8px; z-index: 100; background: var(--sun); color: #000; padding: 10px 16px; transform: translateY(-300%); }
.skip:focus { transform: none; }

/* grain over everything */
body::after {
  content: ""; position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1s steps(4) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 25%{transform:translate(-3%,2%)} 50%{transform:translate(2%,-3%)} 75%{transform:translate(-2%,-1%)} 100%{transform:translate(0,0)} }

.wrap {
  width: 100%; max-width: var(--max); margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  padding-top: env(safe-area-inset-top, 0px);
  transition: transform .45s var(--ease), background .3s;
}
.site-header.is-scrolled { background: rgba(14, 13, 11, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-header.is-hidden { transform: translateY(-100%); }
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand svg { height: 26px; width: auto; }
.brand-tag { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-left: 14px; border-left: 1px solid var(--line); white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav a:not(.btn) { color: var(--muted); transition: color .2s; }
.nav a:not(.btn):hover { color: var(--sand); }
@media (max-width: 860px) { .nav a:not(.btn):not(.lang) { display: none; } }
@media (max-width: 420px) { .brand-tag { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; font-size: 16px; font-weight: 500; line-height: 1;
  border: 1px solid var(--control); color: var(--sand); white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease);
  position: relative; overflow: hidden;
}
.btn:hover { border-color: var(--sand); }
.btn-primary { background: var(--sun); border-color: var(--sun); color: #000; }
.btn-primary:hover { background: var(--sun-deep); border-color: var(--sun-deep); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- shared type ---------- */
.eyebrow { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.serif { font-family: var(--font-serif); font-weight: 300; letter-spacing: -0.01em; }
.chapter { display: grid; gap: 4px; margin-bottom: clamp(32px, 5vw, 56px); }
.chapter-num { font-family: var(--font-serif); font-weight: 300; font-size: clamp(72px, 12vw, 160px); line-height: .8; color: var(--ghost); letter-spacing: -0.04em; }
.chapter-title { font-size: clamp(32px, 5vw, 64px); }
.lede { font-family: var(--font-serif); font-weight: 300; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.35; color: var(--sand); max-width: 34ch; }
.muted { color: var(--muted); }
.section { padding-block: clamp(96px, 14vw, 180px); position: relative; }
.line-top { border-top: 1px solid var(--line); }

/* split text masks */
.split-line { overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  padding-top: calc(var(--header-h) + 24px); padding-bottom: 64px; overflow: hidden; isolation: isolate;
}
.hero-wall {
  position: absolute; inset: 0; z-index: -2; display: flex; flex-direction: column; justify-content: center; gap: .1em;
  font-size: clamp(56px, 11vw, 170px); font-weight: 500; letter-spacing: -0.04em; line-height: .95; color: #2a271f;
  white-space: nowrap; user-select: none; pointer-events: none;
  -webkit-mask-image: radial-gradient(circle var(--r, 260px) at var(--mx, 70%) var(--my, 45%), #000 0%, rgba(0,0,0,.35) 45%, transparent 100%);
          mask-image: radial-gradient(circle var(--r, 260px) at var(--mx, 70%) var(--my, 45%), #000 0%, rgba(0,0,0,.35) 45%, transparent 100%);
}
.hero-wall span { display: block; }
.hero-wall span:nth-child(even) { padding-left: 12vw; }
.hero-glow {
  position: absolute; z-index: -1; width: 70vmax; height: 70vmax; right: -18vmax; top: 50%; translate: 0 -50%;
  background: radial-gradient(closest-side, rgba(232, 116, 44, .30), rgba(232, 116, 44, .08) 55%, transparent 75%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 24px; width: 100%; }
.hero-copy { display: grid; gap: 28px; position: relative; z-index: 2; }
.hero h1 { font-size: clamp(46px, 7.4vw, 112px); line-height: .98; letter-spacing: -0.035em; }
.hero h1 .flicker { color: var(--sun); }
.hero .lede { max-width: 30ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { position: relative; justify-self: center; width: min(100%, 520px); }
.hero-art img { width: 100%; height: auto; filter: drop-shadow(0 30px 60px rgba(0,0,0,.6)); }
.hero-art .shadow { position: absolute; left: 20%; right: 20%; bottom: 2%; height: 26px; background: radial-gradient(closest-side, rgba(0,0,0,.8), transparent); z-index: -1; }
.scroll-cue { position: absolute; bottom: 24px; left: 50%; translate: -50% 0; display: grid; justify-items: center; gap: 10px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }
.scroll-cue i { width: 1px; height: 48px; background: linear-gradient(var(--sand), transparent); transform-origin: top; animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

@media (max-width: 860px) {
  .hero { align-items: flex-start; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { width: min(48%, 240px); order: -1; justify-self: end; margin-bottom: -72px; margin-right: -8px; }
  .hero-copy { gap: 22px; }
  .hero-glow { right: -40vmax; top: 22%; }
  .scroll-cue { display: none; }
}

/* ---------- stats ---------- */
.stats-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: end; }
.stats-intro p.muted { max-width: 46ch; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); margin-top: 64px; }
.stat { padding: 32px 24px 8px 0; border-right: 1px solid var(--line); }
.stat + .stat { padding-left: 24px; }
.stat:last-child { border-right: 0; }
.stat-num { font-size: clamp(64px, 9vw, 132px); font-weight: 400; letter-spacing: -0.05em; line-height: 1; display: flex; align-items: baseline; gap: 8px; }
.stat-num small { font-size: .26em; letter-spacing: 0; color: var(--muted); }
.stat-label { color: var(--muted); font-size: 15px; margin-top: 12px; max-width: 22ch; }
.mix { margin-top: 64px; display: grid; gap: 16px; }
.mix-bar { display: flex; height: 10px; gap: 3px; }
.mix-bar span { background: var(--neon); transform-origin: left; }
.mix-bar span:nth-child(2) { opacity: .7; } .mix-bar span:nth-child(3) { opacity: .5; } .mix-bar span:nth-child(4) { opacity: .32; }
.mix-legend { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 14px; color: var(--muted); }
.mix-legend b { color: var(--sand); font-weight: 500; }
.mix-legend i { display: inline-block; width: 10px; height: 10px; background: var(--neon); margin-right: 8px; vertical-align: -1px; }
@media (max-width: 860px) {
  .stats-intro { grid-template-columns: 1fr; gap: 24px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(3) { padding-left: 0; }
  .stat:nth-child(odd) { padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- winner ---------- */
.winner { background: radial-gradient(ellipse 60% 50% at 30% 50%, rgba(255, 242, 130, .07), transparent 70%); }
.winner-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.winner-media { position: relative; justify-self: center; width: min(100%, 420px); }
.winner-frame { display: block; position: relative; aspect-ratio: 1536 / 2752; overflow: hidden; }
.winner-frame img { width: 100%; height: 100%; object-fit: contain; }
.winner-badge {
  position: absolute; top: -18px; right: -18px; z-index: 2; width: 112px; height: 112px; display: grid; place-items: center; text-align: center;
  background: var(--sun); color: #000; font-weight: 500; font-size: 13px; line-height: 1.15; letter-spacing: .08em; text-transform: uppercase;
}
.winner-badge strong { display: block; font-size: 34px; letter-spacing: -0.03em; }
.winner-copy { display: grid; gap: 28px; }
.winner-copy h3 { font-size: clamp(40px, 6.4vw, 104px); letter-spacing: -0.045em; white-space: nowrap; }
.winner-copy .desc { display: grid; gap: 12px; color: var(--muted); max-width: 52ch; }
.vote-meter { display: grid; gap: 10px; max-width: 460px; }
.vote-meter-top { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.vote-meter-top b { color: var(--sand); font-weight: 500; }
.meter { height: 6px; background: var(--raised); position: relative; overflow: hidden; }
.meter i { position: absolute; inset: 0 auto 0 0; background: var(--neon); transform-origin: left; }
@media (max-width: 860px) {
  .winner-grid { grid-template-columns: 1fr; }
  .winner-media { width: min(76%, 340px); }
  .winner-badge { width: 92px; height: 92px; top: -14px; right: -14px; }
  .winner-badge strong { font-size: 28px; }
}

/* ---------- person ---------- */
.person { display: inline-flex; align-items: center; gap: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--raised); flex: none; }
.person-name { font-weight: 500; line-height: 1.2; }
.person-dept { font-size: 13px; color: var(--muted); line-height: 1.2; }

/* ---------- finalists (horizontal) ---------- */
.finals { overflow: hidden; }
.finals-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; }
.finals-track { display: flex; gap: clamp(16px, 2vw, 28px); margin-top: 8px; padding-left: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); padding-right: var(--gutter); width: max-content; }
.final-card { width: clamp(320px, min(44vw, 88svh), 660px); flex: none; display: grid; gap: 18px; position: relative; }
.final-card .place { position: absolute; top: -.55em; left: -.08em; z-index: 2; font-family: var(--font-serif); font-weight: 300; font-size: clamp(96px, 11vw, 160px); line-height: 1; color: var(--sand); mix-blend-mode: difference; pointer-events: none; }
.final-card .cover { aspect-ratio: 16 / 9; }
.cover.is-portrait img { object-fit: cover; object-position: 50% 50%; }
.cover.is-portrait::before { content: none; }
.finals.section { padding-block: clamp(72px, 9vw, 128px); }
.final-card h3 { font-size: clamp(24px, 2.4vw, 32px); }
.final-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.votes-pill { font-size: 13px; color: var(--neon); border: 1px solid currentColor; padding: 4px 10px; white-space: nowrap; }
@media (max-width: 899px) {
  .finals-scroller { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-top: 40px; }
  .finals-scroller::-webkit-scrollbar { display: none; }
  .finals-scroller { scroll-padding-left: var(--gutter); }
  .final-card { width: 84vw; scroll-snap-align: start; }
}
@media (min-width: 900px) { .finals-scroller { padding-top: 56px; } }

/* ---------- cover image w/ flashlight ---------- */
.cover { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), filter .6s; filter: saturate(.85) brightness(.85); }
.cover::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(circle 220px at var(--cx, 50%) var(--cy, 50%), rgba(255, 242, 130, .16), transparent 70%);
}
a:hover .cover img, a:focus-visible .cover img { transform: scale(1.05); filter: saturate(1) brightness(1); }
a:hover .cover::after { opacity: 1; }

/* ---------- gallery ---------- */
.gallery-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; margin-bottom: 40px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { min-height: 40px; padding: 0 16px; border: 1px solid var(--line); font-size: 14px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; transition: all .2s; }
.filter span { color: var(--faint); }
.filter:hover { border-color: var(--control); color: var(--sand); }
.filter[aria-pressed="true"] { border-color: var(--sun); color: var(--sand); }
.filter[aria-pressed="true"] span { color: var(--sun); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 24px; }
@media (max-width: 1024px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid { grid-template-columns: minmax(0, 1fr); gap: 40px; } }
.card { display: grid; gap: 16px; align-content: start; }
.card .cover { aspect-ratio: 16 / 10; }
.card-tags { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.card-tags .tag-win { color: #000; background: var(--sun); padding: 2px 8px; }
.card-tags .tag-final { color: var(--sun); border: 1px solid var(--sun); padding: 1px 7px; }
.card-tags .tag { padding: 2px 0; }
.card h3 { font-size: 26px; transition: color .2s; }
.card:hover h3 { color: var(--sun); }
.card p { color: var(--muted); font-size: 15px; max-width: 42ch; }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.devices { display: flex; gap: 6px; color: var(--faint); }
.devices svg { width: 18px; height: 18px; }
.card.is-hidden { display: none; }

/* ---------- toolbox marquee ---------- */
.toolbox { overflow: hidden; }
.marquee { display: flex; white-space: nowrap; border-block: 1px solid var(--line); padding-block: 22px; }
.marquee + .marquee { border-top: 0; }
.marquee-inner { display: flex; flex: none; gap: 56px; padding-right: 56px; font-size: clamp(32px, 5vw, 72px); letter-spacing: -0.03em; line-height: 1; }
.marquee-inner span { display: inline-flex; align-items: center; gap: 56px; color: var(--sand); }
.marquee-inner span::after { content: ""; width: 12px; height: 12px; background: var(--ember); flex: none; }
.marquee.alt .marquee-inner { font-family: var(--font-serif); font-weight: 300; color: var(--muted); }
.marquee.alt .marquee-inner span { color: var(--muted); }
.marquee.alt .marquee-inner span::after { background: var(--line); }

/* ---------- timeline ---------- */
.timeline { position: relative; display: grid; gap: clamp(48px, 7vw, 88px); padding-left: clamp(40px, 8vw, 120px); max-width: 980px; }
.timeline-rail { position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.timeline-rail i { position: absolute; inset: 0; background: var(--sun); transform-origin: top; transform: scaleY(0); }
.tl-item { position: relative; display: grid; grid-template-columns: minmax(120px, 200px) minmax(0, 1fr); gap: 24px; }
.tl-item::before { content: ""; position: absolute; left: calc(-1 * clamp(40px, 8vw, 120px) + 1px); top: 10px; width: 11px; height: 11px; background: var(--night); border: 1px solid var(--control); transition: background .3s, border-color .3s; }
.tl-item.is-lit::before { background: var(--sun); border-color: var(--sun); }
.tl-date { font-size: clamp(24px, 3vw, 40px); letter-spacing: -0.03em; line-height: 1.1; color: var(--faint); transition: color .3s; }
.tl-item.is-lit .tl-date { color: var(--sand); }
.tl-item h3 { font-size: 22px; margin-bottom: 8px; letter-spacing: -0.01em; }
.tl-item p { color: var(--muted); max-width: 48ch; }
@media (max-width: 640px) { .tl-item { grid-template-columns: 1fr; gap: 8px; } }

/* ---------- closing ---------- */
.closing { text-align: start; overflow: hidden; }
.closing h2 { font-size: clamp(48px, 9vw, 140px); letter-spacing: -0.045em; max-width: 12ch; }
.closing-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; margin-top: 56px; align-items: end; }
.closing-row p { color: var(--muted); max-width: 56ch; }
.closing-row .btn { justify-self: end; }
@media (max-width: 860px) { .closing-row { grid-template-columns: 1fr; } .closing-row .btn { justify-self: start; } }

.site-footer { border-top: 1px solid var(--line); padding-block: 40px calc(40px + env(safe-area-inset-bottom, 0px)); font-size: 14px; color: var(--faint); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.site-footer svg { height: 20px; width: auto; opacity: .7; }
.site-footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
.site-footer a:hover { color: var(--sand); }

/* ---------- project page ---------- */
.p-hero { padding-top: calc(var(--header-h) + clamp(32px, 6vw, 72px)); padding-bottom: clamp(32px, 5vw, 56px); }
.back { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 15px; margin-bottom: clamp(32px, 5vw, 56px); transition: color .2s; }
.back:hover { color: var(--sand); }
.back .arrow { transition: transform .25s var(--ease); }
.back:hover .arrow { transform: translateX(-4px); }
.p-head { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 48px; align-items: end; }
.p-head h1 { font-size: clamp(48px, 9vw, 136px); letter-spacing: -0.045em; line-height: .95; overflow-wrap: anywhere; }
.p-head .lede { margin-top: 24px; }
.p-side { display: grid; gap: 20px; justify-items: start; }
.p-tags { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 860px) { .p-head { grid-template-columns: 1fr; gap: 32px; } }

.stage-wrap { padding-bottom: clamp(48px, 7vw, 96px); }
.stage { position: relative; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--control); overflow: hidden; }
.stage.is-portrait { aspect-ratio: auto; height: min(84svh, 860px); }
.stage-poster { position: absolute; inset: 0; }
.stage-poster img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.45) saturate(.8); transform: scale(1.04); }
.stage.is-portrait .stage-poster img { object-fit: contain; filter: brightness(.55); }
.stage.is-portrait .stage-poster img { position: relative; z-index: 1; }
.stage.is-portrait .stage-poster::before { content: none; }
.stage-poster::after { content: ""; position: absolute; inset: 0; z-index: 2; background: radial-gradient(circle 360px at var(--cx, 50%) var(--cy, 50%), rgba(255, 242, 130, .12), transparent 70%); pointer-events: none; }
.stage-ui { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 20px; text-align: center; padding: 24px; z-index: 2; background: radial-gradient(ellipse 50% 45% at 50% 50%, rgba(0,0,0,.55), transparent 80%); text-shadow: 0 2px 18px rgba(0,0,0,.6); }
.stage-ui h2 { font-size: clamp(28px, 4vw, 48px); max-width: 18ch; }
.stage-ui p { color: var(--muted); max-width: 44ch; }
.stage-ui .row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.play-btn { width: clamp(88px, 10vw, 120px); aspect-ratio: 1; background: var(--sun); color: #000; display: grid; place-items: center; position: relative; transition: transform .3s var(--ease); }
.play-btn svg { width: 34%; height: 34%; margin-left: 6%; }
.play-btn::before { content: ""; position: absolute; inset: -10px; border: 1px solid var(--sun); opacity: .5; animation: pulse 2.4s var(--ease) infinite; }
.play-btn:hover { transform: scale(1.06); }
@keyframes pulse { 0% { transform: scale(.9); opacity: .6; } 100% { transform: scale(1.35); opacity: 0; } }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; z-index: 3; }
.stage-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 16px; font-size: 14px; color: var(--muted); }
.stage-bar .row { display: flex; gap: 8px; flex-wrap: wrap; }
.qr { background: var(--sand); padding: 12px; width: 156px; height: 156px; }
.qr img, .qr canvas { width: 100% !important; height: 100% !important; }

/* theater mode (fullscreen fallback for iOS etc.) */
.stage.is-theater { position: fixed; inset: 0; z-index: 200; aspect-ratio: auto; height: 100dvh; border: 0; clip-path: none !important; transform: none !important; opacity: 1 !important; }
.is-theater-open .site-header { visibility: hidden; }
.theater-close { position: fixed; z-index: 210; top: calc(12px + env(safe-area-inset-top, 0px)); right: calc(12px + env(safe-area-inset-right, 0px)); background: var(--sun); color: #000; min-height: 44px; padding: 0 16px; font-weight: 500; display: none; }
.is-theater-open .theater-close { display: inline-flex; align-items: center; }
.is-theater-open { overflow: hidden; }

.p-body { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(40px, 7vw, 120px); }
.p-about { display: grid; gap: 20px; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.6; max-width: 60ch; }
.p-about p:first-child { font-family: var(--font-serif); font-weight: 300; font-size: clamp(26px, 2.8vw, 36px); line-height: 1.3; color: var(--sand); }
.p-about p { color: var(--muted); }
.facts { display: grid; align-content: start; border-top: 1px solid var(--line); }
.fact { display: grid; gap: 10px; padding-block: 22px; border-bottom: 1px solid var(--line); }
.fact dt { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.fact dd { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 14px; border: 1px solid var(--line); padding: 4px 12px; color: var(--sand); }
.result-row { display: grid; gap: 8px; }
.result-row + .result-row { margin-top: 14px; }
@media (max-width: 860px) { .p-body { grid-template-columns: 1fr; } }

.trailer { margin-top: clamp(64px, 9vw, 120px); }
.trailer video { width: 100%; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line); }

.note-review { margin-top: 24px; border: 1px solid var(--danger, #f0907f); color: #f0907f; padding: 14px 18px; font-size: 14px; }

.next { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-top: 1px solid var(--line); }
.next a { position: relative; padding: clamp(40px, 6vw, 80px) var(--gutter); display: grid; gap: 12px; overflow: hidden; isolation: isolate; }
.next a + a { border-left: 1px solid var(--line); text-align: right; justify-items: end; }
.next a .bg { position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .5s; }
.next a .bg img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.3) saturate(.7); transform: scale(1.1); transition: transform 1.2s var(--ease); }
.next a:hover .bg { opacity: 1; }
.next a:hover .bg img { transform: scale(1); }
.next .t { font-size: clamp(28px, 4.5vw, 64px); letter-spacing: -0.035em; line-height: 1; font-weight: 500; }
@media (max-width: 640px) { .next { grid-template-columns: 1fr; } .next a + a { border-left: 0; border-top: 1px solid var(--line); } }

.not-found { min-height: 70svh; display: grid; place-content: center; text-align: center; gap: 24px; padding-top: var(--header-h); }

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  body::after { animation: none; }
}

/* =========================================================
   INTRO — pinned scroll sequence (final layout is the CSS default,
   GSAP builds the opening state and scrubs back to this)
   ========================================================= */
.intro { position: relative; }
.intro-pin { position: relative; height: 100svh; min-height: 620px; overflow: hidden; isolation: isolate; perspective: 1100px; }
.intro-glow {
  position: absolute; z-index: 0; width: 90vmax; height: 90vmax; left: 72%; top: 55%; translate: -50% -50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(232, 116, 44, .34), rgba(232, 116, 44, .10) 50%, transparent 75%);
}
.intro-cloud { position: absolute; inset: 0; z-index: 0; transform-style: preserve-3d; pointer-events: none; opacity: .0; }
.cloud-card { position: absolute; transform-style: preserve-3d; }
.cloud-inner { width: 100%; height: 100%; border: 1px solid var(--control); overflow: hidden; background: var(--surface); box-shadow: 0 30px 60px rgba(0,0,0,.55); }
.cloud-inner img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.62) saturate(.85); }

.intro-word {
  position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; text-align: center; pointer-events: none;
  font-size: clamp(96px, 24vw, 440px); font-weight: 500; line-height: .76; letter-spacing: -0.065em; opacity: .05;
}
.intro-word .w { display: block; }
.w-after { color: var(--sand); }
.w-dark { color: transparent; -webkit-text-stroke: clamp(1px, .25vw, 3px) var(--sun); text-shadow: 0 0 60px rgba(255, 242, 130, .25); }

.intro-mascot { position: absolute; z-index: 2; left: 74%; bottom: 0; width: min(30vw, 62svh * .667); translate: -50% 0; }
.intro-mascot img { width: 100%; height: auto; filter: drop-shadow(0 40px 60px rgba(0,0,0,.7)); }
.intro-mascot::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 1%; height: 26px; z-index: -1; background: radial-gradient(closest-side, rgba(0,0,0,.85), transparent); }

.intro-copy { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; padding-top: var(--header-h); pointer-events: none; }
.intro-copy .wrap { width: 100%; }
.intro-copy-inner { display: grid; gap: 26px; max-width: 700px; pointer-events: auto; }
.intro .hero-title { font-size: clamp(46px, 7vw, 108px); line-height: .98; letter-spacing: -0.035em; }
.intro .hero-title .flicker { color: var(--sun); }
.intro .hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.intro-foot {
  position: absolute; left: 0; right: 0; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); z-index: 3;
  display: flex; justify-content: space-between; align-items: end; gap: 16px;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); pointer-events: none;
}
.intro-hint { display: grid; justify-items: center; gap: 10px; color: var(--muted); }
.intro-hint i { width: 1px; height: 44px; background: linear-gradient(var(--sun), transparent); transform-origin: top; animation: cue 2.2s var(--ease) infinite; }

@media (max-width: 860px) {
  .intro-glow { left: 70%; top: 30%; }
  .intro-mascot { left: 74%; top: calc(var(--header-h) + 8px); bottom: auto; width: min(40vw, 30svh * .667); }
  .intro-copy { align-items: flex-end; padding-bottom: 86px; }
  .intro-copy-inner { gap: 20px; }
  .intro-foot span:first-child, .intro-foot span:last-child { display: none; }
  .intro-foot { justify-content: center; }
}

/* =========================================================
   POLISH — custom cursor, magnetic buttons, tilt
   ========================================================= */
.cursor, .cursor-dot { position: fixed; left: 0; top: 0; z-index: 300; pointer-events: none; border-radius: 50%; translate: -50% -50%; }
.cursor { width: 44px; height: 44px; border: 1px solid rgba(242, 240, 217, .5); display: grid; place-items: center; mix-blend-mode: difference; }
.cursor span { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #000; opacity: 0; font-weight: 500; }
.cursor.is-play { background: var(--sun); border-color: var(--sun); mix-blend-mode: normal; }
.cursor.is-play span { opacity: 1; }
.cursor-dot { width: 6px; height: 6px; background: var(--sun); }
@media (hover: none), (pointer: coarse) { .cursor, .cursor-dot { display: none; } }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }
.has-cursor iframe { cursor: auto; }

.card .cover, .final-card .cover, .winner-frame { transform-style: preserve-3d; will-change: transform; }

/* SplitText line masks: leave room for descenders (g, y, p) so they are not clipped */
.hero-title > div, [data-split] > div, .p-title > div, .winner-copy h3 > div { padding-bottom: .16em; margin-bottom: -.16em; }

/* =========================================================
   RTL (Hebrew pages under /he)
   ========================================================= */
.nav a.lang { color: var(--sand); border-bottom: 1px solid var(--control); padding-bottom: 2px; }
[dir="rtl"] body { font-size: 18px; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] .stat-num, [dir="rtl"] .p-head h1, [dir="rtl"] .closing h2, [dir="rtl"] .winner-copy h3 { letter-spacing: -0.01em; }
[dir="rtl"] .intro-word { letter-spacing: -0.02em; line-height: .9; font-size: clamp(88px, 20vw, 380px); }
[dir="rtl"] .eyebrow, [dir="rtl"] .brand-tag, [dir="rtl"] .intro-foot, [dir="rtl"] .card-tags, [dir="rtl"] .fact dt { letter-spacing: .04em; }
[dir="rtl"] .lede { line-height: 1.45; }
[dir="rtl"] .brand-tag { padding-left: 0; border-left: 0; padding-right: 14px; border-right: 1px solid var(--line); }
[dir="rtl"] .stat { border-right: 0; border-left: 1px solid var(--line); padding: 32px 0 8px 24px; }
[dir="rtl"] .stat + .stat { padding-left: 24px; padding-right: 24px; }
[dir="rtl"] .stat:last-child { border-left: 0; }
[dir="rtl"] .mix-bar span { transform-origin: right; }
[dir="rtl"] .winner-badge { right: auto; left: -18px; }
[dir="rtl"] .finals-track { padding-left: var(--gutter); padding-right: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); }
[dir="rtl"] .marquee { direction: ltr; }
[dir="rtl"] .timeline { padding-left: 0; padding-right: clamp(40px, 8vw, 120px); }
[dir="rtl"] .timeline-rail { left: auto; right: 6px; }
[dir="rtl"] .tl-item::before { left: auto; right: calc(-1 * clamp(40px, 8vw, 120px) + 1px); }
[dir="rtl"] .next a + a { border-left: 0; border-right: 1px solid var(--line); text-align: left; justify-items: start; }
[dir="rtl"] .btn:hover .arrow { transform: translateX(-4px); }
[dir="rtl"] .back:hover .arrow { transform: translateX(4px); }
[dir="rtl"] .intro-mascot { left: 26%; }
[dir="rtl"] .intro-glow { left: 28%; }
[dir="rtl"] .p-head h1 { overflow-wrap: normal; }
@media (max-width: 860px) {
  [dir="rtl"] .intro-mascot { left: 26%; }
  [dir="rtl"] .intro-glow { left: 30%; }
  [dir="rtl"] .stat:nth-child(2) { border-left: 0; }
  [dir="rtl"] .stat:nth-child(3) { padding-right: 0; }
}
@media (max-width: 640px) { [dir="rtl"] .next a + a { border-right: 0; } }
[dir="rtl"] .winner-copy h3 { letter-spacing: -0.045em; font-size: clamp(40px, 5.6vw, 96px); }
[dir="rtl"] .tl-date { direction: ltr; unicode-bidi: isolate; text-align: right; }

/* while a game is on screen: no grain, no custom cursor, no page animation competing with it */
body.is-playing::after { display: none; }
body.is-playing .cursor, body.is-playing .cursor-dot { display: none; }
body.is-playing.has-cursor, body.is-playing.has-cursor a, body.is-playing.has-cursor button { cursor: auto; }

/* Hebrew pages use one typeface throughout (Rubik) */
[dir="rtl"] { --font-serif: var(--font-text); }
[dir="rtl"] .serif, [dir="rtl"] .lede, [dir="rtl"] .p-about p:first-child, [dir="rtl"] .marquee.alt .marquee-inner { font-weight: 400; letter-spacing: 0; }

/* Hebrew: Rubik's Hebrew letters don't take an outline cleanly (inner contours show), so the outlined word is solid Sun with a glow */
[dir="rtl"] .w-dark { color: var(--sun); -webkit-text-stroke: 0; text-shadow: 0 0 60px rgba(255, 242, 130, .35), 0 0 18px rgba(255, 242, 130, .25); }
/* portrait games play in a phone-shaped column */
.stage.is-portrait iframe { left: 50%; width: min(100%, calc(min(84svh, 860px) * 0.5)); transform: translateX(-50%); border-inline: 1px solid var(--control); }
.stage.is-portrait.is-theater iframe { width: min(100%, 52dvh); }
