/* OTC Games — overscrolltactics.com
   Tokens first; brand ink + one scarce accent. */

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/montserrat-var-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;
}

:root {
  --paper: #faf9f7;
  --ink: #1b1b1b;
  --accent: #f03d01;
  --muted: #5d5a55;
  --line: rgba(27, 27, 27, 0.14);
  --band-text: #f4f1ec;
  --band-muted: #b6b0a8;
  --band-line: rgba(244, 241, 236, 0.16);
  --wrap: 66rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  /* hero lockup width; every layer derives from it */
  --L: min(78vw, 33rem);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Montserrat", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.6;
}

::selection { background: var(--accent); color: #fff; }

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  z-index: 50;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Brand SVG fills (inline copies have their <style> stripped) */
.svgmark .cls-1 { fill: var(--ink); }
.svgmark .cls-2 { fill: var(--accent); }
.svgmark path:not([class]),
.svgmark polygon:not([class]) { fill: var(--ink); }
.watermark.svgmark * { fill: currentColor; }

/* ---------- Header ---------- */

.site-head {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 1.4rem var(--gutter);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.brand-mark { height: 26px; width: auto; }
.brand-type { height: 12px; width: auto; }

.site-nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
}
.site-nav a {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--accent); }

/* ---------- Hero ---------- */

.hero {
  min-height: 100svh;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  padding: 5.5rem var(--gutter) 3rem;
  position: relative;
}

.lockup {
  position: relative;
  width: var(--L);
  height: calc(var(--L) * 0.5502);
  margin-bottom: 2.5rem;
}

.lockup-replay {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  border-radius: 6px;
}

/* Layer geometry derived from logo.svg (arc = wordmark × 2.112 at x 46.18),
   with the type dropped to y 132 so it clears the orange stick (tip at y 116).
   Canvas: 299.48 wide × 164.76 tall → height = width × 0.5502. */
.m-crop {
  position: absolute;
  left: 24.21%;
  top: 9.8%;
  width: 58.46%;
  opacity: 0;
}
/* Paper panel that slides up to occlude the bottom half — transform-only crop */
.m-cover {
  position: absolute;
  left: -12%;
  right: -12%;
  top: 50%;
  height: 80%;
  background: var(--paper);
  transform: translateY(120%);
}
.m-arc {
  position: absolute;
  left: 15.42%;
  top: 0;
  width: 73.12%;
}
.type-reveal {
  position: absolute;
  left: 0;
  top: 70.4%;
  width: 100%;
  height: 29.6%;
  overflow: hidden;
}
.m-type {
  position: absolute;
  left: 0;
  top: 32.8%;
  width: 100%;
}

.cursor-fx {
  position: absolute;
  left: 60%;
  top: 24%;
  width: calc(var(--L) * 0.052);
  min-width: 17px;
  opacity: 0;
  pointer-events: none;
}
.cursor-fx path {
  fill: var(--ink);
  stroke: var(--paper);
  stroke-width: 1.4;
  stroke-linejoin: round;
}

.hero-line {
  margin: 0 0 1.6rem;
  font-size: clamp(1.05rem, 1rem + 0.6vw, 1.375rem);
  max-width: 30ch;
  line-height: 1.45;
}
.hero-line strong { font-weight: 600; }

.hero-cta { margin: 0; }

.scroll-cue {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  translate: -50% 0;
  width: 4px;
  height: 26px;
  border-radius: 2px;
  background: var(--accent);
}

/* ----- Animation timeline (only when .play is set) -----
   Compositor-only: every keyframe animates transform/opacity. The "crop" is a
   paper cover panel translating up over the mark, never clip-path or height. */

.play .m-full-wrap { animation: full-in 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) 0.1s both,
                                hover-pop 0.3s ease-out 1.25s; }
.play .m-crop      { animation: crop-in 0.01s linear 0.1s both,
                                crop-out 0.25s ease 1.85s forwards; }
.play .m-cover     { animation: cover-up 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 1.55s both; }
.play .m-arc       { animation: arc-in 0.22s ease 1.85s both; }
.play .m-type      { animation: type-slide 0.5s cubic-bezier(0.22, 0.9, 0.3, 1) 2.1s both; }
.play .cursor-fx   { animation: cursor-in 0.35s cubic-bezier(0.2, 0.7, 0.3, 1) 0.9s both,
                                cursor-flick 0.4s cubic-bezier(0.5, 0, 0.8, 0.5) 1.6s forwards; }
.play .hero-line   { animation: rise-in 0.45s ease-out 2.55s both; }
.play .hero-cta    { animation: rise-in 0.45s ease-out 2.7s both; }
.play .scroll-cue  { animation: cue-in 0.4s ease-out 3.05s both, cue-nudge 1.2s ease-in-out 3.5s 3; }

@keyframes full-in {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}
/* browser-style hover response when the cursor reaches the mark */
@keyframes hover-pop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.03); }
  100% { transform: scale(1); }
}
@keyframes crop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes crop-out { to { opacity: 0; } }
@keyframes cover-up {
  from { transform: translateY(120%); }
  to   { transform: translateY(0); }
}
@keyframes arc-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes type-slide {
  from { transform: translateY(-170%); }
  to   { transform: translateY(0); }
}
@keyframes cursor-in {
  from { opacity: 0; transform: translate(calc(var(--L) * 0.06), calc(var(--L) * 0.08)); }
  to   { opacity: 1; transform: translate(0, 0); }
}
@keyframes cursor-flick {
  from { opacity: 1; transform: translate(0, 0); }
  to   { opacity: 0; transform: translate(0, calc(var(--L) * 0.14)); }
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes cue-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes cue-nudge {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* Final state when animation is not running (no-JS, reduced motion, done) */
.hero:not(.play) .m-crop,
.hero:not(.play) .cursor-fx { opacity: 0; }
.hero:not(.play) .m-arc { opacity: 1; }
.hero:not(.play) .m-type { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .play .m-crop, .play .cursor-fx { animation: none; opacity: 0; }
  .play .m-arc, .play .m-type, .play .hero-line,
  .play .hero-cta, .play .scroll-cue, .play .m-full-wrap,
  .play .m-cover { animation: none; }
}

/* ---------- Shared bits ---------- */

/* Keyword emphasis.
   .hl is the loud one: solid accent, white text. Display sizes only — at 3.9:1
   it clears AA for large text but not for body copy. One per heading, and never
   two visible in the same viewport, or the accent stops meaning anything.
   .hl-soft is the body-copy version: an accent wash under ink, so contrast
   stays where it was. Both clone their decoration so they survive a line wrap. */
.hl,
.hl-soft {
  border-radius: 3px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.hl {
  background: var(--accent);
  color: #fff;
  padding: 0.04em 0.2em 0.1em;
}
.hl-soft {
  background: rgba(240, 61, 1, 0.13);
  padding: 0.08em 0.26em;
}
.studio .hl-soft {
  background: rgba(240, 61, 1, 0.26);
  color: var(--band-text);
}

.kicker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.kicker .tick {
  width: 4px;
  height: 16px;
  border-radius: 2px;
  background: var(--accent);
}

h1, h2 {
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 1.25rem;
}
h2 { font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem); }

.lede {
  font-size: clamp(1.0625rem, 1rem + 0.5vw, 1.3125rem);
  line-height: 1.55;
  max-width: 34ch;
  margin: 0 0 2rem;
}

.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  padding: 0.95rem 1.5rem;
  border-radius: 3px;
  border: 0;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { background: #000; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* ---------- PlayDraft ---------- */

.playdraft { padding: clamp(4rem, 10vw, 7.5rem) 0; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.feature-rows {
  list-style: none;
  margin: 0 0 2.25rem;
  padding: 0;
}
.feature-rows li {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}
.feature-rows li:last-child { border-bottom: 1px solid var(--line); }
.feature-rows h3 {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.5;
  padding-top: 0.2rem;
}
.feature-rows p { margin: 0; color: var(--muted); font-size: 0.9375rem; line-height: 1.55; }

.store { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; }
.store-note {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 24ch;
  line-height: 1.5;
}
.store-note a { color: var(--ink); font-weight: 600; }

/* ---------- Studio band ---------- */

.studio {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--band-text);
  padding: clamp(4rem, 10vw, 7.5rem) 0;
}
.studio .kicker { color: var(--band-muted); }
.studio .lede { max-width: 44ch; }
.studio .lede strong { font-weight: 600; color: #fff; }

.watermark {
  position: absolute;
  right: -8%;
  top: 50%;
  translate: 0 -50%;
  width: min(34rem, 60vw);
  color: var(--band-text);
  opacity: 0.05;
  pointer-events: none;
}

.facts {
  margin: 3rem 0 0;
  max-width: 38rem;
}
.facts > div {
  display: grid;
  grid-template-columns: 10.5rem 1fr;
  gap: 1rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--band-line);
}
.facts > div:last-child { border-bottom: 1px solid var(--band-line); }
.facts dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--band-muted);
  padding-top: 0.15rem;
}
.facts dd { margin: 0; font-size: 0.9375rem; }
.facts dd a { color: var(--band-text); }

/* ---------- Footer ---------- */

.site-foot { padding: 2.5rem 0 3rem; }
.foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}
.foot-type { height: 11px; width: auto; }
.foot-row p { margin: 0; font-size: 0.8125rem; color: var(--muted); }
.foot-links { display: flex; gap: 1.5rem; }
.foot-links a {
  font-size: 0.8125rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.foot-links a:hover { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- Inner pages (privacy, support, 404) ---------- */

.page {
  min-height: 60svh;
  padding: clamp(7rem, 16vw, 10rem) 0 clamp(3rem, 8vw, 5rem);
}
.page h1 { font-size: clamp(2rem, 1.5rem + 2.2vw, 3rem); }
.page .prose { max-width: 60ch; }
.page .prose h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 2.25rem 0 0.5rem;
}
.page .prose p { margin: 0 0 1rem; color: var(--muted); }
.page .prose p strong { color: var(--ink); }
.page .prose a { color: var(--ink); font-weight: 600; }
.page-updated {
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0 0 2.5rem;
}

.oops { text-align: center; place-content: center; display: grid; }
.oops .m-arc-static { width: min(14rem, 60vw); margin: 0 auto 2rem; }
.oops p { color: var(--muted); margin: 0 0 2rem; }

/* ---------- Responsive ---------- */

@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; }
  .pd-visual { order: 2; }
}

@media (max-width: 640px) {
  .feature-rows li { grid-template-columns: 1fr; gap: 0.2rem; }
  .facts > div { grid-template-columns: 1fr; gap: 0.2rem; }
  .foot-row { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .brand-type { display: none; }
  :root { --L: 86vw; }
}

/* ==========================================================================
   PlayDraft product page
   ========================================================================== */

.pd-hero {
  padding: clamp(7rem, 16vw, 10rem) 0 clamp(3rem, 7vw, 4.5rem);
}
.pd-hero .split {
  align-items: center;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
}
.pd-hero h1 {
  font-size: clamp(2.6rem, 1.8rem + 3.6vw, 4.5rem);
  margin-bottom: 1.25rem;
}
.pd-hero .lede { max-width: 30ch; }

.pd-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}
.pd-meta li {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.4rem 0.7rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}
.btn-ghost {
  display: inline-block;
  padding: 0.95rem 1.5rem;
  border: 1px solid var(--ink);
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.cta-note {
  width: 100%;
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Device-framed video */
.device {
  width: min(19rem, 78vw);
  margin-inline: auto;
  background: var(--ink);
  border-radius: 2.5rem;
  padding: 0.6rem;
  box-shadow: 0 30px 70px -35px rgba(27, 27, 27, 0.55);
}
.device video,
.device img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2rem;
  background: #12161f;
}

/* Linked device (homepage teaser → product page) */
a.device {
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
a.device:hover {
  transform: translateY(-4px);
  box-shadow: 0 38px 80px -32px rgba(27, 27, 27, 0.58);
}
@media (prefers-reduced-motion: reduce) {
  a.device { transition: none; }
  a.device:hover { transform: none; }
}

/* Section rhythm */
.band { padding: clamp(3.5rem, 9vw, 6rem) 0; }
.band + .band { padding-top: 2em; }
.band-line { border-top: 1px solid var(--line); padding-top: clamp(3rem, 7vw, 4.5rem); }
.section-head { max-width: 42ch; margin-bottom: clamp(2rem, 5vw, 3rem); }
.section-head h2 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.9rem); }
.section-head p { margin: 0; color: var(--muted); font-size: 1.0625rem; line-height: 1.6; }

/* Numbered loop steps */
.loop {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}
.loop li {
  counter-increment: step;
  background: var(--paper);
  padding: 1.75rem 1.25rem 1.5rem;
}
.loop li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 0.9rem;
}
.loop h3 {
  margin: 0 0 0.4rem;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.loop p { margin: 0; font-size: 0.9375rem; line-height: 1.55; color: var(--muted); }

/* Mode / feature detail rows */
.detail-rows { margin: 0; padding: 0; list-style: none; }
.detail-rows > li {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 1rem clamp(1.5rem, 4vw, 3rem);
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
}
.detail-rows > li:last-child { border-bottom: 1px solid var(--line); }
.detail-rows h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.detail-rows .tag {
  display: inline-block;
  margin-top: 0.55rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.detail-rows p { margin: 0; color: var(--muted); line-height: 1.6; }
.detail-rows p + p { margin-top: 0.75rem; }
.detail-rows strong { color: var(--ink); font-weight: 600; }

/* Option grid — settings, roster sizes, etc. */
.options { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.options-3 { grid-template-columns: repeat(3, 1fr); }
.options > div { background: var(--paper); padding: 1.4rem 1.25rem; }
.options dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.options dd { margin: 0; font-size: 0.9375rem; color: var(--muted); line-height: 1.55; }
.options .val { color: var(--ink); font-weight: 600; }

/* Pack chips */
.packs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}
.packs li {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.55rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 600;
}
.packs li.free { border-color: var(--ink); }

@media (max-width: 900px) {
  .pd-hero .split { grid-template-columns: 1fr; }
  .pd-hero .device { order: 2; }
  .loop { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .loop { grid-template-columns: 1fr; }
  .detail-rows > li { grid-template-columns: 1fr; }
  .options-3 { grid-template-columns: 1fr; }
}

.packs li { display: flex; align-items: baseline; gap: 0.5rem; }
.packs li span {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.btn[aria-disabled="true"] {
  background: var(--ink);
  opacity: 0.42;
  cursor: not-allowed;
}
.btn[aria-disabled="true"]:hover { background: var(--ink); transform: none; }
