/* ===== Design tokens ===== */
:root {
  --bg: #07121f;
  --bg-alt: #0b1a2c;
  --surface: #12263a;
  --surface-2: #1a334d;
  --brand: #2ee6a8;
  --brand-dark: #16c48a;
  --brand-soft: rgba(46, 230, 168, .14);
  --on-brand: #042016;
  --text: #e8f4ff;
  --muted: #8fa8bf;
  --border: rgba(142, 210, 255, .12);
  --radius: 12px;
  --shadow: 0 18px 45px rgba(0, 0, 0, .45);
  --header-h: 74px;
  --max: 1200px;
  --pad: 20px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Be Vietnam Pro", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.28; margin: 0 0 14px; }
h1 { font-size: clamp(1.85rem, 3.6vw, 2.75rem); letter-spacing: -.5px; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); letter-spacing: -.3px; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 14px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--brand); color: var(--on-brand); padding: 10px 18px; font-weight: 700;
}
.skip-link:focus { left: 12px; top: 12px; }

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

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; border: 1px solid transparent; border-radius: 999px;
  padding: 11px 24px; font-size: .95rem; font-weight: 700;
  font-family: inherit; cursor: pointer; white-space: nowrap;
  text-decoration: none; transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: var(--on-brand); box-shadow: 0 8px 22px rgba(46, 230, 168, .28);
}
.btn-primary:hover { box-shadow: 0 12px 28px rgba(46, 230, 168, .42); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.btn-lg { padding: 14px 34px; font-size: 1.02rem; }
.btn-block { display: flex; width: 100%; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7, 18, 31, .94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, .45); }

.header-inner {
  display: flex; align-items: center; gap: 16px;
  height: var(--header-h);
}

.logo { display: inline-flex; align-items: center; min-width: 0; }
.logo img { height: 52px; width: auto; max-width: 100%; object-fit: contain; }

.nav-auth { display: flex; gap: 10px; margin-left: auto; flex-shrink: 0; }

/* ===== Hero (split) ===== */
.hero {
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(46, 230, 168, .16), transparent 70%),
    var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: clamp(40px, 6vw, 76px) 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
.eyebrow {
  display: inline-block; margin: 0 0 14px;
  padding: 5px 14px; border-radius: 999px;
  background: var(--brand-soft); border: 1px solid rgba(46, 230, 168, .32);
  color: var(--brand); font-size: .82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
}
.hero-copy h1 { margin-bottom: 18px; }
.hero-desc { color: var(--muted); font-size: 1.05rem; max-width: 54ch; margin-bottom: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }

.hero-chips {
  list-style: none; margin: 0; padding: 22px 0 0;
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 12px 30px;
  color: var(--muted); font-size: .92rem;
}
.hero-chips b { display: block; color: var(--brand); font-size: 1.25rem; line-height: 1.3; }

/* ===== Slider (hero card) ===== */
.hero-media .slider {
  border-radius: 18px; border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.slider { position: relative; width: 100%; overflow: hidden; }
.slides { display: flex; transition: transform .55s cubic-bezier(.4, 0, .2, 1); }
.slide { min-width: 100%; }
.slide img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; display: grid; place-items: center;
  background: rgba(7, 18, 31, .6); color: #fff;
  border: 1px solid var(--border); border-radius: 50%;
  font-size: 1rem; cursor: pointer; opacity: 0; transition: opacity .25s ease, background .2s ease;
}
.slider:hover .slider-arrow, .slider-arrow:focus-visible { opacity: 1; }
.slider-arrow:hover { background: var(--brand); color: var(--on-brand); }
.slider-arrow.prev { left: 12px; }
.slider-arrow.next { right: 12px; }

.slider-dots {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  display: flex; gap: 8px;
}
.slider-dots button {
  width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .5); cursor: pointer; transition: width .25s ease, background .25s ease;
}
.slider-dots button.is-active { width: 26px; border-radius: 999px; background: var(--brand); }

/* ===== Lobby ===== */
.lobby { padding: clamp(44px, 5vw, 66px) 0; }
.lobby-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 24px;
}
.lobby-head h2 { margin: 0; }
.lobby-all { color: var(--brand); font-weight: 700; font-size: .95rem; }
.lobby-all:hover { text-decoration: underline; }

.lobby-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.tile {
  position: relative; display: block; overflow: hidden;
  border-radius: 14px; border: 1px solid var(--border);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.tile img { width: 100%; aspect-ratio: 192 / 300; object-fit: cover; }
.tile-label {
  position: absolute; inset: auto 0 0 0;
  padding: 26px 12px 12px;
  background: linear-gradient(to top, rgba(4, 12, 20, .94), transparent);
  font-weight: 700; font-size: .95rem;
}
.tile-label small { display: block; color: var(--muted); font-weight: 400; font-size: .76rem; line-height: 1.5; }
.tile:hover { transform: translateY(-6px); border-color: var(--brand); box-shadow: 0 16px 34px rgba(46, 230, 168, .22); }

/* ===== KIM88 x OKVIP alliance ===== */
.alliance {
  padding: clamp(48px, 6vw, 78px) 0;
  background:
    linear-gradient(115deg, rgba(46, 230, 168, .08), transparent 48%),
    var(--surface);
  border-block: 1px solid var(--border);
}
.alliance-grid {
  display: grid; grid-template-columns: .9fr 1.1fr;
  gap: clamp(32px, 6vw, 76px); align-items: center;
}
.brand-lockup {
  display: flex; align-items: center; gap: 18px;
  margin: 8px 0 26px;
}
.brand-lockup img { width: auto; max-width: 38%; max-height: 52px; object-fit: contain; }
.brand-lockup span { color: var(--brand); font-size: 2rem; font-weight: 400; }
.alliance-brand h2 { font-size: clamp(1.55rem, 3vw, 2.25rem); }
.alliance-brand > p:last-child { color: var(--muted); margin: 0; }
.alliance-points { display: grid; gap: 12px; }
.alliance-points article {
  display: grid; grid-template-columns: 48px 1fr; gap: 16px;
  padding: 20px; background: rgba(7, 18, 31, .55);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.alliance-points article > span {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; background: var(--brand-soft);
  color: var(--brand); font-size: .8rem; font-weight: 800;
}
.alliance-points h3 { margin: 1px 0 5px; }
.alliance-points p { color: var(--muted); font-size: .9rem; margin: 0; }

/* ===== Article + sidebar ===== */
.doc { padding: clamp(44px, 5vw, 66px) 0; background: var(--bg-alt); border-block: 1px solid var(--border); }
.doc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(28px, 4vw, 52px); align-items: start; }

.doc-main h2 {
  margin-top: 38px; padding-left: 16px;
  border-left: 4px solid var(--brand);
}
.doc-main h2:first-child { margin-top: 0; }
.doc-main h3 { margin-top: 26px; color: var(--brand); }
.doc-main p { color: #c2d6e6; }
.doc-main strong { color: var(--text); }

.doc-aside { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 16px; }
.side-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.side-card h3 {
  margin-bottom: 16px; font-size: .88rem; text-transform: uppercase;
  letter-spacing: .8px; color: var(--brand);
}
.side-list { margin: 0 0 20px; display: grid; gap: 4px; }
.side-list dt { color: var(--muted); font-size: .84rem; }
.side-list dd { margin: 0 0 12px; font-weight: 700; font-size: .95rem; }
.side-list dd:last-child { margin-bottom: 0; }

.side-toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.side-toc a { color: var(--muted); font-size: .93rem; }
.side-toc a:hover { color: var(--brand); }

/* ===== Flow timeline ===== */
.flow { padding: clamp(44px, 5vw, 66px) 0; }
.flow h2 { text-align: center; margin-bottom: 42px; }
.flow-line {
  position: relative; list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.flow-line::before {
  content: ""; position: absolute; top: 7px; left: 8%; right: 8%;
  height: 2px; background: linear-gradient(90deg, var(--brand), rgba(46, 230, 168, .2));
}
.flow-line li { position: relative; padding-top: 34px; }
.flow-dot {
  position: absolute; top: 0; left: 0;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 0 5px rgba(46, 230, 168, .18);
}
.flow-line b { display: block; font-size: 1.05rem; margin-bottom: 6px; }
.flow-line p { color: var(--muted); font-size: .92rem; margin: 0; }

/* ===== Sections / FAQ ===== */
.section { padding: clamp(44px, 5vw, 66px) 0; background: var(--bg-alt); border-block: 1px solid var(--border); }
.section h2 { text-align: center; margin-bottom: 34px; }

.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 4px 20px;
}
.faq-item summary {
  cursor: pointer; padding: 14px 0; font-weight: 700; list-style: none;
  display: flex; justify-content: space-between; gap: 14px; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--brand); font-size: 1.4rem; line-height: 1; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { color: var(--muted); font-size: .93rem; padding-bottom: 10px; margin: 0; }

/* ===== CTA bar ===== */
.cta-bar { background: linear-gradient(120deg, #0d4a3a, #123a45 55%, #0b1a2c); }
.cta-bar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 26px; flex-wrap: wrap; padding-block: 40px;
}
.cta-bar h2 { margin-bottom: 6px; }
.cta-bar p { color: #b9d4d0; margin: 0; }

/* ===== Footer ===== */
.site-footer { background: #040c14; border-top: 1px solid var(--border); font-size: .93rem; }
.site-footer .logo img { height: 42px; }
.footer-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; padding-block: 30px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--brand); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  border-top: 1px solid var(--border); padding-block: 18px; color: var(--muted);
}
.footer-note { margin: 0; max-width: 60ch; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .logo img { height: 46px; }
  .doc-grid { grid-template-columns: 1fr; }
  .doc-aside { position: static; grid-template-columns: 1fr 1fr; }
  .lobby-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  :root { --header-h: 68px; }
  .logo img { height: 42px; }
  .nav-auth { gap: 8px; }
  .nav-auth .btn { padding: 9px 16px; font-size: .88rem; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .slide img { aspect-ratio: 16 / 7; }
  .slider-arrow { opacity: 1; width: 36px; height: 36px; }
  .alliance-grid { grid-template-columns: 1fr; }

  .flow-line { grid-template-columns: 1fr 1fr; }
  .flow-line::before { display: none; }
  .faq-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --header-h: 62px; --pad: 16px; }
  .logo img { height: 34px; }
  .header-inner { gap: 10px; }
  .nav-auth .btn { padding: 8px 14px; font-size: .82rem; }

  .hero-actions .btn { flex: 1 1 100%; }
  .hero-chips { gap: 10px 22px; }
  .hero-chips b { font-size: 1.1rem; }

  .lobby-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .brand-lockup img { max-width: 36%; max-height: 42px; }
  .alliance-points article { grid-template-columns: 40px 1fr; padding: 16px; gap: 12px; }
  .alliance-points article > span { width: 38px; height: 38px; }
  .doc-aside { grid-template-columns: 1fr; }
  .doc-main h2 { margin-top: 30px; padding-left: 12px; }
  .flow-line { grid-template-columns: 1fr; gap: 18px; }
  .cta-bar-inner { padding-block: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .slider-arrow { width: 32px; height: 32px; font-size: .85rem; }
  .slider-dots { bottom: 8px; }
}

@media (max-width: 420px) {
  :root { --header-h: 58px; --pad: 14px; }
  .header-inner { gap: 8px; }
  .logo img { height: 28px; }
  .nav-auth { gap: 6px; }
  .nav-auth .btn { padding: 7px 11px; font-size: .76rem; }
  .faq-item { padding: 2px 14px; }
  .footer-links { gap: 8px 16px; }
}

@media (max-width: 360px) {
  .logo img { height: 24px; }
  .nav-auth .btn { padding: 6px 10px; font-size: .72rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
