/* SUDOKU marketing site. Minimal style: hairlines, Jost, no radius, one accent. */
:root {
  --bg: #0B0B0B;
  --tx: #EDEDED;
  --strong: #FFFFFF;
  --sec: #8C8C8C;
  --mute: #9A9A9A;
  --cell: #181818;
  --box: #262626;
  --rule: #1C1C1C;
  --ctl: #333333;
  --accent: #FFD60A;
  --err: #FF7A59;
  --gutter: 20px;
  --pad-y: clamp(72px, 11vw, 144px);
  color-scheme: dark;
}
@media (min-width: 700px) { :root { --gutter: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
html {
  overflow-x: clip;
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: #333 var(--bg);
  scrollbar-width: thin;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #262626; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #333; }
::selection { background: var(--accent); color: #1A1A1A; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font-family: 'Jost', Futura, 'Century Gothic', 'Avenir Next', sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0.03em;
  caret-color: var(--accent);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, figure, dl, dd { margin: 0; }
a { color: var(--tx); text-decoration: none; }
a:hover { color: var(--strong); }
:focus-visible { outline: 1px solid #EDEDED; outline-offset: 3px; }
button { font: inherit; color: inherit; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip {
  position: absolute; left: var(--gutter); top: -60px; z-index: 100;
  background: var(--tx); color: #0B0B0B; padding: 10px 16px; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
}
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.label { font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--mute); font-weight: 400; }
.note { font-size: 13px; color: var(--mute); letter-spacing: 0.04em; }

/* ---------- WebGL stage ---------- */
#stage {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none; opacity: 0;
}
main, .foot { position: relative; z-index: 1; }

/* ---------- Header ---------- */
.bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px;
  padding: 18px var(--gutter);
  background: rgba(11, 11, 11, 0.82);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.bar__mark { font-size: 16px; letter-spacing: 0.62em; font-weight: 400; color: var(--strong); }
.bar__nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.bar__nav a { font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--mute); padding: 6px 0; }
.bar__nav a:hover { color: var(--strong); }
@media (min-width: 700px) { .bar { padding-top: 22px; padding-bottom: 22px; } .bar__nav { gap: 8px 32px; } .bar__nav a { letter-spacing: 0.32em; } }

/* ---------- Buttons ---------- */
.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 12px 24px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; text-align: center; line-height: 1.4;
}
@media (min-width: 700px) { .cta { letter-spacing: 0.32em; padding: 12px 28px; } }
.cta--primary { background: var(--accent); color: #1A1A1A; cursor: default; user-select: none; }
.cta--ghost { border: 1px solid var(--ctl); color: var(--tx); font-weight: 400; transition: border-color .25s, color .25s; }
.cta--ghost:hover { border-color: var(--tx); }
.cta--ghost svg { flex: none; }

/* ---------- Mini boards (DOM) ---------- */
.board {
  --b-sec: var(--sec);
  display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); aspect-ratio: 1;
  border-right: 1px solid var(--box); border-bottom: 1px solid var(--box);
  container-type: inline-size; position: relative;
  font-weight: 300; letter-spacing: 0; line-height: 1;
}
.board .c {
  display: flex; align-items: center; justify-content: center; min-width: 0;
  border-top: 1px solid var(--cell); border-left: 1px solid var(--cell);
  font-size: 5.4cqw; color: var(--b-sec); font-style: normal;
}
.board .c.t { border-top-color: var(--box); }
.board .c.l { border-left-color: var(--box); }
.board .c.p { color: var(--strong); font-weight: 500; }
.board .c.s { background: var(--accent); }
.board--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.board--3 .c { font-size: 17cqw; border-top-color: var(--box); border-left-color: var(--box); }
.board .c.e { color: var(--err); font-weight: 500; }
.board .c.e span { position: relative; display: inline-block; padding: 0 .12em; }
.board .c.e span::after {
  content: ''; position: absolute; left: 0; right: 0; top: 52%; height: 1px; background: currentColor;
  transform: scaleX(var(--strike, 1)); transform-origin: left center;
}
.vsel { position: absolute; left: 33.3333%; top: 33.3333%; width: 33.3334%; height: 33.3334%; background: var(--accent); pointer-events: none; }

/* Glass style */
.board--glass { gap: 3px; border: 0; }
.board--glass .c, .board--glass .c.t, .board--glass .c.l {
  border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 8px; background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.72); font-size: 4.6cqw;
}
.board--glass .c.p { color: #fff; }
.board--glass .c.s, .board--glass .c.t.s, .board--glass .c.l.s {
  border-color: #5CC8FF; background: rgba(92, 200, 255, 0.18); box-shadow: 0 0 22px rgba(92, 200, 255, 0.65);
}

/* ---------- Hero ---------- */
.hero { padding: clamp(36px, 7vw, 72px) 0 var(--pad-y); overflow-x: clip; }
.hero__grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .hero { min-height: calc(100svh - 68px); display: flex; align-items: center; padding: 56px 0 72px; }
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; }
}
.hero__copy { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.hero__title {
  font-size: clamp(3rem, 9.4vw, 6rem); line-height: 1; font-weight: 200; letter-spacing: -0.01em; color: var(--strong);
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero__title .line > span { display: block; }
.js .hero__title .line > span { opacity: 0; }
.hero__lede { max-width: 44ch; font-size: clamp(1.0625rem, 1.5vw, 1.1875rem); line-height: 1.6; color: var(--sec); }
.hero__cta { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
@media (min-width: 560px) { .hero__cta { flex-direction: row; flex-wrap: wrap; align-items: center; } }
.hero__slot { position: relative; width: 100%; max-width: 600px; aspect-ratio: 1; justify-self: center; }
.hero__slot .fb { position: absolute; inset: 0; transition: opacity .6s ease; transform: perspective(1400px) rotateX(38deg) rotateZ(-18deg); }
.hero__slot .fb .board { width: 100%; box-shadow: 0 60px 120px rgba(0, 0, 0, 0.6); }
.gl .hero__slot .fb { opacity: 0; }

/* ---------- Principles ---------- */
.principles { padding: 0 0 var(--pad-y); }
.principles__list { border-bottom: 1px solid var(--box); }
@media (min-width: 900px) { .principles__list { width: 52%; } }
.principle {
  display: flex; flex-direction: column; justify-content: center; gap: 28px;
  padding: 56px 0; border-top: 1px solid var(--box);
}
@media (min-width: 900px) { .principle { min-height: min(62vh, 560px); } }
.principle h3 {
  font-size: clamp(2rem, 4.6vw, 3.5rem); line-height: 1.04; font-weight: 200; letter-spacing: -0.005em; color: var(--strong); max-width: 13ch;
}
.principle__body { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px 40px; }
.principle p { flex: 1 1 260px; max-width: 40ch; font-size: 16px; line-height: 1.7; color: var(--sec); }
.vignette { flex: none; width: 132px; display: flex; flex-direction: column; gap: 12px; }
.vignette figcaption { font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--mute); }
@media (max-width: 899px) {
  .principles__list { background: rgba(11, 11, 11, 0); }
}

/* ---------- Styles (morph) ---------- */
.styles, .levels, .download, .foot { background: var(--bg); }
.styles { border-top: 1px solid var(--rule); }
.styles .wrap { padding-top: clamp(56px, 8vw, 104px); padding-bottom: var(--pad-y); }
.styles__pin { display: flex; flex-direction: column; gap: 28px; background: var(--bg); padding-bottom: 8px; }
.styles__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 40px; }
h2 { font-size: clamp(2.25rem, 5.6vw, 3.75rem); line-height: 1.04; font-weight: 200; color: var(--strong); letter-spacing: -0.005em; }
.styles__head p { max-width: 42ch; font-size: 16px; line-height: 1.7; color: var(--sec); }
.morph {
  --wipe: 100%;
  position: relative; overflow: hidden; border: 1px solid var(--box); background: var(--bg);
  height: clamp(340px, 54vh, 560px);
}
.morph__layer { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 20px; gap: 8px; }
@media (min-width: 700px) { .morph__layer { padding: 28px 32px; } }
.morph__bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; }
.morph__board { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.morph__board .board { height: 100%; width: auto; max-width: 100%; }
.morph__glass {
  background: radial-gradient(120% 90% at 30% 20%, #2F6BFF 0%, #13244A 45%, #0B1424 100%);
  clip-path: inset(0 0 0 var(--wipe));
}
.morph__glass .label { color: #C9D2F0; letter-spacing: 0.3em; }
.morph__glass .note { color: #B4BFE0; }
.morph__edge { position: absolute; top: 0; bottom: 0; left: var(--wipe); width: 1px; background: var(--tx); z-index: 3; pointer-events: none; }
.morph__edge span {
  position: absolute; top: 50%; left: 0; width: 36px; height: 36px; margin: -18px 0 0 -18px;
  display: flex; align-items: center; justify-content: center; background: var(--bg); border: 1px solid var(--tx); color: var(--tx);
}
.morph__toggle { display: none; gap: 0; }
.morph__toggle button {
  background: none; border: 1px solid var(--ctl); padding: 12px 22px; min-height: 44px; cursor: pointer;
  font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--mute);
}
.morph__toggle button + button { border-left: 0; }
.morph__toggle button[aria-pressed="true"] { color: var(--strong); border-color: var(--tx); }
.morph__toggle button[aria-pressed="true"] + button { border-left: 1px solid var(--ctl); }

/* Reduced motion: no wipe, a crossfade driven by the toggle */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .morph__glass { clip-path: none; opacity: 0; transition: opacity .7s ease; }
  .morph[data-view="glass"] .morph__glass { opacity: 1; }
  .morph__edge { display: none; }
  .morph__toggle { display: flex; }
}

.daylight { display: flex; flex-wrap: wrap; align-items: center; gap: 32px 48px; margin-top: clamp(56px, 8vw, 96px); padding-top: 40px; border-top: 1px solid var(--rule); }
.tile { width: 148px; aspect-ratio: 1; flex: none; background: #F6F6F3; border: 1px solid #E0E0DC; padding: 22px; }
.tile__board { width: 100%; height: 100%; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #E6E6E2; }
.tile__board i { border: 1px solid #F0F0EC; }
.tile__board i.s { background: var(--accent); }
.daylight__copy { display: flex; flex-direction: column; gap: 12px; max-width: 46ch; }
.daylight__copy p { font-size: 16px; line-height: 1.7; color: var(--sec); }

/* ---------- Levels ---------- */
.levels { border-top: 1px solid var(--rule); }
.levels .wrap { padding-top: var(--pad-y); padding-bottom: var(--pad-y); display: flex; flex-direction: column; gap: 28px; }
.levels__lede { max-width: 46ch; font-size: 16px; line-height: 1.7; color: var(--sec); }
.levels__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 16px; margin-top: clamp(16px, 4vw, 40px); }
@media (min-width: 820px) { .levels__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 28px; } }
.level { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.level figcaption { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; border-top: 1px solid var(--box); }
.level__name { font-size: 12px; font-weight: 400; letter-spacing: 0.32em; color: var(--strong); }
.level__range { font-size: 17px; color: var(--tx); letter-spacing: 0.02em; }
.level__note { font-size: 13px; line-height: 1.5; color: var(--mute); letter-spacing: 0.02em; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 36px 40px; margin-top: clamp(24px, 6vw, 72px); padding-top: 40px; border-top: 1px solid var(--rule); }
.facts dt { font-size: 15px; color: var(--tx); font-weight: 400; margin-bottom: 8px; letter-spacing: 0.04em; }
.facts dd { font-size: 15px; line-height: 1.7; color: var(--sec); max-width: 36ch; }

/* ---------- Download ---------- */
.download { border-top: 1px solid var(--rule); }
.download__inner { padding-top: clamp(96px, 14vw, 176px); padding-bottom: clamp(96px, 14vw, 176px); display: flex; flex-direction: column; align-items: center; gap: 28px; text-align: center; }
.download__mark { font-size: 20px; letter-spacing: 0.62em; margin-right: -0.62em; color: var(--strong); font-weight: 400; }
.download__meta { font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--mute); }
@media (max-width: 699px) { .download__inner .cta { width: 100%; } }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--rule); }
.foot__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 24px; padding-top: 28px; padding-bottom: 28px; font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--mute); }
.foot nav { display: flex; gap: 28px; }
.foot a { color: var(--mute); padding: 6px 0; }
.foot a:hover { color: var(--strong); }

/* ---------- Reveal states ---------- */
.js [data-reveal] { opacity: 0; }
.static [data-reveal], .static .hero__title .line > span { opacity: 1 !important; transform: none !important; }
.static #stage { display: none; }

/* Vignettes sit on solid ground so the 3D board never bleeds through them */
.vignette .board { background: var(--bg); }
