/* ==========================================================================
   Dream of Frontier, MOR Hackathon landing page
   Visual world: the 2a key visual poster. Cream grid paper, orange Archivo
   Black title with ink drop shadow, pastel sticker tiles with thick ink
   outlines and hard offset shadows, 3D code Rubik cube.
   ========================================================================== */

:root {
  /* Palette (sampled from the poster source) */
  --paper: #FFFDFA;
  --paper-2: #F6F1EA;
  --grid: #EFE9E2;
  --ink: #1E1E1E;
  --ink-2: #2A2A2A;
  --ink-3: #444;
  --navy: #1B2A6B;
  --orange: #FF7A3D;
  --orange-2: #FF9A68;
  --blue: #1F6FFF;
  --sky: #A8C8FF;
  --yellow: #FFC54D;
  --pink: #F99AC6;
  --lilac: #F1A7F7;
  --lime: #B5E08A;
  --green: #6CC36A;
  --white: #FFFDF8;
  --muted: #6B645C;

  /* Type */
  --f-display: 'Archivo Black', 'Archivo', sans-serif;
  --f-head: 'Archivo', 'Be Vietnam Pro', sans-serif;
  --f-body: 'Be Vietnam Pro', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Shape */
  --bw: 3px;              /* ink outline */
  --bw-lg: 4px;
  --r-sm: 12px;
  --r: 16px;
  --r-lg: 22px;
  --sh: 4px 4px 0 var(--ink);
  --sh-lg: 6px 6px 0 var(--ink);

  /* Motion */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);
  --ease-spring: cubic-bezier(.5, 1.8, .5, .8);

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1240px;
  --nav-h: 76px;

  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.is-jumping { scroll-behavior: auto; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 2px, transparent 2px),
    linear-gradient(90deg, var(--grid) 2px, transparent 2px);
  background-size: 66px 66px;
  background-position: -2px -2px;
  overflow-x: clip;
  caret-color: var(--orange);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
main, .footer { overflow-x: clip; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; }
::selection { background: var(--yellow); color: var(--ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

/* Scrollbar in the poster's ink + orange */
html { scrollbar-color: var(--orange) var(--paper-2); }
::-webkit-scrollbar { width: 14px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb { background: var(--orange); border: 3px solid var(--ink); border-radius: 99px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 10px; transition: top .2s;
}
.skip:focus { top: 12px; }
.mono { font-family: var(--f-mono); }
.wrap { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }

/* Material Symbols: fixed box so ligature text never shows before the font loads */
.ms {
  font-family: 'Material Symbols Rounded';
  font-weight: normal; font-style: normal;
  font-size: 1.25em; line-height: 1;
  display: inline-block; width: 1em; height: 1em; overflow: hidden;
  white-space: nowrap; direction: ltr; vertical-align: -.2em;
  font-feature-settings: 'liga'; -webkit-font-feature-settings: 'liga';
  font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 48;
}

/* Sparkle (four-point star) */
.spark { width: 48px; height: 48px; fill: currentColor; stroke: var(--ink); stroke-width: 6; stroke-linejoin: round; overflow: visible; }
.spark--lg { width: 84px; height: 84px; }
.spark--sky { color: var(--sky); }
.spark--yellow { color: var(--yellow); }
.spark--pink { color: var(--pink); }
.spark--lilac { color: var(--lilac); }

/* Tile colour helpers */
.t-orange { --tc: var(--orange); }
.t-sky { --tc: var(--sky); }
.t-blue { --tc: var(--blue); }
.t-yellow { --tc: var(--yellow); }
.t-pink { --tc: var(--pink); }
.t-lilac { --tc: var(--lilac); }
.t-lime { --tc: var(--lime); }
.t-paper { --tc: var(--white); }

/* Placeholder marker: anything BTC has not confirmed */
.ph {
  display: inline-flex; align-items: center; gap: .3em;
  font: 700 .72rem/1 var(--f-mono); letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink); background: repeating-linear-gradient(-45deg, var(--yellow) 0 6px, #FFE09A 6px 12px);
  border: 2px dashed var(--ink); border-radius: 6px; padding: .4em .55em;
  vertical-align: .25em; white-space: nowrap; cursor: help;
}
.ph::before { content: ''; width: .5em; height: .5em; border-radius: 50%; background: var(--ink); }
.ph--dark { border-color: var(--paper); }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--paper);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 800 1rem/1 var(--f-body);
  padding: .85em 1.3em;
  background: var(--bg); color: var(--ink);
  border: var(--bw) solid var(--ink); border-radius: 999px;
  box-shadow: var(--sh);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease-back), box-shadow .25s var(--ease-back), background-color .2s;
  will-change: transform;
}
.btn .ms { transition: transform .35s var(--ease-back); }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:hover .ms { transform: translateX(4px); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); transition-duration: .08s; }
.btn--orange { --bg: var(--orange); }
.btn--orange:hover { --bg: var(--orange-2); }
.btn--paper { --bg: var(--white); }
.btn--paper:hover { --bg: var(--yellow); }
.btn--ink { --bg: var(--ink); color: var(--paper); box-shadow: 4px 4px 0 var(--orange); }
.btn--ink:hover { box-shadow: 7px 7px 0 var(--orange); --bg: #000; }
.btn--ink:active { box-shadow: 0 0 0 var(--orange); }
.btn--xl { font-size: 1.125rem; padding: 1em 1.55em; }
.btn--block { width: 100%; }

/* Pill sticker (MOR HACKATHON) */
.pill {
  display: inline-block;
  font: 400 1rem/1.2 var(--f-display); letter-spacing: -.01em;
  padding: .3em .95em .24em;
  border: var(--bw-lg) solid var(--ink); border-radius: 999px;
  box-shadow: var(--sh); white-space: nowrap; color: var(--ink);
}
.pill--pink { background: var(--pink); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; z-index: 50; top: 14px; left: 50%;
  width: min(100% - 2 * var(--gutter), 1320px);
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px;
  padding: 8px 8px 8px 10px;
  background: rgba(255, 253, 250, .86);
  backdrop-filter: blur(10px) saturate(1.4); -webkit-backdrop-filter: blur(10px) saturate(1.4);
  border: var(--bw) solid var(--ink); border-radius: 999px;
  box-shadow: var(--sh);
  transition: transform .5s var(--ease-out), box-shadow .3s;
}
.nav.is-stuck { box-shadow: 5px 6px 0 var(--ink); }
.nav__logo {
  flex: none; display: grid; place-items: center;
  height: 48px; padding: 0 16px; border-radius: 999px;
  background: var(--white);
  transition: transform .4s var(--ease-back);
}
.nav__logo:hover { transform: rotate(-4deg) scale(1.04); }
.nav__logo img { height: 30px; width: auto; }
.nav__links { display: flex; gap: 2px; margin-inline: auto; }
.nav__links a:not(.btn) {
  position: relative; padding: .55em .9em; border-radius: 999px;
  font-weight: 700; font-size: .95rem; text-decoration: none;
  transition: background-color .2s, transform .3s var(--ease-back);
}
.nav__links a:not(.btn):hover { background: var(--yellow); transform: rotate(-3deg); }
.nav__links a.is-active { background: var(--ink); color: var(--paper); }
.nav__menu-cta { display: none; }
.nav__cta { padding: .75em 1.15em; }
.nav__toggle {
  display: none; width: 48px; height: 48px; border-radius: 50%;
  border: var(--bw) solid var(--ink); background: var(--yellow); cursor: pointer;
  font-size: 1.2rem;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  align-items: center;
  gap: clamp(8px, 2vw, 40px);
  padding: calc(var(--nav-h) + 48px) var(--gutter) 72px;
  max-width: 1440px; margin-inline: auto;
}
.hero__copy { position: relative; z-index: 2; }
.hero__deco { position: relative; height: clamp(70px, 8vw, 110px); }
.wave {
  position: absolute; left: 0; top: 20%;
  width: clamp(110px, 12vw, 170px); height: auto; overflow: hidden;
  fill: none; stroke: var(--sky); stroke-width: 11; stroke-linecap: round;
}
.sunburst {
  position: absolute; left: clamp(220px, 34vw, 470px); bottom: 14px; overflow: visible;
  width: clamp(80px, 9vw, 120px); fill: var(--yellow);
}
.sunburst__rays polygon { transform-box: fill-box; }

.title {
  position: relative; margin: 0;
  font: 400 var(--title-fs, clamp(3rem, 8vw, 7.6rem))/.86 var(--f-display);
  letter-spacing: -.02em; color: var(--orange);
  text-shadow: .045em .045em 0 var(--ink);
}
.title__line { display: block; position: relative; white-space: nowrap; }
.title .ch { display: inline-block; transform-origin: 50% 100%; }
.title__pill {
  position: absolute; z-index: 2; left: .04em; top: -.42em;
  font-size: .19em; text-shadow: none; transform: rotate(-3deg);
}
.title__spark { position: absolute; width: .42em; height: .42em; left: 5.02em; top: .02em; transform: rotate(20deg); stroke-width: 0; }

.hero__lead {
  max-width: 34rem; margin: clamp(22px, 3vw, 36px) 0 0;
  font-size: clamp(1.05rem, 1.3vw, 1.25rem); line-height: 1.55; font-weight: 500; color: var(--ink-2);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero__count-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--orange); border: 2px solid var(--ink); animation: ping 1.6s var(--ease-out) infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255, 122, 61, .8); } 100% { box-shadow: 0 0 0 12px rgba(255, 122, 61, 0); } }

/* Info block: countdown + key facts, in the highlight yellow */
.infobar {
  margin: 30px 0 0; max-width: 580px;
  background: var(--yellow); color: var(--ink);
  border: var(--bw-lg) solid var(--ink); border-radius: var(--r-lg);
  box-shadow: 7px 7px 0 var(--ink);
  overflow: hidden;
  transition: transform .4s var(--ease-back), box-shadow .4s var(--ease-back);
}
.infobar:hover { transform: translate(-2px, -3px) rotate(-.6deg); box-shadow: 10px 11px 0 var(--ink); }
.infobar__count {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0; padding: 14px 24px;
  background: var(--ink); color: var(--paper);
  font-weight: 700; font-size: 1rem;
}
.infobar__count strong {
  font-weight: 800; font-size: 1.05rem; color: var(--ink);
  background: var(--yellow); padding: .15em .5em; border-radius: 8px;
}
.infobar__grid {
  display: grid; grid-template-columns: auto auto; justify-content: start; gap: 22px;
  margin: 0; padding: 18px 24px 20px;
}
.infobar dt { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .95rem; color: var(--ink-2); }
.infobar dt .ms { color: var(--ink); }
.infobar__cell + .infobar__cell { border-left: 3px solid var(--ink); padding-left: 22px; }
.infobar dd { margin: 4px 0 0; font: 800 clamp(1.1rem, 1.9vw, 1.65rem)/1.15 var(--f-body); letter-spacing: -.02em; white-space: nowrap; }
.infobar dd.mono { font-family: var(--f-mono); }
.infobar__arrow { display: inline-block; margin: 0 .2em; color: var(--orange); -webkit-text-stroke: 1px var(--ink); }


/* ---------- Stage + Rubik cube ---------- */
.stage {
  --mx: 0; --my: 0;
  position: relative; z-index: 1;
  width: 100%; max-width: 640px; aspect-ratio: 1 / 1.02; justify-self: center;
}
.cube-wrap {
  position: absolute; inset: 8% 6% 6%;
  display: grid; place-items: center;
  background: none; border: 0; padding: 0; cursor: pointer; border-radius: 40px;
  -webkit-tap-highlight-color: transparent;
}
.cube-wrap:focus-visible { outline-offset: -6px; }
.cube-shadow {
  position: absolute; left: 50%; bottom: 2%; width: 62%; height: 7%;
  translate: -50% 0; border-radius: 50%; background: rgba(30, 30, 30, .14);
  animation: shadow-breathe 4.2s ease-in-out infinite;
}
.cube-float { position: relative; display: block; width: 0; height: 0; animation: cube-bob 4.2s ease-in-out infinite; }
.cube-view {
  position: absolute; left: 0; top: 0; display: block;
  transform-style: preserve-3d;
  transform: scale(var(--cs, 1)) rotateX(var(--rx, -28deg)) rotateY(var(--ry, -44deg));
}
.cube { position: absolute; left: 0; top: 0; display: block; transform-style: preserve-3d; transform: translateY(14px); }
.cube-wrap.is-solved .cube { animation: solved-pop .7s var(--ease-back); }
@keyframes solved-pop { 0% { transform: translateY(14px); } 35% { transform: translateY(-16px) scale(1.07); } 100% { transform: translateY(14px); } }
.cubie { position: absolute; left: -50px; top: -50px; width: 100px; height: 100px; transform-style: preserve-3d; }
.face {
  position: absolute; inset: 0; background: var(--ink); padding: 7px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.face--pz { transform: translateZ(50px); }
.face--nz { transform: rotateY(180deg) translateZ(50px); }
.face--px { transform: rotateY(90deg) translateZ(50px); }
.face--nx { transform: rotateY(-90deg) translateZ(50px); }
.face--ny { transform: rotateX(90deg) translateZ(50px); }
.face--py { transform: rotateX(-90deg) translateZ(50px); }
.face--in { background: var(--ink-2); }
.tl {
  width: 100%; height: 100%; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--tc); color: var(--fg, var(--navy));
  font: 800 30px/1 var(--f-mono); letter-spacing: -.04em;
}
.tl--big { font: 400 58px/1 var(--f-display); letter-spacing: 0; }
.tl svg { width: 38px; height: 38px; fill: currentColor; stroke: none; }
.tl--b { --tc: var(--blue); --fg: #fff; }
.tl--o { --tc: var(--orange); --fg: #fff; }
.tl--g { --tc: var(--green); --fg: #fff; }
.tl--y { --tc: var(--yellow); }
.tl--p { --tc: var(--pink); }
.tl--w { --tc: var(--white); }

/* Stickers around the cube */
.sticker {
  --d: 1; --dx: 0px; --dy: 0px;
  position: absolute; left: var(--x); top: var(--y); z-index: 3;
  translate: calc(var(--mx) * var(--d) * 14px + var(--dx)) calc(var(--my) * var(--d) * 14px + var(--dy));
  touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none;
}
.sticker.is-dragging { cursor: grabbing; z-index: 6; }
.sticker.is-returning { transition: translate .7s var(--ease-spring); }
.sticker__body {
  display: flex; align-items: center; justify-content: center;
  rotate: var(--r);
  background: var(--tc, transparent);
  animation: bob var(--bob, 3.6s) ease-in-out var(--bob-delay, 0s) infinite;
  transition: scale .3s var(--ease-back), rotate .4s var(--ease-back);
}
.sticker:hover .sticker__body { scale: 1.08; rotate: calc(var(--r) * -1); }
.sticker.is-dragging .sticker__body { scale: 1.14; animation-play-state: paused; }
.sticker--sq .sticker__body,
.sticker--lime .sticker__body,
.sticker--sky .sticker__body {
  border: 5px solid var(--ink); box-shadow: var(--sh-lg); border-radius: 22px;
}
.sticker--sq .sticker__body { width: clamp(64px, 8vw, 104px); aspect-ratio: 1; font-size: clamp(2.2rem, 4.6vw, 3.9rem); }
.sticker--lilac { --tc: var(--lilac); }
.sticker--pink { --tc: var(--pink); }
.sticker--lime { --tc: var(--lime); }
.sticker--sky { --tc: var(--sky); }
.sticker--lime .sticker__body, .sticker--sky .sticker__body {
  padding: .45em .7em; font-weight: 800; font-size: clamp(1.2rem, 2.4vw, 2.1rem); line-height: 1;
}
.sticker--spark .sticker__body { background: none; }
.sticker--spark .spark { width: clamp(32px, 4vw, 48px); height: auto; aspect-ratio: 1; }
.sticker--spark .spark--lg { width: clamp(56px, 6.6vw, 90px); }
.sticker:nth-of-type(2) { --bob: 3.1s; --bob-delay: -.6s; }
.sticker:nth-of-type(3) { --bob: 4.2s; --bob-delay: -1.4s; }
.sticker:nth-of-type(4) { --bob: 3.4s; --bob-delay: -2.1s; }
.sticker:nth-of-type(5) { --bob: 3.9s; --bob-delay: -.9s; }
.sticker:nth-of-type(6) { --bob: 2.8s; --bob-delay: -1.7s; }
.sticker--spark .sticker__body { animation-name: twinkle; }

.stage__dots {
  position: absolute; width: 110px; height: 60px;
  translate: calc(var(--mx) * 8px) calc(var(--my) * 8px);
  background-size: 22px 22px;
}
.stage__dots--sky { left: 4%; top: 24%; background-image: radial-gradient(var(--sky) 5px, transparent 5.5px); }
.stage__dots--yellow { right: 2%; bottom: 14%; background-image: radial-gradient(var(--yellow) 5px, transparent 5.5px); }

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes cube-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes shadow-breathe { 0%, 100% { scale: 1; opacity: 1; } 50% { scale: .9; opacity: .75; } }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(.78) rotate(45deg); } }

/* ---------- Marquee ---------- */
.marquee {
  position: relative; overflow: hidden;
  padding: 7px 0; border-block: var(--bw) solid var(--ink);
  background: var(--paper-2);
}
.marquee__track { display: flex; gap: 0; width: max-content; animation: marquee 34s linear infinite; }
.marquee--reverse .marquee__track { animation-direction: reverse; animation-duration: 26s; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.tile {
  flex: none; width: 41px; height: 41px; margin-left: -3px;
  display: grid; place-items: center;
  background: var(--tc); border: 3px solid var(--ink); border-radius: 8px;
  font-weight: 800; font-size: .78rem; letter-spacing: -.04em;
  transition: transform .35s var(--ease-back);
}
.tile .ms { font-size: 1.3rem; }
.tile:hover { transform: translateY(-5px) rotate(-8deg); position: relative; z-index: 2; }
@keyframes marquee { to { transform: translateX(-50%); } }

.marquee--ink { background: var(--ink); border-color: var(--ink); padding: 9px 0; }
.marquee__track--text { align-items: center; gap: 14px; padding-right: 14px; }
.marquee__track--text span {
  font: 400 clamp(.95rem, 2vw, 1.6rem)/1 var(--f-display); color: var(--paper); white-space: nowrap;
}
.marquee__track--text span:nth-of-type(2n) { color: var(--orange); }
.marquee__track--text .spark { width: 20px; height: 20px; flex: none; stroke: none; animation: spin 6s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(80px, 11vw, 150px) 0; scroll-margin-top: 20px; }
.h2 {
  margin: 0;
  font: 900 clamp(2.2rem, 5.2vw, 4.4rem)/1.14 var(--f-head);
  padding-block: .06em;
  font-stretch: 125%; font-variation-settings: 'wdth' 125;
  letter-spacing: -.025em; text-wrap: balance;
}
.h2--paper { color: var(--paper); }
.h3 { margin: 0; font: 800 clamp(1.5rem, 2.6vw, 2.1rem)/1.15 var(--f-head); font-variation-settings: 'wdth' 125; letter-spacing: -.02em; }
.mark { position: relative; display: inline-block; padding: 0 .3em; margin: 0 .06em; color: var(--ink); z-index: 0; }
.mark::before {
  content: ''; position: absolute; inset: .04em 0 -.04em; z-index: -1;
  border: var(--bw) solid var(--ink); border-radius: .18em; transform: rotate(-2deg) scaleX(var(--mk, 1));
  transform-origin: 0 50%; transition: transform .8s var(--ease-out) .35s;
}
.mark--orange::before { background: var(--orange); }
[data-reveal]:not(.is-in) .mark::before { --mk: 0; }

/* Story */
.story__grid {
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 80px); align-items: end; margin-top: clamp(32px, 4vw, 56px);
}
.story__statement {
  margin: 0; font: 600 clamp(1.1rem, 1.75vw, 1.5rem)/1.65 var(--f-body); letter-spacing: -.005em;
  word-spacing: .04em; max-width: 46ch; text-wrap: pretty;
}
.story__statement .w { color: rgba(30, 30, 30, .2); transition: color .35s var(--ease-out); }
.story__statement .w.on { color: var(--ink); }
.hl {
  font-style: normal; border-radius: .22em; padding: .04em .16em;
  background: linear-gradient(var(--hlc), var(--hlc)) no-repeat 0 50% / var(--hl, 100%) 100%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  transition: background-size .7s var(--ease-out);
}
.hl--yellow { --hlc: var(--yellow); }
.hl--sky { --hlc: var(--sky); }
.js .hl:not(.on) { --hl: 0%; }
.story__aside {
  position: relative; padding: 28px; background: var(--ink); color: var(--paper);
  border-radius: var(--r-lg); box-shadow: 6px 6px 0 var(--pink); rotate: 2deg;
}
.story__aside-quote { margin: 0; font: 400 clamp(1.8rem, 3vw, 2.6rem)/1 var(--f-head); font-variation-settings: 'wdth' 125; font-weight: 900; color: var(--yellow); }
.story__aside-note { margin: 16px 0 0; font-size: .98rem; color: #E7E1D8; }

.goals__title { margin-top: clamp(64px, 8vw, 110px); }
.goals {
  list-style: none; padding: 0; margin: 28px 0 0;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px;
}
.goal {
  position: relative; grid-column: span 2;
  padding: 26px 24px 28px; background: var(--tc); border: var(--bw-lg) solid var(--ink);
  border-radius: var(--r-lg); box-shadow: var(--sh-lg); rotate: var(--r);
  transition: rotate .45s var(--ease-back), translate .45s var(--ease-back), box-shadow .45s var(--ease-back);
}
.goal:nth-child(4) { grid-column: 2 / span 2; }
.goal:hover { rotate: 0deg; translate: -3px -6px; box-shadow: 10px 12px 0 var(--ink); }
.goal--orange { --tc: var(--orange); }
.goal--sky { --tc: var(--sky); }
.goal--yellow { --tc: var(--yellow); }
.goal--lime { --tc: var(--lime); }
.goal--pink { --tc: var(--pink); }
.goal__icon {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px;
  background: var(--white); border: var(--bw) solid var(--ink); font-size: 1.6rem;
  transition: rotate .5s var(--ease-back);
}
.goal:hover .goal__icon { rotate: -12deg; }
.goal h3 { margin: 18px 0 8px; font: 900 1.35rem/1.15 var(--f-head); font-variation-settings: 'wdth' 125; letter-spacing: -.02em; }
.goal p { margin: 0; font-weight: 500; font-size: 1rem; line-height: 1.5; }

/* Who */
.who { background: var(--paper-2); border-block: var(--bw) solid var(--ink); }
.who__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.facts { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 18px; }
.facts li { display: flex; gap: 18px; align-items: flex-start; }
.facts__icon {
  flex: none; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px;
  background: var(--tc); border: var(--bw) solid var(--ink); box-shadow: var(--sh); font-size: 1.4rem;
}
.facts strong { display: block; font: 800 1.2rem/1.3 var(--f-body); }
.facts span:not(.ms):not(.facts__icon) { display: block; color: var(--ink-2); }

.team {
  margin: 0; padding: 32px; background: var(--white);
  border: var(--bw-lg) solid var(--ink); border-radius: 28px; box-shadow: 8px 8px 0 var(--ink);
  rotate: -1.5deg;
}
.team__slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.slot {
  aspect-ratio: 1; display: grid; place-items: center; border-radius: 18px; font-size: 2.4rem;
  border: var(--bw-lg) solid var(--ink); perspective: 400px;
  transition: background-color .4s, transform .6s var(--ease-back);
}
.slot--on { background: var(--orange); box-shadow: var(--sh); }
.slot--on.is-nontech { background: var(--pink); }
.slot--on.is-flip { transform: rotateY(180deg) scale(.9); }
.slot--opt { border-style: dashed; color: var(--muted); background: var(--paper); animation: opt-pulse 2.4s ease-in-out infinite; }
.slot--opt:nth-child(5) { animation-delay: .3s; }
.slot--opt:nth-child(6) { animation-delay: .6s; }
@keyframes opt-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(.92); } }
.team figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 22px; }
.team__num { font: 400 clamp(3.4rem, 6vw, 5rem)/.9 var(--f-display); color: var(--orange); text-shadow: 4px 4px 0 var(--ink); }
.team__dash { display: inline-block; margin: 0 .04em; }
.team__label { font: 800 1.3rem/1.2 var(--f-body); }
.team__legend { width: 100%; display: flex; gap: 18px; font-size: .9rem; font-weight: 600; color: var(--ink-2); }
.team__legend span { display: inline-flex; align-items: center; gap: 6px; }

/* Topics: a Rubik face */
.topics { margin-top: clamp(80px, 10vw, 140px); }
.topics__head { display: grid; grid-template-columns: auto 1fr; gap: 12px 48px; align-items: end; }
.topics__intro { margin: 0; max-width: 36rem; font-size: 1.1rem; font-weight: 500; }
.topics__note { margin: 26px 0 0; font-weight: 600; color: var(--ink-2); }
.rubik-face {
  list-style: none; margin: 32px 0 0; padding: 12px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
  background: var(--ink); border-radius: 30px; box-shadow: 10px 10px 0 var(--orange);
}
.rubik-face__core {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 12px; text-align: center;
  padding: 12px 18px; border-radius: 18px; background: var(--ink-2); color: var(--paper);
  font: 900 clamp(1rem, 1.5vw, 1.2rem)/1.2 var(--f-head); font-variation-settings: 'wdth' 125;
  border: 3px dashed #555;
}
.rubik-face__core .spark { width: 30px; height: 30px; flex: none; stroke: none; animation: spin 8s linear infinite; }
.topic {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 16px; border-radius: 18px; background: var(--tc); color: var(--ink);
  transition: translate .3s var(--ease-back), box-shadow .3s var(--ease-back);
}
.topic:hover { translate: -3px -3px; box-shadow: 4px 4px 0 var(--paper); }
.topic__icon {
  flex: none; width: 46px; height: 46px; display: grid; place-items: center;
  border-radius: 12px; background: var(--ink); color: var(--tc);
}
.topic__icon .ms { font-size: 1.6rem; }
.topic__body { min-width: 0; }
.topic__body strong { display: block; font: 800 clamp(1rem, 1.4vw, 1.15rem)/1.25 var(--f-body); }
.topic__body p { margin: 6px 0 0; font-size: .92rem; line-height: 1.45; font-weight: 500; color: var(--ink-2); }
.topic__body b {
  display: inline-block; margin-right: 4px; padding: 3px 6px; vertical-align: 1px;
  font: 800 .66rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: .08em;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 5px;
}

/* ---------- Dark: countdown + timeline ---------- */
.dark {
  position: relative; background-color: var(--ink); color: var(--paper);
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 2px, transparent 2px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 2px, transparent 2px);
  background-size: 66px 66px;
  scroll-margin-top: 0;
}
.countdown-band { padding: clamp(80px, 10vw, 130px) 0 clamp(40px, 5vw, 60px); }
.countdown-band__inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.countdown-band__title { margin: 0; font: 900 clamp(1.6rem, 3.4vw, 2.6rem)/1.1 var(--f-head); font-variation-settings: 'wdth' 125; color: var(--yellow); }
.countdown-band__note { margin: 20px 0 0; color: #CFC8BE; font-weight: 600; }
.countdown { display: flex; gap: clamp(10px, 2.4vw, 28px); margin-top: 28px; flex-wrap: wrap; justify-content: center; }
.cd { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cd > span { font-weight: 700; font-size: .95rem; color: #CFC8BE; }
.cd__tiles { display: flex; gap: 6px; }
.cd-sep {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(10px, 1.6vw, 18px); height: clamp(64px, 9.4vw, 112px);
  font-size: 0; color: transparent; user-select: none;
}
.cd-sep::before, .cd-sep::after {
  content: ''; width: clamp(8px, 1.1vw, 13px); aspect-ratio: 1; border-radius: 50%; background: #CFC8BE;
}
/* Split-flap digit: static halves + two flaps that fold down in sequence */
.digit {
  position: relative; width: clamp(48px, 7vw, 84px); height: clamp(64px, 9.4vw, 112px);
  perspective: 600px;
  font: 800 clamp(2.2rem, 5vw, 4rem)/1 var(--f-mono); color: var(--ink);
}
.digit::after { /* frame drawn on top so halves and flaps share one outline */
  content: ''; position: absolute; inset: 0; z-index: 5; pointer-events: none;
  border: 4px solid var(--paper); border-radius: 14px;
}
.digit::before { /* the hinge line */
  content: ''; position: absolute; left: 4px; right: 4px; top: calc(50% - 1px); height: 2px; z-index: 4;
  background: rgba(30, 30, 30, .35);
}
.digit__half, .digit__flap {
  position: absolute; left: 0; right: 0; height: 50%; overflow: hidden;
  background: var(--dc, var(--orange));
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.digit__half--top, .digit__flap--top { top: 0; border-radius: 14px 14px 0 0; }
.digit__half--bot, .digit__flap--bot { bottom: 0; border-radius: 0 0 14px 14px; }
.digit__half > span, .digit__flap > span {
  position: absolute; left: 0; right: 0; height: 200%; display: grid; place-items: center;
}
.digit__half--bot > span, .digit__flap--bot > span { top: -100%; }
.digit__half--top > span, .digit__flap--top > span { top: 0; }
.digit__flap { z-index: 3; }
.digit__flap--top { transform-origin: 50% 100%; animation: flap-top .28s cubic-bezier(.55, 0, .9, .45) forwards; }
.digit__flap--bot { transform-origin: 50% 0; transform: rotateX(90deg); animation: flap-bot .34s cubic-bezier(.2, .8, .3, 1) .28s forwards; }
.digit__flap--top::after, .digit__flap--bot::after { /* shading while the flap turns */
  content: ''; position: absolute; inset: 0; background: #000; opacity: 0;
}
.digit__flap--top::after { animation: shade-in .28s ease-in forwards; }
.digit__flap--bot::after { opacity: .25; animation: shade-out .34s ease-out .28s forwards; }
@keyframes flap-top { to { transform: rotateX(-90deg); } }
@keyframes flap-bot { to { transform: rotateX(0deg); } }
@keyframes shade-in { to { opacity: .25; } }
@keyframes shade-out { to { opacity: 0; } }
.cd:nth-of-type(1) { --dc: var(--orange); }
.cd:nth-of-type(2) { --dc: var(--yellow); }
.cd:nth-of-type(3) { --dc: var(--sky); }
.cd:nth-of-type(4) { --dc: var(--pink); }
.countdown.is-over { font-weight: 800; }

.timeline { position: relative; }
.timeline__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.timeline__head { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
@keyframes nudge { 50% { transform: translateX(6px); } }
.timeline__viewport { position: relative; margin-top: clamp(40px, 6vh, 72px); }
.timeline__track {
  list-style: none; margin: 0; padding: 0 var(--gutter);
  padding-left: max(var(--gutter), calc((100vw - var(--maxw)) / 2));
  display: flex; gap: 28px; width: max-content;
  will-change: transform;
}
.timeline__track { position: relative; }
.timeline__track::before, .timeline__track::after {
  content: ''; position: absolute; left: 0; right: 0; top: 85px; height: 10px; z-index: 0; border-radius: 99px;
}
.timeline__track::before { background: #3A3A3A; }
.timeline__track::after { background: linear-gradient(90deg, var(--yellow), var(--orange), var(--pink)); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.ms-item { position: relative; z-index: 1; width: clamp(250px, 24vw, 310px); display: flex; flex-direction: column; align-items: flex-start; }
.ms-item__date { font-weight: 800; font-size: clamp(1.6rem, 2.4vw, 2.1rem); line-height: 1; color: var(--c); height: 44px; }
.ms-item__node {
  margin: 14px 0 0; width: 64px; height: 64px; display: grid; place-items: center;
  border-radius: 18px; background: var(--ink-2); border: 4px solid #555; color: #777; font-size: 1.7rem;
  transition: background-color .4s, border-color .4s, color .4s, transform .6s var(--ease-back);
}
.ms-item.is-on .ms-item__node { background: var(--c); border-color: var(--paper); color: var(--ink); transform: rotate(-8deg) scale(1.1); }
.ms-item__card {
  margin-top: 22px; padding: 20px 22px; background: var(--ink-2); border: 3px solid #444; border-radius: var(--r);
  transition: border-color .4s, box-shadow .5s var(--ease-back), transform .5s var(--ease-back);
}
.ms-item.is-on .ms-item__card { border-color: var(--c); box-shadow: 6px 6px 0 var(--c); transform: translateY(-4px); }
.ms-item__card h3 { margin: 0 0 6px; font: 800 1.25rem/1.25 var(--f-body); color: var(--paper); }
.ms-item__card p { margin: 0; font-size: .97rem; color: #D6D0C6; line-height: 1.5; }
.ms-item--hot .ms-item__card h3::after {
  content: 'Quan trọng'; display: inline-block; margin-left: 8px; vertical-align: .2em;
  font: 800 .62rem/1 var(--f-mono); text-transform: uppercase; letter-spacing: .06em;
  background: var(--orange); color: var(--ink); padding: 4px 6px; border-radius: 5px;
}

/* ---------- Prizes ---------- */
.prizes__intro { margin: 16px 0 0; font-size: 1.15rem; font-weight: 500; }
.podium { --k: 1.3; position: relative; isolation: isolate; height: clamp(400px, 50vw, 600px); margin-top: 20px; display: grid; place-items: end center; }
.podium__scene {
  --dep: calc(120px * var(--k));
  position: relative; display: flex; align-items: flex-end; gap: calc(26px * var(--k));
  transform-style: preserve-3d;
  transform: rotateX(-16deg) rotateY(-26deg);
  margin-bottom: 70px;
}
.block { --w: calc(190px * var(--k)); position: relative; width: var(--w); height: calc(var(--h) * var(--k)); transform-style: preserve-3d; transform-origin: 50% 100%; }
.block > div { position: absolute; border: 4px solid var(--ink); }
.block__front {
  inset: 0; transform: translateZ(calc(var(--dep) / 2));
  background: var(--bc); display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding-top: 14px; gap: 2px;
}
.block__top {
  left: 0; top: 0; width: var(--w); height: var(--dep);
  transform-origin: 50% 0; transform: translateZ(calc(var(--dep) / -2)) rotateX(90deg);
  background: var(--bt); display: grid; place-items: center;
}
.block__side {
  top: 0; right: 0; width: var(--dep); height: 100%;
  transform-origin: 100% 50%; transform: translateZ(calc(var(--dep) / -2)) rotateY(90deg);
  background: var(--bs);
}
.block--1 { --bc: var(--orange); --bt: var(--orange-2); --bs: #E5612A; --w: calc(220px * var(--k)); }
.block--2 { --bc: var(--blue); --bt: #5B93FF; --bs: #1550C4; }
.block--3 { --bc: var(--yellow); --bt: #FFD77F; --bs: #E5A92E; }
.block__rank { font: 400 clamp(2.6rem, 5vw, 4.4rem)/1 var(--f-display); color: var(--white); text-shadow: 4px 4px 0 var(--ink); }
.block--3 .block__rank { color: var(--white); }
.block__name { font: 800 1.15rem/1.2 var(--f-body); color: var(--ink); background: var(--white); padding: 3px 10px; border-radius: 999px; border: 3px solid var(--ink); margin-top: 6px; }
.block__amt { margin-top: 6px; font-weight: 800; font-size: 1.05rem; color: var(--ink); background: repeating-linear-gradient(-45deg, var(--yellow) 0 6px, #FFE09A 6px 12px); border: 2px dashed var(--ink); border-radius: 6px; padding: 3px 7px; }
.block--3 .block__amt { background: var(--white); }
.block__chip {
  width: 70px; height: 70px; border-radius: 18px; background: var(--ink); color: var(--yellow);
  display: grid; place-items: center; font-size: 2.4rem; border: 4px solid var(--yellow);
  animation: chip 3s ease-in-out infinite;
}
@keyframes chip { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-10deg) scale(1.08); } }
.podium__floor { position: absolute; z-index: -1; pointer-events: none; bottom: 24px; left: 50%; width: min(1000px, 96%); height: 62px; translate: -50% 0; border-radius: 50%; background: rgba(30, 30, 30, .12); }
.podium__spark { position: absolute; left: calc(50% + 280px); top: 4%; animation: twinkle 3s ease-in-out infinite; }
.podium__spark--b { left: calc(50% - 380px); top: 22%; animation-delay: -1.2s; }

.submit {
  background-color: var(--sky); border-block: var(--bw-lg) solid var(--ink);
  background-image:
    linear-gradient(rgba(255, 255, 255, .28) 2px, transparent 2px),
    linear-gradient(90deg, rgba(255, 255, 255, .28) 2px, transparent 2px);
  background-size: 66px 66px; background-position: -2px -2px;
}
.submit-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.submit-copy p { margin: 16px 0 0; font-size: 1.15rem; font-weight: 500; max-width: 26rem; }
.term {
  background: #161616; color: #EDE8E0; border: var(--bw-lg) solid var(--ink);
  border-radius: var(--r-lg); box-shadow: 10px 10px 0 var(--lime); overflow: hidden;
  rotate: 1deg;
}
.term__bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--ink-2); border-bottom: 3px solid #000; }
.term__bar i { width: 13px; height: 13px; border-radius: 50%; background: var(--orange); border: 2px solid #000; }
.term__bar i:nth-child(2) { background: var(--yellow); }
.term__bar i:nth-child(3) { background: var(--lime); }
.term__bar span { margin-left: 8px; font-size: .82rem; color: #A9A39A; font-weight: 700; }
.term__body {
  margin: 0; padding: 22px 24px 26px; min-height: 300px;
  font-size: clamp(.86rem, 1.2vw, 1.02rem); line-height: 1.75; font-weight: 500;
  white-space: normal; overflow-wrap: anywhere;
}
.term__line { display: block; min-height: 1.75em; }
.js .term:not(.is-done) .term__line { visibility: hidden; }
.js .term .term__line.is-typed { visibility: visible; }
.c-or { color: var(--orange); font-weight: 800; }
.c-sky { color: var(--sky); }
.c-lime { color: var(--lime); font-weight: 800; }
.term__caret { display: inline-block; width: .6em; height: 1.1em; vertical-align: -.2em; background: var(--lime); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Rules ---------- */
.rules {
  background-color: #FFE3A3; border-bottom: var(--bw-lg) solid var(--ink);
  background-image:
    linear-gradient(rgba(255, 255, 255, .4) 2px, transparent 2px),
    linear-gradient(90deg, rgba(255, 255, 255, .4) 2px, transparent 2px);
  background-size: 66px 66px; background-position: -2px -2px;
}
.rules__grid { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.rules__head { position: sticky; top: 120px; }
.rules__head p { margin: 16px 0 0; font-size: 1.1rem; font-weight: 500; }
.rules__spark { margin-top: 36px; animation: twinkle 4s ease-in-out infinite; }
.accordion { display: grid; gap: 16px; }
.acc {
  background: var(--white); border: var(--bw) solid var(--ink); border-radius: var(--r-lg);
  box-shadow: var(--sh); transition: box-shadow .35s var(--ease-back), translate .35s var(--ease-back);
}
.acc[open] { box-shadow: 7px 7px 0 var(--ac); translate: -2px -2px; }
.acc--orange { --ac: var(--orange); }
.acc--sky { --ac: var(--blue); }
.acc--yellow { --ac: var(--yellow); }
.acc--pink { --ac: var(--pink); }
.acc summary {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px;
  font: 800 clamp(1.1rem, 1.7vw, 1.35rem)/1.2 var(--f-body); cursor: pointer; list-style: none;
}
.acc summary::-webkit-details-marker { display: none; }
.acc__icon { width: 44px; height: 44px; padding: 8px; border-radius: 12px; background: var(--ac); border: var(--bw) solid var(--ink); font-size: 1.5rem; box-sizing: border-box; }
.acc--sky .acc__icon { background: var(--sky); }
.acc__plus { margin-left: auto; font-size: 1.6rem; transition: rotate .45s var(--ease-back); }
.acc[open] .acc__plus { rotate: 135deg; }
.acc ul { margin: 0; padding: 0 22px 22px 78px; display: grid; gap: 10px; }
.acc li { padding-left: 4px; }
.acc li::marker { content: '✦  '; color: var(--ac); }
.acc--sky li::marker { color: var(--blue); }
.acc__body { overflow: hidden; }
.acc__body ul { transition: opacity .35s var(--ease-out), transform .45s var(--ease-out); }
.acc.is-closing .acc__body ul, .acc.is-pre-open .acc__body ul { opacity: 0; transform: translateY(-10px); }
.acc.is-closing .acc__plus { rotate: 0deg; }

/* ---------- Register ---------- */
.register {
  position: relative; background-color: var(--orange);
  background-image:
    linear-gradient(rgba(255, 255, 255, .16) 2px, transparent 2px),
    linear-gradient(90deg, rgba(255, 255, 255, .16) 2px, transparent 2px);
  background-size: 66px 66px;
  padding-bottom: clamp(80px, 10vw, 140px);
  scroll-margin-top: 0;
}
.register .marquee { border-top: 0; }
.register__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 80px); align-items: start; padding-top: clamp(60px, 8vw, 110px); }
.register__title { color: var(--white); text-shadow: 5px 5px 0 var(--ink); font-size: clamp(2.1rem, 4.2vw, 3.6rem); }
.deadline {
  margin: 26px 0 0; max-width: 520px; overflow: hidden;
  background: var(--yellow); border: var(--bw-lg) solid var(--ink); border-radius: var(--r-lg);
  box-shadow: 7px 7px 0 var(--ink);
}
.deadline__count {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; padding: 14px 22px;
  background: var(--ink); color: var(--paper); font-weight: 700;
}
.deadline__count strong { font-weight: 800; font-size: 1.05rem; color: var(--ink); background: var(--yellow); padding: .15em .5em; border-radius: 8px; }
.deadline__date { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; padding: 14px 22px 16px; font-weight: 700; font-size: 1.05rem; }
.deadline__date strong { font-weight: 800; }
.next { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 14px; }
.next li { display: flex; gap: 14px; align-items: center; background: rgba(255, 253, 250, .92); border: var(--bw) solid var(--ink); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--sh); }
.next__n { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--ink); color: var(--yellow); font: 800 1.1rem/1 var(--f-mono); }
.next strong { display: block; font-weight: 800; }
.next span:not(.next__n) { display: block; font-size: .95rem; color: var(--ink-2); }

.form-card {
  position: relative; background: var(--white); border: var(--bw-lg) solid var(--ink); border-radius: 28px;
  box-shadow: 12px 12px 0 var(--ink); padding: clamp(22px, 3vw, 38px);
}
.form-card.is-arrived { animation: slap .8s var(--ease-back); }
@keyframes slap { 0% { transform: scale(1.06) rotate(-2deg); box-shadow: 24px 24px 0 var(--ink); } 60% { transform: scale(.99) rotate(.4deg); } 100% { transform: none; } }
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label, .field legend { font-weight: 800; font-size: .98rem; padding: 0; }
.field i, legend i { color: var(--orange); font-style: normal; }
.field input {
  width: 100%; font: 500 1.02rem/1.3 var(--f-body); color: var(--ink);
  padding: 14px 16px; background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 14px;
  transition: box-shadow .25s var(--ease-back), translate .25s var(--ease-back), background-color .2s;
}
.field input::placeholder { color: #6F685F; }
.field input:hover { background: #FFF8EE; }
.field input:focus { outline: none; background: var(--white); box-shadow: 4px 4px 0 var(--blue); translate: -2px -2px; }
.field.is-error input { background: #FFEAF3; box-shadow: 4px 4px 0 var(--pink); }
.field__err { margin: 0; min-height: 0; font-size: .9rem; font-weight: 700; color: #B0185A; }
.field__err:empty { display: none; }
.field.is-error { animation: shake .45s var(--ease-out); }
@keyframes shake { 20% { translate: -6px 0; } 40% { translate: 5px 0; } 60% { translate: -3px 0; } 80% { translate: 2px 0; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-block; padding: 9px 14px; border: var(--bw) solid var(--ink); border-radius: 999px;
  font-weight: 700; font-size: .92rem; background: var(--paper);
  transition: background-color .2s, transform .3s var(--ease-back), box-shadow .3s var(--ease-back);
}
.chip:hover span { transform: translateY(-2px) rotate(-2deg); background: #FFF1D6; }
.chip input:checked + span { background: var(--yellow); box-shadow: var(--sh); transform: translate(-2px, -2px) rotate(-2deg); }
.chip input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-weight: 600; position: relative; }
.check input { position: absolute; opacity: 0; width: 28px; height: 28px; cursor: pointer; }
.check__box {
  flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px;
  border: var(--bw) solid var(--ink); background: var(--paper); color: var(--ink);
  transition: background-color .2s, transform .3s var(--ease-back);
}
.check__box .ms { scale: 0; transition: scale .35s var(--ease-back); font-size: 1.1rem; }
.check input:checked + .check__box { background: var(--lime); transform: rotate(-6deg); }
.check input:checked + .check__box .ms { scale: 1; }
.check input:focus-visible + .check__box { outline: 3px solid var(--blue); outline-offset: 2px; }
.check a { font-weight: 800; }
.form__submit { margin-top: 6px; position: relative; }
.form__spinner { display: none; grid-template-columns: repeat(2, 9px); gap: 3px; }
.form__spinner i { width: 9px; height: 9px; border-radius: 2px; background: var(--orange); animation: spin-tile .9s var(--ease-out) infinite; }
.form__spinner i:nth-child(2) { background: var(--yellow); animation-delay: .1s; }
.form__spinner i:nth-child(3) { background: var(--sky); animation-delay: .3s; }
.form__spinner i:nth-child(4) { background: var(--pink); animation-delay: .2s; }
@keyframes spin-tile { 50% { transform: rotate(90deg) scale(.6); } }
.form.is-loading .form__spinner { display: grid; }
.form.is-loading .form__submit .ms { display: none; }
.form.is-loading .form__submit { pointer-events: none; opacity: .9; }
.form__mode { margin: 0; font-size: .88rem; color: var(--ink-2); font-weight: 500; }
.form-done { text-align: center; padding: 20px 0; }
.form-done:focus { outline: none; }
.form-done__badge {
  width: 96px; height: 96px; margin: 0 auto; display: grid; place-items: center; border-radius: 28px;
  background: var(--lime); border: var(--bw-lg) solid var(--ink); box-shadow: var(--sh-lg); font-size: 3.4rem;
  animation: done-pop .8s var(--ease-back);
}
@keyframes done-pop { from { transform: scale(0) rotate(-40deg); } }
.form-done h3 { margin: 22px 0 8px; font: 900 2rem/1.1 var(--f-head); font-variation-settings: 'wdth' 125; }
.form-done p { margin: 0 auto 22px; max-width: 28rem; font-weight: 500; }
.confetti { position: fixed; left: 0; top: 0; z-index: 90; width: 14px; height: 14px; border: 2px solid var(--ink); border-radius: 3px; pointer-events: none; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--paper); padding: 40px 0 28px; overflow: hidden; }
.footer__giant {
  margin: 0; text-align: center; white-space: nowrap;
  font: 400 7.2vw/.85 var(--f-display); letter-spacing: -.02em;
  color: transparent; -webkit-text-stroke: 2px #4A4A4A;
  transition: color .6s;
}
.footer__giant:hover { color: var(--orange); -webkit-text-stroke-color: var(--orange); }
.footer__copy { margin-top: 24px; font-size: .85rem; color: #A9A39A; text-align: center; }

/* ---------- Floating register button ---------- */
.fab {
  position: fixed; z-index: 40; right: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px);
  font-size: 1.05rem; padding: .8em 1.25em .8em .8em;
  transform: translateY(calc(100% + 170px)) rotate(-6deg); transition: transform .6s var(--ease-back), box-shadow .25s;
}
.fab.is-shown { transform: none; }
.fab__cube {
  position: absolute; left: 50%; bottom: calc(100% + 38px); width: 0; height: 0;
  pointer-events: none; transition: opacity .3s;
}
.fab:not(.is-shown) .fab__cube { opacity: 0; }
.fab__cube .cube-float { animation-duration: 3.2s; }
.fab__view { --cs: .24; --rx: -26deg; --ry: -40deg; }
.fab__cube::after { /* little shadow on the button */
  content: ''; position: absolute; left: -36px; top: 34px; width: 72px; height: 10px; border-radius: 50%;
  background: rgba(30, 30, 30, .22); animation: shadow-breathe 3.2s ease-in-out infinite;
}
.fab:hover .fab__cube .cube-float { animation-duration: 1s; }
.fab__cube.is-solved .cube { animation: solved-pop .7s var(--ease-back); }
.fab.is-shown:hover { transform: translate(-2px, -2px); }
.fab__icon { width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: var(--yellow); display: grid; place-items: center; animation: fab-wiggle 3.2s ease-in-out infinite; }
.fab .fab__icon .ms { transform: none; }
@keyframes fab-wiggle { 0%, 70%, 100% { rotate: 0deg; } 76% { rotate: -16deg; } 84% { rotate: 14deg; } 92% { rotate: -6deg; } }

/* ---------- Tile wipe (jump to form) ---------- */
.wipe { position: fixed; inset: 0; z-index: 95; pointer-events: none; display: grid; }
.wipe span { background: var(--wc); transform: scale(0); border-radius: 18%; }
.wipe.is-in span { animation: wipe-in .34s var(--ease-out) forwards; animation-delay: var(--wd); }
.wipe.is-out span { transform: scale(1.04); animation: wipe-out .38s var(--ease-out) forwards; animation-delay: var(--wd); }
@keyframes wipe-in { from { transform: scale(0) rotate(-45deg); border-radius: 50%; } to { transform: scale(1.04) rotate(0); border-radius: 0; } }
@keyframes wipe-out { from { transform: scale(1.04); border-radius: 0; } to { transform: scale(0) rotate(45deg); border-radius: 50%; } }

/* ==========================================================================
   Entrance choreography (only when JS is on; content is visible otherwise)
   ========================================================================== */
.js .hero .ch,
.js .title__pill,
.js .title__spark,
.js .hero__lead, .js .hero__actions, .js .infobar,
.js .stage .sticker, .js .cube-wrap, .js .nav,
.js .wave, .js .sunburst, .js .stage__dots { opacity: 0; }

.is-loaded .nav { opacity: 1; animation: nav-in .9s var(--ease-out) both; }
@keyframes nav-in { from { transform: translate(-50%, -140%); } }
.is-loaded .hero .ch { opacity: 1; animation: drop .9s var(--ease-back) both; animation-delay: calc(.15s + var(--i) * .045s); }
@keyframes drop {
  0% { transform: translateY(-110%) rotate(var(--rot, -12deg)); text-shadow: 0 0 0 var(--ink); opacity: 0; }
  40% { opacity: 1; }
  100% { transform: none; text-shadow: .045em .045em 0 var(--ink); }
}
.is-loaded .title__pill { opacity: 1; animation: slap-in .7s var(--ease-back) .85s both; }
@keyframes slap-in { from { transform: scale(2.2) rotate(-18deg); opacity: 0; } to { transform: rotate(-3deg); } }
.is-loaded .title__spark { opacity: 1; animation: spark-in 1s var(--ease-back) 1s both, spin 9s linear 2s infinite; }
@keyframes spark-in { from { transform: scale(0) rotate(-180deg); } to { transform: rotate(20deg); } }
.is-loaded .wave { opacity: 1; animation: fade-in .6s ease .1s both; }
.wave__track { animation: wave-move 1.6s linear infinite; }
@keyframes wave-move { to { transform: translateX(60px); } }
.is-loaded .sunburst { opacity: 1; animation: fade-in .4s ease .2s both; }
.is-loaded .sunburst__rays polygon { animation: ray-in .7s var(--ease-back) both, ray-pulse 3s ease-in-out infinite; transform-origin: 50% 100%; }
.sunburst__rays g:nth-child(1) polygon { animation-delay: .25s, 1.2s; }
.sunburst__rays g:nth-child(2) polygon { animation-delay: .32s, 1.4s; }
.sunburst__rays g:nth-child(3) polygon { animation-delay: .39s, 1.6s; }
.sunburst__rays g:nth-child(4) polygon { animation-delay: .46s, 1.8s; }
.sunburst__rays g:nth-child(5) polygon { animation-delay: .53s, 2s; }
@keyframes ray-in { from { scale: 1 0; } }
@keyframes ray-pulse { 0%, 100% { scale: 1 1; } 50% { scale: 1 .8; } }
@keyframes fade-in { from { opacity: 0; } }
.is-loaded .hero__lead { opacity: 1; animation: rise .8s var(--ease-out) 1s both; }
.is-loaded .hero__actions { opacity: 1; animation: rise .8s var(--ease-out) 1.1s both; }
.is-loaded .infobar { opacity: 1; animation: rise-tilt .9s var(--ease-back) 1.25s both; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }
@keyframes rise-tilt { from { opacity: 0; transform: translateY(40px) rotate(3deg); } }
.is-loaded .cube-wrap { opacity: 1; animation: cube-in 1.2s var(--ease-back) .45s both; }
@keyframes cube-in { from { opacity: 0; transform: translateY(80px) scale(.6) rotate(-14deg); } }
.is-loaded .stage .sticker { opacity: 1; animation: pop 0.7s var(--ease-back) both; }
.is-loaded .stage .sticker:nth-of-type(1) { animation-delay: .9s; }
.is-loaded .stage .sticker:nth-of-type(2) { animation-delay: 1s; }
.is-loaded .stage .sticker:nth-of-type(3) { animation-delay: 1.1s; }
.is-loaded .stage .sticker:nth-of-type(4) { animation-delay: 1.2s; }
.is-loaded .stage .sticker:nth-of-type(5) { animation-delay: 1.3s; }
.is-loaded .stage .sticker:nth-of-type(6) { animation-delay: 1.38s; }
@keyframes pop { from { opacity: 0; transform: scale(0) rotate(-30deg); } }
.is-loaded .stage__dots { opacity: 1; animation: fade-in .8s ease 1.2s both; }

/* Scroll reveals: several kinds so sections don't share one entrance */
.js [data-reveal] { transition: opacity .8s var(--ease-out), transform .9s var(--ease-out), clip-path 1s var(--ease-out); }
.js [data-reveal="rise"]:not(.is-in) { opacity: 0; transform: translateY(40px); }
.js [data-reveal="wipe"] { clip-path: inset(-.5em -.3em -.4em -.3em); }
.js [data-reveal="wipe"]:not(.is-in) { clip-path: inset(-.5em 100% -.4em -.3em); transform: translateX(-20px); }
.js [data-reveal="slap"] { transition: opacity .5s var(--ease-out), transform .8s var(--ease-back), rotate .45s var(--ease-back), translate .45s var(--ease-back), box-shadow .45s var(--ease-back); }
.js [data-reveal="slap"]:not(.is-in) { opacity: 0; transform: scale(1.35) rotate(-10deg) translateY(-30px); }
.js [data-reveal="pop"] { transition: opacity .5s var(--ease-out), transform .9s var(--ease-back); }
.js [data-reveal="pop"]:not(.is-in) { opacity: 0; transform: scale(.6) rotate(6deg); }
.js [data-reveal="tiles"] > * { transition: opacity .5s var(--ease-out), transform .8s var(--ease-back); transition-delay: calc(var(--i, 0) * 70ms); }
.js [data-reveal="tiles"]:not(.is-in) > * { opacity: 0; transform: translate(var(--tx, 0), var(--ty, 0)) rotate(var(--tr, 0deg)) scale(.7); }
.js [data-reveal="podium"] .block { transition: transform 1s var(--ease-back); }
.js [data-reveal="podium"]:not(.is-in) .block { transform: scaleY(0); }
.js [data-reveal="podium"] .block--2 { transition-delay: .15s; }
.js [data-reveal="podium"] .block--3 { transition-delay: .3s; }
.js [data-reveal="podium"] .podium__spark { transition: opacity .6s .9s, transform .8s var(--ease-back) .9s; }
.js [data-reveal="podium"]:not(.is-in) .podium__spark { opacity: 0; }
.js [data-reveal="term"]:not(.is-in) { opacity: 0; transform: translateY(40px) rotate(-2deg); }
.js .goals [data-reveal="slap"]:nth-child(2) { transition-delay: .08s; }
.js .goals [data-reveal="slap"]:nth-child(3) { transition-delay: .16s; }
.js .goals [data-reveal="slap"]:nth-child(4) { transition-delay: .24s; }
.js .goals [data-reveal="slap"]:nth-child(5) { transition-delay: .32s; }
.js .goals [data-reveal="slap"].is-in { transition-delay: 0s; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .nav__links a:not(.btn) { padding: .55em .6em; font-size: .9rem; }
}
@media (max-width: 1023px) {
  .podium { --k: 1.05; height: clamp(360px, 46vw, 470px); }
  :root { --nav-h: 64px; }
  .nav { top: 10px; padding: 6px 6px 6px 8px; }
  .nav__logo { height: 44px; padding: 0 12px; }
  .nav__logo img { height: 26px; }
  .nav__cta { display: none; }
  .nav__toggle { display: grid; place-items: center; margin-left: auto; }
  .nav__links {
    position: fixed; left: 0; right: 0; top: calc(100% + 10px);
    flex-direction: column; gap: 6px; padding: 16px;
    background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 24px; box-shadow: var(--sh-lg);
    transform-origin: 90% 0; transform: scale(.6) rotate(-4deg); opacity: 0; visibility: hidden;
    transition: transform .45s var(--ease-back), opacity .25s, visibility 0s .45s;
  }
  .nav.is-open .nav__links { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
  .nav__links a:not(.btn) { font: 900 1.5rem/1.2 var(--f-head); font-variation-settings: 'wdth' 125; padding: .45em .5em; }
  .nav__menu-cta { display: flex; margin-top: 8px; }

  .hero { grid-template-columns: 1fr; padding-top: calc(var(--nav-h) + 40px); gap: 8px; }
  .title { --title-fs: 14vw; }
  .sunburst { left: auto; right: 4%; }
  /* Phones/tablets: cube right under the title, then copy and CTA */
  .hero__copy { display: contents; }
  .hero__deco { order: 1; }
  .title { order: 2; }
  .stage { order: 3; width: min(100%, 440px); margin: 4px auto 0; }
  .hero__lead { order: 4; }
  .hero__actions { order: 5; }
  .infobar { order: 7; }
  .hero__deco, .title, .hero__lead, .hero__actions, .infobar { position: relative; z-index: 2; }
  .story__grid { grid-template-columns: 1fr; }
  .story__aside { max-width: 420px; }
  .goals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .goal, .goal:nth-child(4) { grid-column: auto; }
  .goal:last-child { grid-column: 1 / -1; }
  .who__grid { grid-template-columns: 1fr; }
  .team { max-width: 460px; }
  .topics__head { grid-template-columns: 1fr; }
  .submit-grid, .rules__grid, .register__grid { grid-template-columns: 1fr; }
  .rules__head { position: static; }
  .rules__spark { display: none; }
}
@media (min-width: 1024px) {
  .hero__copy { padding-bottom: 20px; }
}
@media (max-width: 760px) {
  body { font-size: 1rem; }
  .infobar__grid { grid-template-columns: 1fr; gap: 14px; padding: 16px 20px 18px; }
  .infobar__count { padding: 12px 20px; }
  .infobar__cell + .infobar__cell { border-left: 0; padding-left: 0; border-top: 3px solid var(--ink); padding-top: 14px; }
  .hero__actions .btn { flex: 1 1 auto; }
  .goals { grid-template-columns: 1fr; }
  .rubik-face { grid-template-columns: 1fr; padding: 10px; gap: 10px; border-radius: 22px; }
  .topic { padding: 12px 14px; gap: 12px; }
  .topic__icon { width: 40px; height: 40px; }
  .field-row { grid-template-columns: 1fr; }
  .podium { --k: 1; height: 330px; }
  .podium__floor { width: 92%; height: 40px; bottom: 20px; }
  .podium__scene { --dep: 70px; gap: 12px; transform: rotateX(-14deg) rotateY(-22deg); margin-bottom: 56px; }
  .block { --w: 92px !important; }
  .block--1 { --w: 104px !important; }
  .block__name { font-size: .78rem; padding: 2px 6px; }
  .block__amt { font-size: .72rem; padding: 2px 4px; }
  .block__chip { width: 46px; height: 46px; font-size: 1.6rem; border-radius: 12px; }
  .podium__spark { left: auto; right: 4%; }
  .podium__spark--b { left: 2%; }
  .acc ul { padding: 0 18px 20px 24px; }
  .fab { left: 16px; right: 16px; justify-content: center; }
  .stage { width: min(100%, 330px); aspect-ratio: 1 / .9; margin-bottom: -18px; }
  .hero__deco { height: 48px; }
  .hero { padding-top: calc(var(--nav-h) + 28px); }
  .hero__lead { margin-top: 14px; }
  .hero__actions { margin-top: 20px; }
}

/* Timeline: vertical on narrow screens */
@media (max-width: 899px) {
  .timeline__sticky { position: static; height: auto; overflow: visible; padding-bottom: 90px; }
  .timeline__viewport { margin-top: 36px; }
  .timeline__track { flex-direction: column; width: auto; padding: 0 var(--gutter) 0 calc(var(--gutter) + 34px); gap: 30px; transform: none !important; }
  .ms-item { width: auto; display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: center; }
  .ms-item__node { grid-row: 1 / span 2; width: 52px; height: 52px; margin: 0; align-self: start; font-size: 1.4rem; }
  .ms-item__date { height: auto; font-size: 1.4rem; }
  .ms-item__card { grid-column: 2; margin-top: 8px; }
  .timeline__track::before, .timeline__track::after { left: calc(var(--gutter) + 34px + 21px); right: auto; top: 0; bottom: 0; width: 10px; height: auto; }
  .timeline__track::after { transform-origin: 50% 0; transform: scaleY(var(--p, 0)); background: linear-gradient(180deg, var(--yellow), var(--orange), var(--pink)); }
}

/* ==========================================================================
   Reduced motion: a calm, static version of the page
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    animation-delay: 0s !important; transition-duration: .15s !important; transition-delay: 0s !important;
  }
  .js [data-reveal], .js [data-reveal] > *, .js [data-reveal] .block, .js [data-reveal] .podium__spark { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .marquee__track { transform: none; }
  .js .term .term__line { visibility: visible; }
  .story__statement .w { color: var(--ink); }
  .js .hl { --hl: 100%; }
  .topic { transition: none; }
}

@media (max-width: 600px) { .cd-sep { display: none; } }
