/* ==========================================================================
   NYX Games — design system
   Palette: Ink #17191C · Charcoal #23262A · Slate #2F3338 · Ash #8A9099 · Paper #F4F4F2
   ========================================================================== */

:root {
  --ink:        #17191c;
  --surface:    #1d2024;
  --surface-2:  #1a1d21;
  --charcoal:   #23262a;
  --slate:      #2f3338;
  --line:       #2f3338;
  --line-2:     #464c53;
  --ash:        #8a9099;
  --dim:        #6d7480;
  --muted:      #b7bcc3;
  --faint:      #565c64;
  --paper:      #f4f4f2;

  --font-sans: "Archivo", "Pretendard", -apple-system, BlinkMacSystemFont,
               "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", Helvetica, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --pad-x: 48px;
}

@media (max-width: 900px) { :root { --pad-x: 28px; } }
@media (max-width: 560px) { :root { --pad-x: 20px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--paper); text-decoration: none; transition: color .15s ease, border-color .15s ease, background .15s ease; }
a:hover { color: var(--ash); }
img { max-width: 100%; display: block; }

:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }

.mono {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ash);
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--paper); color: var(--ink); padding: 12px 20px; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---------- header ---------- */

.site-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  padding: 20px var(--pad-x);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
  background: rgba(23, 25, 28, .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brand { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.brand:hover { color: var(--paper); }
.brand:hover .mark::after { background: var(--ink); }
.brand-name { font-size: 22px; font-weight: 900; letter-spacing: .12em; }

/* half-moon mark */
.mark {
  position: relative; width: 28px; height: 28px;
  border-radius: 50%; background: var(--paper); overflow: hidden; flex-shrink: 0;
}
.mark::after {
  content: ""; position: absolute;
  top: -11%; left: 29%; width: 100%; height: 121%;
  border-radius: 50%; background: var(--ink);
}

.site-nav {
  display: flex; align-items: center; gap: 32px;
  font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.site-nav a[aria-current="page"] { color: var(--ash); }

.btn-ghost {
  border: 1px solid var(--line-2); border-radius: 2px; padding: 10px 20px;
}
.btn-ghost:hover { border-color: var(--ash); color: var(--paper); }

@media (max-width: 760px) {
  .site-header { flex-wrap: wrap; padding: 16px var(--pad-x); }
  .site-nav { gap: 20px; font-size: 12px; width: 100%; flex-wrap: wrap; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  padding: 17px 34px; border-radius: 2px;
}
.btn-solid { background: var(--paper); color: var(--ink); }
.btn-solid:hover { background: #ffffff; color: var(--ink); }
.btn-outline { border: 1px solid var(--line-2); color: var(--paper); }
.btn-outline:hover { border-color: var(--ash); color: var(--paper); }
.btn[aria-disabled="true"] {
  border: 1px dashed #3a4046; color: var(--faint); cursor: not-allowed; background: none;
}
.btn[aria-disabled="true"]:hover { border-color: #3a4046; color: var(--faint); }

/* ---------- footer ---------- */

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 26px var(--pad-x);
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--dim);
}
.site-footer a { color: var(--dim); }
.site-footer a:hover { color: var(--paper); }
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; }

/* ---------- breadcrumb ---------- */

.crumbs {
  padding: 22px var(--pad-x) 0;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim);
}
.crumbs a { color: var(--dim); }
.crumbs a:hover { color: var(--paper); }
.crumbs span[aria-current] { color: var(--ash); }
.crumbs .sep { padding: 0 10px; color: var(--faint); }

/* ==========================================================================
   Home
   ========================================================================== */

.hero {
  position: relative;
  min-height: 620px;
  display: grid; grid-template-columns: 1fr; align-items: stretch;
}
.hero-bg { position: absolute; inset: 0; overflow: hidden; background: var(--surface); }
.hero-bg svg { display: block; opacity: .5; }
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--ink) 8%, rgba(23,25,28,.72) 52%, rgba(23,25,28,.25) 100%);
}
.hero-body {
  position: relative;
  padding: 104px var(--pad-x);
  display: flex; flex-direction: column; justify-content: center; gap: 30px;
  max-width: 780px;
}
.hero-eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--ash);
}
.hero h1 {
  margin: 0;
  font-size: clamp(40px, 8vw, 88px);
  font-weight: 900; line-height: .96; letter-spacing: -.02em;
  text-wrap: pretty;
}
.hero p {
  margin: 0; font-size: 17px; line-height: 1.65; color: var(--muted);
  max-width: 520px; text-wrap: pretty;
}
.hero p strong { color: var(--paper); font-weight: 700; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; padding-top: 6px; }

@media (max-width: 760px) {
  .hero { min-height: 0; }
  .hero-body { padding: 72px var(--pad-x); gap: 24px; }
  .hero-scrim { background: linear-gradient(180deg, rgba(23,25,28,.86) 0%, rgba(23,25,28,.72) 100%); }
}

/* ---------- game grid ---------- */

.game-grid {
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.game-card {
  border-right: 1px solid var(--line);
  padding: 40px var(--pad-x) 44px;
  display: flex; flex-direction: column; gap: 18px;
  color: var(--paper);
}
.game-card p { margin: 0; }
.game-card:last-child { border-right: none; }
a.game-card:hover { background: var(--surface-2); color: var(--paper); }
a.game-card:hover .game-title { color: var(--ash); }

.game-shot {
  height: 180px; border-radius: 3px; overflow: hidden;
  background: var(--surface); position: relative;
}
.game-shot img { width: 100%; height: 100%; object-fit: cover; }
.game-shot--defense img { object-position: 30% 20%; }
.game-shot--capydoku img { object-position: 50% 42%; }
.game-shot--empty {
  border: 1px dashed #3a4046; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
}
.game-shot--empty .mono { color: var(--faint); }

.game-title { font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.game-desc { font-size: 14px; line-height: 1.6; color: var(--muted); }
.game-card--tba .game-title { color: var(--faint); }
.game-card--tba .game-desc { color: #7c828a; }

@media (max-width: 900px) {
  .game-grid { grid-template-columns: 1fr; }
  .game-card { border-right: none; border-bottom: 1px solid var(--line); }
  .game-card:last-child { border-bottom: none; }
}

/* ---------- studio ---------- */

.studio {
  border-top: 1px solid var(--line);
  padding: 72px var(--pad-x);
  display: grid; grid-template-columns: 320px 1fr; gap: 48px;
}
.studio h2 {
  margin: 0; font-size: 34px; font-weight: 900; letter-spacing: -.02em; line-height: 1.15;
}
.studio-body { display: flex; flex-direction: column; gap: 18px; max-width: 620px; }
.studio-body p { margin: 0; font-size: 16px; line-height: 1.75; color: var(--muted); text-wrap: pretty; }
.studio-facts {
  margin: 10px 0 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px;
}
.studio-facts dt {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim);
  margin-bottom: 6px;
}
.studio-facts dd { margin: 0; font-size: 15px; color: var(--paper); }

@media (max-width: 900px) { .studio { grid-template-columns: 1fr; gap: 28px; padding: 56px var(--pad-x); } }

/* ==========================================================================
   Game detail page
   ========================================================================== */

.game-hero {
  padding: 40px var(--pad-x) 72px;
  display: grid; grid-template-columns: 380px 1fr; gap: 56px; align-items: start;
}
.game-hero-art {
  border-radius: 4px; overflow: hidden; background: var(--surface);
  border: 1px solid var(--line);
}
.game-hero-art img { width: 100%; height: auto; }
.game-hero-body { display: flex; flex-direction: column; gap: 24px; max-width: 640px; }
.game-hero h1 {
  margin: 0; font-size: clamp(40px, 7vw, 68px);
  font-weight: 900; letter-spacing: -.02em; line-height: 1;
}
.game-hero .tagline { margin: 0; font-size: 19px; line-height: 1.6; color: var(--paper); text-wrap: pretty; }
.game-hero p { margin: 0; font-size: 16px; line-height: 1.75; color: var(--muted); text-wrap: pretty; }
.game-actions { display: flex; gap: 14px; flex-wrap: wrap; padding-top: 4px; }

.badges { display: flex; gap: 10px; flex-wrap: wrap; }
.badge {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ash); border: 1px solid var(--line); border-radius: 2px; padding: 6px 12px;
}

@media (max-width: 900px) {
  .game-hero { grid-template-columns: 1fr; gap: 32px; padding-bottom: 56px; }
  .game-hero-art { max-width: 320px; }
}

.section {
  border-top: 1px solid var(--line);
  padding: 64px var(--pad-x);
}
.section-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 36px; }
.section-head p { margin: 0; }
.section-head h2 { margin: 0; font-size: 30px; font-weight: 900; letter-spacing: -.02em; }

.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 3px; overflow: hidden;
}
.feature {
  background: var(--ink); padding: 28px 26px;
  display: flex; flex-direction: column; gap: 10px;
}
.feature h3 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.feature p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--muted); }

.spec-table { width: 100%; border-collapse: collapse; font-size: 15px; max-width: 720px; }
.spec-table th, .spec-table td {
  border-bottom: 1px solid var(--line); padding: 16px 0; text-align: left; vertical-align: top;
}
.spec-table th {
  width: 200px; font-weight: 600; color: var(--ash);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  padding-top: 20px;
}
.spec-table td { color: var(--paper); }
@media (max-width: 620px) {
  .spec-table th, .spec-table td { display: block; width: auto; border-bottom: none; padding: 0; }
  .spec-table th { padding-top: 18px; }
  .spec-table td { padding: 6px 0 18px; border-bottom: 1px solid var(--line); }
}

.callout {
  border: 1px solid var(--line); border-left: 3px solid var(--line-2);
  border-radius: 0 3px 3px 0; background: var(--surface-2);
  padding: 22px 24px; max-width: 720px;
  display: flex; flex-direction: column; gap: 12px;
}
.callout p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--muted); }
.callout a { text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   Legal document (privacy policy)
   ========================================================================== */

.doc { width: 100%; max-width: 820px; margin: 0 auto; padding: 0 var(--pad-x) 96px; }

.doc-header { padding: 48px 0 28px; border-bottom: 1px solid var(--line); }
.doc-header .eyebrow {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ash); font-weight: 500; margin: 0 0 14px;
}
.doc-header h1 {
  font-size: clamp(26px, 5vw, 36px); line-height: 1.25; margin: 0 0 16px;
  letter-spacing: -.02em; font-weight: 900;
}
.doc-meta { margin: 0; color: var(--dim); font-size: 13px; font-family: var(--font-mono); letter-spacing: .06em; }
.doc-meta span { display: inline-block; margin-right: 20px; }
.doc-lead { margin: 28px 0 0; color: var(--muted); font-size: 15px; line-height: 1.8; }

.toc {
  margin: 32px 0 8px; padding: 22px 24px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px;
}
.toc h2 {
  font-family: var(--font-mono);
  font-size: 11px; margin: 0 0 14px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ash); font-weight: 500;
}
.toc ol {
  margin: 0; padding-left: 20px; columns: 2; column-gap: 32px;
  font-size: 14px; color: var(--dim);
}
.toc li { margin: 0 0 8px; break-inside: avoid; }
.toc a { color: var(--muted); border-bottom: 1px solid transparent; }
.toc a:hover, .toc a:focus { color: var(--paper); border-bottom-color: var(--line-2); }
@media (max-width: 560px) { .toc ol { columns: 1; } }

.article { padding: 36px 0 4px; border-top: 1px solid var(--line); margin-top: 36px; }
.article:first-of-type { border-top: none; }
.article h2 {
  font-size: 19px; margin: 0 0 16px; letter-spacing: -.01em; font-weight: 800;
  scroll-margin-top: 90px;
}
.article h2 .num {
  display: inline-block; min-width: 2.1em; color: var(--ash);
  font-variant-numeric: tabular-nums; font-weight: 700;
}
.article h3 { font-size: 15px; margin: 26px 0 10px; font-weight: 700; color: var(--paper); }
.article p { margin: 0 0 14px; font-size: 15px; line-height: 1.8; color: var(--muted); }
.article ul, .article ol.body { margin: 0 0 14px; padding-left: 20px; font-size: 15px; line-height: 1.8; color: var(--muted); }
.article li { margin: 0 0 8px; }
.article strong { font-weight: 700; color: var(--paper); }
.article a { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.article a:hover { color: var(--ash); }

.tbl-scroll { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 4px; }
.doc table {
  border-collapse: collapse; width: 100%; min-width: 520px;
  font-size: 14px; background: var(--surface-2);
}
.doc caption {
  text-align: left; font-size: 13px; color: var(--dim); padding: 0 0 10px;
  font-family: var(--font-mono); letter-spacing: .1em; text-transform: uppercase;
}
.doc th, .doc td {
  border: 1px solid var(--line); padding: 12px 14px; text-align: left; vertical-align: top;
  line-height: 1.65; color: var(--muted);
}
.doc th { background: var(--slate); font-weight: 700; white-space: nowrap; color: var(--paper); }
.doc td:first-child { color: var(--paper); font-weight: 600; white-space: nowrap; }

.note {
  margin: 0 0 16px; padding: 16px 18px;
  background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--line-2);
  border-radius: 0 4px 4px 0; font-size: 14px; line-height: 1.75; color: var(--muted);
}
.note p { margin: 0 0 10px; font-size: 14px; }
.note p:last-child { margin-bottom: 0; }

.doc-footer {
  margin-top: 52px; padding-top: 24px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--dim); line-height: 1.7;
}

@media print {
  body { background: #fff; color: #000; }
  .site-header, .site-footer, .toc, .crumbs, .skip-link { display: none; }
  .doc { max-width: none; padding: 0; }
  .article { page-break-inside: avoid; border-top: 1px solid #ccc; }
  .doc p, .doc li, .doc td, .doc th, .doc-meta, .doc-lead, .doc-footer { color: #000; }
  .doc th { background: #eee; }
  .note, .doc table { background: #fff; }
}
