/* ============================================================
   HAGE GAME · A Journal of Playable Things
   Stylesheet — v1.0 · 2026-05-12
   ============================================================ */

/* -------- Fonts -------- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,700;9..144,900&family=IBM+Plex+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;600&family=Noto+Serif+SC:wght@400;500;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

/* -------- Tokens -------- */
:root {
  /* Color */
  --bg: #FAFAF6;
  --bg-elev: #FFFFFF;
  --bg-band: #F2EFE6;
  --ink: #0A0A0A;
  --ink-2: #3C3C40;
  --ink-3: #707075;  /* WCAG AA 4.71:1 */
  --ink-4: #B5B5B8;
  --line: #E6E2D6;
  --line-strong: #1A1A1A;
  --brand: #FF4D1F;
  --brand-ink: #B33009;
  --brand-soft: #FFE7DD;
  --accent: #0E1538;
  --gold: #C8A24B;
  --good: #1F7A4D;
  --warn: #B65A00;

  /* Type */
  --f-display: 'Fraunces', 'Noto Serif SC', Georgia, serif;
  --f-body: 'IBM Plex Sans', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
  --f-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

  /* Layout */
  --maxw: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 4px;
  --radius-lg: 14px;

  /* Motion */
  --ease: cubic-bezier(.2,.7,.2,1);
  --t-fast: 160ms;
  --t-med: 320ms;
  --t-slow: 600ms;
}

/* -------- Reset -------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; }
input, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Skip-link 可访问性 */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 12px 16px;
  z-index: 9999; font-weight: 600;
}
.skip-link:focus { left: 8px; top: 8px; }

/* -------- Container -------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ============================================================
   HEADER · Top Banner + Nav
   ============================================================ */
.top-band {
  background: var(--ink);
  color: #fff;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 0;
}
.top-band__inner {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  flex-wrap: wrap;
}
.top-band__pill {
  display: inline-flex; align-items: center; gap: 8px;
}
.top-band__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand);
  animation: pulse 2s var(--ease) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.4); }
}

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(180%) blur(8px);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
  gap: 24px;
}
.brand {
  display: inline-flex; align-items: baseline; gap: 10px;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 26px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.brand__mark {
  width: 28px; height: 28px;
  background: var(--brand);
  border-radius: 4px;
  display: inline-block;
  position: relative;
}
.brand__mark::after {
  content: "";
  position: absolute; inset: 6px;
  background: var(--bg);
  border-radius: 1px;
}
.brand__tag {
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 400;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.nav__menu {
  display: flex; align-items: center; gap: 28px;
  list-style: none; margin: 0; padding: 0;
}
.nav__menu a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
  transition: color var(--t-fast) var(--ease);
}
.nav__menu a::after {
  content: "";
  position: absolute; left: 0; right: 100%; bottom: 0;
  height: 2px; background: var(--brand);
  transition: right var(--t-med) var(--ease);
}
.nav__menu a:hover::after,
.nav__menu a[aria-current="page"]::after { right: 0; }

.nav__actions {
  display: flex; align-items: center; gap: 12px;
}
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--ink); border-radius: 999px;
  font-family: var(--f-mono); font-size: 11px;
  overflow: hidden;
}
.lang-switch a {
  padding: 6px 12px;
  color: var(--ink);
  transition: all var(--t-fast) var(--ease);
}
.lang-switch a[aria-current="true"] {
  background: var(--ink); color: var(--bg);
}

.nav__toggle {
  display: none;
  width: 36px; height: 36px;
  border: 1px solid var(--ink);
  border-radius: 4px;
}
.nav__toggle span {
  display: block; width: 16px; height: 2px;
  background: var(--ink); margin: 3px auto;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.hero__issue {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--brand);
  text-transform: uppercase;
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 12px;
}
.hero__issue::before {
  content: ""; width: 28px; height: 1px; background: var(--brand);
}
.hero__title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  font-variation-settings: "opsz" 120, "SOFT" 30;
}
.hero__title em {
  font-style: italic;
  color: var(--brand);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.hero__lede {
  font-size: clamp(17px, 1.3vw, 20px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 56ch;
  margin: 0;
}
.hero__meta {
  display: flex; flex-wrap: wrap; gap: 24px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.05em;
}
.hero__meta strong {
  display: block;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}

/* ============================================================
   SECTION TITLES
   ============================================================ */
.section {
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}
.section--band { background: var(--bg-band); }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 40px; flex-wrap: wrap;
}
.section-head__title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0;
}
.section-head__kicker {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 12px;
  display: block;
}
.section-head__more {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 2px solid var(--brand);
  padding-bottom: 2px;
  transition: color var(--t-fast) var(--ease);
}
.section-head__more:hover { color: var(--brand); }

/* ============================================================
   FEATURED CARD (the big one)
   ============================================================ */
.feature {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  border: 1px solid var(--ink);
  background: var(--bg-elev);
  overflow: hidden;
  position: relative;
}
.feature__visual {
  background: var(--ink);
  position: relative;
  min-height: 360px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.feature__visual svg { width: 100%; height: 100%; }
.feature__body {
  padding: 40px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.feature__tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
}
.feature__title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 16px 0 16px;
}
.feature__title a:hover { color: var(--brand); }
.feature__desc {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0;
}
.feature__meta {
  display: flex; align-items: center; gap: 16px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* ============================================================
   GAME GRID
   ============================================================ */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.game-card {
  background: var(--bg-elev);
  padding: 24px;
  position: relative;
  transition: background var(--t-fast) var(--ease);
  display: flex; flex-direction: column;
  min-height: 320px;
}
.game-card:hover { background: var(--bg-band); }
.game-card__rank {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}
.game-card__rank strong {
  color: var(--brand);
  font-weight: 600;
}
.game-card__visual {
  margin: 16px 0;
  aspect-ratio: 4 / 3;
  background: var(--bg-band);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.game-card__visual svg { width: 70%; height: 70%; }
.game-card__title {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.game-card__title a:hover { color: var(--brand); }
.game-card__desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 16px;
}
.game-card__foot {
  margin-top: auto;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-3);
}
.game-card__rating {
  color: var(--ink);
  letter-spacing: 0.04em;
}
.game-card__rating .star { color: var(--gold); }

/* ============================================================
   ARTICLE LIST
   ============================================================ */
.article-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.article-card {
  background: var(--bg-elev);
  padding: 28px;
  display: flex; flex-direction: column;
  min-height: 280px;
  transition: background var(--t-fast) var(--ease);
}
.article-card:hover { background: var(--bg-band); }
.article-card__tag {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 16px;
}
.article-card__title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.article-card__title a:hover { color: var(--brand); }
.article-card__excerpt {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
}
.article-card__foot {
  margin-top: auto;
  padding-top: 20px;
  display: flex; justify-content: space-between;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink-3);
}

/* ============================================================
   CONTENT PAGES (About / Privacy / etc)
   ============================================================ */
.page {
  padding: 64px 0 96px;
}
.page__head {
  max-width: 720px;
  margin-bottom: 56px;
}
.page__kicker {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
  display: block;
  margin-bottom: 20px;
}
.page__title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
}
.page__lede {
  font-size: clamp(17px, 1.3vw, 20px);
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
}

.prose {
  max-width: 720px;
  font-size: 16px;
  line-height: 1.75;
}
.prose h2 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 64px 0 16px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.25rem;
  margin: 40px 0 12px;
}
.prose p { margin: 0 0 18px; color: var(--ink-2); }
.prose ul, .prose ol { margin: 0 0 24px; padding-left: 24px; color: var(--ink-2); }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a {
  color: var(--brand-ink);
  border-bottom: 1px solid currentColor;
  transition: color var(--t-fast);
}
.prose a:hover { color: var(--brand); }
.prose blockquote {
  border-left: 3px solid var(--brand);
  padding: 0 0 0 24px;
  margin: 32px 0;
  font-family: var(--f-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink);
}
.prose table {
  width: 100%; border-collapse: collapse;
  margin: 24px 0; font-size: 14px;
}
.prose th, .prose td {
  text-align: left; padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.prose th {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-3); border-bottom-color: var(--ink);
}
.prose hr {
  border: 0; height: 1px; background: var(--line);
  margin: 48px 0;
}

/* ============================================================
   TEAM (About page)
   ============================================================ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  margin: 48px 0;
}
.team-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 32px;
}
.team-card__avatar {
  width: 96px; height: 96px;
  margin-bottom: 20px;
  background: var(--bg-band);
  border-radius: 50%;
  overflow: hidden;
}
.team-card__name {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}
.team-card__role {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 16px;
}
.team-card__bio {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 32px;
}
.contact-box {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 32px;
}
.contact-box h3 {
  font-family: var(--f-display);
  font-size: 1.4rem;
  margin: 0 0 16px;
  font-weight: 600;
}
.contact-box a.email {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 15px;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--bg);
  margin-top: 16px;
  transition: background var(--t-fast);
}
.contact-box a.email:hover { background: var(--brand); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: #C9C9CC;
  padding: 72px 0 32px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 28px;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.footer-tag {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6E6E72;
  display: block;
  margin-bottom: 8px;
}
.footer-desc {
  color: #9A9A9F;
  max-width: 40ch;
  line-height: 1.6;
}
.footer-col h4 {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6E6E72;
  font-weight: 400;
  margin: 0 0 16px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: #C9C9CC;
  transition: color var(--t-fast);
}
.footer-col a:hover { color: var(--brand); }
.footer-base {
  border-top: 1px solid #2A2A2E;
  padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap;
  gap: 16px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #6E6E72;
  text-transform: uppercase;
}

/* ============================================================
   CMP — Cookie Consent Banner (TCF v2.3 placeholder UI)
   The actual Quantcast Choice / Funding Choices script
   will be injected post-deployment.
   ============================================================ */
.cmp {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--ink); color: #fff;
  z-index: 9000;
  transform: translateY(100%);
  transition: transform var(--t-med) var(--ease);
  border-top: 4px solid var(--brand);
  font-size: 14px;
}
.cmp.is-visible { transform: translateY(0); }
.cmp__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}
.cmp__title {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 18px;
  margin: 0 0 6px;
}
.cmp__text {
  color: #C9C9CC;
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
  max-width: 56ch;
}
.cmp__text a { color: #fff; border-bottom: 1px solid var(--brand); }
.cmp__actions {
  display: flex; gap: 12px; flex-wrap: wrap;
}
.cmp__btn {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 20px;
  border: 1px solid #C9C9CC;
  color: #fff;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.cmp__btn:hover { background: #fff; color: var(--ink); }
.cmp__btn--primary {
  background: var(--brand);
  border-color: var(--brand);
}
.cmp__btn--primary:hover { background: #fff; color: var(--brand); border-color: #fff; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 880px) {
  .nav__menu { display: none; }
  .nav__toggle { display: flex; flex-direction: column; justify-content: center; }
  .nav.is-open .nav__menu {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-elev);
    border-top: 1px solid var(--line);
    padding: 24px var(--gutter);
    gap: 16px;
    box-shadow: 0 12px 24px rgba(0,0,0,.08);
  }
  .feature { grid-template-columns: 1fr; }
  .feature__visual { min-height: 240px; }
  .feature__body { padding: 28px 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .contact-grid { grid-template-columns: 1fr; gap: 24px; }
  .cmp__inner { grid-template-columns: 1fr; gap: 16px; }
  .hero { padding: 48px 0 40px; }
  .section { padding: 56px 0; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .game-card { padding: 16px; min-height: 260px; }
  .game-card__title { font-size: 17px; }
}

/* -------- Reduced motion -------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* -------- Print -------- */
@media print {
  .site-header, .site-footer, .cmp, .top-band { display: none; }
  body { background: #fff; color: #000; }
}
