/* Hallmark · genre: atmospheric · macrostructure: Conversational FAQ · tone: steel-crimson-brawler
 * theme: Midnight · nav: N3 Pill cluster · footer: Ft8 Marquee scroll
 * enrichment: real Steam app 2377420 screenshots · axes: dark / soft-display / steel-crimson
 * pre-emit critique: P4 H5 E5 S5 R4 V5
 * Differs from Map/Photographic Midnight: Conversational FAQ + steel-crimson + N3/Ft8
 */

@import "./tokens.css";

html,
body {
  overflow-x: clip;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-body);
  background:
    radial-gradient(ellipse 55% 40% at 8% 0%, oklch(42% 0.12 25 / 0.22), transparent 58%),
    radial-gradient(ellipse 45% 35% at 92% 12%, oklch(48% 0.06 250 / 0.18), transparent 55%),
    linear-gradient(180deg, var(--color-paper-2), var(--color-paper) 32%);
  background-attachment: fixed;
  line-height: 1.7;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  min-width: 0;
  color: var(--color-ink);
  margin: 0 0 var(--space-sm);
}
p {
  margin: 0 0 var(--space-md);
}
a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover {
  text-decoration-thickness: 2px;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
.shell {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}
.shell-wide {
  width: min(100% - 2rem, var(--max-wide));
  margin-inline: auto;
}
.kicker {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-2);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ——— N3 Pill cluster (midnight steel-crimson) ——— */
.site-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 0 var(--space-lg);
  background: oklch(12% 0.025 290 / 0.88);
  border-bottom: var(--rule) solid var(--color-line);
  backdrop-filter: blur(14px) saturate(120%);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  flex-shrink: 0;
  white-space: nowrap;
}
.brand img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 999px;
  border: var(--rule) solid var(--color-line);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0 auto;
  padding: 4px;
  background: oklch(18% 0.03 285 / 0.7);
  border: var(--rule) solid var(--color-line);
  border-radius: 999px;
}
.nav-links a {
  color: var(--color-ink-muted);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 999px;
  transition:
    color var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out);
}
.nav-links a:hover {
  color: var(--color-ink);
  background: oklch(26% 0.04 280 / 0.8);
}
.nav-links a[aria-current="page"] {
  color: var(--color-ink);
  background: var(--color-accent);
}
.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  flex-shrink: 0;
}
.nav-toggle {
  display: none;
  min-height: 44px;
  padding: 8px 14px;
  border: var(--rule) solid var(--color-line);
  background: oklch(18% 0.03 285 / 0.7);
  color: var(--color-ink);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  border-radius: 999px;
}
.nav-toggle:focus-visible,
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}
@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
  }
  .site-nav .btn-primary {
    display: none;
  }
  .nav-links {
    position: absolute;
    top: calc(100% + 6px);
    left: var(--space-md);
    right: var(--space-md);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin: 0;
    padding: var(--space-sm);
    border-radius: var(--radius-md);
  }
  .nav-links.is-open {
    display: flex;
  }
  .nav-links a {
    text-align: center;
  }
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1.15rem;
  border: var(--rule) solid var(--color-line);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    filter var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}
.btn-primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: oklch(98% 0.01 30);
}
.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent;
  color: var(--color-ink);
  border-color: var(--color-line);
}
.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  min-height: auto;
  padding: 0.35rem 0.2rem;
}
.btn-ghost:hover {
  text-decoration-thickness: 2px;
}
.site-nav .btn-primary {
  min-height: 36px;
  padding: 0 0.95rem;
  border-radius: 999px;
  font-size: var(--text-xs);
}

/* ——— Conversational FAQ hero ——— */
.chat-hero {
  position: relative;
  min-height: min(88vh, 820px);
  display: flex;
  align-items: flex-end;
  padding: calc(var(--nav-h) + var(--space-2xl)) 0 var(--space-3xl);
  isolation: isolate;
  overflow: clip;
}
.chat-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.chat-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  animation: hero-drift 22s ease-in-out infinite alternate;
}
.chat-hero__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, oklch(10% 0.03 290 / 0.92) 0%, oklch(12% 0.025 285 / 0.55) 52%, oklch(12% 0.025 285 / 0.28) 100%),
    linear-gradient(180deg, oklch(10% 0.03 290 / 0.3) 0%, oklch(10% 0.03 290 / 0.12) 38%, oklch(10% 0.03 290 / 0.9) 100%);
  pointer-events: none;
}
.chat-hero .shell {
  max-width: 38rem;
}
.chat-hero h1 {
  font-size: var(--text-display);
  margin-bottom: var(--space-sm);
}
.chat-hero h1 .en {
  display: block;
  margin-top: var(--space-xs);
  font-size: var(--text-display-s);
  font-weight: 600;
  color: var(--color-accent-2);
  letter-spacing: 0.02em;
}
.lede {
  font-size: var(--text-xl);
  color: var(--color-body);
  max-width: 34rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}
.aka {
  margin-top: var(--space-md);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-ink-muted);
  letter-spacing: 0.02em;
}

/* ——— Sections ——— */
.section {
  padding: var(--space-3xl) 0;
}
.section-head {
  margin-bottom: var(--space-xl);
  max-width: 42rem;
}
.section-head h2 {
  font-size: var(--text-display-s);
}
.section-head p {
  color: var(--color-ink-muted);
  margin: 0;
}
.page-hero {
  padding: calc(var(--nav-h) + var(--space-2xl)) 0 var(--space-xl);
}
.page-hero h1 {
  font-size: var(--text-display-s);
}
.crumbs {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-ink-muted);
  margin-bottom: var(--space-sm);
}
.crumbs a {
  color: var(--color-ink-muted);
  text-decoration: none;
}
.crumbs a:hover {
  color: var(--color-accent);
}

/* ——— Conversational FAQ flow ——— */
.faq-flow {
  display: grid;
  gap: var(--space-lg);
  max-width: 40rem;
}
.chat-turn {
  display: grid;
  gap: var(--space-sm);
  min-width: 0;
}
.chat-q {
  margin: 0;
  font-family: var(--font-display);
  font-style: normal;
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--color-ink);
  overflow-wrap: anywhere;
  min-width: 0;
}
.chat-q::before {
  content: "Q";
  display: inline-block;
  margin-right: var(--space-xs);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  vertical-align: 0.15em;
}
.chat-a {
  margin: 0;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-paper-2);
  border: var(--rule) solid var(--color-line);
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--color-body);
  min-width: 0;
}
.chat-a p:last-child {
  margin-bottom: 0;
}
.chat-a a {
  font-weight: 600;
}
.chat-shot {
  margin: var(--space-sm) 0 0;
  border: var(--rule) solid var(--color-line);
  border-radius: var(--radius-sm);
  overflow: clip;
}
.chat-shot img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.chat-shot figcaption {
  padding: var(--space-xs) var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-ink-muted);
  background: var(--color-paper-3);
}

/* ——— Info / gallery / download ——— */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--rule);
  border: var(--rule) solid var(--color-line);
  border-radius: var(--radius-md);
  overflow: clip;
  background: var(--color-line);
}
.info-cell {
  background: var(--color-paper-2);
  padding: var(--space-md) var(--space-lg);
  min-width: 0;
}
.info-cell dt {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-ink-muted);
  margin: 0 0 4px;
}
.info-cell dd {
  margin: 0;
  color: var(--color-ink);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
  min-width: 0;
}
@media (max-width: 720px) {
  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 420px) {
  .info-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
}
.gallery-item {
  display: block;
  width: 100%;
  padding: 0;
  border: var(--rule) solid var(--color-line);
  border-radius: var(--radius-sm);
  overflow: clip;
  background: var(--color-paper-3);
  cursor: zoom-in;
  min-width: 0;
  transition: border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.gallery-item:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.gallery-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}
.gallery-tabs button {
  min-height: 40px;
  padding: 0 14px;
  border: var(--rule) solid var(--color-line);
  border-radius: 999px;
  background: transparent;
  color: var(--color-ink-muted);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  cursor: pointer;
}
.gallery-tabs button.is-active,
.gallery-tabs button:hover {
  color: var(--color-ink);
  border-color: var(--color-accent);
  background: oklch(22% 0.04 280 / 0.6);
}
@media (max-width: 800px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 420px) {
  .gallery-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.download-band {
  padding: var(--space-2xl);
  border: var(--rule) solid var(--color-line);
  border-radius: var(--radius-md);
  background:
    radial-gradient(ellipse 60% 80% at 0% 50%, oklch(42% 0.14 25 / 0.2), transparent 70%),
    var(--color-paper-2);
}
.download-band h2 {
  font-size: var(--text-display-s);
}
.download-band p {
  color: var(--color-ink-muted);
  max-width: 36rem;
}
.band-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.timeline {
  display: grid;
  gap: var(--space-md);
  border-left: 2px solid var(--color-accent);
  padding-left: var(--space-lg);
}
.timeline-item {
  position: relative;
  min-width: 0;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--space-lg) - 5px);
  top: 0.45em;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--color-accent);
}
.timeline-item h3 {
  font-size: var(--text-xl);
}
.timeline-item p {
  color: var(--color-ink-muted);
  margin: 0;
}

.faq-list {
  display: grid;
  gap: var(--space-sm);
}
.faq-item {
  border: var(--rule) solid var(--color-line);
  border-radius: var(--radius-sm);
  background: var(--color-paper-2);
  padding: 0 var(--space-md);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  min-height: 48px;
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 600;
  color: var(--color-ink);
  overflow-wrap: anywhere;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-a {
  margin: 0 0 var(--space-md);
  color: var(--color-body);
  padding-bottom: var(--space-sm);
  border-top: var(--rule) solid var(--color-line);
  padding-top: var(--space-sm);
}

.article-grid,
.guide-grid,
.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}
.article-card,
.platform-card,
.guide-card {
  display: block;
  min-width: 0;
  padding: var(--space-lg);
  border: var(--rule) solid var(--color-line);
  border-radius: var(--radius-sm);
  background: var(--color-paper-2);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.article-card:hover,
.platform-card:hover,
.guide-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
}
.article-card h3,
.platform-card h3,
.guide-card h3 {
  font-size: var(--text-xl);
}
.article-card p,
.platform-card p,
.guide-card p {
  margin: 0;
  color: var(--color-ink-muted);
  font-size: var(--text-sm);
}
.platform-card a {
  display: inline-block;
  margin-top: var(--space-sm);
  font-weight: 600;
}
.steps {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: var(--space-sm);
}
.steps li {
  padding-left: 4px;
}
@media (max-width: 640px) {
  .article-grid,
  .guide-grid,
  .platform-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .section-head {
    max-width: none;
  }
}

.final-cta {
  padding: var(--space-4xl) 0;
  text-align: center;
  background:
    radial-gradient(ellipse 50% 60% at 50% 100%, oklch(40% 0.14 25 / 0.18), transparent 70%),
    var(--color-paper);
  border-top: var(--rule) solid var(--color-line);
}
.final-cta h2 {
  font-size: var(--text-display-s);
}
.final-cta p {
  color: var(--color-ink-muted);
  max-width: 36rem;
  margin-inline: auto;
}
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

/* ——— Article body ——— */
.article-body {
  width: min(100% - 2rem, 720px);
  margin: 0 auto var(--space-4xl);
  padding: var(--space-xl);
  border: var(--rule) solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-paper-2);
  min-width: 0;
}
.article-body h2 {
  font-size: var(--text-4xl);
  margin-top: var(--space-xl);
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-lg) 0;
  font-size: var(--text-sm);
}
.article-body th,
.article-body td {
  border: var(--rule) solid var(--color-line);
  padding: 10px 12px;
  text-align: left;
  overflow-wrap: anywhere;
  min-width: 0;
}
.article-body th {
  background: var(--color-paper-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: var(--color-ink-muted);
  font-weight: 500;
}
.article-body .checklist {
  margin: 0;
  padding-left: 1.2rem;
}
.article-body .checklist li {
  margin-bottom: 6px;
}

/* ——— Lightbox ——— */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: var(--space-lg);
  background: oklch(8% 0.02 290 / 0.9);
  backdrop-filter: blur(8px);
}
.lightbox.is-open {
  display: grid;
}
.lightbox img {
  max-width: min(96vw, 1100px);
  max-height: 78vh;
  object-fit: contain;
  border: var(--rule) solid var(--color-line);
  border-radius: var(--radius-sm);
}
.lightbox-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
}
.lightbox-ui {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

/* ——— Ft8 Marquee scroll footer ——— */
.site-footer {
  border-top: 2px solid var(--color-accent);
  background: var(--color-paper);
  overflow: clip;
}
.footer-marquee {
  overflow: hidden;
  border-bottom: var(--rule) solid var(--color-line);
}
.footer-marquee__track {
  display: flex;
  gap: var(--space-2xl);
  white-space: nowrap;
  padding-block: var(--space-md);
  animation: foot-marquee 36s linear infinite;
  width: max-content;
}
.footer-marquee__track span {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: clamp(1rem, 2.4vw, 1.45rem);
  color: var(--color-ink);
}
.footer-marquee__track .dot {
  color: var(--color-accent);
  margin: 0 0.35em;
}
.footer-body {
  padding: var(--space-2xl) 0 var(--space-xl);
}
.footer-meta {
  display: grid;
  gap: var(--space-md);
  font-size: var(--text-xs);
  color: var(--color-ink-muted);
}
.footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-ink);
  font-family: var(--font-display);
  font-weight: 700;
}
.footer-brand img {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: var(--rule) solid var(--color-line);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-links a {
  color: var(--color-ink-muted);
  text-decoration: none;
  white-space: nowrap;
}
.footer-links a:hover {
  color: var(--color-accent);
}
.related-games span {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.related-games ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}
.related-games a {
  color: var(--color-ink-muted);
  text-decoration: none;
}
.related-games a:hover {
  color: var(--color-accent);
}
.footer-legal {
  margin-top: var(--space-md);
  max-width: 56ch;
  line-height: 1.6;
}
.footer-legal p {
  margin: 0 0 4px;
}

/* ——— Motion ——— */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity var(--dur-med) var(--ease-out),
    transform var(--dur-med) var(--ease-out);
}
.reveal.is-in,
.reveal.visible {
  opacity: 1;
  transform: none;
}
.chat-turn {
  opacity: 0;
  transform: translateY(10px);
  animation: chat-in 0.5s var(--ease-out) forwards;
}
.chat-turn:nth-child(1) {
  animation-delay: 0.04s;
}
.chat-turn:nth-child(2) {
  animation-delay: 0.1s;
}
.chat-turn:nth-child(3) {
  animation-delay: 0.16s;
}
.chat-turn:nth-child(4) {
  animation-delay: 0.22s;
}
.chat-turn:nth-child(5) {
  animation-delay: 0.28s;
}
.chat-turn:nth-child(6) {
  animation-delay: 0.34s;
}
.chat-turn:nth-child(7) {
  animation-delay: 0.4s;
}
.chat-turn:nth-child(8) {
  animation-delay: 0.46s;
}
@keyframes chat-in {
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes hero-drift {
  from {
    transform: scale(1.02) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.06) translate3d(-1.2%, 1%, 0);
  }
}
@keyframes foot-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal,
  .chat-turn {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }
  .chat-hero__bg img {
    animation: none;
  }
  .footer-marquee__track {
    animation: none;
  }
  .btn-primary:hover,
  .gallery-item:hover,
  .article-card:hover {
    transform: none;
  }
}
