/* ========================
   DESIGN TOKENS
   ======================== */
:root {
  --c-primary: #6A57F7;
  --c-primary-hover: #5A47E0;
  --c-navy: #0D0E1E;
  --c-navy-mid: #161729;

  --c-canvas: #FFFFFF;
  --c-surface: #F7F7F5;
  --c-surface-soft: #FBFBFA;

  --c-hairline: #E8E8E6;
  --c-hairline-soft: #F0F0EE;
  --c-hairline-strong: #CBCBC8;

  --c-ink: #1A1A1A;
  --c-charcoal: #37352F;
  --c-slate: #5E5C56;
  --c-steel: #9B9A97;
  --c-muted: #C2C0BE;
  --c-on-dark: #FFFFFF;
  --c-on-dark-muted: rgba(255, 255, 255, 0.65);
  --c-link: #2563EB;

  --c-tint-lavender: #EDE7F6;
  --c-tint-lavender-text: #5B4FCF;
  --c-tint-mint: #E8F5E9;
  --c-tint-mint-text: #2E7D32;
  --c-tint-yellow-bold: #FFF9C4;

  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-24: 96px;

  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-xxl: 20px;
  --r-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(15, 15, 15, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 15, 15, 0.08);
  --shadow-lg: 0 24px 48px -8px rgba(15, 15, 15, 0.20);

  --font: 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --nav-h: 64px;
}

/* ========================
   RESET + BASE
   ======================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--c-charcoal);
  background: var(--c-canvas);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--c-link); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }
ul, ol { list-style: none; }

/* Bilingual */
html[lang="ko"] .t-en { display: none !important; }
html[lang="en"] .t-ko { display: none !important; }

/* ========================
   NAV
   ======================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-canvas);
  border-bottom: 1px solid var(--c-hairline);
  height: var(--nav-h);
}
.nav__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  text-decoration: none;
  flex-shrink: 0;
}
.nav__logo:hover { text-decoration: none; }
.nav__logo-mark {
  width: 32px;
  height: 32px;
  background: var(--c-primary);
  color: white;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.nav__logo-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--c-ink);
  letter-spacing: -0.3px;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}
.nav__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--c-slate);
  padding: 6px 12px;
  border-radius: var(--r-md);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.nav__link:hover {
  color: var(--c-ink);
  background: var(--c-surface);
  text-decoration: none;
}
.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-left: var(--sp-3);
}
.lang-btn {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-slate);
  padding: 6px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--c-hairline-strong);
  background: transparent;
  line-height: 1;
  transition: color 0.15s, border-color 0.15s;
}
.lang-btn:hover { color: var(--c-ink); border-color: var(--c-slate); }
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: var(--r-md);
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--c-charcoal);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none;
  flex-direction: column;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--c-canvas);
  border-bottom: 1px solid var(--c-hairline);
  padding: var(--sp-3) var(--sp-4);
  gap: 2px;
  z-index: 99;
  box-shadow: var(--shadow-md);
}
.nav-mobile.is-open { display: flex; }
.nav-mobile__link {
  font-size: 15px;
  font-weight: 500;
  color: var(--c-charcoal);
  padding: 10px 12px;
  border-radius: var(--r-md);
  text-decoration: none;
  transition: background 0.15s;
}
.nav-mobile__link:hover { background: var(--c-surface); text-decoration: none; }
.nav-mobile__divider { height: 1px; background: var(--c-hairline); margin: var(--sp-2) 0; }
.nav-mobile__lang {
  font-size: 14px;
  font-weight: 500;
  color: var(--c-slate);
  padding: 10px 12px;
  border-radius: var(--r-md);
  text-align: left;
  transition: background 0.15s;
}
.nav-mobile__lang:hover { background: var(--c-surface); }

/* ========================
   HERO
   ======================== */
.hero {
  background: var(--c-navy);
  padding: var(--sp-24) var(--sp-8);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 55%, rgba(106, 87, 247, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 82% 20%, rgba(165, 148, 249, 0.12) 0%, transparent 42%),
    radial-gradient(circle at 50% 90%, rgba(38, 166, 154, 0.08) 0%, transparent 40%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: rgba(106, 87, 247, 0.18);
  color: #B0A4FA;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--r-full);
  margin-bottom: var(--sp-6);
  border: 1px solid rgba(106, 87, 247, 0.25);
}
.hero__title {
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--c-on-dark);
  margin-bottom: var(--sp-6);
  word-break: keep-all;
}
.hero__subtitle {
  font-size: 18px;
  line-height: 1.65;
  color: var(--c-on-dark-muted);
  margin-bottom: var(--sp-10);
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  word-break: keep-all;
}
.hero__actions {
  display: flex;
  gap: var(--sp-3);
  justify-content: center;
  flex-wrap: wrap;
}
.hero__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: var(--sp-12);
}
.hero__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  opacity: 0.45;
}

/* ========================
   BUTTONS
   ======================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: var(--r-md);
  text-decoration: none;
  line-height: 1.3;
  transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
  white-space: nowrap;
  cursor: pointer;
  border: none;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--c-primary); color: white; }
.btn--primary:hover { background: var(--c-primary-hover); color: white; }
.btn--outline-dark {
  background: transparent;
  color: var(--c-on-dark);
  border: 1px solid rgba(255, 255, 255, 0.35);
}
.btn--outline-dark:hover { background: rgba(255, 255, 255, 0.08); color: white; }
.btn--outline {
  background: transparent;
  color: var(--c-charcoal);
  border: 1px solid var(--c-hairline-strong);
}
.btn--outline:hover { border-color: var(--c-slate); color: var(--c-ink); }
.btn--disabled, .btn[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.btn--full { width: 100%; justify-content: center; }

/* ========================
   SECTIONS
   ======================== */
.section { padding: var(--sp-16) var(--sp-8); }
.section--surface { background: var(--c-surface); }
.section__inner { max-width: 1280px; margin: 0 auto; }
.section__header { margin-bottom: var(--sp-10); }
.section__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--sp-3);
}
.section__title {
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--c-ink);
  margin-bottom: var(--sp-4);
  word-break: keep-all;
}
.section__desc {
  font-size: 16px;
  color: var(--c-slate);
  max-width: 540px;
  line-height: 1.65;
  word-break: keep-all;
}

/* ========================
   GAME CARDS
   ======================== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--sp-6);
}
.game-card {
  background: var(--c-canvas);
  border: 1px solid var(--c-hairline);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}
.game-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.game-card__thumb {
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.game-card__thumb-icon {
  font-size: 60px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.25));
  line-height: 1;
}
.game-card__body { padding: var(--sp-6); }
.game-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}
.game-card__name {
  font-size: 18px;
  font-weight: 600;
  color: var(--c-ink);
  letter-spacing: -0.02em;
}
.badge {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--r-full);
  white-space: nowrap;
  flex-shrink: 0;
}
.badge--coming-soon { background: var(--c-tint-lavender); color: var(--c-tint-lavender-text); }
.badge--available { background: var(--c-tint-mint); color: var(--c-tint-mint-text); }
.game-card__desc {
  font-size: 14px;
  color: var(--c-slate);
  line-height: 1.65;
  margin-bottom: var(--sp-6);
  word-break: keep-all;
}

/* Game card thumb variants — add one per new game */
.game-card__thumb--colorbridge {
  background: linear-gradient(135deg, #6A57F7 0%, #A594F9 100%);
}

/* ========================
   ABOUT CARD
   ======================== */
.about-card {
  background: var(--c-tint-yellow-bold);
  border-radius: var(--r-xxl);
  padding: var(--sp-10) var(--sp-12);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-10);
  align-items: center;
}
.about-card__title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 600;
  color: var(--c-ink);
  letter-spacing: -0.025em;
  line-height: 1.25;
  margin-bottom: var(--sp-4);
  word-break: keep-all;
}
.about-card__text {
  font-size: 15px;
  color: var(--c-charcoal);
  line-height: 1.75;
  margin-bottom: var(--sp-4);
  max-width: 520px;
  word-break: keep-all;
}
.about-card__contact { font-size: 14px; color: var(--c-slate); }
.about-card__contact a { color: var(--c-primary); font-weight: 500; }
.about-card__visual { flex-shrink: 0; }
.about-card__logo-big {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, var(--c-primary), #A594F9);
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  font-weight: 700;
  color: white;
  box-shadow: var(--shadow-lg);
  letter-spacing: -2px;
}

/* ========================
   LEGAL PAGES
   ======================== */
.legal-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-hairline);
  padding: var(--sp-10) var(--sp-8);
}
.legal-header__inner {
  max-width: 780px;
  margin: 0 auto;
}
.legal-header__breadcrumb {
  font-size: 13px;
  color: var(--c-steel);
  margin-bottom: var(--sp-3);
}
.legal-header__breadcrumb a { color: var(--c-slate); }
.legal-header__breadcrumb a:hover { color: var(--c-charcoal); }
.legal-header__title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 600;
  color: var(--c-ink);
  letter-spacing: -0.025em;
  margin-bottom: var(--sp-2);
}
.legal-header__meta { font-size: 14px; color: var(--c-steel); }
.legal-content {
  max-width: 780px;
  margin: 0 auto;
  padding: var(--sp-10) var(--sp-8) var(--sp-24);
}
.legal-content p {
  font-size: 15px;
  color: var(--c-charcoal);
  line-height: 1.8;
  margin-bottom: var(--sp-4);
}
.legal-content h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--c-ink);
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-3);
  padding-left: var(--sp-3);
  border-left: 3px solid var(--c-primary);
  line-height: 1.4;
}
.legal-content ul, .legal-content ol {
  list-style: disc;
  padding-left: var(--sp-6);
  margin-bottom: var(--sp-4);
}
.legal-content ol { list-style: decimal; }
.legal-content li {
  font-size: 15px;
  color: var(--c-charcoal);
  line-height: 1.8;
  margin-bottom: 6px;
}
.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--sp-3) 0 var(--sp-6);
  font-size: 14px;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--c-hairline);
}
.legal-content th {
  background: var(--c-surface);
  color: var(--c-charcoal);
  font-weight: 600;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--c-hairline);
}
.legal-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--c-hairline-soft);
  color: var(--c-charcoal);
  vertical-align: top;
}
.legal-content tr:last-child td { border-bottom: none; }
.legal-content a { color: var(--c-primary); }
.legal-note {
  background: var(--c-surface);
  border: 1px solid var(--c-hairline);
  border-radius: var(--r-md);
  padding: var(--sp-4) var(--sp-6);
  font-size: 14px;
  color: var(--c-slate);
  margin-bottom: var(--sp-6);
}

/* ========================
   FOOTER
   ======================== */
.footer {
  background: var(--c-canvas);
  border-top: 1px solid var(--c-hairline);
  padding: var(--sp-10) var(--sp-8);
}
.footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}
.footer__brand { font-size: 14px; font-weight: 600; color: var(--c-charcoal); }
.footer__copy { font-size: 13px; color: var(--c-steel); margin-top: 3px; }
.footer__links { display: flex; gap: var(--sp-4); flex-wrap: wrap; align-items: center; }
.footer__link { font-size: 13px; color: var(--c-steel); text-decoration: none; }
.footer__link:hover { color: var(--c-charcoal); text-decoration: underline; }

/* ========================
   RESPONSIVE
   ======================== */
@media (max-width: 1023px) {
  .nav__links { display: none; }
  .hamburger { display: flex; }
  .about-card {
    grid-template-columns: 1fr;
    padding: var(--sp-8) var(--sp-8);
  }
  .about-card__visual { display: none; }
}

@media (max-width: 767px) {
  .section { padding: var(--sp-12) var(--sp-4); }
  .hero { padding: var(--sp-16) var(--sp-4); }
  .nav__inner { padding: 0 16px; }
  .footer { padding: var(--sp-8) var(--sp-4); }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .games-grid { grid-template-columns: 1fr; }
  .legal-header { padding: var(--sp-8) var(--sp-4); }
  .legal-content { padding: var(--sp-8) var(--sp-4) var(--sp-16); }
  .about-card { padding: var(--sp-8) var(--sp-6); }
}

@media (max-width: 479px) {
  .hero__title { font-size: 32px; }
  .hero__subtitle { font-size: 15px; }
  .hero__actions { flex-direction: column; align-items: center; }
  .hero__actions .btn { width: 100%; justify-content: center; }
}
