/* Sweat the Pixels — site styles */

@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../fonts/Archivo-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../fonts/Archivo-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url('../fonts/JetBrainsMono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url('../fonts/JetBrainsMono-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ink: #14150F;
  --paper: #FAF8F2;
  --paper-2: #F3F0E6;
  --white: #FFFFFF;
  --orange: #FF4A1C;
  --orange-ink: #C7350F;
  --orange-deep: #B32F0B;
  --orange-tint: #FFEDE7;
  --stone-900: #3A382F;
  --stone-800: #55534A;
  --stone-600: #6E6B5E;
  --stone-400: #CFCBBB;
  --stone-300: #E2DDCD;
  --stone-250: #E4E0D2;
  --stone-200: #E7E3D5;
  --ash-300: #A8A498;
  --ash-400: #9C998D;
  --tile-down: #DCD6C4;

  --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --gutter: clamp(20px, 4vw, 48px);
  --max: 1180px;
  --header-h: 74px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light; scroll-behavior: smooth; }   /* nav + button anchors glide to their section */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--orange); }
img { display: block; }
button, input, select, textarea { font: inherit; }
h1, h2, h3, p { margin: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
[id] { scroll-margin-top: var(--header-h); }
.sr-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- type ---------- */
.eyebrow { font-family: var(--mono); font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--stone-600); margin-bottom: 20px; }
.h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.04; font-weight: 800; letter-spacing: -.035em; max-width: 540px; text-wrap: pretty; }
.h2-sm { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.08; font-weight: 800; letter-spacing: -.035em; }
.body { font-size: clamp(16px, 1.7vw, 18px); line-height: 1.6; color: var(--stone-800); text-wrap: pretty; }
em { font-style: normal; font-weight: 700; color: var(--ink); }
.pixel-stop { display: inline-block; width: .16em; height: .16em; margin-left: .05em; border-radius: .057em; background: var(--orange); vertical-align: baseline; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.btn-primary { padding: 15px 26px; background: var(--ink); color: var(--paper); border: 1px solid transparent; }
.btn-primary:hover { background: var(--orange); color: var(--ink); }
.btn-secondary { padding: 15px 24px; background: transparent; color: var(--stone-900); border: 1px solid var(--stone-400); }
.btn-secondary:hover { border-color: var(--ink); color: var(--stone-900); }
.btn-sm { padding: 12px 20px; font-size: 14px; }
.btn .arrow { font-family: var(--mono); font-size: 13px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(250,248,242,.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--stone-250); }
.site-header .wrap { padding-top: 14px; padding-bottom: 14px; min-height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; }
.logo-link { position: relative; display: flex; align-items: center; min-width: 0; margin: -8px -12px; padding: 8px 12px; border-radius: 10px; cursor: pointer; }
.logo-link img { height: 30px; width: auto; }
.logo-link picture { display: block; }
@media (max-width: 519px) { .logo-link img { height: 42px; } }
html.force-stacked .logo-link img { height: 42px; }
.logo-link .logo-hover { position: absolute; inset: 0; display: flex; align-items: center; padding: 8px 12px; border-radius: 10px; background: var(--ink); opacity: 0; transition: opacity .3s ease; }
/* real hover only (mouse/trackpad); touch gets a brief press flash instead of a stuck hover */
@media (hover: hover) { .logo-link:hover .logo-hover { opacity: 1; } }
.logo-link:focus-visible .logo-hover { opacity: 1; }
@media (hover: none) { .logo-link { -webkit-tap-highlight-color: transparent; } .logo-link:active .logo-hover { opacity: 1; transition: none; } }
.site-nav { display: flex; flex-wrap: wrap; gap: 8px clamp(14px, 2.4vw, 32px); font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; }
.site-nav a { color: var(--stone-600); }
.site-nav a.strong { color: var(--ink); }
.site-nav a:hover { color: var(--orange); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden;
  background-image: repeating-linear-gradient(to right, var(--stone-200) 0 1px, transparent 1px 44px), repeating-linear-gradient(to bottom, var(--stone-200) 0 1px, transparent 1px 44px);
  background-position: -1px -1px; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(250,248,242,0) 35%, var(--paper) 100%); pointer-events: none; }
.hero .wrap { position: relative; padding-top: clamp(64px, 9vw, 108px); padding-bottom: clamp(52px, 6.5vw, 80px); }
.hero h1 { margin-bottom: 24px; font-size: clamp(44px, 8vw, 96px); line-height: .92; font-weight: 800; letter-spacing: -.042em; max-width: 960px; text-wrap: balance; }
.hero .status { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.hero .status i { width: 9px; height: 9px; flex: none; border-radius: 2px; background: var(--orange); animation: stp-pulse 2.4s ease-in-out infinite; }
.hero .status span { font-family: var(--mono); font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--orange-ink); }
.hero .lead { margin-bottom: 40px; font-size: clamp(17px, 1.9vw, 21px); line-height: 1.55; color: var(--stone-800); max-width: 620px; text-wrap: pretty; }
.hero .btn-row { gap: 14px; align-items: center; }
@keyframes stp-pulse { 0%, 100% { opacity: .35 } 50% { opacity: 1 } }

/* ---------- workshop / game ---------- */
/* Recessed full-bleed band so the workshop reads as its own chapter after the hero. */
/* (the workshop is back on plain paper; Our apps above it now carries the recessed band) */
.workshop .game-tile { background: var(--paper-2); }
.workshop { position: relative; isolation: isolate; padding-top: clamp(48px, 6.5vw, 80px); padding-bottom: clamp(56px, 8vw, 92px); display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "tile" "rest"; row-gap: 32px; }
.workshop .game-head { grid-area: head; }
.workshop .game-tile { grid-area: tile; justify-self: start; }
.workshop .game-rest { grid-area: rest; }
.game-head .h2 { margin-bottom: 22px; }
@media (min-width: 860px) {
  .workshop { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 1fr auto auto 1fr; grid-template-areas: "tile ." "tile head" "tile rest" "tile ."; column-gap: clamp(36px, 5vw, 64px); row-gap: 0; }
  .workshop .game-tile { align-self: center; justify-self: start; }
  .workshop .game-rest { padding-top: 28px; }
}
.game-tile { position: relative; aspect-ratio: 1; width: 100%; max-width: 480px; border: 1px solid var(--stone-250); border-radius: 12px; background: var(--paper-2); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.board { position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(7, 38px); grid-auto-rows: 38px; gap: 4px; }
.board::before { content: ""; position: absolute; inset: -968px; z-index: -1; pointer-events: none;
  background-image: repeating-linear-gradient(to right, var(--stone-300) 0 1px, transparent 1px 42px), repeating-linear-gradient(to bottom, var(--stone-300) 0 1px, transparent 1px 42px); }
.tile { position: relative; border-radius: 13.5px; -webkit-appearance: none; appearance: none; font: inherit; color: inherit; outline-offset: 3px; display: flex; align-items: center; justify-content: center; transform-origin: 50% 100%; border: 0; padding: 0; background: transparent; }
.tile .face { font-size: 21px; line-height: 1; user-select: none; }
/* Flippable tiles: warm tint on hover that lingers and fades (trail). Pure CSS. */
button.tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--orange); opacity: 0; pointer-events: none; transition: opacity .9s ease-out; }
@media (hover: hover) {
  button.tile:not(:disabled):hover::after { opacity: .3; transition: opacity .06s linear; }
  button.tile:not(:disabled):active::after { opacity: .45; }
}
button.tile:disabled::after { opacity: 0; transition: none; }
.game-meta { position: absolute; top: 14px; left: 16px; right: 16px; display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--stone-600); }
.game-best { position: absolute; bottom: 14px; left: 16px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--stone-600); }
.game-sound { position: absolute; bottom: 9px; right: 11px; display: flex; align-items: center; gap: 7px; padding: 5px 6px; border: 0; background: transparent; cursor: pointer; font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--stone-600); border-radius: 6px; }
.game-sound::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--orange); transition: background .15s, box-shadow .15s; }
.game-sound.off::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--stone-400); }
.game-sound:hover { color: var(--ink); }
.game-sound:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; }
.game-copy .lede { margin-bottom: 18px; max-width: 500px; }
.game-copy .hint { margin-bottom: 0; font-size: 15px; line-height: 1.6; color: var(--stone-600); max-width: 500px; text-wrap: pretty; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 16px; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--stone-600); }
.legend > span { display: flex; align-items: center; gap: 9px; }
.legend i { flex: none; width: 18px; height: 18px; border-radius: 6.4px; }
.legend .lg-flip { background: var(--tile-down); }
.legend .lg-auto { box-shadow: inset 0 0 0 1.5px var(--stone-400); }
.game-play { margin-bottom: 28px; }
.game-won { margin-bottom: 22px; }
.game-won .won-label { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--stone-800); }
.won-label i, .done-card i { width: 10px; height: 10px; flex: none; border-radius: 3px; background: var(--orange); }
.game-won .won-title { margin-bottom: 8px; font-size: 26px; font-weight: 800; letter-spacing: -.025em; }
.game-won .won-line { margin-bottom: 26px; font-size: 17px; line-height: 1.6; color: var(--stone-800); max-width: 480px; text-wrap: pretty; }
.game-won .btn-row { margin-bottom: 30px; }
.game-won .prompt { font-size: 15px; font-weight: 700; }
.tags { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.tag { padding: 7px 13px; border: 1px solid var(--stone-400); border-radius: 99px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; color: var(--stone-800); }
.tag.accent { border-color: var(--orange); background: var(--orange-tint); color: var(--orange-deep); }

/* ---------- email capture ---------- */
.waitlist-lead { margin-bottom: 12px; font-size: 15px; font-weight: 700; color: var(--ink); }
.capture { display: flex; max-width: 460px; border: 1px solid var(--ink); border-radius: 9px; overflow: hidden; background: var(--white); }
.capture input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 15px 18px; font-size: 15px; background: var(--white); color: var(--ink); }
.capture button { border: 0; padding: 15px 22px; background: var(--ink); color: var(--paper); font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.capture button:hover { background: var(--orange); color: var(--ink); }
.form-note { margin-top: 10px; font-size: 13px; color: var(--stone-600); }
.form-note.error, .contact-note.error { color: var(--orange-deep); }
.done-card { display: flex; gap: 14px; align-items: flex-start; max-width: 460px; padding: 16px 18px; border: 1px solid var(--ink); border-radius: 9px; background: var(--white); }
.done-card i { margin-top: 6px; }
.done-card strong { display: block; margin-bottom: 4px; font-size: 15px; }
.done-card p { font-size: 14px; line-height: 1.5; color: var(--stone-800); }

/* ---------- our apps ---------- */
/* Recessed band so the apps read as their own chapter after the hero (paper → paper-2 → paper rhythm). */
.apps { background: var(--paper-2); border-top: 1px solid var(--stone-250); border-bottom: 1px solid var(--stone-250); }
.apps .wrap { padding-top: clamp(52px, 7vw, 80px); padding-bottom: clamp(52px, 7vw, 80px); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 36px 48px; }
.apps-head { flex: 1 1 320px; max-width: 460px; }
.apps.stacked .apps-head { flex-basis: 100%; max-width: 620px; }
.apps .eyebrow { margin-bottom: 18px; }
.apps .h2 { margin-bottom: 14px; }
.apps-intro { max-width: 380px; font-size: 16px; line-height: 1.55; color: var(--stone-800); text-wrap: pretty; }
.app-shelf { display: flex; flex-wrap: wrap; gap: 30px 32px; align-items: flex-start; }
.app { width: 144px; display: flex; flex-direction: column; align-items: center; text-align: center; color: var(--ink); }
.app:hover { color: var(--ink); }
.app-icon { position: relative; width: 128px; height: 128px; margin-bottom: 12px; border-radius: 29px; background: var(--paper-2); box-shadow: inset 0 0 0 1px rgba(20,21,15,.08); }
.app-icon img { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.app-icon.initial { display: flex; align-items: center; justify-content: center; background: var(--ink); color: var(--paper); font-size: 58px; font-weight: 800; letter-spacing: -.04em; }
.app-icon .badge { position: absolute; right: -5px; bottom: -5px; width: 18px; height: 18px; border-radius: 5.5px; background: var(--orange); box-shadow: 0 0 0 3.5px var(--paper-2); animation: stp-pulse 2.4s ease-in-out infinite; }
.app-icon.pixels { background: none; box-shadow: none; border-radius: 0; display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 1fr; gap: 1.5px; }
.app-icon.pixels span { border-radius: 2.6px; transition: background .32s ease; }
.app-name { display: block; white-space: pre; min-height: 20px; margin-bottom: 8px; font-size: 16px; font-weight: 700; line-height: 20px; letter-spacing: -.015em; }
.app-name b { font-weight: inherit; color: var(--orange-ink); }
.app-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-bottom: 9px; }
.app-tag { padding: 3px 7px 3.5px; border: 1px solid var(--stone-400); border-radius: 99px; font-family: var(--mono); font-size: 10px; line-height: 1.2; letter-spacing: .02em; color: var(--stone-800); white-space: nowrap; }
.app-tag.primary { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.apps.dark .app-tag { border-color: rgba(250,248,242,.28); color: #C9C5B8; }
.apps.dark .app-tag.primary { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.app-meta { display: flex; align-items: center; justify-content: center; gap: 6px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--stone-600); }
.app-meta.soon { color: var(--orange-ink); }
.app-meta i { width: 6px; height: 6px; flex: none; border-radius: 1.5px; background: var(--orange); animation: stp-pulse 2.4s ease-in-out infinite; }
/* dark band (apps.theme: "dark") */
.apps.dark { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.apps.dark .eyebrow { color: var(--orange); }
.apps.dark .h2, .apps.dark .app, .apps.dark .app:hover { color: var(--paper); }
.apps.dark .apps-intro { color: var(--ash-300); }
.apps.dark .app-icon { background: #22231C; box-shadow: inset 0 0 0 1px rgba(250,248,242,.08); }
.apps.dark .app-icon.initial { background: var(--paper); color: var(--ink); }
.apps.dark .app-icon.pixels { background: none; box-shadow: none; }
.apps.dark .app-icon .badge { box-shadow: 0 0 0 3.5px var(--ink); }
.apps.dark .app-meta { color: var(--ash-400); }
.apps.dark .app-meta.soon, .apps.dark .app-name b { color: #FF8A5C; }
/* charcoal band (apps.theme: "charcoal") — builds on .dark */
.apps.charcoal { background: var(--stone-900); border-color: var(--stone-900); }
.apps.charcoal .eyebrow { color: #FF8A5C; }
.apps.charcoal .apps-intro { color: #BDB9AD; }
.apps.charcoal .app-meta { color: #B5B1A5; }
.apps.charcoal .app-icon { background: #45433A; }
.apps.charcoal .app-icon .badge { box-shadow: 0 0 0 3.5px var(--stone-900); }
@media (max-width: 519px) {
  .apps-head { flex-basis: 100%; }
  .app-shelf { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 20px; }
  .app { width: auto; }
  .app-icon { width: min(128px, 100%); height: auto; aspect-ratio: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .app-icon.pixels span { transition: none; }
  .app-icon .badge, .app-meta i { animation: none; }
}

/* ---------- beliefs ---------- */
.beliefs { background: var(--ink); color: var(--paper); }
.beliefs .wrap { padding-top: clamp(56px, 8vw, 88px); padding-bottom: clamp(56px, 8vw, 88px); }
.beliefs .eyebrow { color: var(--orange); margin-bottom: 46px; }
.belief-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: clamp(36px, 4vw, 52px) clamp(40px, 6vw, 72px); }
.belief { position: relative; }
.fx-select { position: absolute; pointer-events: none; border: 1px solid var(--orange); opacity: 0; transform: scale(.97); transition: opacity .16s ease-out, transform .32s cubic-bezier(.2,.9,.3,1); }
.fx-select b { position: absolute; width: 7px; height: 7px; border: 1px solid var(--orange); border-radius: 2px; background: var(--ink); transform: scale(0); transition: transform .24s cubic-bezier(.3,1.6,.4,1); }
.fx-select .tl { left: -4px; top: -4px; }
.fx-select .tr { right: -4px; top: -4px; transition-delay: .04s; }
.fx-select .br { right: -4px; bottom: -4px; transition-delay: .08s; }
.fx-select .bl { left: -4px; bottom: -4px; transition-delay: .12s; }
.fx-size { position: absolute; right: -1px; bottom: calc(100% + 8px); padding: 3px 7px; border-radius: 4px; background: var(--orange); color: var(--ink); font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .04em; white-space: nowrap; font-variant-numeric: tabular-nums; opacity: 0; transform: translateY(4px); transition: opacity .2s ease-out .1s, transform .3s cubic-bezier(.2,.9,.3,1) .1s; }
.belief.fx-on .fx-select, .belief.fx-on .fx-size { opacity: 1; transform: none; }
.belief.fx-on .fx-select b { transform: scale(1); }
.fx-tail { position: absolute; left: 0; top: 0; pointer-events: none; opacity: 0; transform: translateY(3px); transition: opacity .18s ease-out, transform .3s cubic-bezier(.2,.9,.3,1); }
.belief.fx-on .fx-tail { opacity: 1; transform: none; }
.fx-cal { width: 20px; height: 22px; perspective: 120px; }
.fx-cal-page { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transform-origin: 50% 5px; }
.fx-cal-front, .fx-cal-back { position: absolute; inset: 0; border-radius: 4px; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.fx-cal-front { border: 1px solid var(--ash-400); border-top-width: 5px; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 9.5px; font-weight: 500; color: var(--paper); font-variant-numeric: tabular-nums; }
.fx-cal-back { border: 1px solid var(--orange); transform: rotateX(180deg); display: flex; align-items: center; justify-content: center; }
.fx-cal-back i { width: 5px; height: 9px; margin-top: -3px; border: solid var(--orange); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.belief.fx-on .fx-cal-page { animation: fx-cal-flip 1s .16s both; }
@keyframes fx-cal-flip {
  0%   { transform: translateY(0) rotateX(0deg); animation-timing-function: cubic-bezier(.5,-0.2,.3,1); }
  52%  { transform: translateY(0) rotateX(-180deg); animation-timing-function: cubic-bezier(.55,0,.9,.5); }
  74%  { transform: translateY(12px) rotateX(-180deg); animation-timing-function: ease-out; }
  86%  { transform: translateY(10px) rotateX(-180deg); animation-timing-function: ease-in-out; }
  100% { transform: translateY(12px) rotateX(-180deg); }
}
.fx-merge { width: 29px; height: 8px; }
.fx-merge i { position: absolute; top: 0; width: 8px; height: 8px; border: 1.5px solid var(--ash-400); border-radius: 2.8px; transition: transform .42s cubic-bezier(.6,-0.1,.3,1.25) .15s, opacity .2s .45s, background-color .2s .45s, border-color .2s .45s; }
.fx-merge .l { left: 0; }
.fx-merge .c { left: 10.5px; }
.fx-merge .r { left: 21px; }
.belief.fx-on .fx-merge .l { transform: translateX(10.5px); opacity: 0; }
.belief.fx-on .fx-merge .r { transform: translateX(-10.5px); opacity: 0; }
.belief.fx-on .fx-merge .c { background-color: var(--orange); border-color: var(--orange); animation: fx-pop .34s cubic-bezier(.2,.9,.3,1) .5s; }
.fx-lock { width: 15px; height: 19px; }
.fx-lock .shackle { position: absolute; left: 3px; top: 0; width: 9px; height: 10px; border: 1.5px solid var(--ash-400); border-bottom: 0; border-radius: 5px 5px 0 0; transform: translateY(-4px); transition: transform .24s cubic-bezier(.6,0,.9,.5) .25s, border-color .15s .45s; }
.fx-lock .body { position: absolute; left: 0; bottom: 0; width: 15px; height: 10px; border: 1.5px solid var(--ash-400); border-radius: 3px; transition: border-color .15s .45s, background-color .15s .45s; }
.fx-lock .body::after { content: ""; position: absolute; left: 50%; top: 50%; width: 2px; height: 3px; margin: -1.5px 0 0 -1px; border-radius: 1px; background: var(--ash-400); transition: background-color .15s .45s; }
.belief.fx-on .fx-lock .shackle { transform: none; border-color: var(--orange); }
.belief.fx-on .fx-lock .body { border-color: var(--orange); animation: fx-click .3s ease-out .48s; }
.belief.fx-on .fx-lock .body::after { background: var(--orange); }
.fx-stack { width: 8px; height: 26px; }
.fx-stack i { position: absolute; left: 0; width: 8px; height: 8px; border-radius: 2.8px; background: var(--ash-400); opacity: 0; transform-origin: 50% 100%; }
.fx-stack .b1 { bottom: 0; }
.fx-stack .b2 { bottom: 9px; }
.fx-stack .b3 { bottom: 18px; background: var(--orange); }
.belief.fx-on .fx-stack i { animation: fx-stack-drop .46s both; }
.belief.fx-on .fx-stack .b1 { animation-delay: .1s; }
.belief.fx-on .fx-stack .b2 { animation-delay: .32s; }
.belief.fx-on .fx-stack .b3 { animation-delay: .54s; }
@keyframes fx-stack-drop {
  0%   { opacity: 0; transform: translateY(-16px) scale(.85, 1.2); animation-timing-function: cubic-bezier(.5, 0, .9, .55); }
  15%  { opacity: 1; }
  60%  { opacity: 1; transform: translateY(0) scale(.85, 1.2); animation-timing-function: ease-out; }
  76%  { opacity: 1; transform: translateY(0) scale(1.3, .72); animation-timing-function: ease-out; }
  90%  { opacity: 1; transform: translateY(-2px) scale(.95, 1.05); }
  100% { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .belief.fx-on .fx-stack i { opacity: 1; } }
@keyframes fx-pop { 0% { transform: scale(1) } 45% { transform: scale(1.45) } 100% { transform: scale(1) } }
@keyframes fx-click { 0% { transform: none } 40% { transform: scale(1.12, .86) } 100% { transform: none } }
@media (prefers-reduced-motion: reduce) {
  .fx-select, .fx-select b, .fx-size, .fx-tail, .fx-tail *, .fx-tail *::after { transition: none !important; animation: none !important; }
}
.belief .num { font-family: var(--mono); font-size: 12px; color: var(--ash-400); margin-bottom: 12px; }
.belief h3 { margin-bottom: 10px; font-size: clamp(21px, 2.4vw, 25px); font-weight: 700; letter-spacing: -.025em; }
.belief p { font-size: 16.5px; line-height: 1.6; color: var(--ash-300); max-width: 440px; text-wrap: pretty; }

/* ---------- about ---------- */
.about { }
.about .wrap { padding-top: clamp(52px, 7vw, 78px); padding-bottom: clamp(52px, 7vw, 78px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: clamp(32px, 5vw, 64px); align-items: start; }
.about .body { line-height: 1.65; }
.team { grid-column: 1 / -1; list-style: none; margin: clamp(8px, 2vw, 20px) 0 0; padding: clamp(28px, 4vw, 40px) 0 0; border-top: 1px solid var(--stone-250);
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 32px clamp(24px, 4vw, 48px); }
.person { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 18px; align-items: center; }
.person .ph { position: relative; width: 76px; height: 76px; }
.person .ph img, .person .ph .initials { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; display: flex; align-items: center; justify-content: center; }
/* toned black & white: fully desaturated, then a partial sepia wash to warm it toward the paper */
.person .ph img { filter: grayscale(1) sepia(.32) contrast(1.04); transition: filter .5s ease; }
.person .ph .initials { background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--stone-250); font-family: var(--mono); font-size: 16px; letter-spacing: .08em; color: var(--stone-600); }
.person .ph::after { content: ""; position: absolute; right: 3px; bottom: 3px; width: 13px; height: 13px; border-radius: 4px; background: var(--orange); box-shadow: 0 0 0 3px var(--paper); transform: scale(0); transform-origin: 50% 100%; transition: transform .2s ease-in; }
.person:hover .ph img, .person.in .ph img { filter: none; }
.person:hover .ph::after, .person.in .ph::after { transform: none; animation: person-pixel .7s cubic-bezier(.3,.7,.3,1) both; }
/* the pixel pops in, then does one little hop and a squash landing */
@keyframes person-pixel {
  0%   { transform: scale(0); }
  30%  { transform: scale(1.15); }
  42%  { transform: scale(1); }
  62%  { transform: translateY(-6px) scale(.92, 1.1); }
  82%  { transform: translateY(0) scale(1.15, .85); }
  100% { transform: none; }
}
.person .name { font-size: 18px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 5px; }
.person .role { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--stone-600); line-height: 1.5; }
.person .role span { display: block; }
.person .role span + span { color: var(--stone-800); }
@media (prefers-reduced-motion: reduce) { .person .ph img, .person .ph::after { transition: none; animation: none !important; } }

/* ---------- contact ---------- */
.contact { background: var(--paper-2); border-bottom: 1px solid var(--stone-250); }
.contact .wrap { padding-top: clamp(56px, 8vw, 88px); padding-bottom: clamp(56px, 8vw, 88px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: clamp(36px, 5vw, 72px); align-items: start; }
.contact .h2 { margin-bottom: 20px; max-width: 460px; }
.contact .body { max-width: 440px; }
.contact-form { display: grid; gap: 18px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 18px; }
.field { display: grid; gap: 8px; }
.field > span { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--stone-800); }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--stone-400); border-radius: 8px; background: var(--white); padding: 13px 15px; font-size: 15px; color: var(--ink); outline: 0; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(255,74,28,.18); }
.field select { appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.field textarea { resize: vertical; line-height: 1.55; min-height: 130px; }
.contact-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.contact-note { font-size: 13.5px; color: var(--stone-600); }
.contact-done { border: 1px solid var(--ink); border-radius: 12px; background: var(--white); padding: 30px 30px 32px; }
.contact-done .won-label { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--stone-800); }
.contact-done .title { margin-bottom: 8px; font-size: 24px; font-weight: 800; letter-spacing: -.025em; }
.contact-done p { font-size: 16px; line-height: 1.6; color: var(--stone-800); }

/* ---------- footer ---------- */
.site-footer .wrap { padding-top: clamp(40px, 6vw, 56px); padding-bottom: 46px; display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.site-footer img { height: 52px; width: auto; margin-bottom: 18px; }
.site-footer .copy { font-family: var(--mono); font-size: 11.5px; color: var(--stone-600); }
.footer-links { display: flex; gap: clamp(16px, 2.2vw, 26px); flex-wrap: wrap; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.footer-links a { color: var(--stone-800); }
.footer-links a:hover { color: var(--orange); }

/* ---------- privacy page ---------- */
.legal { padding-top: clamp(56px, 8vw, 92px); padding-bottom: clamp(56px, 8vw, 92px); }
.legal > * { max-width: 760px; }
.legal h1 { margin-bottom: 14px; font-size: clamp(40px, 6vw, 64px); line-height: .96; font-weight: 800; letter-spacing: -.04em; }
.legal .updated { margin-bottom: 40px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--stone-600); }
.legal .summary { margin-bottom: 48px; padding: 26px 28px; border: 1px solid var(--stone-250); border-radius: 12px; background: var(--white); }
.legal .summary h2 { margin-bottom: 14px; font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--orange-ink); }
.legal .summary ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 16.5px; line-height: 1.55; color: var(--ink); }
.legal section + section { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--stone-250); }
.legal h2.sec { margin-bottom: 14px; font-size: clamp(22px, 2.6vw, 26px); font-weight: 800; letter-spacing: -.025em; }
.legal p, .legal li { font-size: 16.5px; line-height: 1.65; color: var(--stone-800); text-wrap: pretty; }
.legal p + p { margin-top: 12px; }
.legal ul.list { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 8px; }
.legal strong { color: var(--ink); }
.legal a.inline { color: var(--ink); text-decoration: underline; text-decoration-color: var(--stone-400); text-underline-offset: 3px; }
.legal a.inline:hover { color: var(--orange); text-decoration-color: var(--orange); }

/* ---------- intro overlay ---------- */
.intro { position: fixed; inset: 0; z-index: 100; background: var(--paper); display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; }
.intro .fit { transform-origin: 50% 50%; }
.intro .lockup { display: flex; align-items: flex-start; gap: 22.2px; transform-origin: 0 0; }
.intro .dropbox { position: relative; flex: none; width: 78.4px; height: 89.8px; }
.intro .drop { position: absolute; left: 0; top: 0; display: grid; grid-template-columns: repeat(7, 26px); grid-auto-rows: 26px; gap: 3px; transform-origin: 0 0; transform: translate(0px, 0px) scale(.3921); opacity: 0; }
.intro .drop div { width: 26px; height: 26px; border-radius: 9.2px; }
.intro .word { position: relative; flex: none; width: 451px; height: 59.7px; margin-top: 20px; }
.intro .word img { width: 451px; height: 59.7px; opacity: 0; }
.intro .word .dot { position: absolute; left: 0; top: 0; transform-origin: 72.87% 17.31%; }
/* narrow screens: two-line lockup */
.intro.stacked .lockup { gap: 18.1px; }
.intro.stacked .word { width: 201px; height: 86.2px; margin-top: 5.7px; }
.intro.stacked .word img { width: 201px; height: 86.2px; }
.intro.stacked .word .dot { transform-origin: 54.44% 57.49%; }
html.intro-on body { overflow: hidden; }
html.intro-pre #top { visibility: hidden; }

/* ---------- easter egg ---------- */
.egg { position: fixed; inset: 0; z-index: 50; pointer-events: none; overflow: hidden; }
.egg i { position: absolute; top: 0; width: 9px; height: 9px; border-radius: 2px; animation: stp-fall linear infinite; }
.egg .toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); background: var(--ink); color: #FF8A5C; font-family: var(--mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; padding: 14px 24px; border-radius: 99px; box-shadow: 0 16px 40px rgba(0,0,0,.35); white-space: nowrap; }
@keyframes stp-fall { from { transform: translateY(-20vh) } to { transform: translateY(120vh) } }

@media (prefers-reduced-motion: reduce) {
  .hero .status i { animation: none; opacity: 1; }
  .logo-link .logo-hover { transition: none; }
}

/* preview switches (?preview) — never shown to visitors */
.pv-bar { position: fixed; z-index: 200; right: 16px; bottom: 16px; display: flex; gap: 6px; padding: 6px; border-radius: 12px; background: var(--ink); box-shadow: 0 12px 30px rgba(0,0,0,.3); }
.pv-btn { display: flex; align-items: center; gap: 8px; border: 0; border-radius: 8px; padding: 9px 12px; background: transparent; color: var(--ash-300); font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.pv-btn::before { content: ""; width: 8px; height: 8px; border-radius: 2px; box-shadow: inset 0 0 0 1.5px var(--ash-400); }
.pv-btn.on { color: var(--paper); }
.pv-btn.on::before { background: var(--orange); box-shadow: none; }
.pv-btn:hover { background: rgba(255,255,255,.06); }

/* Small screens: the board nearly fills the square tile, so the corner labels would sit on the pixels.
   Let the tile grow taller instead and reserve a clear strip above and below the board for them. */
@media (max-width: 560px) {
  .game-tile { aspect-ratio: auto; padding: 46px 12px 50px; }
  .game-meta { top: 16px; }
  .game-best { bottom: 17px; }
  .game-sound { bottom: 11px; }
}
