/* KOPARYX games — site stylesheet
   Brand tokens come from Marketing/Logo/brand-sheet.html. Change them there first. */

/* Fonts are self-hosted (latin subsets, SIL Open Font License; see assets/fonts/). */
@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter.woff2") format("woff2"); }
@font-face { font-family: "Press Start 2P"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/press-start-2p.woff2") format("woff2"); }

:root {
  --ink: #121212;
  --ink-2: #1A1A1A;
  --ink-3: #262626;
  --rule: #2E2E2E;
  --text: #EDEAE4;
  --text-2: #A9A59C;
  --text-3: #AAA69D;
  --gold: #D6B57A;
  --gold-2: #E4CF9A;
  --max: 1080px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }

html { color-scheme: dark; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold-2); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

img { max-width: 100%; height: auto; display: block; }

.skip {
  position: absolute; left: 16px; top: -60px;
  background: var(--gold); color: var(--ink); padding: 8px 12px; font-weight: 600;
  z-index: 10;
}
.skip:focus { top: 16px; }

/* ---------- header ---------- */
.site-head {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px var(--gutter) 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.brand img { width: 220px; height: auto; }
.site-head nav { display: flex; gap: 28px; }
.site-head nav a {
  color: var(--text-2); text-decoration: none;
  font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 0; border-bottom: 1px solid transparent;
}
.site-head nav a:hover, .site-head nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--gold); }

/* ---------- layout ---------- */
main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) 80px; }
.narrow { max-width: 68ch; }

.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 14px;
}
h1, h2, h3 { font-weight: 600; letter-spacing: -.01em; line-height: 1.15; margin: 0 0 16px; text-wrap: balance; }
h1 { font-size: clamp(34px, 5.5vw, 60px); }
h2 { font-size: clamp(22px, 3vw, 30px); margin-top: 48px; }
h3 { font-size: 19px; margin-top: 28px; }
p { margin: 0 0 16px; }
.lede { font-size: clamp(19px, 2.2vw, 23px); color: var(--text); max-width: 60ch; }
.muted { color: var(--text-2); }
.small { font-size: 14px; }
ul, ol { padding-left: 22px; margin: 0 0 16px; }
li { margin-bottom: 6px; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 40px 0; }

/* ---------- hero ---------- */
.hero { padding: 56px 0 24px; border-bottom: 1px solid var(--rule); }
.hero .rule { width: 56px; height: 3px; background: var(--gold); margin: 26px 0 0; }

/* ---------- facts strip ---------- */
.facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px;
  background: var(--rule); border: 1px solid var(--rule); margin: 40px 0 0;
}
.facts div { background: var(--ink-2); padding: 18px 20px; }
.facts b { display: block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; font-weight: 600; }
.facts span { font-weight: 500; }
.facts.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .facts, .facts.two { grid-template-columns: minmax(0, 1fr); } }

/* ---------- newsletter card ---------- */
.signup {
  margin: 48px 0 0; padding: 28px clamp(20px, 3vw, 36px);
  background: var(--ink-2); border: 1px solid var(--rule); border-top: 3px solid var(--gold);
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px 40px; align-items: center;
}
.signup h2 { margin-top: 0; font-size: 24px; }
.signup p { margin: 0; color: var(--text-2); }
.signup .action { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 720px) { .signup { grid-template-columns: minmax(0, 1fr); } }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--gold); color: var(--ink); text-decoration: none;
  font-weight: 600; font-size: 15px; letter-spacing: .04em;
  padding: 13px 22px; border: 0; cursor: pointer; text-align: center;
}
.button:hover { background: var(--gold-2); color: var(--ink); }
.button.secondary { background: transparent; color: var(--text); border: 1px solid var(--rule); }
.button.secondary:hover { border-color: var(--gold); color: var(--gold-2); }

/* newsletter form styling, used once a service snippet replaces the mailto */
.signup form { display: flex; gap: 10px; flex-wrap: wrap; }
.signup input[type="email"] {
  flex: 1 1 200px; padding: 12px 14px; background: var(--ink); color: var(--text);
  border: 1px solid var(--rule); font: inherit; font-size: 15px;
}
.signup input[type="email"]:focus { border-color: var(--gold); outline: none; }

/* ---------- news list ---------- */
.posts { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.posts li { margin: 0; padding: 22px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 28px; }
.posts time, .posts .cat { font-size: 13px; color: var(--text-3); letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.posts h3 { margin: 0 0 6px; font-size: 21px; }
.posts h3 a { color: var(--text); text-decoration: none; }
.posts h3 a:hover { color: var(--gold-2); }
.posts p { margin: 0; color: var(--text-2); }
@media (max-width: 640px) { .posts li { grid-template-columns: minmax(0, 1fr); } }

/* ---------- article ---------- */
article header { padding: 40px 0 24px; border-bottom: 1px solid var(--rule); margin-bottom: 28px; }
article .meta { font-size: 13px; color: var(--text-3); letter-spacing: .06em; text-transform: uppercase; font-weight: 600; margin: 0 0 12px; display: flex; gap: 14px; flex-wrap: wrap; }
article .meta span::before { content: "·"; margin-right: 14px; color: var(--rule); }
article .meta span:first-child::before { content: none; margin: 0; }
article figure { margin: 28px 0; }
article figcaption { font-size: 14px; color: var(--text-3); margin-top: 8px; }
.back { display: inline-block; margin-top: 36px; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; text-decoration: none; }

/* ---------- legal ---------- */
.legal h2 { font-size: 20px; margin-top: 36px; }

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--rule);
  background: var(--ink-2);
}
.site-foot .inner {
  max-width: var(--max); margin: 0 auto; padding: 36px var(--gutter) 44px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; align-items: start;
}
.site-foot img { width: 44px; margin-bottom: 14px; }
.site-foot p { margin: 0; font-size: 14px; color: var(--text-2); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.site-foot nav a { color: var(--text-2); text-decoration: none; }
.site-foot nav a:hover { color: var(--gold-2); }
.site-foot .tagline { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-top: 10px; }
@media (max-width: 640px) { .site-foot .inner { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 404 ---------- */
.notfound { padding: 80px 0; text-align: left; }
.notfound h1 { font-size: clamp(60px, 14vw, 140px); color: var(--gold); line-height: 1; margin-bottom: 8px; }


/* ---------- game page and front-page teaser ---------- */
.game-hero { padding: 48px 0 8px; }
.lockup { width: min(100%, 440px); height: auto; margin: 0 0 22px; filter: drop-shadow(0 6px 0 rgba(0,0,0,.6)); }
.game-hero .lede { max-width: 62ch; }
figure { margin: 0; }
.keyart, .feature figure, .pair figure, .teaser-art, article figure {
  background: var(--ink-2); border: 1px solid var(--rule); padding: 8px;
}
.keyart { margin: 28px 0 0; }
.keyart img, .feature figure img, .pair figure img, .teaser-art img, article figure img { width: 100%; height: auto; display: block; }
.keyart figcaption, .feature figcaption, .pair figcaption { font-size: 13px; color: var(--text-3); padding: 10px 4px 2px; }
.feature { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 40px; }
.feature .text h2 { margin-top: 0; }
.feature .text p { max-width: 68ch; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 640px) { .pair { grid-template-columns: minmax(0, 1fr); } }
.teaser {
  margin: 40px 0 0; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; align-items: center;
}
.teaser-art { display: block; }
.teaser-text .lockup { width: min(100%, 320px); margin-bottom: 14px; }
.teaser-text h2 { margin-top: 0; }
.teaser-text p { color: var(--text-2); }
@media (max-width: 800px) { .teaser { grid-template-columns: minmax(0, 1fr); } }
.teaser-art img { transition: transform .3s ease, filter .3s ease; }
.teaser-art:hover img { transform: scale(1.015); filter: brightness(1.06); }


/* ---------- demo notification form ---------- */
.signup.demo { display: block; padding: 34px clamp(20px, 4vw, 44px) 32px; }
.demo-intro { max-width: 60ch; margin-bottom: 22px; }
.demo-intro .eyebrow { margin-bottom: 10px; }
.demo-intro h2 { margin: 0 0 10px; }
.demo-intro p { margin: 0; }
.demo-form, .signup form.demo-form { display: grid; gap: 18px; flex-wrap: nowrap; }
.demo-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.demo-form .field { display: grid; gap: 7px; }
.demo-form label { font-size: 13px; font-weight: 600; color: var(--text-2); letter-spacing: .04em; }
.demo-form input[type="text"], .demo-form input[type="email"], .demo-form input[type="password"],
.signup form.demo-form input[type="text"], .signup form.demo-form input[type="email"] {
  flex: none; width: 100%; height: 48px; padding: 0 14px; margin: 0;
  background: var(--ink-3); color: var(--text); border: 1px solid #3F3F3F; border-radius: 0;
  font: inherit; font-size: 16px;
  box-shadow: inset 1px 1px 0 var(--bevel-lo, #000);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.demo-form input::placeholder { color: var(--text-3); }
.demo-form input[type="text"]:hover, .demo-form input[type="email"]:hover { border-color: #5A5A5A; }
.demo-form input[type="text"]:focus, .demo-form input[type="email"]:focus, .demo-form input[type="password"]:focus {
  border-color: var(--gold); outline: none; background: #2A2A2A; box-shadow: 0 0 0 3px rgba(214,181,122,.22);
}
.demo-form .consent {
  display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 14px 16px; background: var(--ink); border: 1px solid var(--rule);
}
.demo-form .consent input {
  appearance: none; -webkit-appearance: none; margin: 1px 0 0; width: 22px; height: 22px; cursor: pointer;
  background: var(--ink-3); border: 2px solid var(--gold-dark, #6F5B33);
  transition: background .15s, border-color .15s;
}
.demo-form .consent input:hover { border-color: var(--gold); }
.demo-form .consent input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.demo-form .consent input:checked {
  background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='%23121212' stroke-width='2.4' stroke-linecap='square'/%3E%3C/svg%3E") center / 16px 16px no-repeat; border-color: var(--gold);
}
.demo-form .consent label { font-weight: 400; font-size: 14px; letter-spacing: 0; line-height: 1.55; color: var(--text-2); cursor: pointer; }
.demo-form .consent label a { white-space: nowrap; }
.demo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.demo-actions .button { white-space: nowrap; min-width: 190px; }
.demo-actions .small { margin: 0; }
.demo-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 640px) {
  .demo-fields { grid-template-columns: minmax(0, 1fr); }
  .demo-actions .button { width: 100%; }
}
.list-wrap { overflow-x: auto; margin: 20px 0; }
.list { border-collapse: collapse; width: 100%; font-size: 14px; }
.list th, .list td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.list th { color: var(--text-3); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }

/* footer: company line needs room; stack earlier so it never squeezes into a thin column */
.site-foot .inner { grid-template-columns: minmax(280px, 1fr) auto; }
.site-foot p.small { margin-top: 6px; max-width: 52ch; }
@media (max-width: 980px) { .site-foot .inner { grid-template-columns: minmax(0, 1fr); } }

/* =====================================================================
   90s LAYER — pixel type, scanlines, ticker, bevels, blink, motion.
   Everything below overrides the calmer rules above. Remove this block
   and the site goes back to plain.
   ===================================================================== */

:root {
  --pixel: "Press Start 2P", Silkscreen, "Courier New", monospace;
  --bevel-hi: #3A3A3A;
  --bevel-lo: #000000;
  --gold-dark: #6F5B33;
}

::selection { background: var(--gold); color: var(--ink); }

/* CRT: scanlines and a soft vignette, fixed over everything, never block clicks */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 9; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.16) 0 1px, transparent 1px 3px);
  opacity: .4;
  animation: flicker 7s ease-in-out infinite;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: 8; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 58%, rgba(0,0,0,.45) 100%);
}
@keyframes flicker { 0%, 100% { opacity: .4; } 48% { opacity: .35; } 52% { opacity: .45; } }

/* pixel typography */
h1, h2, .eyebrow, .site-head nav a, .site-foot nav a, .button, .back, .badge-new, .ticker, .retro {
  font-family: var(--pixel);
  font-weight: 400;
}
h1 { font-size: clamp(19px, 3vw, 32px); line-height: 1.45; letter-spacing: 0; }
h2 { font-size: clamp(13px, 1.5vw, 16px); line-height: 1.5; letter-spacing: 0; }
.legal h2 { font-size: 12px; }
.signup h2 { font-size: 13px; line-height: 1.6; }
.eyebrow { font-size: 9px; letter-spacing: .08em; line-height: 1.6; }
.site-head nav a, .site-foot nav a { font-size: 9px; letter-spacing: .06em; position: relative; line-height: 1.6; }
.site-head nav a::before {
  content: ">"; position: absolute; left: -14px; color: var(--gold); opacity: 0;
  transition: opacity .15s, transform .15s; transform: translateX(-4px);
}
.site-head nav a:hover::before, .site-head nav a[aria-current="page"]::before { opacity: 1; transform: none; }
.site-head nav a { transition: color .15s, border-color .15s; }
.back { font-size: 9px; }
.notfound h1 { font-size: clamp(48px, 10vw, 96px); line-height: 1.1; }

/* logo: soft glow on hover */
.brand img { transition: filter .25s ease; }
.brand:hover img { filter: drop-shadow(0 0 10px rgba(214,181,122,.55)); }

/* links: underline slides down on hover */
a { transition: color .15s, text-underline-offset .15s; }
a:hover { text-underline-offset: 5px; }

/* ticker: one line of scrolling status, pauses on hover */
.ticker {
  border-block: 1px solid var(--rule); background: var(--ink-2);
  overflow: hidden; font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: var(--gold);
  box-shadow: inset 0 1px 0 var(--bevel-hi), inset 0 -1px 0 var(--bevel-lo);
}
.ticker-track { display: flex; width: max-content; animation: ticker 34s linear infinite; }
.ticker-track span { padding: 10px 0; white-space: nowrap; }
.ticker-track span::after { content: "◆"; color: var(--text-3); margin: 0 22px; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* hero: the rule draws itself, the cursor blinks */
.hero .rule { animation: grow .7s cubic-bezier(.2,.7,.2,1) .35s both; }
@keyframes grow { from { width: 0; } }
.cursor {
  display: inline-block; width: .5em; height: .85em; background: var(--gold);
  margin-left: .18em; vertical-align: -.06em; animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* bevelled panels, the Win95 way */
.facts div, .signup, .posts li:hover, .keyart, .feature figure, .pair figure, .teaser-art, article figure {
  box-shadow: inset 1px 1px 0 var(--bevel-hi), inset -1px -1px 0 var(--bevel-lo);
}
.facts div { transition: background .2s, transform .2s; }
.facts div:hover { background: var(--ink-3); transform: translateY(-2px); }
.posts li { transition: background .2s, padding-left .2s; }
.posts li:hover { background: var(--ink-2); padding-left: 12px; }

/* hazard stripes crawl along the top of the sign-up box */
.signup { position: relative; border-top: 0; padding-top: 34px; }
.signup.construction::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 8px;
  background: repeating-linear-gradient(45deg, var(--gold) 0 12px, var(--ink) 12px 24px);
  background-size: 33.94px 8px;
  animation: stripes 1s linear infinite;
}
@keyframes stripes { to { background-position: 33.94px 0; } }

/* the button: hard drop shadow, blinking arrow, shine sweep, presses down */
.button {
  position: relative; overflow: hidden; isolation: isolate;
  font-size: 10px; letter-spacing: .04em; text-transform: uppercase; line-height: 1.6;
  border: 2px solid var(--gold-2);
  box-shadow: 4px 4px 0 var(--gold-dark);
  transition: transform .1s ease, box-shadow .1s ease, background .2s ease;
}
.button::before { content: "▶"; font-size: 9px; animation: blink 1.2s steps(1) infinite; }
.button::after {
  content: ""; position: absolute; top: -60%; left: 0; width: 28%; height: 220%; z-index: -1;
  background: linear-gradient(115deg, transparent 0%, rgba(255,255,255,.6) 50%, transparent 100%);
  transform: skewX(-20deg) translateX(-260%);
  animation: shine 4.5s ease-in-out infinite;
}
@keyframes shine { 0%, 68% { transform: skewX(-20deg) translateX(-260%); } 100% { transform: skewX(-20deg) translateX(560%); } }
.button:hover {
  background: var(--gold-2); transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--gold-dark), 0 0 28px rgba(214,181,122,.35);
}
.button:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--gold-dark); }
.button.secondary { box-shadow: 4px 4px 0 var(--bevel-lo); border-color: var(--rule); }
.button.secondary::after { display: none; }
.button.secondary:hover { box-shadow: 6px 6px 0 var(--bevel-lo), 0 0 20px rgba(214,181,122,.2); }

/* NEW badge */
.badge-new {
  display: inline-block; font-size: 8px; letter-spacing: .08em; text-transform: uppercase;
  background: var(--gold); color: var(--ink); padding: 3px 6px 2px; margin-right: 10px;
  vertical-align: middle; animation: blink 1.4s steps(1) infinite;
}

/* footer joke line */
.retro { font-size: 8px; letter-spacing: .04em; line-height: 1.8; color: var(--text-3); margin-top: 14px; }

/* page entrance: sections rise in one after another */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
main > * { animation: rise .55s cubic-bezier(.2,.7,.2,1) both; }
main > :nth-child(1) { animation-delay: .04s; }
main > :nth-child(2) { animation-delay: .12s; }
main > :nth-child(3) { animation-delay: .20s; }
main > :nth-child(4) { animation-delay: .28s; }
main > :nth-child(5) { animation-delay: .36s; }
main > :nth-child(n+6) { animation-delay: .44s; }

/* cross-page transitions (browsers that support them; others just navigate) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 160ms ease-in both fade-out; }
::view-transition-new(root) { animation: 280ms cubic-bezier(.2,.7,.2,1) both rise; }
@keyframes fade-out { to { opacity: 0; } }

/* reduced motion: everything still, nothing lost */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ticker-track { width: auto; flex-wrap: wrap; }
  .ticker-track span:nth-child(n+7) { display: none; }
}

/* Allow narrow screens and enlarged text to wrap instead of overflowing. */
.site-head > *, .signup > *, .site-foot .inner > * { min-width: 0; }
a, h1, h2, h3 { overflow-wrap: anywhere; }
