@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/BricolageGrotesque-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  --ink: #0b0b0b;
  --paper: #f4f2ec;
  --line: #ddd9cf;
  --mute: #6b675e;
  --sun: #ffd60a;
  --white: #fff;
  --display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", "Noto Sans Thai", "Thonburi", sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--body);
  -webkit-text-size-adjust: 100%;
}
img, video, iframe { max-width: 100%; display: block; }
img { height: auto; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; box-shadow: 0 0 0 6px var(--ink); }

/* Language: English by default, Thai when <html data-lang="th">. */
[lang="th"] { display: none; }
html[data-lang="th"] [lang="th"] { display: revert; }
html[data-lang="th"] [lang="en"] { display: none; }
html[data-lang="th"] body { line-height: 1.8; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--gutter); top: 8px; z-index: 10; background: var(--sun); padding: 8px 12px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
section { padding: clamp(48px, 8vw, 96px) 0; }
[id] { scroll-margin-top: 72px; }
.dark { background: var(--ink); color: var(--paper); }
.sun { background: var(--sun); }

h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1.02; letter-spacing: -0.02em; margin: 0 0 0.4em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 9vw, 6rem); }
h2 { font-size: clamp(1.9rem, 5vw, 3.2rem); }
h3 { font-size: 1.25rem; letter-spacing: 0; line-height: 1.2; }
html[data-lang="th"] h1, html[data-lang="th"] h2, html[data-lang="th"] h3 { line-height: 1.3; letter-spacing: 0; }
p { margin: 0 0 1em; max-width: 62ch; }
.lede { font-size: clamp(1.1rem, 2.4vw, 1.4rem); }
.eyebrow { font: 800 0.8rem/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 1rem; }
.small { font-size: 0.875rem; color: var(--mute); }
.dark .small { color: #b5b0a4; }

/* Header */
.top { background: var(--ink); color: var(--paper); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.top .logo img { height: 26px; width: auto; }
.top nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.top nav a, .lang { padding: 10px; font-size: 0.9rem; text-decoration: none; color: inherit; }
.top nav a[aria-current="page"] { color: var(--sun); }
.top nav a:hover { text-decoration: underline; }
.lang { background: none; border: 1px solid #444; border-radius: 99px; padding: 6px 12px; cursor: pointer; font-family: inherit; }

@media (max-width: 700px) {
  .top { position: static; }
  .top .wrap { gap: 0 12px; padding-top: 6px; }
  .top .lang { margin-left: auto; }
  .top nav { order: 3; width: 100%; margin: 0 -10px; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; }
}

/* Buttons */
.btn {
  display: inline-block; padding: 14px 22px; border: 2px solid var(--ink); border-radius: 6px;
  background: var(--sun); color: var(--ink); font: 800 1rem/1.1 var(--display);
  text-decoration: none; cursor: pointer; box-shadow: 4px 4px 0 var(--ink);
}
.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn.ghost { background: transparent; box-shadow: none; }
.dark .btn { border-color: var(--sun); box-shadow: 4px 4px 0 #000; }
.dark .btn.ghost { color: var(--paper); border-color: var(--paper); box-shadow: none; }
.btn[aria-disabled="true"] { background: var(--line); border-color: var(--mute); color: var(--ink); box-shadow: none; cursor: not-allowed; transform: none; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.5rem; align-items: center; }

/* Hero */
.hero { padding: clamp(32px, 6vw, 80px) 0; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(24px, 5vw, 56px); align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 6.4vw, 4.8rem); }
.hero h1 em { font-style: normal; color: var(--sun); }
.hero figure { margin: 0; }
.hero figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; border-radius: 6px; box-shadow: 10px 10px 0 var(--sun); }
.hero figcaption { font-size: 0.8rem; color: #b5b0a4; margin-top: 18px; }
@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero figure { order: -1; }
  /* Wide crop on phones: keep both faces in frame, sitting a little below the top edge. */
  .hero figure img { aspect-ratio: 5 / 4; object-position: 50% 24%; box-shadow: 6px 6px 0 var(--sun); }
}

/* Scoreboard */
.board { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0; border: 2px solid var(--ink); background: var(--white); }
.board > div { padding: 20px; border: 1px solid var(--line); }
.board .num { font: 800 clamp(2rem, 6vw, 3rem)/1 var(--display); display: block; }
.board { color: var(--ink); }
.dark .board .small { color: var(--mute); }
.board .label { font-size: 0.85rem; color: var(--mute); display: block; margin-top: 6px; }
.bar { height: 18px; border: 2px solid var(--ink); background: var(--white); margin: 12px 0 6px; }
.bar > i { display: block; height: 100%; background: var(--sun); border-right: 2px solid var(--ink); min-width: 0; }
.bar > i[style="width: 0%;"], .bar > i[style="width:0%"] { border-right: 0; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; margin-top: 1.5rem; padding: 0; list-style: none; }
.card { background: var(--white); border: 2px solid var(--ink); border-radius: 6px; padding: 22px; display: flex; flex-direction: column; gap: 6px; color: var(--ink); }
.card.pick { box-shadow: 6px 6px 0 var(--sun), 6px 6px 0 2px var(--ink); }
.card .price { font: 800 1.8rem/1 var(--display); }
.card .btn { margin-top: auto; align-self: flex-start; }
.card p { margin-bottom: 0.6em; }
.tag { display: inline-block; align-self: flex-start; font: 800 0.7rem/1 var(--display); letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 8px; border: 1.5px solid var(--ink); border-radius: 3px; background: var(--paper); }
.tag.available { background: var(--sun); }
.tag.sold { background: var(--ink); color: var(--paper); }
.tag.reserved, .tag.soon { background: var(--line); }

.video { aspect-ratio: 16 / 9; background: #000; border: 2px solid var(--ink); }
.shorts { display: flex; gap: 14px; overflow-x: auto; padding: 4px 0 12px; margin: 0.8rem 0 0; list-style: none; scroll-snap-type: x mandatory; }
.shorts li { flex: 0 0 150px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; }
.shorts a { display: block; aspect-ratio: 9 / 16; border: 2px solid var(--sun); border-radius: 6px; }
.shorts a:hover, .shorts a:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.shorts .small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video iframe { width: 100%; height: 100%; border: 0; }

/* Journal */
.journal { list-style: none; padding: 0; margin: 1.5rem 0 0; border-top: 2px solid var(--ink); }
.journal li { padding: 18px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 8.5rem 1fr; gap: 12px; }
.journal time { font: 800 0.85rem/1.6 var(--display); color: var(--mute); }
@media (max-width: 560px) { .journal li { grid-template-columns: 1fr; gap: 0; } }

/* Surprise */
.wheel { width: min(260px, 70vw); aspect-ratio: 1; margin: 0 auto 20px; border-radius: 50%; border: 4px solid var(--ink);
  background: conic-gradient(var(--sun) 0 45deg, var(--white) 0 90deg, var(--sun) 0 135deg, var(--white) 0 180deg, var(--sun) 0 225deg, var(--white) 0 270deg, var(--sun) 0 315deg, var(--white) 0);
  position: relative; }
.wheel::after { content: ""; position: absolute; inset: 38%; border-radius: 50%; background: var(--ink); }
.pointer { width: 0; height: 0; margin: 0 auto -6px; border: 14px solid transparent; border-top: 22px solid var(--ink); position: relative; z-index: 1; }
.wheel.spin { animation: spin 1.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes spin { to { transform: rotate(1080deg); } }
.reveal { text-align: center; }
.reveal .card { max-width: 480px; margin: 20px auto 0; text-align: left; }
.stamps { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 0; list-style: none; margin: 20px 0 0; }
.stamps li { width: 52px; height: 52px; border: 2px dashed var(--mute); border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; background: var(--white); }
.stamps li.got { border: 2px solid var(--ink); background: var(--sun); }

/* Tables */
table { width: 100%; border-collapse: collapse; background: var(--white); border: 2px solid var(--ink); }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 0.95rem; }
th { font: 800 0.75rem/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; background: var(--paper); }
.scroll { overflow-x: auto; }

/* Forms */
form { display: grid; gap: 14px; max-width: 560px; }
label { display: grid; gap: 6px; font-weight: 600; font-size: 0.95rem; }
input, textarea, select { font: inherit; padding: 12px; border: 2px solid var(--ink); border-radius: 4px; background: var(--white); color: var(--ink); width: 100%; }
.hp { position: absolute; left: -9999px; }
.note { border: 1.5px dashed var(--ink); background: var(--white); padding: 14px 16px; margin: 1.2rem 0; max-width: 62ch; }
.dark .note { background: #1a1a1a; border-color: var(--mute); }

details { border-bottom: 1px solid var(--line); padding: 16px 0; max-width: 70ch; }
summary { font: 800 1.1rem/1.3 var(--display); cursor: pointer; }
details p { margin: 0.8em 0 0; }

footer { background: var(--ink); color: var(--paper); padding: 40px 0; font-size: 0.9rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; }
footer ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 16px; flex-wrap: wrap; }
footer img { height: 24px; width: auto; margin-bottom: 10px; }

/* Live numbers */
.live { display: inline-flex; align-items: center; gap: 8px; }
.live::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #d62828; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }
[data-live-box][hidden] { display: none; }

/* Will we make it? */
.tug { display: flex; height: 54px; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; background: var(--white); margin: 18px 0 8px; }
.tug > span { display: flex; align-items: center; padding: 0 14px; font: 800 1.1rem/1 var(--display); min-width: 3.2rem; transition: flex-basis 0.6s ease; white-space: nowrap; }
.tug .can { background: var(--sun); color: var(--ink); }
.tug .cannot { background: var(--ink); color: var(--paper); justify-content: flex-end; flex: 1; }
.dark .tug { border-color: var(--paper); }
.dark .tug .cannot { background: #2a2a2a; }
.tug-labels { display: flex; justify-content: space-between; gap: 12px; font-size: 0.9rem; }
.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 26px; }
@media (max-width: 700px) { .sides { grid-template-columns: 1fr; } }
.side { border: 2px solid var(--ink); border-radius: 6px; padding: 18px; background: var(--white); color: var(--ink); display: grid; gap: 10px; align-content: start; }
.side.cannot { background: var(--ink); color: var(--paper); border-color: var(--paper); }
.side h3 { margin: 0; }
.take { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 13px 14px; border: 2px solid currentColor; border-radius: 6px; background: transparent; color: inherit; font: 600 1rem/1.3 var(--body); cursor: pointer; }
.take b { font: 800 1.15rem/1 var(--display); background: var(--sun); color: var(--ink); padding: 7px 9px; border-radius: 4px; flex: none; }
.take:hover, .take[aria-pressed="true"] { background: var(--sun); color: var(--ink); border-color: var(--ink); }
.take[aria-pressed="true"] b { background: var(--ink); color: var(--sun); }
.take:disabled { opacity: 0.55; cursor: progress; }
.vote { font: 800 1rem/1.1 var(--display); padding: 12px 14px; border: 2px solid currentColor; border-radius: 6px; background: transparent; color: inherit; cursor: pointer; }
.vote[aria-pressed="true"] { background: var(--sun); color: var(--ink); border-color: var(--ink); }

/* Sponsor stage */
.stage { background: radial-gradient(ellipse at 50% 0%, #2b2610 0%, var(--ink) 62%); color: var(--paper); }
.figures { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 560px; margin: 0 auto; }
.figures figure { margin: 0; text-align: center; }
.figures figcaption { font: 800 0.75rem/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: #b5b0a4; margin-top: 6px; }
.figures svg { width: 100%; height: auto; overflow: visible; }
.figures .body { fill: #3a3832; stroke: #6b675e; stroke-width: 1.5; }
.figures .slot { stroke: var(--ink); stroke-width: 1.5; cursor: pointer; transition: transform 0.15s ease; transform-box: fill-box; transform-origin: center; }
.figures .slot.available { fill: var(--sun); }
.figures .slot.reserved { fill: #b5b0a4; stroke-dasharray: 4 3; }
.figures .slot.sold { fill: var(--white); }
.figures a:hover .slot, .figures a:focus .slot { transform: scale(1.08); stroke: var(--white); stroke-width: 3; }
.figures a:focus { outline: none; }
.stage-grid { display: grid; grid-template-columns: minmax(300px, 1fr) 1fr; gap: clamp(20px, 4vw, 48px); align-items: start; margin-top: 1.5rem; }
@media (max-width: 860px) { .stage-grid { grid-template-columns: 1fr; } }
.stage table { color: var(--ink); }
.stage tr:target td { background: var(--sun); }
.stage td a { font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 0.85rem; margin: 14px 0 0; padding: 0; list-style: none; justify-content: center; }
.legend i { display: inline-block; width: 14px; height: 14px; border: 1.5px solid var(--paper); vertical-align: -2px; margin-right: 6px; }
.wall { display: flex; flex-wrap: wrap; gap: 14px; padding: 0; list-style: none; }
.wall li { background: var(--white); border: 2px solid var(--ink); border-radius: 6px; padding: 14px 18px; display: grid; gap: 4px; justify-items: center; min-width: 150px; color: var(--ink); }
.wall img { max-height: 48px; width: auto; }

@media (prefers-reduced-motion: reduce) {
  .live::before { animation: none; }
  .tug > span, .figures .slot { transition: none; }
  html { scroll-behavior: auto; }
  .wheel.spin { animation: none; }
  .btn:hover { transform: none; }
}

.side .small { color: var(--mute); }
.side.cannot .small { color: #b5b0a4; }
.sun .tug-labels, .sun .lede { color: var(--ink); }

/* Vote: custom amount, helper panel, celebration */
.custom { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; max-width: none; margin-top: 4px; }
.custom label { font-size: 0.9rem; }
.custom .small { grid-column: 1 / -1; margin: 0; }
.money { display: flex; align-items: center; border: 2px solid var(--ink); border-radius: 4px; background: var(--white); color: var(--ink); }
.money b { padding: 0 4px 0 12px; font: 800 1.2rem/1 var(--display); }
.money input { border: 0; padding-left: 4px; font: 800 1.2rem/1.2 var(--display); min-width: 0; background: transparent; }
.money:focus-within { outline: 3px solid var(--sun); outline-offset: 2px; }
.money input:focus-visible { outline: none; box-shadow: none; }
.side.cannot .custom .btn { border-color: var(--sun); }
.helper { border: 2px dashed currentColor; border-radius: 6px; padding: 14px; display: grid; gap: 8px; }
.helper p, .helper blockquote { margin: 0; max-width: none; }
.helper .eyebrow { margin: 0; font-size: 0.7rem; opacity: 0.75; }
.helper blockquote { font: 800 1.15rem/1.3 var(--display); }
html[data-lang="th"] .helper blockquote { line-height: 1.5; }
.helper [data-spend] { font-size: 1.05rem; }
.helper .vote { justify-self: start; font-size: 0.85rem; padding: 8px 10px; }
.pop-layer { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.pop-layer span { position: absolute; line-height: 1; will-change: transform, opacity; }
.stamp { position: absolute; font: 800 clamp(2rem, 9vw, 4rem)/1 var(--display); padding: 10px 18px; border: 5px solid currentColor; border-radius: 8px; color: #d62828; background: rgba(255, 255, 255, 0.92); white-space: nowrap; letter-spacing: 0.04em; }
.stamp.cannot { color: var(--ink); background: var(--sun); }
.sun .tug .can { background: var(--white); }

/* Follow + email */
.follow-row { display: flex; flex-wrap: wrap; gap: 18px 22px; list-style: none; padding: 0; margin: 1.4rem 0 2rem; }
.follow-row li { display: grid; gap: 8px; justify-items: start; }
.follow-row .btn { font-size: 1.05rem; }
.subscribe { max-width: 620px; gap: 10px; }
.subscribe > label { font-weight: 600; font-size: 1.05rem; }
.subscribe-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
@media (max-width: 520px) { .subscribe-row { grid-template-columns: 1fr; } .follow-row .btn { width: 100%; text-align: center; } .follow-row li { width: 100%; } }
.subscribe input[aria-invalid="true"] { border-color: #d62828; }

/* First-visit pop-up */
dialog.welcome { border: 3px solid var(--ink); border-radius: 10px; padding: clamp(20px, 5vw, 36px); width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; background: var(--paper); color: var(--ink); box-shadow: 10px 10px 0 var(--sun); }
dialog.welcome::backdrop { background: rgba(11, 11, 11, 0.78); }
.welcome h2 { font-size: clamp(1.6rem, 6vw, 2.3rem); margin-top: 0.2em; }
.welcome-close { float: right; background: none; border: 0; font: 600 0.85rem var(--body); color: var(--mute); cursor: pointer; padding: 8px; margin: -8px -8px 0 0; text-decoration: underline; }
.welcome-step { color: var(--mute); margin-bottom: 0.4rem; }
.welcome-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 1rem 0; }
.welcome-side { display: grid; gap: 4px; justify-items: center; padding: 22px 10px; border: 3px solid var(--ink); border-radius: 8px; cursor: pointer; font-family: inherit; color: var(--ink); background: var(--sun); }
.welcome-side.cannot { background: var(--ink); color: var(--paper); }
.welcome-side.cannot .small { color: #b5b0a4; }
.welcome-side strong { font: 800 1.3rem/1.15 var(--display); }
.welcome-side .big { font-size: 2.4rem; line-height: 1; }
.welcome-side:hover { transform: translateY(-3px); }
.welcome-side:disabled { opacity: 0.6; cursor: progress; transform: none; }
.welcome form { max-width: none; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chips .vote { font-size: 1.2rem; padding: 12px 18px; }
.contact-row { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; padding: 0; margin: 0.6rem 0 0; }
.dark .contact-row .btn.ghost { color: var(--paper); border-color: var(--paper); }
@media (prefers-reduced-motion: reduce) { .welcome-side:hover { transform: none; } }

/* /work */
.reel { display: block; position: relative; aspect-ratio: 9 / 16; background: #1a1a1a; border: 2px solid var(--sun); border-radius: 6px; overflow: hidden; }
.reel img { width: 100%; height: 100%; object-fit: cover; }
.reel .tile-cap { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; text-align: center; font: 800 0.95rem/1.25 var(--display); color: var(--paper); }
.reel.proof { border-color: var(--ink); }
[data-w-proof-list] { grid-template-columns: repeat(auto-fill, minmax(140px, 200px)); }
[data-w-audience] > div { padding: 20px; }
/* mission scope builder (work page) */
form[data-mission] fieldset { border: 0; padding: 0; margin: 0 0 14px; }
form[data-mission] legend { font: 800 0.8rem/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 8px; }
form[data-mission] .opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); cursor: pointer; }
form[data-mission] .opt input { width: auto; flex: none; margin: 4px 0 0; padding: 0; accent-color: var(--ink); }
form[data-mission] .opt > span { flex: 1; text-align: left; }
form[data-mission] .opt b { white-space: nowrap; }
