/* =====================================================================
   Home page v2 (2026-11-22): colour-blocked sections, giant condensed headings,
   masked line reveals, scroll drift, word highlight, sticky pill, marquee.
   Loaded after site.css on index.html only.
   ===================================================================== */
.home section { border-bottom: 0; }
.home .site-header { background: transparent; border-bottom-color: transparent; backdrop-filter: none; }
.home .site-header.is-scrolled { background: color-mix(in srgb, var(--bg) 88%, transparent); border-bottom-color: var(--line); backdrop-filter: blur(12px); }
.home .nav a { color: var(--text-dim); }
.home .nav a:hover, .home .nav a[aria-current="page"] { color: var(--text); }

/* announcement bar */
.announce { position: relative; height: 34px; overflow: hidden; background: var(--ink); color: var(--cream);
  font: 500 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.announce > span { position: absolute; inset: 0; display: grid; place-items: center; padding: 0 16px; text-align: center;
  opacity: 0; transform: translateY(100%); transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
.announce > span.on { opacity: 1; transform: none; }

/* giant headings */
.mega { font-family: var(--display); font-weight: 800; font-stretch: 72%; text-transform: uppercase;
  font-size: clamp(64px, 11vw, 176px); line-height: .88; letter-spacing: -.01em; margin: 0 0 24px; }
.mega.sm { font-size: clamp(48px, 7vw, 112px); }
:lang(th) .mega { font-weight: 700; line-height: 1.04; letter-spacing: 0; }
.js [data-lines] .ln { display: block; overflow: hidden; padding: .1em 0 .14em; margin: -.1em 0 -.14em; }
.js [data-lines] .ln > span { display: inline-block; transform: translateY(115%);
  transition: transform 1.1s var(--ease-out); transition-delay: calc(var(--i) * 90ms + .1s); }
.js [data-lines].is-in .ln > span { transform: none; }

.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font: 500 12px var(--mono);
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime-deep); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* buttons for coloured backgrounds */
.btn { transition: border-color .2s, background .2s, color .2s, transform .15s var(--ease-out); }
.btn:active { transform: scale(.97); }
.btn.ink { background: var(--ink-green); border-color: var(--ink-green); color: var(--cream); }
.btn.ink:hover { background: #000; border-color: #000; }
.btn.ghost { border: 1.5px solid currentColor; color: var(--text); }
.btn.ghost:hover { background: rgb(0 0 0 / .06); }
.btn.sm { padding: 8px 16px; font-size: 14px; }

/* hero */
.xhero { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 24px;
  min-height: clamp(600px, calc(100svh - var(--head) - 34px), 980px);
  max-width: 1440px; margin: 0 auto; padding: 24px clamp(16px, 3.4vw, 48px) 72px; overflow-x: clip; }
.xhero-stage { position: relative; display: grid; place-items: center; min-height: 480px; }
.xhero .device.main { width: min(360px, 72vw); }
.xhero .mega { font-size: clamp(60px, 8.6vw, 150px); }
.xhero .lead { color: var(--text); opacity: .86; }
.rise { animation: rise 1.2s var(--ease-out) .15s both; }
@keyframes rise { from { opacity: 0; transform: translateY(60px) scale(.96); } }
.float-tile { position: absolute; z-index: 1; width: clamp(110px, 13vw, 190px); padding: 9px; border-radius: 18px;
  background: #0c0d0b; box-shadow: 0 24px 40px rgb(27 33 8 / .3), inset 0 1px 0 rgb(255 255 255 / .08);
  transform: translateY(var(--py, 0px)) rotate(calc(var(--rot) + var(--spin, 0deg)));
  animation: fade-in 1.2s var(--ease-out) .35s both; }
@keyframes fade-in { from { opacity: 0; } }
.float-tile img { display: block; width: 100%; height: auto; image-rendering: pixelated; border-radius: 6px; }
.float-tile.t1 { --rot: -13deg; top: 2%; left: 2%; }
.float-tile.t2 { --rot: 10deg; bottom: 8%; right: 2%; animation-delay: .5s; }
.pill-link { display: inline-flex; align-items: center; gap: 10px; margin: 4px 0 22px; padding: 5px 14px 5px 5px;
  border-radius: 999px; background: var(--ink-green); color: var(--cream); font-size: 14px; text-decoration: none;
  transition: transform .2s var(--ease-out); }
.pill-link:hover { transform: translateX(3px); }
.pill-link b { padding: 4px 10px; border-radius: 999px; background: var(--lime); color: var(--ink-green); font: 400 11px var(--pixelfont); }

/* spotlight */
.spot { padding: clamp(80px, 12vw, 150px) 0; }
.spot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.spot-media { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 28px;
  background: var(--bg-raised); box-shadow: 0 30px 60px rgb(27 33 8 / .08); }
.spot-device { width: min(380px, 78%); transition: transform .6s var(--ease-out); }
.spot-media:hover .spot-device { transform: translateY(-8px) rotate(-2deg); }
.spot-device .screen img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.tag { position: absolute; top: 18px; left: 18px; padding: 5px 12px; border-radius: 999px; background: var(--ink-green); color: var(--lime);
  font: 400 11px var(--pixelfont); }
.tagline { font-size: clamp(19px, 1.7vw, 23px); line-height: 1.45; font-weight: 500; max-width: 30ch; }
.state { font-size: 14px; color: var(--text-dim); }

/* statement */
.statement { position: relative; min-height: 115vh; padding: 18vh 0; overflow: clip; display: grid; align-items: center; }
.statement-art { position: absolute; left: -5vw; top: 10%; width: min(58vw, 760px); pointer-events: none;
  transform: translateY(var(--py, 0px)) rotate(calc(-12deg + var(--spin, 0deg)));
  filter: drop-shadow(0 40px 50px rgb(0 0 0 / .35)); }
.statement-art svg { display: block; width: 100%; height: auto; }
.statement-copy { position: relative; z-index: 2; display: grid; justify-items: end; text-align: right; }
.statement .mega { font-size: clamp(80px, 13vw, 210px); }
:lang(th) .statement .mega { font-size: clamp(64px, 9.6vw, 156px); }
.statement .lead { max-width: 30ch; }

/* manifesto: words light up while scrolling */
.manifesto { padding: clamp(100px, 14vw, 180px) 0; }
.kicker { font: 500 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }
.words { font-family: var(--display); font-weight: 600; font-size: clamp(28px, 4.2vw, 60px); line-height: 1.22; max-width: 22ch; margin: 0; }
:lang(th) .words { line-height: 1.4; max-width: 24ch; }
.js .words .w { color: color-mix(in srgb, var(--text) 20%, transparent); transition: color .35s; }
.js .words .w.on { color: var(--text); }

/* characters on the home page */
.home .characters { padding-top: 40px; }

/* keypad toy */
.keypad { padding: clamp(90px, 12vw, 150px) 0; }
.keypad-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.key-row { display: flex; justify-content: center; gap: clamp(5px, .8vw, 12px); margin-bottom: clamp(5px, .8vw, 12px); }
.key { --k: min(7vw, 70px); width: var(--k); height: var(--k); padding: 0; border-radius: 14px; cursor: pointer;
  border: 2px solid #0e1a2c; background: var(--cream); color: #0e1a2c; font: 400 clamp(13px, 1.9vw, 22px) var(--pixelfont);
  box-shadow: 0 6px 0 #0e1a2c; transition: background .2s; }
.key:hover { background: #fff; }
.key.hit { animation: keyhit .22s var(--ease-out); }
.key.lit { background: var(--lime); }
.key:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
@keyframes keyhit { 40% { transform: translateY(5px); box-shadow: 0 1px 0 #0e1a2c; } }
.typed { min-height: 1.6em; margin-top: 18px; text-align: center; font-size: 20px; letter-spacing: .3em; color: var(--text-dim); }
.keypad-device { width: min(300px, 80%); margin-bottom: 36px; }
.keypad.won .keypad-device { animation: wobble .7s ease-in-out; }
.keypad-msg { font-size: 18px; min-height: 3.2em; color: var(--text-dim); }
.keypad.won .keypad-msg { color: var(--lime); }

/* how we work + next up on dark */
.home .privacy { padding: clamp(90px, 12vw, 150px) 0; }
.home .rules b { color: var(--heading); }
.next { padding: clamp(80px, 10vw, 130px) 0 clamp(110px, 14vw, 180px); }
.next-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.next-card { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 28px; overflow: hidden; background: var(--bg-raised); }
.blur-device { width: 56%; filter: blur(16px); opacity: .8; }
.blur-device .screen img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.soon { position: absolute; padding: 7px 16px; border-radius: 999px; background: var(--cream); color: var(--ink); font: 400 11px var(--pixelfont); }

/* footer with marquee */
/* the footer is too short to reach the middle of the screen, so it carries its own lime colours */
.xfooter { --bg: #bcd142; --text: #1b2108; --text-dim: rgb(27 33 8 / .74); --line: rgb(27 33 8 / .2); --heading: #1b2108;
  background: var(--bg); padding: 48px 0 0; color: var(--text); font-size: 15px; }
.marquee { overflow: hidden; padding: 12px 0 36px; }
.marquee-track { display: flex; align-items: center; gap: 4vw; width: max-content; animation: marquee 34s linear infinite; }
.marquee-track span { font: 800 9vw/1 var(--display); font-stretch: 72%; color: var(--heading); }
.marquee-track img { height: 6vw; width: auto; padding: .5vw; border-radius: 1vw; background: #0c0d0b; image-rendering: pixelated; }
@keyframes marquee { to { transform: translateX(calc(-50% - 2vw)); } }
.xfooter .footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; align-items: start; padding: 32px 0 48px; border-top: 1px solid var(--line); }
.xfooter nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.xfooter nav a { text-decoration: none; }
.xfooter nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.xfooter .small { font-size: 13px; color: var(--text-dim); }

/* sticky pill */
.sticky-cta { position: fixed; z-index: 30; left: 50%; bottom: 18px; display: flex; align-items: center; gap: 12px;
  padding: 6px 6px 6px 8px; border-radius: 999px; background: var(--ink); color: var(--cream);
  box-shadow: 0 14px 40px rgb(0 0 0 / .3); transform: translate(-50%, 160%); opacity: 0; pointer-events: none;
  transition: transform .5s var(--ease-out), opacity .4s; }
.sticky-cta.is-on { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.sticky-cta img { width: 48px; height: 24px; border-radius: 6px; background: #000; image-rendering: pixelated; }
.sticky-text { display: grid; line-height: 1.2; font-size: 14px; }
.sticky-text small { color: rgb(246 244 227 / .7); font-size: 12px; }
.sticky-cta .btn.primary { color: var(--ink-green); }

@media (max-width: 860px) {
  .xhero { grid-template-columns: 1fr; padding-top: 8px; min-height: 0; }
  .xhero-stage { min-height: 360px; }
  .xhero .device.main { width: min(260px, 64vw); }
  .float-tile { width: 92px; padding: 6px; border-radius: 12px; }
  .spot-grid, .keypad-grid, .next-grid { grid-template-columns: 1fr; }
  .keypad-side { order: -1; }
  .statement { min-height: 0; padding: 72px 0 96px; }
  .statement-art { position: relative; left: auto; top: auto; width: 76vw; margin: 0 auto 24px; }
  .statement-copy { justify-items: start; text-align: left; }
  .xfooter .footer-grid { grid-template-columns: 1fr; }
  .marquee-track span { font-size: 16vw; }
  .marquee-track img { height: 11vw; }
  .key { --k: calc((100vw - 32px - 9 * 5px) / 10); border-radius: 9px; box-shadow: 0 4px 0 #0e1a2c; }
  .announce { font-size: 10px; letter-spacing: .06em; }
  .announce > span { white-space: nowrap; padding: 0 8px; }
  .sticky-cta { gap: 10px; }
  .sticky-text, .sticky-cta .btn { white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  body, .site-header { transition: none; }
  .announce > span { transition: none; }
  .js [data-lines] .ln > span { transform: none; transition: none; }
  .rise, .float-tile, .marquee-track, .eyebrow .dot, .key.hit, .keypad.won .keypad-device { animation: none; }
  .js .words .w { color: var(--text); transition: none; }
  .sticky-cta { transition: none; }
}
