/* laneworkstudio.dev — Matchlane Night Studio for the web.
   Values come from agents/design_system/night_studio/tokens.json (Night Studio and High
   Contrast). Rules kept from the brand book: no hairlines (surfaces are separated by their
   fills; borders are High Contrast only), one accent, faint glows, 48px targets, 4.5:1 text. */

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/Manrope-Variable.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Unbounded";
  src: url("/assets/fonts/Unbounded-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --bg: #0E0C17;
  --bg-glow: #221C40;
  --surface-1: #141128;
  --surface-2: #17142A;
  --surface-3: #1A1730;
  --surface-4: #1F1B36;
  --surface-raised: #211C3C;
  --border: rgba(255, 255, 255, 0);
  --highlight: rgba(255, 255, 255, 0.05);

  --text: #F4F1FF;
  --text-2: #B7B0D6;
  --text-muted: #9790BA;
  --icon: #D6D0F5;

  --accent: #9B8CFF;
  --accent-strong: #8C7CFF;
  --accent-light: #B3A8FF;
  --on-accent: #140F2B;
  --accent-glow: rgba(155, 140, 255, 0.14);
  --glow-primary: 0 6px 13px rgba(155, 140, 255, 0.22);
  --shadow-panel: 0 8px 16px rgba(0, 0, 0, 0.32);

  --radius-lane: 7px;
  --radius-cell: 13px;
  --radius-button: 15px;
  --radius-card: 20px;
  --radius-panel: 23px;

  --font-display: "Unbounded", "Manrope", system-ui, sans-serif;
  --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: 20px;
}

@media (prefers-contrast: more) {
  :root {
    --bg: #000000;
    --bg-glow: #000000;
    --surface-1: #0A0914;
    --surface-2: #0D0B19;
    --surface-3: #110F20;
    --surface-4: #151229;
    --surface-raised: #1B1737;
    --border: rgba(255, 255, 255, 0.45);
    --highlight: rgba(255, 255, 255, 0.12);
    --text: #FFFFFF;
    --text-2: #E6E2F8;
    --text-muted: #D0CBEA;
    --icon: #F0EDFF;
    --accent: #B9AFFF;
    --accent-strong: #AA9EFF;
    --accent-light: #CBC4FF;
    --on-accent: #0B0819;
    --accent-glow: transparent;
    --glow-primary: none;
    --shadow-panel: none;
  }
}

* { box-sizing: border-box; }

html { background: var(--bg); scroll-behavior: smooth; }
/* In-page links (how-to-play's section chips) land with a little room above the target. */
[id] { scroll-margin-top: 24px; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  /* One soft light from the top of every screen. */
  background: radial-gradient(120% 900px at 50% 0%, var(--bg-glow) 0%, var(--bg) 62%) no-repeat, var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex; flex-direction: column;
}
main { flex: 1 0 auto; width: 100%; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-light); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap--text { max-width: 760px; }

.skip {
  position: absolute; left: -9999px; top: 8px;
  padding: 12px 16px; border-radius: var(--radius-cell);
  background: var(--surface-raised); color: var(--text);
}
.skip:focus { left: 8px; z-index: 10; }

/* Top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 72px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px;
  color: var(--text); text-decoration: none;
  font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -0.01em;
}
.brand svg { width: 32px; height: 32px; border-radius: 8px; flex: none; }
.brand:hover { color: var(--text); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.nav a {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 14px;
  border-radius: var(--radius-cell);
  color: var(--text-2); font-weight: 700; font-size: 15px; text-decoration: none;
}
.nav a:hover { color: var(--text); background: var(--surface-3); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-3); }
@media (max-width: 440px) {
  :root { --gutter: 16px; }
  .brand { font-size: 16px; gap: 8px; }
  .brand svg { width: 28px; height: 28px; }
  .nav { flex-wrap: nowrap; gap: 0; }
  .nav a { padding: 0 10px; font-size: 14px; }
}

/* Type */
.eyebrow {
  margin: 0 0 8px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-muted);
}
.num { font-family: var(--font-display); font-weight: 600; font-variant-numeric: tabular-nums; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
.page-title { font-size: clamp(28px, 5vw, 36px); font-weight: 800; letter-spacing: -0.01em; }
.lede { color: var(--text-2); font-size: 18px; margin: 12px 0 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 20px; border-radius: var(--radius-cell);
  font-family: var(--font-sans); font-weight: 700; font-size: 15px; text-decoration: none;
  border: 1.5px solid var(--border);
  transition: transform 120ms ease-out;
}
.btn:active { transform: scale(0.97); }
.btn--primary {
  height: 60px; padding: 0 28px; border-radius: var(--radius-button);
  background: linear-gradient(180deg, var(--accent-light) 0%, var(--accent-strong) 100%);
  color: var(--on-accent); font-size: 17px; font-weight: 800;
  box-shadow: var(--glow-primary), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn--primary:hover { color: var(--on-accent); filter: brightness(1.05); }
.btn--secondary { height: 54px; background: var(--surface-3); color: var(--text); }
.btn--secondary:hover { color: var(--text); background: var(--surface-4); }

.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 14px;
  border-radius: 15px; background: var(--surface-3); border: 1.5px solid var(--border);
  color: var(--text-2); font-size: 13px; font-weight: 700;
}
.chip__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* Surfaces */
.card {
  background: var(--surface-2); border: 1.5px solid var(--border);
  border-radius: var(--radius-card); padding: 24px;
  box-shadow: inset 0 1px 0 var(--highlight);
}
.card h3 { font-size: 17px; font-weight: 800; margin: 14px 0 6px; }
.card p { margin: 0; color: var(--text-2); font-size: 15px; }
.card .icon { width: 24px; height: 24px; color: var(--icon); display: block; }
.card .eyebrow { font-size: 11px; color: var(--text-muted); margin: 0 0 8px; }

.panel {
  background: var(--surface-1); border: 1.5px solid var(--border);
  border-radius: var(--radius-panel); box-shadow: var(--shadow-panel);
  overflow: hidden;
}


/* Gameplay clips: captured from the game's own help screens. Each clip carries its own
   ground and board panel, so the frame only rounds it off; it adds no surface of its own. */
.clip { display: block; width: 100%; height: auto; background: var(--bg); }

/* Footer */
.footer {
  margin-top: 72px; padding: 28px 0 40px;
  background: var(--surface-1);
  color: var(--text-muted); font-size: 13px;
}
.footer__row { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center; }
.footer nav { display: flex; flex-wrap: wrap; gap: 0 4px; }
.footer nav a {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 10px;
  color: var(--text-2); font-weight: 600; font-size: 14px; text-decoration: none;
}
.footer nav a:hover { color: var(--text); }
.footer p { margin: 4px 0 0; }
.footer__owner { color: var(--text-2); }
.footer .credit a { color: var(--text-muted); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 150ms !important; animation: none !important; }
  .btn:active { transform: none; }
}

.clip-frame { position: relative; border-radius: var(--radius-card); overflow: hidden; }
.clip-toggle {
  position: absolute; right: 12px; bottom: 12px;
  width: 48px; height: 48px; border-radius: var(--radius-cell);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-3); color: var(--icon); border: 1.5px solid var(--border);
  cursor: pointer; opacity: 0.85;
}
.clip-toggle:hover { opacity: 1; background: var(--surface-4); }
.clip-toggle svg { width: 20px; height: 20px; }

/* Lane symbols switch (clips.js). Hidden until the script can make it work. */
.symbols-toggle { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; margin: 16px 0 0; }
.symbols-toggle[hidden] { display: none; }
.switch {
  display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 16px 0 10px;
  border-radius: var(--radius-cell); border: 1.5px solid var(--border);
  background: var(--surface-3); color: var(--text); cursor: pointer;
  font-family: var(--font-sans); font-size: 15px; font-weight: 700;
}
.switch:hover { background: var(--surface-4); }
.switch__track {
  position: relative; width: 44px; height: 26px; flex: none; border-radius: 999px;
  background: var(--surface-raised); box-shadow: inset 0 0 0 1.5px var(--border);
  transition: background 200ms ease-out;
}
.switch__thumb {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--text-2); transition: transform 200ms ease-out, background 200ms ease-out;
}
.switch[aria-checked="true"] .switch__track { background: var(--accent); }
.switch[aria-checked="true"] .switch__thumb { transform: translateX(18px); background: var(--on-accent); }
.switch__hint { margin: 0; flex: 1 1 16em; color: var(--text-muted); font-size: 13px; line-height: 1.45; }

/* Official Google Play badge (unaltered artwork; the PNG carries its own clear space). */
.store-badge { display: inline-block; line-height: 0; }
.store-badge img { height: 80px; width: auto; display: block; }
.hero__actions .store-badge { margin-left: -10px; }
