/* Talentino Arcade — design system.
   Laws applied from the award-site research:
   · one visual world (near-black editorial), one typeface (Inter) across a 8× size range
   · one rationed accent (#6EB1DA) against quiet neutrals
   · grain + gradient used only as accents, never as the subject
   · bento grid: tight geometry, unpredictable cell spans
   · motion is a reveal, not decoration: staggered, short, eased
*/
:root {
  --ink: #eef4f8;
  --ink-2: #b7cbd8;
  --ink-3: #7d99a9;
  --bg: #060a0e;
  --bg-1: #0a1016;
  --bg-2: #0e1720;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --accent: #6eb1da;
  --accent-2: #2f8fc4;
  --gold: #e8c37a;
  --silver: #c3ccd4;
  --bronze: #c98d63;
  --bad: #ff6b78;
  --ok: #3fd397;
  --r: 18px;
  --pad: clamp(16px, 4vw, 64px);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }   /* Lenis-style inertia owns the scroll */

body {
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "SF Pro Display", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "ss01" on, "tnum" on;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;          /* clip, not hidden: hidden would break every sticky section */
  min-height: 100vh;
}

/* texture: the whole canvas gets a whisper of grain so it never looks plastic */
.grain {
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 9999;
  opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(6) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -2%); }
  80% { transform: translate(3%, 1%); }
}

/* the only big gradient in the app: a single cold bloom behind the hero */
.bloom {
  position: fixed; top: -22vh; left: 50%; transform: translateX(-50%);
  width: min(1200px, 120vw); height: 70vh; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(110, 177, 218, .17), rgba(110, 177, 218, .05) 42%, transparent 70%);
  filter: blur(20px);
}

.wrap { position: relative; z-index: 1; }

/* ---------------------------------------------------------------- chrome */
header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 16px var(--pad);
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(6, 10, 14, .86), rgba(6, 10, 14, .35));
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand .full-logo { height: 34px; width: auto; display: block; }
.brand .wordmark { display: flex; align-items: baseline; gap: 7px; }
.brand .wordmark b {
  font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--ink);
  padding-left: 8px; border-left: 1px solid var(--line-2);
}
.brand .wordmark i {
  font-style: normal; font-size: 9px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--ink-3);
}

/* ticker: the one piece of motion that says "arcade" */
.ticker {
  position: relative; z-index: 2; overflow: hidden; border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(110,177,218,.07), transparent 40%, rgba(110,177,218,.07));
}
.ticker-track {
  display: flex; gap: 34px; padding: 8px 0; white-space: nowrap; width: max-content;
  animation: tick 42s linear infinite;
  font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-3);
}
.ticker-track b { color: var(--accent); font-weight: 700; }
.ticker-track .hi { color: var(--ink-2); }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }

nav { margin-left: auto; display: flex; gap: 4px; }
nav a {
  font-size: 12.5px; font-weight: 600; color: var(--ink-2); text-decoration: none;
  padding: 9px 14px; border-radius: 99px; transition: color .2s, background .2s;
}
nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }
nav a.on { color: var(--ink); background: rgba(110, 177, 218, .12); box-shadow: inset 0 0 0 1px rgba(110,177,218,.35); }

.btn {
  font: inherit; font-size: 13px; font-weight: 700; letter-spacing: .01em;
  color: #04222f; background: var(--ink); border: 0; border-radius: 99px;
  padding: 11px 20px; cursor: pointer; text-decoration: none; display: inline-flex;
  align-items: center; gap: 8px; transition: transform .18s var(--ease), background .18s;
}
.btn:hover { transform: translateY(-2px); background: #fff; }
.btn.accent { background: var(--accent); color: #04222f; }
.btn.accent:hover { background: #8fc9ea; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.btn.ghost:hover { border-color: var(--accent); background: rgba(110, 177, 218, .08); }

/* ------------------------------------------------------------------ hero */
.hero { padding: clamp(28px, 4.5vw, 72px) var(--pad) clamp(24px, 3vw, 44px); position: relative; }

/* hero is a two-column editorial block: words left, the living mascot right */
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: clamp(18px, 3vw, 56px); align-items: end;
}
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; } .hero-mascot { order: -1; height: 300px; } }
.hero-copy { display: flex; flex-direction: column; }
.hero-mascot {
  /* no card, no frame: he stands in the hero and shares the text's air */
  position: relative; height: clamp(360px, min(62vw, 82vh), 820px); overflow: hidden;
  display: grid; place-items: center;
  background: radial-gradient(ellipse at 50% 62%, rgba(110,177,218,.14), transparent 62%);
}
.hero-mascot::before {
  /* a soft pool of stage light under him, nothing more */
  content: ''; position: absolute; left: 6%; right: 6%; bottom: 8%; height: 26%;
  background: radial-gradient(ellipse at 50% 100%, rgba(110,177,218,.22), transparent 70%);
  filter: blur(10px); pointer-events: none;
}
.hero-mascot::after {
  content: ''; position: absolute; left: 16%; right: 16%; bottom: 14%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(110,177,218,.45), transparent);
}
#mascot-canvas { width: 100%; height: 100%; display: block; }
.mascot-tag {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 4px;
  font-size: 9.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-3);
  white-space: nowrap;
}

/* sheet close */
.sheet { position: relative; }
.sheet-x {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.06); border: 1px solid var(--line-2); color: var(--ink-2);
  font-size: 13px; cursor: pointer; line-height: 1;
}
.sheet-x:hover { background: rgba(255,95,109,.16); border-color: var(--bad); color: #fff; }

/* cards read as cabinets on hover */
.card .play {
  position: absolute; right: 16px; top: 16px; font-size: 9px; font-weight: 800; letter-spacing: .18em;
  padding: 5px 9px; border-radius: 99px; background: var(--accent); color: #04222f;
  opacity: 0; transform: translateY(-4px); transition: opacity .2s, transform .2s;
}
.card:hover .play, .card:focus-visible .play { opacity: 1; transform: none; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-3);
  margin-bottom: clamp(18px, 2.4vw, 34px);
}
.eyebrow i { width: 26px; height: 1px; background: var(--accent); display: block; }

/* the one typeface, stretched to the extremes of the scale */
.display {
  font-size: clamp(40px, 8.8vw, 168px);
  line-height: .94; letter-spacing: -.045em; font-weight: 800;
  text-wrap: balance;
}
.display em { font-style: normal; color: var(--accent); }
.lede {
  margin-top: clamp(20px, 2.6vw, 34px); margin-bottom: clamp(6px, 1vw, 12px); max-width: 56ch;
  font-size: clamp(14px, 1.5vw, 20px); line-height: 1.55; color: var(--ink-2);
}
.hero-row {
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
  margin-top: clamp(26px, 3.6vw, 46px);
  margin-bottom: clamp(12px, 1.6vw, 20px);
}
.hero-note { font-size: 12px; color: var(--ink-3); max-width: 34ch; line-height: 1.5; margin-top: 6px; }

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1px; margin-top: clamp(34px, 5vw, 72px); background: var(--line);
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
}
.stat { background: var(--bg-1); padding: 18px 20px; }
.stat small { display: block; font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.stat b { font-size: clamp(20px, 2.4vw, 30px); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- bento grid */
section { padding: clamp(40px, 6vw, 88px) var(--pad); }
.sec-head { display: flex; align-items: flex-end; gap: 20px; margin-bottom: clamp(20px, 3vw, 40px); flex-wrap: wrap; }
.sec-head h2 {
  font-size: clamp(26px, 3.6vw, 54px); line-height: .96; letter-spacing: -.03em; font-weight: 800;
}
.sec-head p { font-size: 13px; color: var(--ink-3); max-width: 42ch; line-height: 1.5; margin-left: auto; }

.bento {
  display: grid; gap: 12px;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(132px, auto);
}

.card {
  position: relative; overflow: hidden; cursor: pointer;
  background: linear-gradient(165deg, var(--bg-2), var(--bg-1) 68%);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 20px; display: flex; flex-direction: column; gap: 10px;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
  text-decoration: none; color: inherit;
}
.card::after {
  /* the accent lives in a single hairline sheen on hover */
  content: ''; position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(110, 177, 218, .16), transparent 60%);
  transition: opacity .3s;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.card:hover::after { opacity: 1; }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.card .idx { font-size: 10px; letter-spacing: .26em; color: var(--ink-3); }
.card h3 { font-size: clamp(17px, 1.7vw, 24px); font-weight: 750; letter-spacing: -.02em; line-height: 1.05; }
.card p { font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }
.card .meta { margin-top: auto; display: flex; align-items: center; gap: 10px; font-size: 10.5px; color: var(--ink-3); letter-spacing: .06em; }
.card .chip {
  font-size: 9px; letter-spacing: .18em; text-transform: uppercase; padding: 4px 8px;
  border-radius: 99px; border: 1px solid var(--line-2); color: var(--ink-2);
}
.card .chip.d3 { border-color: rgba(110, 177, 218, .5); color: var(--accent); }
.card .logo { width: 34px; height: 34px; opacity: .95; }

.card.hero-card { grid-column: span 6; grid-row: span 2; padding: 26px; }
.card.hero-card h3 { font-size: clamp(26px, 3.2vw, 44px); }
.card.hero-card .preview {
  position: absolute; right: -6%; bottom: -12%; width: 62%; pointer-events: none;
  opacity: .3; filter: invert(1) brightness(1.4);
  mix-blend-mode: screen; -webkit-mask-image: radial-gradient(circle at 60% 50%, #000 45%, transparent 78%);
  mask-image: radial-gradient(circle at 60% 50%, #000 45%, transparent 78%);
}
.card.wide { grid-column: span 6; }
.card.tall { grid-row: span 2; }
.card.sq { grid-column: span 3; }

@media (max-width: 900px) {
  .card.hero-card, .card.wide, .card.tall, .card.sq { grid-column: span 12; grid-row: auto; }
}

/* ---------------------------------------------------------------- boards */
.boards { display: grid; grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); gap: 12px; }
.board {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px;
}
.board h4 { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.rows { display: flex; flex-direction: column; gap: 2px; }
.row {
  display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center;
  padding: 8px 8px; border-radius: 10px; font-size: 12.5px;
}
.row .medal {
  width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  font-size: 10px; font-weight: 800; color: #0a1016; background: rgba(255, 255, 255, .07);
}
.row.gold .medal { background: var(--gold); }
.row.silver .medal { background: var(--silver); }
.row.bronze .medal { background: var(--bronze); }
.row .who { overflow: hidden; }
.row .who b { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .who small { color: var(--ink-3); font-size: 10.5px; letter-spacing: .04em; }
.row .pts { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); }
.row.me { background: rgba(110, 177, 218, .1); box-shadow: inset 0 0 0 1px rgba(110, 177, 218, .35); }
.empty { font-size: 12px; color: var(--ink-3); padding: 10px 0; }

/* ------------------------------------------------------------- fact strip */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.fact {
  border: 1px solid var(--line); border-radius: var(--r); padding: 18px;
  background: linear-gradient(160deg, rgba(110, 177, 218, .07), transparent 60%);
}
.fact small { font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.fact p { margin-top: 8px; font-size: 13px; line-height: 1.5; color: var(--ink-2); }

/* ------------------------------------------------------------------- game */
.shell { position: fixed; inset: 0; z-index: 100; display: none; background: #04080b; }
.shell.on { display: grid; grid-template-rows: auto 1fr auto; }
.shell-top {
  display: flex; align-items: center; gap: 16px; padding: 12px clamp(12px, 2.4vw, 28px);
  border-bottom: 1px solid var(--line);
}
.shell-top .t { font-size: 13px; font-weight: 700; }
.shell-top .hud { margin-left: auto; display: flex; gap: 18px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.shell-top .hud b {
  color: var(--ink); font-size: 15px; letter-spacing: 0; text-transform: none;
  font-variant-numeric: tabular-nums; display: inline-block; min-width: 4ch; text-align: right;
}
.shell-top .hud span { min-width: 72px; display: inline-flex; gap: 6px; align-items: baseline; }
.stagewrap { position: relative; display: block; overflow: hidden; min-height: 0; }
#game-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; }
.shell-foot {
  display: flex; align-items: center; gap: 14px; padding: 10px clamp(12px, 2.4vw, 28px);
  border-top: 1px solid var(--line); font-size: 11.5px; color: var(--ink-3); min-height: 44px;
}
.shell-foot .hint { margin-left: auto; }

/* modal / interstitial */
.modal { position: fixed; inset: 0; z-index: 200; display: none; place-items: center; padding: 20px; background: rgba(4, 8, 11, .82); backdrop-filter: blur(6px); }
.modal.on { display: grid; }
.sheet {
  width: min(620px, 100%); background: linear-gradient(170deg, #0d1a24, #08121a);
  border: 1px solid var(--line-2); border-radius: 22px; padding: clamp(20px, 3vw, 34px);
  display: flex; flex-direction: column; gap: 14px; box-shadow: 0 40px 120px rgba(0, 0, 0, .7);
  animation: sheetIn .34s var(--ease);
}
@keyframes sheetIn { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
.sheet .k { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); }
.sheet h3 { font-size: clamp(22px, 2.8vw, 34px); line-height: 1.05; letter-spacing: -.03em; font-weight: 800; }
.sheet p { font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .fields { grid-template-columns: 1fr; } }
.fields label { display: flex; flex-direction: column; gap: 6px; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
input[type="text"] {
  font: inherit; font-size: 14px; color: var(--ink); background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; width: 100%;
}
input[type="text"]:focus { outline: none; border-color: var(--accent); background: rgba(110, 177, 218, .08); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.sheet .board { background: transparent; border: 0; padding: 0; }

footer {
  padding: clamp(40px, 6vw, 90px) var(--pad) 60px; border-top: 1px solid var(--line);
  display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
}
footer .display { font-size: clamp(28px, 4.4vw, 64px); }
footer .foot-note { margin-left: auto; font-size: 11.5px; color: var(--ink-3); max-width: 34ch; line-height: 1.6; }

/* reveal */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .grain { animation: none; }
}


/* segmented control + prize ticket */
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button {
  font: inherit; font-size: 12px; font-weight: 650; color: var(--ink-2);
  background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 14px; cursor: pointer; text-transform: capitalize;
}
.seg button.on { background: rgba(110,177,218,.16); border-color: var(--accent); color: #fff; }
.seg.off { opacity: .35; pointer-events: none; }

.ticket {
  position: relative; border-radius: 16px; padding: 16px 18px; overflow: hidden;
  background:
    radial-gradient(circle at 0 50%, transparent 0 10px, rgba(110,177,218,.14) 10px),
    linear-gradient(135deg, rgba(110,177,218,.18), rgba(255,255,255,.03) 60%);
  border: 1px dashed rgba(110,177,218,.5);
}
.ticket::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 2px, transparent 2px 6px);
  opacity: .25;
}
.tk-top { display: flex; justify-content: space-between; font-size: 9px; letter-spacing: .22em;
  color: var(--ink-3); text-transform: uppercase; }
.tk-code { font-family: ui-monospace, SFMono-Regular, monospace; font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 800; letter-spacing: .12em; color: var(--accent); margin: 10px 0 8px; }
.tk-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); }
.tk-note { margin-top: 10px; font-size: 10.5px; color: var(--ink-3); line-height: 1.5; }

.rate { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.rate-label { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.stars { display: inline-flex; gap: 2px; }
.stars button { background: none; border: 0; color: rgba(255,255,255,.22); font-size: 20px; line-height: 1;
  cursor: pointer; padding: 2px 3px; transition: color .15s, transform .15s; }
.stars button:hover { transform: translateY(-2px); color: var(--gold); }
.stars button.on { color: var(--gold); }
.rate-val { font-size: 11.5px; color: var(--ink-3); }


/* ================= award-site motion layers ================= */
/* 1 · scroll progress */
#progress{position:fixed;top:0;left:0;right:0;height:2px;z-index:9998;background:rgba(255,255,255,.06)}
#progress i{display:block;height:100%;width:0%;background:linear-gradient(90deg,#2f8fc4,#6EB1DA,#e8c37a);
  transform-origin:left center}

/* 2 · cursor: one soft blob, lerped, grows over interactive things */
#cursor{display:none;position:fixed;top:0;left:0;width:26px;height:26px;border-radius:50%;pointer-events:none;z-index:9997;
  border:1px solid rgba(110,177,218,.65);background:rgba(110,177,218,.14);
  transform:translate3d(-50%,-50%,0);transition:width .18s,height .18s,background .18s,border-color .18s;
  mix-blend-mode:screen;will-change:transform}
#cursor.big{width:64px;height:64px;background:rgba(110,177,218,.22);border-color:rgba(110,177,218,.9)}
@media (hover:none){#cursor{display:none}}

/* 3 · pinning: the hero holds while the words scrub */
.hero{position:relative}
.hero .hero-copy{will-change:auto}

/* 4 · cards tilt to the pointer (isolated, CSS vars set in JS) */
.card{transform-style:preserve-3d;transition:transform .25s var(--ease), border-color .25s, box-shadow .25s}
.card.tilting{transition:transform .06s linear}
.card .idx, .card h3, .card p, .card .meta{transform:translateZ(18px)}

/* 5 · reveal: layered, staggered, with a clip so lines rise out of nothing */
.rv{opacity:0;transform:translateY(24px);clip-path:inset(0 0 12% 0)}
.rv.in{opacity:1;transform:none;clip-path:inset(0 0 0 0)}
.rv[data-i="1"].in{transition-delay:.06s}
.rv[data-i="2"].in{transition-delay:.12s}
.rv[data-i="3"].in{transition-delay:.18s}
.rv[data-i="4"].in{transition-delay:.24s}

/* parallax layers are static again: no scroll hijacking */
.bloom{will-change:auto}
.grain{will-change:auto}



}
}
