/* ==========================================================================
   GOYOUNG GAMES (goyoung.games)
   Original Swiss Game-Cartridge Editorial Grid × Scanline-ASCII Identity
   Warm Stone Parchment + Deep Ink Slate + Disciplined PackStorm Gold Accent
   ========================================================================== */

:root {
  --bg: #050505;
  --surface: #0B0B0B;
  --surface-tint: #111111;
  --ink: #F4F3EE;
  --ink-muted: #9A9A9A;
  --ink-faint: #666666;
  --line: #1E1E1E;
  --line-strong: #2E2E2E;
  --accent: #E5A63E;
  --accent-soft: rgba(229, 166, 62, 0.16);

  --font-pixel: "Silkscreen", "DotGothic16", monospace;
  --font-mono: "IBM Plex Mono", "Noto Sans KR", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-kr: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;

  --max-w: 1240px;
  --gutter: clamp(18px, 3.6vw, 48px);
  --radius: 3px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-mono);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.7;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.pixel-crisp {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

html[lang="ko"] .body-copy {
  font-family: var(--font-kr);
  word-break: keep-all;
}

/* ---------- Header: Framed Studio Top Bar ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 5, 5, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: none;
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand-badge {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-strong);
  background: #000000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
}

.brand-badge img {
  width: 20px;
  height: 20px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-pixel);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.brand-domain {
  color: var(--ink-muted);
  font-size: 10.5px;
  letter-spacing: 0.06em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 30px);
}

.site-nav a {
  font-size: 12.5px;
  color: var(--ink);
  white-space: nowrap;
  padding: 4px 0;
  position: relative;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.site-nav a:hover::after {
  transform: scaleX(1);
}

.lang-toggle {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.lang-toggle:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* ---------- Hero: Borderless Seamless Obsidian Stage ---------- */
.hero-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 68px) var(--gutter) clamp(48px, 6.5vw, 88px);
  overflow: hidden;
}

.hero-frame {
  border: none;
  background: transparent;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 1.02fr) minmax(320px, 0.98fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
}

.hero-left {
  position: relative;
  z-index: 2;
  padding: clamp(12px, 2vw, 28px) 0;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 32px;
}

.hero-title {
  margin: 0 0 20px;
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: clamp(40px, 5.2vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.hero-title .accent-dot {
  color: var(--accent);
}

.hero-sub {
  margin: 0;
  max-width: 440px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--ink);
  color: var(--bg);
  border: 1px solid var(--ink);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  background: #FFFFFF;
  border-color: #FFFFFF;
}

.btn-primary svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  padding: 11px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-secondary:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* Right Column: Seamless Computational Reel Goyoung Cat Stage */
.hero-specimen {
  position: relative;
  min-height: clamp(380px, 54vh, 520px);
  background: transparent;
  display: flex;
  flex-direction: column;
}

#goyoung-ascii-canvas {
  width: 100%;
  height: 100%;
  flex: 1;
  display: block;
  user-select: none;
}

/* ---------- Editorial Sections ---------- */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: clamp(56px, 6.5vw, 92px) var(--gutter);
  border-top: none;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(24px, 3.6vw, 40px);
}

.section-index {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.section-title {
  margin: 0;
  font-family: var(--font-pixel);
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.1;
}

.section-note {
  font-size: 13px;
  color: var(--ink-muted);
  max-width: 440px;
}

/* ---------- Section 01: Flagship Game — PACKSTORM ---------- */
.game-feature {
  display: grid;
  grid-template-columns: minmax(300px, 1.2fr) minmax(280px, 0.95fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

.capsule-frame {
  border: none;
  background: transparent;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
}

.capsule-viewport {
  position: relative;
  width: 100%;
  aspect-ratio: 920 / 430;
  overflow: hidden;
  background: #140f24;
  border-radius: var(--radius);
}

.capsule-viewport img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pill-toggle {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: var(--radius);
  transition: all 0.15s ease;
}

.pill-toggle.active,
.pill-toggle:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.game-tagline {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.7;
  margin: 0 0 14px;
}

.game-desc {
  font-size: 13.5px;
  color: var(--ink-muted);
  margin: 0 0 24px;
  line-height: 1.8;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--surface);
  margin-bottom: 24px;
}

.spec-cell {
  padding: 12px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.spec-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.spec-value {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
}

/* ---------- Section 02: 4 Core Gameplay GIFs ---------- */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.pillar-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.pillar-card:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.pillar-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-tint);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.pillar-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #050505;
  overflow: hidden;
}

.pillar-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pillar-body {
  padding: 18px 18px 20px;
}

.pillar-title {
  margin: 0 0 8px;
  font-family: var(--font-pixel);
  font-size: 15.5px;
}

.pillar-copy {
  margin: 0;
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.75;
}

/* ---------- Section 03: Screenshots Gallery (Crisp Full Color Default) ---------- */
.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.shot-card {
  margin: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 6px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.shot-card:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.shot-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #050505;
}

.shot-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.shot-card:hover .shot-thumb img {
  transform: scale(1.02);
}

.shot-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 2px;
  font-size: 11px;
  color: var(--ink-muted);
}

/* ---------- Section 04: About & Contact ---------- */
.studio-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.studio-manifesto {
  font-size: 15px;
  line-height: 1.85;
  margin: 0 0 16px;
}

.ascii-divider {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-faint);
  letter-spacing: 0.14em;
  overflow: hidden;
  white-space: nowrap;
  user-select: none;
  margin: 20px 0;
}

.press-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-box {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  padding: 22px 24px;
  border-radius: var(--radius);
}

.contact-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.contact-row:first-child { padding-top: 0; }
.contact-row:last-child { border-bottom: none; padding-bottom: 0; }

.contact-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  text-transform: uppercase;
}

.contact-link {
  font-weight: 500;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.contact-link:hover {
  border-bottom-color: var(--accent);
  color: var(--ink);
}

/* ---------- Footer with Napping ASCII Goyoung Cat ---------- */
.site-footer {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 40px var(--gutter) 48px;
  border-top: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-pixel);
  font-size: 12.5px;
}

.footer-brand img {
  width: 20px;
  height: 20px;
}

.footer-meta {
  font-size: 11.5px;
  color: var(--ink-muted);
}

.footer-links {
  display: flex;
  gap: 16px;
  font-size: 11.5px;
  color: var(--ink-muted);
}

.footer-links a:hover,
.footer-links button:hover {
  color: var(--ink);
  text-decoration: underline;
}

.footer-links button {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.sleeping-cat-ascii {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.18;
  color: var(--ink);
  user-select: none;
  white-space: pre;
}

/* ---------- Lightbox & Privacy Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop.open {
  display: flex;
}

.lightbox-shell {
  width: min(1040px, 96vw);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 14px;
}

.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
  font-size: 12px;
}

.lightbox-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #050505;
  overflow: hidden;
}

.lightbox-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lightbox-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-card {
  width: min(560px, 94vw);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 26px;
}

.modal-card h4 {
  margin: 0 0 12px;
  font-family: var(--font-pixel);
  font-size: 18px;
}

.modal-card p {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.8;
  margin: 0 0 12px;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-wrap {
    padding-top: 28px;
    padding-bottom: 40px;
  }

  .hero-grid {
    display: block;
    min-height: 360px;
  }

  .hero-left {
    position: relative;
    z-index: 2;
    max-width: 78%;
    padding: 20px 0;
  }

  .hero-specimen {
    position: absolute;
    top: -12px;
    right: -32px;
    bottom: -12px;
    width: 68%;
    min-height: 0;
    z-index: 1;
    opacity: 0.44;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.55) 26%, rgba(0, 0, 0, 1) 58%);
    mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.55) 26%, rgba(0, 0, 0, 1) 58%);
  }

  .game-feature,
  .studio-grid {
    grid-template-columns: 1fr;
  }

  .media-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .brand-domain {
    display: none;
  }

  .brand-name {
    font-size: 11.5px;
  }

  .site-nav {
    gap: 12px;
  }

  .site-nav a {
    font-size: 12px;
  }

  .site-nav a.hide-sm {
    display: none;
  }

  .hero-grid {
    min-height: 330px;
  }

  .hero-left {
    max-width: 100%;
    padding: 14px 0;
  }

  .hero-sub {
    max-width: 260px;
    font-size: 13.5px;
    color: #C2C2C2;
  }

  .hero-specimen {
    top: -8px;
    right: -46px;
    bottom: -8px;
    width: 84%;
    opacity: 0.38;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.35) 30%, rgba(0, 0, 0, 0.95) 68%);
    mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.35) 30%, rgba(0, 0, 0, 0.95) 68%);
  }

  .pillars-grid,
  .media-grid,
  .spec-grid {
    grid-template-columns: 1fr;
  }
}
