:root {
  --bg:        #ffffff;
  --bg-soft:   #fafafa;
  --text:      #0a0a0a;
  --text-mute: #6b6b6b;
  --border:    #e8e8e8;
  --accent:    #0a0a0a;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display",
          "Pretendard", system-ui, sans-serif;

  --hero-size: clamp(40px, 8vw, 72px);
  --h2-size:   clamp(28px, 4vw, 40px);

  --max-w: 1080px;
  --radius: 14px;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 40px;
  --space-5: 64px;
  --space-6: 96px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

section {
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--border);
}
section:last-of-type { border-bottom: none; }

h1, h2, h3 { margin: 0 0 var(--space-2); letter-spacing: -0.02em; font-weight: 800; }
h2 { font-size: var(--h2-size); }
p { margin: 0 0 var(--space-2); color: var(--text-mute); }

.muted { color: var(--text-mute); }
.center { text-align: center; }

/* NAV */
.nav {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo { font-weight: 800; font-size: 20px; letter-spacing: -0.04em; }
.logo .dot { color: var(--text-mute); }
.nav-links { display: flex; gap: var(--space-3); }
.nav-links a { font-size: 14px; color: var(--text-mute); }
.nav-links a:hover { color: var(--text); }
.lang-toggle { display: flex; gap: 4px; }
.lang-toggle button {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-mute);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.lang-toggle button[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* HERO */
.hero { padding: var(--space-6) 0 var(--space-5); text-align: center; }
.badge {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mute);
  margin-bottom: var(--space-3);
}
.hero-title {
  font-size: var(--hero-size);
  line-height: 1.05;
  margin: 0 auto var(--space-2);
  max-width: 14ch;
}
.hero-sub { font-size: 18px; margin-bottom: var(--space-4); }

.hero-tiles {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.tile {
  width: 96px; height: 96px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.25);
}

/* GAMES */
.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.game-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  transition: transform .15s ease, box-shadow .15s ease;
}
.game-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -16px rgba(0,0,0,.18);
}
.game-art {
  aspect-ratio: 4 / 3;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 800; letter-spacing: -0.04em;
  color: var(--text);
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.game-art-2048   { background: #f4f4f5; }
.game-art-subak  { background: #fafaf5; }
.game-art-sudoku { background: #f5f7fa; }
.game-card h3 { padding: var(--space-2) var(--space-2) 4px; font-size: 18px; }
.game-card p  { padding: 0 var(--space-2) var(--space-2); font-size: 14px; }

/* FEATURES */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.feature {
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}
.feature-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: var(--space-2);
}
.feature h3 { font-size: 16px; margin-bottom: 4px; }
.feature p  { font-size: 14px; margin: 0; }

/* GALLERY */
.gallery-scroll {
  margin-top: var(--space-3);
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding: 0 var(--space-3) var(--space-2);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.shot {
  flex: 0 0 auto;
  width: 220px;
  aspect-ratio: 9 / 16;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-mute);
  font-weight: 700;
  scroll-snap-align: start;
}

/* VIDEO */
.video-frame {
  margin-top: var(--space-3);
  aspect-ratio: 16 / 9;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-mute);
  font-weight: 700;
  font-size: 18px;
}

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: var(--space-2) 0;
}
.faq-item:first-of-type { border-top: 1px solid var(--border); margin-top: var(--space-3); }
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 22px;
  color: var(--text-mute);
  transition: transform .15s ease;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin-top: var(--space-1); font-size: 15px; }

/* FOOTER */
.footer {
  padding: var(--space-4) 0;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.footer-copy { font-size: 13px; }
.footer-links { display: flex; gap: var(--space-3); }
.footer-links a { font-size: 13px; color: var(--text-mute); }
.footer-links a:hover { color: var(--text); }

/* Responsive: tablet */
@media (max-width: 960px) {
  .game-grid    { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links    { gap: var(--space-2); }
}

/* Responsive: mobile */
@media (max-width: 640px) {
  section { padding: var(--space-5) 0; }

  .nav-inner { height: 56px; }
  .nav-links { display: none; }

  .hero { padding: var(--space-5) 0 var(--space-4); }
  .hero-tiles { gap: var(--space-1); }
  .tile { width: 76px; height: 76px; font-size: 14px; }

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

  .shot { width: 180px; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
