/* CrossCrease website. No external fonts, scripts or trackers; everything is served from this site. */

:root {
  color-scheme: light;
  --bg: #f4f6f3;
  --surface: #ffffff;
  --surface-2: #eceff0;
  --ink: #11151b;
  --ink-2: #39414d;
  --muted: #5d6776;
  --line: #dce1e4;
  --line-strong: #c4cbd1;
  --accent: #c9ef5d;
  --accent-ink: #18210a;
  --accent-text: #4a6a0c;
  --rink-red: #d9443f;
  --rink-blue: #2f5fd6;
  --works: #3f9d4a;
  --testing: #c98a12;
  --progress: #7d8794;
  --shadow: 0 1px 2px rgb(17 21 27 / 6%), 0 8px 24px rgb(17 21 27 / 6%);
  --radius: 14px;
  --wrap: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0c0f13;
    --surface: #141920;
    --surface-2: #1a2029;
    --ink: #eef1f4;
    --ink-2: #c9d0d9;
    --muted: #97a1af;
    --line: #232a34;
    --line-strong: #333c48;
    --accent: #d2f66b;
    --accent-ink: #18210a;
    --accent-text: #d2f66b;
    --rink-red: #f0625c;
    --rink-blue: #6f93ff;
    --works: #74d17f;
    --testing: #f0bd5c;
    --progress: #8c96a4;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 12px 32px rgb(0 0 0 / 25%);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0f13;
  --surface: #141920;
  --surface-2: #1a2029;
  --ink: #eef1f4;
  --ink-2: #c9d0d9;
  --muted: #97a1af;
  --line: #232a34;
  --line-strong: #333c48;
  --accent: #d2f66b;
  --accent-ink: #18210a;
  --accent-text: #d2f66b;
  --rink-red: #f0625c;
  --rink-blue: #6f93ff;
  --works: #74d17f;
  --testing: #f0bd5c;
  --progress: #8c96a4;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
a:hover { color: var(--accent-text); }
:focus-visible { outline: 2px solid var(--rink-blue); outline-offset: 3px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--accent) 60%, transparent); color: var(--ink); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

.skip-link { position: absolute; left: 12px; top: -48px; padding: 8px 14px; background: var(--ink); color: var(--bg); border-radius: 8px; z-index: 10; text-decoration: none; }
.skip-link:focus { top: 12px; color: var(--bg); }

/* ---- header ---------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 17px; letter-spacing: -0.01em; text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-mark.small { width: 22px; height: 22px; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { padding: 8px 12px; border-radius: 9px; color: var(--ink-2); font-size: 15px; font-weight: 550; text-decoration: none; white-space: nowrap; }
.site-nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav-github { display: inline-flex; align-items: center; gap: 7px; }
.nav-github svg { width: 17px; height: 17px; }
@media (max-width: 640px) {
  .hide-narrow { display: none; }
  .site-nav a { padding: 8px 9px; font-size: 14px; }
  .brand span { font-size: 16px; }
}
@media (max-width: 340px) { .brand span { display: none; } }

/* ---- hero ------------------------------------------------------------------------ */
.hero { padding: 88px 0 72px; border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.eyebrow { font: 600 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--rink-red); }
.hero h1 { font-size: clamp(40px, 6.4vw, 72px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; }
.lede { margin-top: 24px; max-width: 34em; font-size: 18px; color: var(--ink-2); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 12px; font-weight: 650; font-size: 16px; text-decoration: none; transition: transform .15s ease, background-color .15s ease, border-color .15s ease; }
.button:active { transform: translateY(1px); }
.button-primary { background: var(--accent); color: var(--accent-ink); box-shadow: inset 0 -2px 0 rgb(0 0 0 / 12%); }
.button-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); color: var(--accent-ink); }
.button-quiet { border: 1px solid var(--line-strong); color: var(--ink); }
.button-quiet:hover { border-color: var(--ink-2); color: var(--ink); background: var(--surface); }
.fineprint { margin-top: 18px; font-size: 14px; color: var(--muted); }

.rink { position: relative; }
.rink svg { width: 100%; height: auto; display: block; overflow: visible; }
.rink svg * { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.rink-boards { stroke: var(--line-strong); fill: var(--surface) !important; }
.rink-goal { stroke: color-mix(in srgb, var(--rink-red) 55%, transparent); stroke-width: 1.5; }
.rink-blue { stroke: var(--rink-blue); stroke-width: 5 !important; opacity: .8; }
.rink-red { stroke: var(--rink-red); stroke-width: 4 !important; opacity: .85; }
.rink-circle { stroke: color-mix(in srgb, var(--rink-red) 45%, transparent); stroke-width: 1.5; }
.rink-crease { stroke: var(--rink-red); fill: color-mix(in srgb, var(--rink-blue) 22%, transparent) !important; stroke-width: 1.5; }
.rink-dot { fill: var(--rink-red) !important; stroke: none; }
.rink-puck { fill: var(--ink) !important; stroke: none; }
.rink::after { content: ""; position: absolute; inset: 14% 8% -10%; z-index: -1; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 35%, transparent), transparent); filter: blur(30px); }

@media (max-width: 860px) {
  .hero { padding: 56px 0 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .rink { max-width: 520px; }
}

/* ---- sections -------------------------------------------------------------------- */
.section { padding: 88px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 36px; max-width: 40em; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; letter-spacing: -0.025em; font-weight: 780; }
.section-head p { margin-top: 10px; color: var(--muted); font-size: 17px; }
@media (max-width: 640px) { .section { padding: 64px 0; } }

/* ---- games ----------------------------------------------------------------------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.game-nhl17 { --game: #27c9b3; }
.game-nhl27 { --game: #00a2c7; }

/* Every title at a glance: a season line from NHL 15 to the newest. */
.seasons { position: relative; display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 6px; }
.seasons::before { content: ""; position: absolute; left: 3%; right: 3%; top: 21px; height: 2px; background: var(--line); }
.seasons li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding-top: 34px; }
.seasons li::before {
  content: ""; position: absolute; top: 14px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line-strong);
}
.seasons li[data-state="ready"]::before { background: var(--works); border-color: var(--works); box-shadow: 0 0 0 5px color-mix(in srgb, var(--works) 20%, transparent); }
.seasons li[data-state="dev"]::before { background: var(--testing); border-color: var(--testing); box-shadow: 0 0 0 5px color-mix(in srgb, var(--testing) 20%, transparent); }
.season-num { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.season-plat { font: 600 10px/1 var(--mono); letter-spacing: .05em; color: var(--muted); opacity: .8; }
.seasons li[data-state="ready"] .season-num, .seasons li[data-state="dev"] .season-num { color: var(--ink); font-size: 14px; }
.season-tag { font-size: 11px; font-weight: 650; line-height: 1.2; color: var(--works); }
.seasons li[data-state="dev"] .season-tag { color: var(--testing); }
.season-key { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 18px; font-size: 13px; color: var(--muted); }
.season-key li { display: inline-flex; align-items: center; gap: 8px; }
.season-key li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line-strong); }
.season-key li[data-state="ready"]::before { background: var(--works); border-color: var(--works); }
.season-key li[data-state="dev"]::before { background: var(--testing); border-color: var(--testing); }

/* The playable and in-development titles. */
.titles { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-top: 36px; }
.title-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px;
  padding: 24px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.title-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--game, var(--progress)); }
.title-top { display: flex; align-items: center; gap: 14px; }
.title-num { font: 800 44px/1 var(--font); letter-spacing: -0.05em; color: var(--game, var(--progress)); font-variant-numeric: tabular-nums; }
.title-name { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.title-name h3 { font-size: 21px; letter-spacing: -0.015em; font-weight: 750; line-height: 1.1; }
.platform { font: 600 11px/1 var(--mono); padding: 4px 7px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); letter-spacing: 0.04em; }
.state { margin-left: auto; align-self: flex-start; font-size: 13px; font-weight: 650; padding: 5px 11px; border-radius: 999px; white-space: nowrap; }
.state-ready { background: color-mix(in srgb, var(--works) 16%, transparent); color: var(--works); }
.state-dev { background: color-mix(in srgb, var(--testing) 18%, transparent); color: var(--testing); }
.title-card > p { color: var(--ink-2); font-size: 15px; flex: 1; }
.title-progress { border-top: 1px solid var(--line); padding-top: 14px; }
.title-count { font-size: 14px; font-weight: 650; color: var(--ink); }
.bar { display: block; height: 6px; margin-top: 8px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar span { display: block; width: 0; height: 100%; border-radius: 3px; background: var(--works); transition: width .4s ease; }

/* Modes by game. */
.modes-panel { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 24px 26px; }
.modes-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; margin-bottom: 16px; }
.modes-head h3 { font-size: 18px; font-weight: 720; letter-spacing: -0.01em; }
.modes-source { font-size: 13px; color: var(--muted); max-width: 46em; }
.mx-scroll { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; background: var(--bg); }
.mx-scroll:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.mx { width: 100%; border-collapse: collapse; font-size: 14px; }
.mx th, .mx td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.mx tbody tr:last-child > * { border-bottom: 0; }
.mx thead th { background: var(--surface-2); }
.mx-corner { font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; width: 40%; }
.mx-game-name { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.mx-game-name i { width: 10px; height: 10px; border-radius: 3px; background: var(--game, var(--progress)); flex: none; }
.mx-group th { padding-top: 14px; padding-bottom: 6px; font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; background: var(--surface); }
.mx-row { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.mx tbody tr:not(.mx-group):hover > * { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.mx-pill {
  --s: var(--progress); display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 5px; border-radius: 999px;
  font-size: 13px; font-weight: 650; white-space: nowrap;
  color: var(--s); background: color-mix(in srgb, var(--s) 13%, transparent); border: 1px solid color-mix(in srgb, var(--s) 35%, transparent);
}
.mx-pill[data-s="playable"] { --s: var(--works); }
.mx-pill[data-s="partial"] { --s: var(--testing); }
.mx-pill[data-s="broken"] { --s: var(--rink-red); }
.mx-icon { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--s); color: var(--surface); font-size: 12px; font-weight: 800; line-height: 1; }
.mx-dash { color: var(--line-strong); font-weight: 700; }
.mx-legend { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.mx-legend li { display: inline-flex; align-items: center; gap: 8px; }
.modes-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.modes-foot a { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--accent-text); text-decoration: none; }
.modes-foot a:hover { text-decoration: underline; }
.live-note { display: inline-flex; align-items: center; gap: 9px; }
.live-note[hidden] { display: none; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--works); box-shadow: 0 0 0 4px color-mix(in srgb, var(--works) 22%, transparent); flex: none; }

@media (max-width: 900px) {
  .seasons { grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 18px; }
  .seasons::before { display: none; }
}
@media (max-width: 640px) {
  .seasons { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px 2px; }
  .season-num { font-size: 12px; }
  .titles { grid-template-columns: 1fr; }
  .title-card, .modes-panel { padding: 20px 16px; }
  .title-num { font-size: 36px; }
  .mx th, .mx td { padding: 10px; }
  .mx-corner { width: auto; }
  .mx-pill:not(.mx-legend .mx-pill) { padding-right: 5px; }
  .mx-pill:not(.mx-legend .mx-pill) .mx-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* ---- steps ----------------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: step; }
.steps li { padding: 26px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); display: flex; flex-direction: column; }
.step-num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--ink); color: var(--bg); font: 700 15px/1 var(--mono); margin-bottom: 18px; }
.steps h3 { font-size: 19px; letter-spacing: -0.01em; margin-bottom: 8px; }
.steps p { color: var(--ink-2); flex: 1; }
.steps a { margin-top: 16px; font: 600 13px/1.4 var(--mono); color: var(--muted); text-decoration: none; }
.steps a:hover { color: var(--accent-text); }
.steps a::after { content: " ↗"; }
.steps a[href^="/"]::after { content: " →"; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ---- FAQ ------------------------------------------------------------------------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px; align-items: start; }
.faq-grid .section-head { position: sticky; top: 100px; }
.faq-grid .section-head a { color: var(--accent-text); }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 44px 20px 0; position: relative;
  font-size: 18px; font-weight: 650; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg);
  transition: transform .2s ease, margin-top .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq summary:hover { color: var(--accent-text); }
.faq details p { padding: 0 44px 22px 0; color: var(--ink-2); max-width: 44em; }
.faq details p a { color: var(--accent-text); }
@media (max-width: 860px) {
  .faq-grid { grid-template-columns: 1fr; gap: 8px; }
  .faq-grid .section-head { position: static; }
  .faq summary { font-size: 17px; }
  .faq details p { padding-right: 0; }
}

/* ---- footer ---------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--muted); font-size: 14px; }
.footer-inner { display: grid; grid-template-columns: auto 1fr; gap: 18px 32px; align-items: center; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); font-weight: 600; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 22px; }
.footer-links a { text-decoration: none; }
.disclaimer { grid-column: 1 / -1; font-size: 12.5px; max-width: 60em; }
@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
}

/* ---- 404 ------------------------------------------------------------------------- */
.notfound { min-height: calc(100dvh - 65px - 140px); display: grid; place-items: center; text-align: center; padding: 80px 0; }
.notfound h1 { font-size: clamp(40px, 8vw, 80px); letter-spacing: -0.04em; line-height: 1; }
.notfound p { margin: 16px 0 28px; color: var(--muted); font-size: 18px; }
