/* ══════════════════════════════════════════
   RUBIA — Global Stylesheet
   Pretendard · minimal weight
   ══════════════════════════════════════════ */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css');

/* ── TOKENS ── */
:root {
  --bg-0:        #070809;
  --bg-1:        #0c0e10;
  --bg-2:        #111417;
  --bg-3:        #171b1f;
  --bg-4:        #1d2227;

  --border-0:    rgba(255,255,255,0.04);
  --border-1:    rgba(255,255,255,0.08);
  --border-2:    rgba(255,255,255,0.14);

  --silver-0:    #2a2e33;
  --silver-1:    #3d4349;
  --silver-2:    #5c6470;
  --silver-3:    #8a939e;
  --silver-4:    #b8bfc8;
  --silver-5:    #d4d9df;
  --white:       #eef0f3;

  --accent:      #c8cdd3;
  --accent-dim:  rgba(200,205,211,0.08);
  --accent-glow: rgba(200,205,211,0.05);

  --red:         #e05252;
  --green:       #4caf87;

  --nav-h:       60px;
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-xl:   22px;

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);

  --font: 'Pretendard Variable', 'Pretendard', system-ui, sans-serif;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  font-weight: 400;
  background: var(--bg-0);
  color: var(--white);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul { list-style: none; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--silver-1); border-radius: 3px; }

/* ── NOISE OVERLAY ── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  opacity: .6;
}

/* ── TYPOGRAPHY ── */
.display-xl {
  font-family: var(--font);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 600; letter-spacing: -0.03em; line-height: 1.08;
}
.display-lg {
  font-family: var(--font);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 600; letter-spacing: -0.025em; line-height: 1.12;
}
.display-md {
  font-family: var(--font);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 500; letter-spacing: -0.015em; line-height: 1.2;
}
.label-xs {
  font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--silver-3);
}
.label-sm {
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.body-lg { font-size: 17px; font-weight: 300; color: var(--silver-3); line-height: 1.8; }
.body-md { font-size: 15px; font-weight: 400; color: var(--silver-3); line-height: 1.75; }
.body-sm { font-size: 13.5px; font-weight: 400; color: var(--silver-2); line-height: 1.7; }

/* ── LAYOUT ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 40px; }
.section { padding: 96px 0; position: relative; z-index: 1; }
.section-sm { padding: 64px 0; position: relative; z-index: 1; }
.divider { border: none; border-top: 1px solid var(--border-0); margin: 0; }

/* ── SECTION HEADER ── */
.section-header { margin-bottom: 56px; }
.section-header .eyebrow { margin-bottom: 12px; }
.section-header h2 { margin-bottom: 14px; }
.section-header p { max-width: 500px; }

/* ── NAV ── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-h);
  background: rgba(7,8,9,0.82);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-0);
  transition: border-color .3s;
}
#nav.scrolled { border-bottom-color: var(--border-1); }
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 40px;
  height: 100%; display: flex; align-items: center; gap: 0;
}
.nav-logo { display: flex; align-items: center; margin-right: auto; }
.nav-logo img { height: 28px; width: auto; }
.nav-links {
  display: flex; align-items: center; gap: 2px; margin-right: 20px;
}
.nav-links a {
  font-size: 13px; font-weight: 400; color: var(--silver-2);
  padding: 6px 13px; border-radius: var(--radius-sm);
  transition: color .2s, background .2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--white); background: var(--accent-dim); }
.nav-btn {
  font-size: 12.5px; font-weight: 500; letter-spacing: 0.02em;
  color: var(--bg-0) !important; background: var(--white) !important;
  padding: 7px 18px !important; border-radius: var(--radius-sm) !important;
  transition: opacity .2s !important;
}
.nav-btn:hover { opacity: .85 !important; }
.nav-mobile-toggle { display: none; padding: 8px; color: var(--silver-3); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 500; letter-spacing: 0.01em;
  padding: 11px 24px; border-radius: var(--radius-sm);
  transition: all .2s var(--ease-out);
}
.btn-white { background: var(--white); color: var(--bg-0); }
.btn-white:hover { background: var(--silver-5); transform: translateY(-1px); }
.btn-outline {
  background: transparent; color: var(--silver-4);
  border: 1px solid var(--border-2);
}
.btn-outline:hover { color: var(--white); border-color: var(--accent); background: var(--accent-dim); transform: translateY(-1px); }

/* ── STAT STRIP ── */
.stat-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border-1); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--bg-2);
}
.stat-item {
  padding: 28px 24px; text-align: left;
  border-right: 1px solid var(--border-0);
}
.stat-item:last-child { border-right: none; }
.stat-value {
  font-size: 2rem; font-weight: 600;
  color: var(--white); line-height: 1; margin-bottom: 4px;
  letter-spacing: -0.025em;
}
.stat-label { font-size: 12px; font-weight: 400; color: var(--silver-2); }

/* ── FEATURE GRID ── */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-card {
  background: var(--bg-2); border: 1px solid var(--border-1);
  border-radius: var(--radius-lg); padding: 32px 28px;
  transition: border-color .25s, background .25s;
}
.feature-card:hover { border-color: var(--border-2); background: var(--bg-3); }
.feature-icon-wrap {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  background: var(--bg-3); border: 1px solid var(--border-1);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; color: var(--silver-4);
}
.feature-icon-wrap svg { width: 20px; height: 20px; }
.feature-title { font-weight: 500; font-size: 15px; margin-bottom: 8px; color: var(--white); }
.feature-desc { font-size: 14px; font-weight: 400; color: var(--silver-2); line-height: 1.7; }

/* ── GAMES GRID ── */
.games-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.game-card {
  background: var(--bg-2); border: 1px solid var(--border-1);
  border-radius: var(--radius-md); padding: 20px 16px;
  text-align: center; cursor: default;
  transition: border-color .2s, background .2s;
}
.game-card:hover { border-color: var(--border-2); background: var(--bg-3); }
.game-card-icon {
  width: 40px; height: 40px; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--silver-3);
}
.game-card-icon svg { width: 36px; height: 36px; }
.game-name { font-size: 12.5px; font-weight: 400; color: var(--silver-3); }
.game-badge {
  display: inline-block; font-size: 9.5px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase;
  background: var(--bg-3); border: 1px solid var(--border-0);
  color: var(--silver-1); padding: 2px 7px; border-radius: 100px; margin-top: 6px;
}

/* ── SPEC CARD ── */
.spec-card {
  background: var(--bg-2); border: 1px solid var(--border-1);
  border-radius: var(--radius-xl); overflow: hidden; position: relative;
}
.spec-card-top {
  padding: 48px 48px 40px;
  background: linear-gradient(135deg, var(--bg-3) 0%, var(--bg-2) 100%);
  border-bottom: 1px solid var(--border-0); position: relative;
}
.spec-card-top::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 80% at 90% 10%, rgba(200,205,211,0.04) 0%, transparent 70%);
}
.spec-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  background: var(--bg-4); border: 1px solid var(--border-1);
  color: var(--silver-3); padding: 5px 13px; border-radius: 100px; margin-bottom: 20px;
}
.spec-name {
  font-size: 2.2rem; font-weight: 600;
  letter-spacing: -0.025em; margin-bottom: 6px;
}
.spec-sub { font-size: 15px; font-weight: 400; color: var(--silver-2); margin-bottom: 36px; }
.spec-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.spec-metric {
  background: var(--bg-4); border: 1px solid var(--border-0);
  border-radius: var(--radius-md); padding: 18px 20px;
}
.spec-metric-label { font-size: 10.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--silver-2); margin-bottom: 6px; }
.spec-metric-value { font-size: 1.6rem; font-weight: 600; color: var(--white); letter-spacing: -0.025em; }
.spec-metric-sub { font-size: 11.5px; font-weight: 400; color: var(--silver-2); margin-top: 2px; }
.spec-card-bottom {
  padding: 28px 48px 36px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px;
}
.spec-price {
  font-size: 3.2rem; font-weight: 600;
  color: var(--white); letter-spacing: -0.035em; line-height: 1;
}
.spec-price sub { font-size: 1rem; font-weight: 400; color: var(--silver-2); margin-left: 4px; vertical-align: baseline; }
.spec-price-note { font-size: 12px; font-weight: 400; color: var(--silver-1); margin-top: 4px; }

/* ── HOW STEPS ── */
.how-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border: 1px solid var(--border-1); border-radius: var(--radius-lg); overflow: hidden;
}
.how-step { padding: 36px 28px; border-right: 1px solid var(--border-0); }
.how-step:last-child { border-right: none; }
.how-step-num {
  font-size: 3rem; font-weight: 300;
  color: var(--border-1); line-height: 1; margin-bottom: 16px; letter-spacing: -0.04em;
}
.how-step h3 { font-size: 14.5px; font-weight: 500; margin-bottom: 8px; }
.how-step p { font-size: 13px; font-weight: 400; color: var(--silver-2); line-height: 1.7; }

/* ── COMPARISON TABLE ── */
.compare-table {
  width: 100%; border-collapse: collapse;
  border: 1px solid var(--border-1); border-radius: var(--radius-lg); overflow: hidden;
}
.compare-table th, .compare-table td {
  padding: 14px 20px; text-align: left;
  border-bottom: 1px solid var(--border-0); font-size: 14px;
}
.compare-table th {
  background: var(--bg-3); font-size: 11px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--silver-2);
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table td:not(:first-child) { text-align: left; }
.compare-table .chk { color: var(--green); }
.compare-table .x { color: var(--silver-1); }

/* ── DOCS LAYOUT ── */
.docs-layout { display: grid; grid-template-columns: 220px 1fr; gap: 56px; }
.docs-sidebar { position: sticky; top: calc(var(--nav-h) + 24px); height: fit-content; }
.docs-sidebar-group {
  font-size: 10px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  color: var(--silver-1); padding: 14px 10px 5px;
}
.docs-sidebar a {
  display: block; font-size: 13px; font-weight: 400; color: var(--silver-2);
  padding: 7px 10px; border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  transition: color .15s, background .15s, border-color .15s;
}
.docs-sidebar a:hover { color: var(--silver-4); background: var(--bg-2); }
.docs-sidebar a.active { color: var(--white); border-left-color: var(--white); background: var(--bg-2); }
.docs-content h1 { margin-bottom: 6px; }
.docs-content .page-date { font-size: 12px; color: var(--silver-1); margin-bottom: 48px; }
.docs-content h2 {
  font-size: 1.1rem; font-weight: 500;
  margin: 40px 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border-0);
}
.docs-content p { font-size: 15px; font-weight: 400; color: var(--silver-3); margin-bottom: 14px; line-height: 1.8; }
.docs-content ul { padding-left: 20px; margin-bottom: 14px; }
.docs-content li { font-size: 15px; font-weight: 400; color: var(--silver-3); margin-bottom: 7px; line-height: 1.75; }
.docs-content strong { color: var(--silver-5); font-weight: 500; }
.docs-callout {
  background: var(--bg-2); border: 1px solid var(--border-1);
  border-left: 3px solid var(--silver-3); border-radius: var(--radius-md);
  padding: 16px 20px; margin: 20px 0; font-size: 14px; font-weight: 400; color: var(--silver-3);
}
.docs-code {
  background: var(--bg-2); border: 1px solid var(--border-1);
  border-radius: var(--radius-md); padding: 16px 20px;
  font-family: 'Fira Code', 'JetBrains Mono', monospace;
  font-size: 13px; color: var(--silver-4); overflow-x: auto; margin: 16px 0;
}

/* ── LEGAL PAGES ── */
.legal-content h1 { margin-bottom: 6px; }
.legal-content .page-date { font-size: 12px; color: var(--silver-1); margin-bottom: 48px; }
.legal-content h2 {
  font-size: 1.05rem; font-weight: 500;
  margin: 36px 0 10px; padding-bottom: 9px; border-bottom: 1px solid var(--border-0);
}
.legal-content p { font-size: 14.5px; font-weight: 400; color: var(--silver-2); margin-bottom: 12px; line-height: 1.8; }
.legal-content ul { padding-left: 20px; margin-bottom: 12px; }
.legal-content li { font-size: 14.5px; font-weight: 400; color: var(--silver-2); margin-bottom: 6px; line-height: 1.75; }
.legal-content strong { color: var(--silver-4); font-weight: 500; }

/* ── FOOTER ── */
#footer {
  border-top: 1px solid var(--border-0);
  padding: 56px 0 40px; position: relative; z-index: 1;
}
.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px;
}
.footer-brand img { height: 28px; margin-bottom: 14px; }
.footer-brand p { font-size: 13px; font-weight: 400; color: var(--silver-1); line-height: 1.7; max-width: 240px; }
.footer-col h4 { font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--silver-2); margin-bottom: 14px; }
.footer-col a { display: block; font-size: 13px; font-weight: 400; color: var(--silver-1); margin-bottom: 9px; transition: color .15s; }
.footer-col a:hover { color: var(--silver-4); }
.footer-bottom {
  border-top: 1px solid var(--border-0); padding-top: 24px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { font-size: 12px; font-weight: 400; color: var(--silver-1); }

/* ── PAGE WRAPPERS ── */
.page-wrap { padding-top: var(--nav-h); min-height: 100vh; position: relative; z-index: 1; }
.page-hero { padding: 80px 0 72px; border-bottom: 1px solid var(--border-0); }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .4s var(--ease-out) both; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
.delay-4 { animation-delay: .4s; }
.delay-5 { animation-delay: .5s; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .games-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 768px) {
  .container, .container-sm { padding: 0 24px; }
  .section { padding: 64px 0; }
  .nav-links { display: none; }
  .nav-mobile-toggle { display: flex; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .features-grid { grid-template-columns: 1fr; }
  .games-grid { grid-template-columns: repeat(3, 1fr); }
  .how-grid { grid-template-columns: 1fr 1fr; }
  .how-step:nth-child(2) { border-right: none; }
  .how-step:nth-child(3), .how-step:nth-child(4) { border-top: 1px solid var(--border-0); }
  .spec-metrics { grid-template-columns: 1fr 1fr; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .spec-card-top, .spec-card-bottom { padding-left: 24px; padding-right: 24px; }
  .compare-table { font-size: 12.5px; }
  .compare-table th, .compare-table td { padding: 11px 12px; }
}
@media (max-width: 480px) {
  .games-grid { grid-template-columns: repeat(2, 1fr); }
  .how-grid { grid-template-columns: 1fr; }
  .how-step { border-right: none !important; border-bottom: 1px solid var(--border-0); }
  .how-step:last-child { border-bottom: none; }
}
