/* ==========================================================================
   home.css: homepage layout.
   Bands: hero (artwork, tinted by the current game), catalogue (surface),
   how it works (bg), build ideas (sunken), news (bg).
   Game colors (--game) supply most of the accent color.
   ========================================================================== */

.section-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.section-head { display: flex; align-items: flex-end; gap: var(--s-4) var(--s-6); margin-bottom: var(--s-4); flex-wrap: wrap; }
.section-head h2 { font-size: var(--fs-2xl); text-transform: uppercase; letter-spacing: 0.01em; line-height: 1; }
.section-note { flex: 1 1 320px; max-width: 62ch; font-size: var(--fs-sm); color: var(--text-2); }
.section-link { margin-left: auto; font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.fine-print { margin-top: var(--s-3); font-size: var(--fs-xs); color: var(--text-3); }
.site-footer { margin-top: 0; }
main > section[id] { scroll-margin-top: var(--header-h); }
@media (prefers-reduced-motion: no-preference) { html:has(body[data-page='home']) { scroll-behavior: smooth; } }
:root[data-reduce-motion='true'] { scroll-behavior: auto !important; }

/* A small ivy sprig, used as a mark beside kicker labels. */
.kicker-mark { width: 22px; height: 14px; flex-shrink: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 14'%3E%3Cpath d='M1 10C6 7 12 9 21 4' fill='none' stroke='%235d7a3e' stroke-width='1.4' stroke-linecap='round'/%3E%3Cpath d='M8 8C6 4 8 1 10 1c0 3 1 5-2 7zM14 6c1-4 4-5 6-4-1 3-3 4-6 4zM4 10C1 8 1 5 2 4c2 1 3 3 2 6z' fill='%2386a35a'/%3E%3C/svg%3E") no-repeat center / contain; }

/* Large action buttons: chamfered stone slabs; the primary one is gilt. */
.btn-hero {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 0 28px;
  border: 0;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
  background: linear-gradient(180deg, #3a342b, #25211b 60%, #1d1a15);
  box-shadow: inset 0 1px 0 rgba(255, 236, 190, 0.12), inset 0 -2px 0 rgba(0, 0, 0, 0.45);
  color: var(--text);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform 160ms ease, filter 160ms ease, color 160ms ease;
}
.btn-hero:hover { color: #fff3d6; text-decoration: none; transform: translateY(-2px); filter: brightness(1.12); }
.btn-hero:active { transform: translateY(0); }
.btn-hero.is-primary { background: linear-gradient(180deg, #e6c47f, #b48d46 55%, #8e6c2f); color: var(--accent-ink); box-shadow: inset 0 1px 0 rgba(255, 250, 230, 0.6), inset 0 -2px 0 rgba(60, 40, 10, 0.45); }
.btn-hero.is-primary:hover { color: var(--accent-ink); }

/* ---------------- A. Hero ---------------- */
@property --hero-tint { syntax: '<color>'; inherits: true; initial-value: #7fa69c; }

.hero {
  --gutter: var(--s-6);
  --hero-tint: #c9a45c;
  --inner: min(100% - 2 * var(--gutter), var(--container) - 2 * var(--s-6));
  position: relative;
  margin-top: calc(-1 * var(--header-h));
  padding: calc(var(--header-h) + var(--s-6)) 0 var(--s-7);
  background: radial-gradient(70% 90% at 12% 30%, color-mix(in srgb, var(--hero-tint) 12%, transparent) 0%, transparent 70%), linear-gradient(180deg, #0b0a08 0%, transparent 40%);
  transition: --hero-tint 900ms ease;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns:
    [full-start] minmax(var(--gutter), 1fr)
    [copy-start] calc(var(--inner) * 0.4)
    [art-start] calc(var(--inner) * 0.6)
    [content-end] minmax(var(--gutter), 1fr)
    [full-end];
  grid-template-rows: 1fr auto;
  row-gap: var(--s-6);
}
.hero-copy { grid-column: copy-start / art-start; grid-row: 1; align-self: center; padding-right: var(--s-7); }
.hero-strip { grid-column: copy-start / art-start; grid-row: 2; align-self: end; padding-right: var(--s-7); }
.hero-stage { grid-column: art-start / full-end; grid-row: 1 / span 2; min-width: 0; }

.hero-kicker { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2); }
.hero-title {
  margin-top: var(--s-4);
  font-size: clamp(2.75rem, 4.6vw, 4.25rem);
  line-height: 0.94;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}
.hero-title-line { display: block; color: color-mix(in srgb, var(--hero-tint) 70%, var(--text)); }
.hero-lede { margin-top: var(--s-4); max-width: 42ch; font-size: 1.0625rem; color: var(--text-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }

/* Featured games strip: also the showcase picker. */
.strip-label { font-family: var(--font-display); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: var(--s-2); padding-top: var(--s-2); border-top: 1px solid var(--line); }
.strip-item { display: grid; gap: 6px; align-content: start; min-width: 0; padding: 0; border: 0; background: none; color: var(--text-3); text-align: left; cursor: pointer; }
.strip-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 2px; background: #060606; }
.strip-thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.7) brightness(0.62); transition: filter 200ms ease; }
.strip-thumb::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--game); transform: scaleX(0); transform-origin: left; transition: transform 200ms ease; }
.strip-fallback { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; padding: 4px; font-family: var(--font-display); font-size: 0.625rem; font-weight: 600; text-align: center; text-transform: uppercase; color: var(--text-3); background: var(--surface-2); }
.strip-thumb.is-missing img { display: none; }
.strip-thumb.is-missing .strip-fallback { display: flex; }
.strip-item.is-missing { opacity: 0.6; }
.strip-name { font-family: var(--font-display); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.05em; line-height: 1.2; text-transform: uppercase; }
.strip-item:hover { color: var(--text-2); }
.strip-item:hover .strip-thumb img { filter: grayscale(0.2) brightness(0.85); }
.strip-item[aria-pressed='true'] { color: var(--text); }
.strip-item[aria-pressed='true'] .strip-thumb { border-color: var(--game); }
.strip-item[aria-pressed='true'] .strip-thumb img { filter: none; }
.strip-item[aria-pressed='true'] .strip-thumb::after { transform: scaleX(1); }
.strip-item:focus-visible { outline: none; }
.strip-item:focus-visible .strip-thumb { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Showcase frame: fixed 16:9, so nothing moves while images load. */
.showcase-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #060606;
  border: 1px solid var(--line-strong);
  border-right: 0;
}
.showcase-frame.skeleton { border-radius: 0; }
.showcase-slide { position: absolute; inset: 0; opacity: 0; background: #060606; transition: opacity 650ms ease; }
.showcase-slide.is-active { opacity: 1; z-index: 2; }
.showcase-slide.is-prev { opacity: 1; z-index: 1; transition: none; }
.showcase-img { width: 100%; height: 100%; object-fit: cover; }
.showcase-img.is-contain { object-fit: contain; }
.is-pixelated { image-rendering: pixelated; }
.showcase-slide.is-active .showcase-img { animation: showcase-in 2400ms cubic-bezier(0.2, 0.6, 0.2, 1) both; }
@keyframes showcase-in {
  from { transform: scale(1.07) translateX(1.2%); }
  to { transform: none; }
}
/* Torchlit vignette over the artwork. */
.showcase-frame::after { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(0, 0, 0, 0.6); }

/* Caption bar under the artwork. */
.showcase-caption {
  --game: var(--accent);
  position: relative;
  min-height: 60px;
  padding: 10px max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--s-6))) 10px var(--s-4);
  border: 1px solid var(--line-strong);
  border-top: 0;
  border-right: 0;
  background: var(--surface);
}
.showcase-progress { position: absolute; left: 0; right: 0; top: 0; height: 2px; }
.showcase-progress-fill { display: block; width: 0; height: 100%; background: var(--game); }
.showcase-progress-fill.is-full { width: 100%; opacity: 0.5; }
@keyframes showcase-progress { from { width: 0; } to { width: 100%; } }
.showcase-caption-inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--s-4); }
.showcase-count { font-size: var(--fs-xs); color: var(--text-3); }
.showcase-title { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; line-height: 1.15; text-transform: uppercase; letter-spacing: 0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.showcase-meta { display: flex; align-items: center; gap: 8px; margin-top: 2px; font-size: var(--fs-xs); color: var(--game); }
.showcase-link { font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.showcase-controls { display: flex; gap: 4px; }
.showcase-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--text-2);
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}
.showcase-btn:hover { color: var(--text); border-color: var(--text-3); }
.showcase-toggle { min-width: 58px; font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; }

/* Reduced motion: no zoom, no fades, no animated progress. */
@media (prefers-reduced-motion: reduce) {
  .hero { transition: none; }
  .showcase-slide { transition: none; }
  .showcase-slide.is-active .showcase-img { animation: none; }
  .showcase-progress { display: none; }
  .btn-hero, .strip-thumb img, .strip-thumb::after { transition: none; }
}
:root[data-reduce-motion='true'] .hero { transition: none; }
:root[data-reduce-motion='true'] .showcase-slide { transition: none; }
:root[data-reduce-motion='true'] .showcase-slide.is-active .showcase-img { animation: none; }
:root[data-reduce-motion='true'] .showcase-progress { display: none; }

/* ---------------- A2. Gaming news ticker ---------------- */
/* A "next stops" display: a track along the top, one stop per story. */
.ticker { background: var(--bg-sunken); border-bottom: 1px solid var(--line); }
.ticker-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 12px var(--s-6) 14px;
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 0 var(--s-4);
  align-items: start;
}
.ticker-head { display: grid; gap: 4px; align-content: start; padding-top: 2px; }
.ticker-label { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); }
.ticker-label { color: var(--accent); }
.ticker-source { font-style: italic; font-size: var(--fs-xs); color: var(--text-3); }
.ticker-source a { color: var(--text-2); }
.ticker-controls { display: flex; gap: 4px; margin-top: 4px; }
.ticker-btn { width: 28px; height: 26px; border: 1px solid var(--line-strong); border-radius: 2px; background: transparent; color: var(--text-2); font-size: var(--fs-md); line-height: 1; cursor: pointer; }
.ticker-btn:hover:not(:disabled) { color: var(--text); border-color: var(--text-3); }
.ticker-btn:disabled { opacity: 0.35; cursor: default; }

.ticker-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  /* Fade the right edge so the next card reads as "more to come". */
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent);
}
.ticker.at-end .ticker-viewport { -webkit-mask-image: none; mask-image: none; }
.ticker-viewport::-webkit-scrollbar { display: none; }
.ticker-viewport:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ticker-track { list-style: none; position: relative; display: flex; width: max-content; padding-top: 14px; }
.ticker-track::before { content: ''; position: absolute; top: 5px; left: 0; right: 0; height: 3px; background: #0a0907; box-shadow: 0 1px 0 rgba(255, 236, 190, 0.06); }
.ticker-stop { position: relative; flex: 0 0 312px; padding-right: 12px; scroll-snap-align: start; }
.ticker-stop .stop-dot { position: absolute; top: -14px; left: 12px; width: 8px; height: 13px; background: var(--line-strong); clip-path: polygon(50% 0, 100% 30%, 100% 100%, 0 100%, 0 30%); }
.ticker-stop.is-latest .stop-dot { background: var(--accent); }
.ticker-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
  height: 100%;
  margin-top: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  transition: border-color 150ms ease;
}
a.ticker-card:hover { text-decoration: none; color: var(--text); border-color: var(--game, var(--accent)); }
.ticker.is-examples .ticker-card { opacity: 0.85; }
.news-thumb { position: relative; display: block; width: 88px; height: 50px; overflow: hidden; border-radius: 2px; background: #060606; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-fallback { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; padding: 4px; text-align: center; font-family: var(--font-display); font-size: 0.625rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-2); background: linear-gradient(135deg, color-mix(in srgb, var(--game, var(--text-3)) 30%, var(--surface-2)), var(--surface-2)); }
.news-thumb.is-missing img { display: none; }
.news-thumb.is-missing .thumb-fallback { display: flex; }
.news-text { display: grid; gap: 2px; min-width: 0; align-content: start; }
.news-game { font-family: var(--font-display); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--game, var(--accent)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-headline { font-size: var(--fs-sm); font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-summary-line { font-size: 0.6875rem; line-height: 1.4; color: var(--text-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-meta-line { display: flex; align-items: center; gap: 8px; margin-top: 2px; font-size: var(--fs-xs); font-style: italic; color: var(--text-3); }
.ticker-stop.is-end { flex-basis: 180px; }
.ticker-more { display: flex; align-items: center; height: 100%; min-height: 70px; margin-top: 6px; padding: 8px 12px; font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.ticker-empty { margin-top: 6px; font-size: var(--fs-sm); color: var(--text-3); }
@media (prefers-reduced-motion: reduce) { .ticker-card { transition: none; } }

/* ---------------- B. Catalogue ---------------- */
.catalogue { padding-block: var(--s-7); background: var(--surface); border-bottom: 1px solid var(--line); }
.status-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.status-legend li { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--text-2); }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s-4); }
.chip {
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: transparent;
  color: var(--text-2);
  font-size: var(--fs-xs);
  font-weight: 500;
  cursor: pointer;
  transition: color var(--t), border-color var(--t), background-color var(--t);
}
.chip:hover { color: var(--text); border-color: #4a453f; }
.chip[aria-pressed='true'] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

.catalogue-grid { list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 276px; grid-auto-flow: dense; gap: 12px; }
.catalogue-grid > .empty { grid-column: 1 / -1; }
.tile { min-width: 0; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--bg); overflow: hidden; transition: border-color var(--t); }
.tile:hover, .tile:focus-within { border-color: var(--game); }
.tile-cover { position: relative; overflow: hidden; background: var(--surface-2); }
.tile-cover > img, .tile-cover > svg { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 300ms ease; }
.tile:hover .tile-cover > img, .tile:hover .tile-cover > svg { transform: scale(1.04); }
:root[data-reduce-motion='true'] .tile:hover .tile-cover > * { transform: none; }
@media (prefers-reduced-motion: reduce) { .tile:hover .tile-cover > * { transform: none; } }

/* Playable games take a 2 × 2 slot. */
.tile-featured { grid-column: span 2; grid-row: span 2; display: grid; grid-template-rows: minmax(140px, 1fr) auto; }
.tile-media { display: block; }
.tile-media .tile-cover { height: 100%; }
.tile-body { padding: var(--s-4); display: grid; gap: 6px; align-content: start; }
.tile-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tile-title { margin-top: 4px; font-size: var(--fs-xl); text-transform: uppercase; }
.tile-title a { color: var(--text); }
.tile-genre { font-size: var(--fs-xs); color: var(--game); font-weight: 500; }
.tile-text { font-size: var(--fs-sm); color: var(--text-2); }
.tile-body .btn { justify-self: start; margin-top: 6px; }
.system-list { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.system-list li { padding: 1px 6px; border: 1px solid var(--line); border-radius: 2px; font-size: 0.6875rem; color: var(--text-2); background: var(--surface); }

/* Games with artwork: wide tiles. */
.tile-art { grid-column: span 2; }
.art-link { display: flex; flex-direction: column; height: 100%; color: var(--text); }
.art-link:hover { color: var(--text); text-decoration: none; }
.tile-art .tile-cover { flex: 1; min-height: 0; background: #060606; }
.art-caption { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--bg); }
.art-text { display: grid; gap: 2px; min-width: 0; }
.art-title { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-systems { font-size: 0.6875rem; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-side { display: grid; justify-items: end; gap: 4px; flex-shrink: 0; }
.art-genre { font-size: 0.6875rem; color: var(--game); font-weight: 500; }

/* Planned games without artwork: posters. */
.tile-poster { display: flex; }
.poster-link { display: block; flex: 1; position: relative; color: var(--text); }
.poster-link:hover { text-decoration: none; color: var(--text); }
.tile-poster .tile-cover { height: 100%; }
.poster-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: grid;
  gap: 2px;
  padding: 10px 10px 9px;
  background: rgba(15, 14, 13, 0.88);
  border-top: 1px solid var(--line);
}
.poster-title { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-sm); line-height: 1.2; text-transform: uppercase; letter-spacing: 0.02em; }
.poster-meta { display: flex; justify-content: space-between; gap: 6px; font-size: 0.6875rem; color: var(--game); }
.poster-status { color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; }

/* The rest, as a list. */
.tile-more { background: var(--surface-2); }
.more-link { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 14px; color: var(--text); }
.more-link:hover { color: var(--text); text-decoration: none; }
.more-count { font-size: var(--fs-xl); line-height: 1; color: var(--text); }
.more-label { font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.more-list { list-style: none; display: grid; gap: 3px; margin-top: 8px; font-size: var(--fs-xs); color: var(--text-2); }
.more-cta { margin-top: auto; font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }

/* ---------------- C. How it works ----------------
   A sticky intro beside a numbered route. Each step pairs short copy with
   an illustration; even steps swap sides. Steps light up on scroll
   (js/pages/home.js adds .is-in); with reduced motion they render lit. */
.how { position: relative; padding-block: var(--s-8); border-top: 1px solid var(--line); --how: var(--accent); }
.how-layout { display: grid; grid-template-columns: minmax(270px, 360px) minmax(0, 1fr); gap: var(--s-6) var(--s-8); align-items: start; }

.how-intro { position: sticky; top: calc(var(--header-h) + 28px); display: grid; gap: var(--s-4); }
.how-title { font-size: clamp(2rem, 3.1vw, 2.75rem); line-height: 0.94; text-transform: uppercase; letter-spacing: 0.005em; }
.how-title-line { display: block; color: var(--how); }
.how-lede { font-size: 1.0625rem; color: var(--text-2); max-width: 36ch; }
.how-intro .btn-hero { justify-self: start; }

.how-status { display: grid; gap: 6px; padding: var(--s-3) var(--s-4); border: 1px solid var(--line-strong); border-left: 3px solid var(--warn); border-radius: var(--r-sm); background: rgba(0, 0, 0, 0.25); font-size: var(--fs-sm); color: var(--text-2); }
.how-status strong { color: var(--text); font-weight: 600; }
.how-status-head { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--warn); }
.how-status-link { justify-self: start; font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.how-status-link::after { content: ' →'; }

/* The route */
.how-route { list-style: none; display: grid; counter-reset: none; }
.how-step {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 0.85fr) minmax(0, 1.15fr);
  grid-template-areas: 'marker copy visual';
  gap: var(--s-4) var(--s-6);
  align-items: center;
  padding-bottom: var(--s-7);
}
.how-step:nth-child(even) { grid-template-columns: 64px minmax(0, 1.15fr) minmax(0, 0.85fr); grid-template-areas: 'marker visual copy'; }
.how-step:last-child { padding-bottom: 0; }
/* Track and progress line between nodes */
.how-step::before, .how-step::after { content: ''; position: absolute; left: 31px; top: 30px; bottom: -2px; width: 2px; }
.how-step::before { background: rgba(0, 0, 0, 0.35); width: 3px; }
.how-step::after { display: none; }
.how-route { position: relative; }
.how-route .route-vine { position: absolute; }
.how-step:last-child::before, .how-step:last-child::after { display: none; }
.how-step.is-in::after { transform: scaleY(1); }

.how-marker { grid-area: marker; align-self: start; position: relative; z-index: 1; display: grid; justify-items: center; gap: 10px; padding-top: 2px; }
.how-node { width: 22px; height: 26px; clip-path: polygon(0 0, 100% 0, 100% 45%, 50% 100%, 0 45%); background: linear-gradient(180deg, #4a4337, #2c2820); transition: background 300ms; }
.how-step.is-in .how-node { background: linear-gradient(180deg, #e6c47f, #9c7a38); }
.how-num { font-family: var(--font-display); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; color: var(--text-3); background: var(--bg); padding-block: 2px; transition: color 300ms; }
.how-step.is-in .how-num { color: var(--text); }

.how-copy { grid-area: copy; display: grid; gap: var(--s-2); align-content: center; min-width: 0; }
.how-copy h3 { font-size: clamp(1.375rem, 2.1vw, 1.75rem); line-height: 1.05; text-transform: uppercase; letter-spacing: 0.01em; }
.how-copy p { font-size: var(--fs-md); color: var(--text-2); max-width: 46ch; }
.how-hint { font-size: var(--fs-sm) !important; color: var(--text-3) !important; }
.how-hint .tag { vertical-align: 1px; }
.how-facts { list-style: none; display: grid; gap: 5px; margin-top: 2px; font-size: var(--fs-sm); color: var(--text); }
.how-facts li { display: flex; gap: 10px; align-items: baseline; }
.how-facts li::before { content: ''; flex: none; width: 6px; height: 6px; transform: translateY(-1px) rotate(45deg); background: var(--how); }

/* Illustration frame, with the corner brackets used on hero buttons */
/* Illustrations sit on carved stone tablets. */
.how-visual { grid-area: visual; position: relative; min-width: 0; min-height: 200px; display: grid; align-items: center; padding: var(--s-5); border: 1px solid #3a342b; border-radius: var(--r); background: linear-gradient(180deg, #16140f, #0e0d0a); box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 236, 190, 0.04), 0 14px 30px rgba(0, 0, 0, 0.3); transition: transform 400ms ease; }
.how-step:hover .how-visual { transform: translateY(-3px); }

/* Entrance: only the illustration eases in; the copy is always readable. */
.how-route.is-animated .how-visual { transition: transform 700ms cubic-bezier(.2, .7, .2, 1); }
.how-route.is-animated .how-step:not(.is-in) .how-visual { transform: translateY(14px); }

/* Step 1: fanned covers */
.hv-fan { position: relative; height: 212px; overflow: hidden; margin: -8px; padding: 8px; }
.hv-card {
  position: absolute; left: 50%; bottom: 6px; width: 120px; height: 164px; margin: 0;
  border: 1px solid var(--line-strong); border-radius: var(--r); overflow: hidden; background: var(--surface);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  transform-origin: 50% 120%;
  transform: translateX(-50%) rotate(0deg);
  transition: transform 700ms cubic-bezier(.2, .7, .2, 1), border-color 200ms;
}
.hv-card img { width: 100%; height: 100%; object-fit: cover; }
.hv-card figcaption { position: absolute; inset: auto 0 0; padding: 14px 8px 6px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.85)); font-family: var(--font-display); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.how-step.is-in .hv-card { transform: translateX(calc(-50% + var(--i) * 46px)) rotate(calc(var(--i) * 6deg)); }
.how-step.is-in:hover .hv-card { transform: translateX(calc(-50% + var(--i) * 56px)) rotate(calc(var(--i) * 8deg)); }
.hv-card:nth-child(3) { z-index: 3; border-color: var(--game, var(--how)); }
.hv-card:nth-child(2), .hv-card:nth-child(4) { z-index: 2; }

/* Step 2: attributes and gear */
.hv-panel { display: grid; gap: 10px; font-size: var(--fs-xs); }
.hv-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.hv-budget { width: 90px; height: 4px; background: var(--surface-3); border-radius: 2px; overflow: hidden; }
.hv-budget-fill { display: block; height: 100%; width: 0; background: var(--warn); transition: width 900ms ease 500ms; }
.how-step.is-in .hv-budget-fill { width: 86%; }
.hv-meters { display: grid; gap: 7px; }
.hv-row { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 10px; }
.hv-key { color: var(--how); }
.hv-bar { height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.hv-bar > span { display: block; height: 100%; width: 0; background: var(--how); border-radius: 3px; transition: width 800ms cubic-bezier(.2, .7, .2, 1); transition-delay: calc(300ms + var(--d)); }
.how-step.is-in .hv-bar > span { width: var(--pct); }
.hv-slots { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.hv-slots li { display: grid; gap: 2px; padding: 7px 8px; border: 1px solid var(--line-strong); border-radius: 2px; background: var(--surface); }
.hv-slot-name { color: var(--text); }
.hv-slot-state { font-size: 0.6875rem; }
.hv-slots [data-tone='good'] .hv-slot-state { color: var(--good); }
.hv-slots [data-tone='bad'] { border-color: rgba(212, 121, 94, 0.5); }
.hv-slots [data-tone='bad'] .hv-slot-state { color: var(--bad); }

/* Step 3: stat pipeline and verdict */
.hv-read { display: grid; gap: var(--s-4); }
.hv-pipe { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.hv-pipe li { position: relative; display: grid; gap: 3px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 2px; background: var(--surface); opacity: 0.35; transition: opacity 400ms, border-color 400ms; transition-delay: calc(400ms + var(--d)); }
.hv-pipe li + li::before { content: '›'; position: absolute; left: -12px; top: 50%; transform: translateY(-50%); font-size: var(--fs-lg); color: var(--accent); }
.how-step.is-in .hv-pipe li { opacity: 1; }
.hv-pipe li.is-result { border-color: var(--how); }
.hv-pipe-label { font-family: var(--font-display); font-size: 0.625rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.hv-pipe-value { font-size: var(--fs-xs); color: var(--text); overflow-wrap: anywhere; }
.is-result .hv-pipe-value { color: var(--how); }
.hv-verdict { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: var(--fs-xs); }
.hv-verdict li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px; border: 1px solid var(--line); border-radius: 2px; color: var(--text-2); }
.hv-verdict li::before { font-weight: 700; }
.hv-verdict [data-tone='good']::before { content: '+'; color: var(--good); }
.hv-verdict [data-tone='bad']::before { content: '−'; color: var(--bad); }
.hv-verdict [data-tone='warn']::before { content: '!'; color: var(--warn); }

/* Step 4: saved build and backup */
.hv-save { display: grid; gap: var(--s-3); justify-items: start; }
.hv-file { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); }
.hv-file-icon { position: relative; width: 26px; height: 32px; border: 2px solid var(--how); border-radius: 2px; clip-path: polygon(0 0, 68% 0, 100% 26%, 100% 100%, 0 100%); }
.hv-file-icon::after { content: ''; position: absolute; left: 50%; top: 50%; width: 9px; height: 5px; border: solid var(--good); border-width: 0 0 2px 2px; transform: translate(-50%, -70%) rotate(-45deg) scale(0); transition: transform 300ms ease 700ms; }
.how-step.is-in .hv-file-icon::after { transform: translate(-50%, -70%) rotate(-45deg) scale(1); }
.hv-file-name { display: block; font-weight: 500; color: var(--text); font-size: var(--fs-sm); }
.hv-file-meta { display: block; font-size: var(--fs-xs); color: var(--text-3); }
.hv-actions { display: flex; flex-wrap: wrap; gap: 6px; font-size: var(--fs-xs); }
.hv-actions span { padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 2px; color: var(--text-2); font-family: var(--font-display); font-size: 0.6875rem; letter-spacing: 0.06em; }

/* After the route */
.how-later { grid-column: 2; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px var(--s-4); margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px solid var(--line-strong); }
.how-later-label { font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
.how-later-list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.how-later-list li { padding: 3px 10px; border: 1px solid var(--line); border-radius: 2px; background: rgba(0, 0, 0, 0.2); font-size: var(--fs-xs); font-style: italic; color: var(--text-2); }
.how-later-note { flex-basis: 100%; font-size: var(--fs-xs); color: var(--text-3); }

@media (prefers-reduced-motion: reduce) {
  .how-node, .how-num, .hv-card, .hv-bar > span, .hv-budget-fill, .hv-pipe li, .hv-file-icon::after, .how-visual { transition: none !important; }
}
:root[data-reduce-motion='true'] :is(.how-node, .how-num, .hv-card, .hv-bar > span, .hv-budget-fill, .hv-pipe li, .how-visual) { transition: none !important; }

/* ---------------- D. Example builds ---------------- */
.gallery { padding-block: var(--s-7); background: var(--bg-sunken); border-top: 1px solid var(--line); }
.gallery-grid { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(230px, auto); gap: 12px; }
.build-tile { display: grid; grid-template-rows: 130px 1fr; min-width: 0; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); overflow: hidden; transition: border-color var(--t); }
.build-tile:hover { border-color: var(--game); }
.build-art { overflow: hidden; border-bottom: 1px solid var(--line); background: #060606; }
.build-art svg, .build-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.build-tile.is-feature { grid-column: span 2; grid-row: span 2; grid-template-rows: 1fr auto; }
.build-tile.is-feature .build-art { min-height: 220px; }
.build-tile.is-tall { grid-row: span 2; grid-template-rows: 46% 1fr; }
.build-tile.is-wide { grid-column: span 2; grid-template-rows: none; grid-template-columns: 38% 1fr; }
.build-tile.is-wide .build-art { border-bottom: 0; border-right: 1px solid var(--line); }
.build-body { display: grid; gap: 6px; align-content: start; padding: var(--s-4); }
.build-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.build-game { font-size: var(--fs-xs); font-weight: 500; color: var(--game); }
.build-name { font-size: var(--fs-md); text-transform: uppercase; letter-spacing: 0.02em; }
.is-feature .build-name, .is-wide .build-name { font-size: var(--fs-lg); }
.build-desc { font-size: var(--fs-sm); color: var(--text-2); }
.build-highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 6px 0 0; border: 1px solid var(--line); border-radius: 2px; }
.build-highlights > div { padding: 6px 8px; min-width: 0; }
.build-highlights > div + div { border-left: 1px solid var(--line); }
.build-highlights dt { font-size: 0.625rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.build-highlights dd { margin: 0; font-size: var(--fs-md); font-weight: 500; }
.build-highlights [data-tone='good'] dd { color: var(--good); }
.build-highlights [data-tone='bad'] dd { color: var(--bad); }
.build-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); font-size: var(--fs-xs); color: var(--text-3); }
.build-foot a { font-weight: 500; }

/* ---------------- E. News ---------------- */
.news { padding-block: var(--s-7) var(--s-8); border-top: 1px solid var(--line); }
.news-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 12px; align-items: stretch; }
.news-list { display: grid; gap: 12px; }
.news-card { min-width: 0; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.news-card.is-example { opacity: 0.9; }
.news-card.is-highlight { display: grid; grid-template-columns: 34% minmax(0, 1fr); }
.news-art { min-height: 220px; border-right: 1px solid var(--line-strong); background: var(--surface-2); }
.news-art svg, .news-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.news-art-empty {
  display: flex; align-items: center; justify-content: center; gap: 10px; height: 100%;
  background: repeating-linear-gradient(135deg, transparent 0 10px, rgba(235, 230, 220, 0.025) 10px 20px);
  font-family: var(--font-display); font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3);
}
.news-body { display: grid; gap: 6px; align-content: start; padding: var(--s-4); }
.is-highlight .news-body { padding: var(--s-5); }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--fs-xs); }
.news-kind { font-family: var(--font-display); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.news-title { font-size: var(--fs-md); line-height: 1.25; }
.is-highlight .news-title { font-size: var(--fs-xl); }
.news-title a { color: var(--text); }
.news-summary { font-size: var(--fs-sm); color: var(--text-2); }
.news-source { font-size: var(--fs-xs); color: var(--text-3); }

/* ---------------- Responsive ---------------- */
@media (max-width: 1180px) {
  .catalogue-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .how-layout { grid-template-columns: 1fr; gap: var(--s-7); }
  .how-intro { position: static; max-width: 64ch; }
  .how-later { grid-column: 1; }
  .hero-title { font-size: clamp(2.5rem, 5vw, 3.75rem); }
  .strip { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 96px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
}
@media (max-width: 820px) {
  .how-step, .how-step:nth-child(even) { grid-template-columns: 44px minmax(0, 1fr); grid-template-areas: 'marker copy' 'marker visual'; gap: var(--s-4); }
  .how-step::before, .how-step::after { left: 21px; }
  .how-visual { min-height: 0; padding: var(--s-4); }
}
@media (max-width: 960px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-grid { grid-template-columns: 1fr; }
}

/* Hero stacks: copy, artwork (full width), strip. */
@media (max-width: 900px) {
  .hero { --gutter: var(--s-5); padding: calc(var(--header-h) + var(--s-5)) 0 var(--s-6); }
  .hero-grid { grid-template-columns: [full-start] var(--gutter) [copy-start art-start] minmax(0, 1fr) [content-end] var(--gutter) [full-end]; grid-template-rows: auto auto auto; row-gap: var(--s-5); }
  .hero-copy { grid-column: copy-start / content-end; grid-row: 1; padding-right: 0; }
  .hero-stage { grid-column: full-start / full-end; grid-row: 2; }
  .hero-strip { grid-column: copy-start / content-end; grid-row: 3; padding-right: 0; }
  .hero-title { font-size: clamp(2.5rem, 9vw, 3.75rem); }
  .showcase-frame { border-inline: 0; }
  .showcase-caption { border-inline: 0; padding-inline: var(--gutter); }
  .strip { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 108px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
}

@media (max-width: 900px) {
  .ticker-inner { grid-template-columns: 1fr; padding-inline: var(--s-5); gap: 8px; }
  .ticker-head { grid-template-columns: auto auto 1fr; align-items: center; gap: 12px; }
  .ticker-controls { margin: 0 0 0 auto; }
}
@media (max-width: 640px) {
  .hero { --gutter: var(--s-4); }
  .ticker-inner { padding-inline: var(--s-4); }
  .ticker-stop { flex-basis: 272px; }
  .showcase-caption-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 6px var(--s-3); }
  .showcase-count { display: none; }
  .showcase-link { grid-column: 1; grid-row: 2; }
  .showcase-controls { grid-column: 2; grid-row: 1 / span 2; }
  .hero-actions .btn-hero { flex: 1 1 140px; padding-inline: 12px; }
  .section-head h2 { font-size: var(--fs-xl); }
  .catalogue, .gallery { padding-block: var(--s-6); }
  .how { padding-block: var(--s-7); }
  .news { padding-block: var(--s-6) var(--s-7); }
  .catalogue-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; gap: 10px; }
  .tile-featured { grid-column: 1 / -1; grid-row: auto; grid-template-rows: 120px auto; }
  .tile-art { grid-column: auto; }
  .tile-art .tile-cover { flex: none; aspect-ratio: 16 / 10; }
  .art-caption { flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px 10px; }
  .art-title { font-size: var(--fs-sm); white-space: normal; }
  .art-systems { display: none; }
  .art-side { justify-items: start; grid-auto-flow: column; align-items: center; gap: 6px; }
  .tile-poster .tile-cover { height: auto; aspect-ratio: 3 / 4; }
  .tile-more { grid-column: 1 / -1; }
  .chip-row { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin-inline: calc(var(--s-4) * -1); padding-inline: var(--s-4); }
  .chip { flex-shrink: 0; }
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .build-tile.is-feature, .build-tile.is-tall, .build-tile.is-wide { grid-column: auto; grid-row: auto; grid-template-columns: none; grid-template-rows: 160px auto; }
  .build-tile.is-wide .build-art { border-right: 0; border-bottom: 1px solid var(--line); }
  .build-tile.is-feature .build-art { min-height: 0; }
  .news-card.is-highlight { grid-template-columns: 1fr; }
  .news-art { min-height: 140px; height: 140px; border-right: 0; border-bottom: 1px solid var(--line-strong); }
  .section-link { margin-left: 0; }
  .hv-fan { height: 170px; }
  .hv-card { width: 96px; height: 132px; }
  .how-step.is-in .hv-card { transform: translateX(calc(-50% + var(--i) * 40px)) rotate(calc(var(--i) * 6deg)); }
  .how-step.is-in:hover .hv-card { transform: translateX(calc(-50% + var(--i) * 44px)) rotate(calc(var(--i) * 7deg)); }
  .hv-pipe { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hv-pipe li:nth-child(3)::before { display: none; }
  .hv-slots { grid-template-columns: 1fr; }
  .hv-slots li { grid-template-columns: 1fr auto; align-items: center; }
}
