/* ZUGZWANG — release hub (antoniomiguelareia.com)
   Board-grid layout: every section is a tile. Stacks into one column on phones. */

:root {
  --bg: #161616;
  --ink: #ededed;
  --soft: #c2c2c2;
  --mute: #929292;
  --red: #f2262e;
  --red-text: #f5454a;
  --red-hover: #f77b7e;
  --line: #2c2c2c;
  --line-2: #3a3a3a;
  --line-3: #505050;
  --sq-dark: #131313;
  --sq-light: #242424;
  --display: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--mono); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
a { color: var(--red-text); text-decoration: none; }
a:hover { color: var(--red-hover); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grain { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; opacity: .1; mix-blend-mode: screen; }

.label { font-size: 11px; letter-spacing: .16em; color: var(--mute); text-transform: uppercase; }
.h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 34px; letter-spacing: -.035em; line-height: .9; color: var(--red); }
.body { margin: 0; font-size: 13px; line-height: 1.75; color: var(--soft); max-width: 62ch; }

.btn {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 16px; border: 1px solid var(--line-3); background: transparent; color: var(--ink);
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; cursor: pointer;
  transition: border-color .2s, background .2s, color .2s;
}
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn.red { background: var(--red); border-color: var(--red); color: var(--bg); font-weight: 500; }
.btn.red:hover { background: #ff3b42; border-color: #ff3b42; color: var(--bg); }
.btn.ghost { border-style: dashed; color: var(--mute); cursor: default; }
.btn.wide { width: 100%; }

/* ── Frame ── */
.hub { width: 100%; max-width: 640px; margin: 0 auto; padding: 14px 16px 28px; display: flex; flex-direction: column; gap: 10px; }
.nav { display: flex; justify-content: space-between; align-items: center; font-size: 10px; letter-spacing: .14em; min-height: 44px; }
.nav .name { color: var(--ink); display: flex; flex-direction: column; gap: 5px; text-decoration: none; }
.nav .roles { color: var(--mute); font-size: 9px; letter-spacing: .14em; }
.nav .menu { display: none; gap: 26px; }
.nav .menu a, .nav .menu button { background: none; border: 0; padding: 0; color: var(--ink); font-size: 11px; letter-spacing: .14em; cursor: pointer; }
.nav .menu a:hover, .nav .menu button:hover { color: var(--red-text); }
.burger { width: 44px; height: 44px; background: none; border: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; gap: 5px; cursor: pointer; }
.burger i { display: block; height: 1.5px; background: var(--ink); }

.tile { position: relative; overflow: hidden; border: 1px solid var(--line); min-width: 0; }
.sechead { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Video */
.t-video { aspect-ratio: 16 / 9; background: #000; }
.video-btn { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; }
.video-btn img { width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(.78); transition: filter .3s; }
.video-btn:hover img { filter: brightness(.9); }
.video-btn .play { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: var(--red); display: flex; align-items: center; justify-content: center; transition: transform .25s var(--ease); }
.video-btn:hover .play { transform: scale(1.06); }
.video-btn .tag { position: absolute; left: 12px; top: 10px; font-size: 10px; letter-spacing: .14em; color: var(--ink); background: rgba(22, 22, 22, .8); padding: 4px 8px; }
.t-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Title */
.t-title { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.z { margin: 0; line-height: 0; }
.z svg { display: block; width: 100%; height: auto; overflow: visible; }
.z text { font-family: var(--display); font-weight: 700; fill: var(--red); stroke: var(--red); stroke-width: 3.2px; stroke-linejoin: round; paint-order: stroke fill; }
.feat { display: flex; align-items: baseline; gap: 10px; color: var(--ink); flex-wrap: wrap; }
.feat .f { font-size: 12px; letter-spacing: .12em; color: var(--mute); }
.feat .n { font-family: var(--display); font-weight: 700; font-size: 32px; letter-spacing: -.02em; line-height: 1; }
.feat .h { font-size: 11px; color: var(--red-text); }
.feat:hover .n { color: var(--red-text); }
.meta-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.jump { font-size: 10px; letter-spacing: .14em; }
.listen { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.listen .pair { gap: 8px; }

/* About + contact */
.t-about { aspect-ratio: 1; padding: 0; border: 1px solid var(--line); background: #000; cursor: pointer; text-align: left; }
.t-about img { width: 100%; height: 100%; object-fit: cover; object-position: 66% 50%; display: block; filter: grayscale(1) contrast(1.05) brightness(.85); transition: filter .4s; }
.t-about:hover img { filter: grayscale(0) brightness(.95); }
.t-about .label, .t-contact .label { position: absolute; left: 12px; bottom: 10px; color: var(--ink); }
.t-contact { aspect-ratio: 1; padding: 14px; display: flex; flex-direction: column; justify-content: space-between; background: transparent; cursor: pointer; text-align: left; border: 1px solid var(--line); }
.t-contact:hover { border-color: var(--red); }
.t-contact .label { position: static; color: var(--mute); }
.say { font-family: var(--display); font-weight: 700; font-size: 24px; letter-spacing: -.03em; color: var(--ink); }
.work { font-size: 10px; line-height: 1.5; color: var(--soft); }

/* Records + shop */
.t-ep { aspect-ratio: 1; display: flex; flex-direction: column; justify-content: space-between; padding: 12px; background: var(--sq-light); cursor: pointer; border: 1px solid var(--line); text-align: left; }
.t-ep:hover { border-color: var(--red); }
.t-ep.checker { background: repeating-conic-gradient(var(--sq-dark) 0 25%, var(--sq-light) 0 50%) 0 0 / 25% 25%; }
.t-ep .big { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; letter-spacing: -.03em; color: var(--red); font-size: 15px; pointer-events: none; }
.t-ep .ttl { font-size: 11px; line-height: 1.4; color: var(--ink); position: relative; }
.t-ep .ntf { font-size: 10px; letter-spacing: .14em; color: var(--red-text); position: relative; }
.t-ep .lab { position: relative; }
.t-shop { aspect-ratio: 1; padding: 12px; display: flex; flex-direction: column; justify-content: space-between; border: 1px dashed var(--line-3); background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(255, 255, 255, .025) 14px 15px); }
.t-shop b { font-weight: 400; font-size: 14px; }
.t-shop span { font-size: 10px; letter-spacing: .14em; color: var(--red-text); }

/* ── Game ── */
.t-game { display: flex; flex-direction: column; }
.board { position: relative; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); aspect-ratio: 1; width: 100%; }
.sq { position: relative; margin: 0; padding: 0; border: 0; display: flex; align-items: center; justify-content: center; background: var(--sq-light); --hole: var(--sq-light); color: var(--ink); cursor: pointer; }
.sq.d { background: var(--sq-dark); --hole: var(--sq-dark); }
.sq.b { color: var(--red); }
.sq svg { width: 86%; height: 86%; overflow: visible; pointer-events: none; }
.sq.sel { box-shadow: inset 0 0 0 2px var(--red); }
.sq.last::after { content: ''; position: absolute; inset: 0; background: rgba(242, 38, 46, .12); pointer-events: none; }
.sq.chk { box-shadow: inset 0 0 0 3px var(--red); }
.sq .dot { position: absolute; width: 22%; height: 22%; border-radius: 50%; background: var(--red); pointer-events: none; }
.sq .ring { position: absolute; inset: 6%; border-radius: 50%; border: 3px solid var(--red); pointer-events: none; }
.sq .co { position: absolute; font-family: var(--mono); font-size: 8px; line-height: 1; color: var(--mute); pointer-events: none; }
.sq .co.r { left: 3px; top: 2px; } .sq .co.f { right: 3px; bottom: 2px; }
.board.locked .sq { cursor: default; }

.panel { padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel > * { flex-shrink: 0; }
.panel-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.status { font-size: 11px; letter-spacing: .14em; color: var(--ink); text-transform: uppercase; text-align: right; }
.status.win, .status.alert { color: var(--red-text); }
.panel .h2 { font-size: 32px; }
.panel-msg { font-size: 12px; line-height: 1.6; color: var(--soft); margin: 0; min-height: 1.6em; }
.rewards { display: flex; flex-direction: column; }
.reward { border-top: 1px solid var(--line); padding: 12px 0; display: flex; flex-direction: column; gap: 12px; }
.reward:last-child { border-bottom: 1px solid var(--line); }
.reward.open { border-color: var(--red); }
.reward.open + .reward { border-top-color: var(--red); }
.reward-row { display: flex; align-items: center; gap: 14px; font-size: 12px; }
.lock { width: 34px; height: 34px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line-3); color: var(--mute); }
.reward.open .lock { border-color: var(--red); color: var(--red-text); }
.what { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.what b { font-weight: 400; color: var(--ink); }
.what span { font-size: 11px; color: var(--mute); }
.reward.open .what span { color: var(--red-text); }
.reward .again { background: none; border: 0; padding: 0; color: var(--red-text); font-size: 11px; cursor: pointer; text-align: left; }
.panel-actions { margin-top: auto; display: flex; gap: 8px; }
.panel-actions .btn { flex: 1; }

/* Voice memo player */
.player { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--sq-dark); border: 1px solid var(--line-2); }
.player .pp { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; border: 0; background: var(--red); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--bg); }
.player .pp svg { width: 14px; height: 14px; }
.player .tr { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.player canvas { width: 100%; height: 28px; display: block; cursor: pointer; }
.player .info { display: flex; justify-content: space-between; gap: 8px; font-size: 10px; color: var(--mute); }

/* Sample pack demo */
.demo { display: flex; flex-direction: column; gap: 10px; }
.demo p { margin: 0; font-size: 11px; line-height: 1.6; color: var(--soft); }
.inline-form { display: flex; gap: 6px; }
.inline-form input { flex: 1; min-width: 0; height: 42px; padding: 0 12px; background: transparent; border: 1px solid var(--line-3); color: var(--ink); font-family: var(--mono); font-size: 12px; }
.inline-form .btn { min-height: 42px; }
.ok { font-size: 12px; color: var(--red-text); }

/* Footer */
.foot { display: flex; flex-direction: column; gap: 14px; padding-top: 22px; font-size: 11px; letter-spacing: .12em; color: var(--mute); }
.foot .social { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ── Dialogs (about, contact, notify, menu) ── */
dialog { padding: 0; border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; }
dialog::backdrop { background: rgba(10, 10, 10, .78); backdrop-filter: blur(2px); }
.dlg { padding: 24px; display: flex; flex-direction: column; gap: 18px; position: relative; }
.x { position: absolute; right: 6px; top: 6px; width: 44px; height: 44px; background: none; border: 0; color: var(--mute); font-size: 22px; cursor: pointer; }
.x:hover { color: var(--ink); }
.about-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.about-grid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 66% 50%; display: block; filter: grayscale(1) contrast(1.05) brightness(.9); }
.bio { display: flex; flex-direction: column; gap: 14px; }
.bio p { margin: 0; font-size: 13px; line-height: 1.8; color: var(--soft); }
.pull { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: -.03em; color: var(--red); margin: 0; }
.cities { display: flex; gap: 20px; }

form.stack { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .chips legend { font-size: 10px; letter-spacing: .16em; color: var(--mute); padding: 0; }
.field input, .field textarea { width: 100%; background: transparent; border: 1px solid var(--line-3); color: var(--ink); font-family: var(--mono); font-size: 13px; padding: 12px; }
.field input:focus, .field textarea:focus, .inline-form input:focus { outline: none; border-color: var(--ink); }
.field textarea { min-height: 120px; resize: vertical; }
.chips { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips legend { margin-bottom: 8px; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips label { min-height: 36px; display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid var(--line-3); font-size: 11px; letter-spacing: .1em; cursor: pointer; }
.chips input:checked + label { background: var(--red); border-color: var(--red); color: var(--bg); }
.chips input:focus-visible + label { outline: 2px solid var(--red); outline-offset: 2px; }
.row2 { display: grid; grid-template-columns: 1fr; gap: 12px; }
.form-note { font-size: 11px; color: var(--mute); margin: 0; }

.menu-list { display: flex; flex-direction: column; }
.menu-list a, .menu-list button { min-height: 56px; display: flex; align-items: center; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 0; font-family: var(--display); font-weight: 700; font-size: 28px; letter-spacing: -.03em; color: var(--ink); text-align: left; cursor: pointer; }
.menu-list a:hover, .menu-list button:hover { color: var(--red-text); }

/* ── Tablet: two-column pairs get more room ── */
@media (min-width: 560px) {
  .row2 { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 220px 1fr; align-items: start; }
  .t-ep .big { font-size: 22px; }
  .say { font-size: 30px; }
}

/* ── Desktop: the board grid ── */
@media (min-width: 1200px) {
  .hub {
    --w: min(100vw - 112px, 1600px);
    --c: calc((var(--w) - 70px) / 8);
    --r: calc(((var(--c) * 5 + 40px) * 9 / 16 - 20px) / 3);
    max-width: none; width: var(--w); padding: 28px 0 56px;
    display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: auto repeat(8, var(--r)) auto; gap: 10px;
  }
  .nav { grid-column: 1 / -1; grid-row: auto; min-height: 0; padding-bottom: 12px; }
  .nav .menu { display: flex; }
  .burger { display: none; }
  .hub > .nav { height: auto; }
  .t-video { grid-column: 1 / span 5; grid-row: 2 / span 3; aspect-ratio: auto; }
  .t-title { grid-column: 6 / span 3; grid-row: 2 / span 3; padding: 22px; gap: 16px; }
  .feat .n { font-size: 40px; }
  .t-game { grid-column: 1 / span 5; grid-row: 5 / span 3; flex-direction: row; }
  .t-game .board { width: auto; height: 100%; flex-shrink: 0; }
  .t-game .panel { flex: 1; padding: 22px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-3, #505050) transparent; }
  .pair.people { display: contents; }
  .t-about { grid-column: 6 / span 3; grid-row: 5 / span 2; aspect-ratio: auto; }
  .t-contact { grid-column: 6 / span 3; grid-row: 7; aspect-ratio: auto; padding: 18px; }
  .say { font-size: 30px; }
  .work { font-size: 12px; }
  .sechead { display: none; }
  .records { display: contents; }
  .records > :nth-child(1) { grid-column: 1 / span 2; grid-row: 8 / span 2; }
  .records > :nth-child(2) { grid-column: 3 / span 2; grid-row: 8 / span 2; }
  .records > :nth-child(3) { grid-column: 5 / span 2; grid-row: 8 / span 2; }
  .records > :nth-child(4), .records > .t-shop { grid-column: 7 / span 2; grid-row: 8 / span 2; }
  .t-support b { font-size: 34px; }
  .t-ep, .t-shop { aspect-ratio: auto; padding: 16px; }
  .t-ep .big { font-size: 24px; }
  .t-ep .ttl { font-size: 12px; }
  .foot { grid-column: 1 / -1; grid-row: 10; flex-direction: row; justify-content: space-between; align-items: center; padding-top: 18px; }
  .foot .social { gap: 22px; }
  .sq .co { font-size: 9px; }
  .jump { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Support (in the shop slot) */
.t-support { font: inherit; color: var(--ink); text-align: left; cursor: pointer; border: 1px solid var(--line-3); gap: 10px; }
.t-support b { font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: -.03em; line-height: 1.05; margin-top: auto; }
.t-support .label { color: var(--mute); }
.t-support > span:last-child { margin-top: 0; }
.t-support:hover, .t-support:focus-visible { border-color: var(--red); }
.t-support:hover b { color: var(--red-text); }
.sup-step { display: flex; flex-direction: column; gap: 16px; }
.money { display: flex; align-items: center; border: 1px solid var(--line-3); }
.money span { padding: 0 0 0 12px; color: var(--mute); font-family: var(--mono); }
.money input { border: 0 !important; }
.money:focus-within { border-color: var(--ink); }
.back { align-self: flex-start; background: none; border: 0; padding: 0; color: var(--mute); font-family: var(--mono); font-size: 11px; letter-spacing: .08em; cursor: pointer; }
.back:hover { color: var(--ink); }
#sup-checkout { min-height: 420px; }
#dlg-support { width: min(560px, calc(100vw - 32px)); }

/* Press quote (title tile) */
.press { display: flex; flex-direction: column; gap: 8px; padding: 14px 0 2px; border-top: 1px solid var(--line-2); color: var(--ink); text-decoration: none; }
.press q { font-family: var(--display); font-weight: 700; font-size: 19px; line-height: 1.15; letter-spacing: -.02em; quotes: "“" "”"; }
.press .label { color: var(--red-text); }
.press:hover q { color: var(--red-text); }
@media (min-width: 1200px) { .press q { font-size: clamp(20px, 1.7vw, 28px); } }

/* Voice memo volume */
.player .vol { display: flex; align-items: center; gap: 6px; flex-shrink: 0; color: var(--mute); cursor: pointer; }
.player .vol svg { width: 16px; height: 16px; }
.player .vol input { -webkit-appearance: none; appearance: none; width: 72px; height: 3px; margin: 0; background: linear-gradient(to right, var(--red) var(--v, 50%), var(--line-3) var(--v, 50%)); cursor: pointer; }
.player .vol input::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); border: 0; }
.player .vol input::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); border: 0; }
.player .vol input:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
@media (max-width: 700px) {
  .player { flex-wrap: wrap; }
  .player .vol { width: 100%; padding-left: 52px; }
  .player .vol input { flex: 1; width: auto; }
}

@media (min-width: 900px) {
  .nav .name { flex-direction: row; align-items: baseline; gap: 18px; }
  .nav .roles { font-size: 10px; }
}
