:root {
  --bg: #070b18;
  --bg-2: #0b1124;
  --panel: #101934;
  --panel-2: #142047;
  --line: rgba(214, 178, 94, 0.28);
  --gold: #e8c26a;
  --gold-2: #b98a2e;
  --blue: #2f6bff;
  --blue-2: #1b3fae;
  --text: #eef1f8;
  --muted: #9aa5c4;
  --ok: #34d17a;
  --bad: #ff5a6a;
  --radius: 12px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: Cinzel, Georgia, serif; line-height: 1.15; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; margin-top: 32px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 10px; border: 1px solid transparent;
  padding: 10px 18px; font: 600 15px Inter, sans-serif; color: var(--text);
  text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s;
  background: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn-primary {
  background: linear-gradient(180deg, #4b82ff, var(--blue-2));
  border-color: rgba(160, 190, 255, .55);
  box-shadow: 0 6px 22px rgba(47, 107, 255, .35), inset 0 1px 0 rgba(255,255,255,.25);
  font-family: Cinzel, serif; letter-spacing: .3px;
}
.btn-primary:hover { box-shadow: 0 8px 28px rgba(47, 107, 255, .5), inset 0 1px 0 rgba(255,255,255,.3); }
.btn-ghost, .btn-outline { border-color: var(--line); color: var(--gold); font-family: Cinzel, serif; }
.btn-ghost:hover, .btn-outline:hover { background: rgba(232, 194, 106, .08); }
.btn-outline { background: rgba(7, 11, 24, .55); }
.btn-sm { padding: 8px 16px; }
.btn-lg { padding: 14px 34px; font-size: 19px; border-radius: 12px; }
.btn-block { width: 100%; padding: 12px; font-size: 17px; }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(6, 9, 20, .82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1240px; margin: 0 auto; padding: 8px 20px;
  display: flex; align-items: center; gap: 28px;
}
.brand img { height: 46px; width: auto; }
.nav { display: flex; gap: 24px; flex: 1; }
.nav a { text-decoration: none; color: #d6dbea; font-weight: 500; font-size: 15px; padding: 6px 0; position: relative; }
.nav a:hover, .nav a.is-active { color: var(--gold); }
.nav a.is-active::after {
  content: ""; position: absolute; left: 15%; right: 15%; bottom: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px; cursor: pointer; }
.menu-toggle span { display: block; width: 20px; height: 2px; background: var(--gold); margin: 4px 0; }

.status-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: rgba(15, 22, 44, .9); border: 1px solid rgba(255,255,255,.12);
}
.status-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: #777; }
.status-pill.is-online .dot { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.status-pill.is-offline .dot { background: var(--bad); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: calc(100vh - 63px); display: flex; align-items: center; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(7,11,24,.96) 0%, rgba(7,11,24,.78) 38%, rgba(7,11,24,.15) 75%),
    linear-gradient(0deg, var(--bg) 0%, transparent 30%),
    url("/img/hero.webp") center right / cover no-repeat;
  animation: drift 30s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.08) translateX(-1%); } }
.hero-content { position: relative; max-width: 1240px; width: 100%; margin: 0 auto; padding: 40px 20px 80px; }
.hero-logo { width: min(440px, 80vw); margin: 0 0 10px -12px; filter: drop-shadow(0 0 30px rgba(47,107,255,.35)); }
.eyebrow {
  display: flex; align-items: center; gap: 12px; margin: 0 0 14px;
  color: var(--gold); font: 600 13px Inter, sans-serif; letter-spacing: 3px; text-transform: uppercase;
}
.eyebrow .rule { width: 34px; height: 1px; background: var(--gold); }
.hero h1 { font-size: clamp(44px, 7vw, 82px); font-weight: 700; text-shadow: 0 4px 30px rgba(0,0,0,.6); }
.gold {
  background: linear-gradient(180deg, #ffe7a3, var(--gold) 45%, var(--gold-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.divider { display: flex; align-items: center; gap: 10px; margin: 18px 0; width: 180px; }
.divider::before { content: ""; width: 8px; height: 8px; border: 1px solid var(--gold); transform: rotate(45deg); }
.divider span { flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); }
.lead { max-width: 560px; font-size: 18px; color: #d9deec; margin: 0 0 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-links { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 22px; font-size: 15px; }
.hero-links a { color: var(--gold); text-underline-offset: 3px; }

/* ---------- stats ---------- */
.stats {
  position: relative; z-index: 2; max-width: 1100px; margin: -60px auto 0; padding: 0 20px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
}
.stat {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); padding: 22px; text-align: center;
}
.stat:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.stat:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.stat strong { display: block; font: 700 30px Cinzel, serif; color: var(--gold); }
.stat span { color: var(--muted); font-size: 14px; }

/* ---------- sections ---------- */
.section { max-width: 1240px; margin: 0 auto; padding: 96px 20px; }
.section-alt { max-width: none; background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-top: 1px solid rgba(255,255,255,.04); }
.section-alt > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
.section-head { margin-bottom: 40px; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
}
.feature h3 { font-size: 21px; margin: 16px 0 8px; color: var(--gold); }
.feature p { margin: 0; color: #c7cee2; }
.feature-icon {
  width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 30%, rgba(47,107,255,.6), rgba(27,63,174,.35));
  border: 1px solid rgba(160,190,255,.4);
}
.feature-icon svg { width: 26px; height: 26px; fill: none; stroke: #e8eeff; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }

.classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.class-card {
  position: relative; padding: 24px; border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(47,107,255,.14), rgba(16,25,52,.9) 45%);
  border: 1px solid rgba(160,190,255,.18); transition: border-color .2s, transform .2s;
}
.class-card:hover { border-color: var(--gold); transform: translateY(-3px); }
.class-card h3 { font-size: 22px; margin: 10px 0 6px; }
.class-card p { margin: 0; color: #c7cee2; font-size: 15px; }
.class-tag { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); font-weight: 600; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.ranking { width: 100%; border-collapse: collapse; min-width: 520px; }
.ranking th, .ranking td { padding: 14px 18px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.06); }
.ranking th { font: 600 13px Inter; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); background: rgba(0,0,0,.2); }
.ranking tbody tr:hover { background: rgba(47,107,255,.08); }
.ranking td:first-child { font-family: Cinzel, serif; font-weight: 700; color: var(--gold); width: 60px; }
.ranking tr:last-child td { border-bottom: none; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.steps h3 { font-size: 20px; margin: 14px 0 6px; }
.steps p { margin: 0; color: #c7cee2; }
.step-n {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  font: 700 18px Cinzel; color: #0a0f20; background: linear-gradient(180deg, #ffe7a3, var(--gold-2));
}

.faq { display: grid; gap: 12px; max-width: 860px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; }
.faq summary::after { content: "+"; float: right; color: var(--gold); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 12px 0 0; color: #c7cee2; }

.footer { border-top: 1px solid var(--line); padding: 48px 20px; text-align: center; background: #05080f; }
.footer img { height: 70px; width: auto; margin: 0 auto 12px; }
.footer p { margin: 4px auto; max-width: 720px; }

/* ---------- modal ---------- */
.modal { border: none; padding: 0; background: transparent; color: var(--text); width: min(420px, calc(100vw - 32px)); }
.modal::backdrop { background: rgba(2, 4, 10, .75); backdrop-filter: blur(4px); }
.modal-card {
  position: relative; padding: 28px; border-radius: 16px;
  background: linear-gradient(180deg, var(--panel-2), var(--bg-2));
  border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.modal-logo { width: 180px; margin: -6px auto 6px; }
.modal-card h2 { text-align: center; font-size: 26px; }
.modal-card > .muted { text-align: center; margin: 4px 0 18px; }
.modal-close { position: absolute; top: 10px; right: 14px; background: none; border: none; color: var(--muted); font-size: 28px; cursor: pointer; }
.modal label { display: block; font-size: 14px; font-weight: 600; color: #d6dbea; margin-bottom: 14px; }
.modal input {
  display: block; width: 100%; margin-top: 6px; padding: 11px 12px;
  border-radius: 9px; border: 1px solid rgba(160,190,255,.25); background: rgba(3,6,15,.7);
  color: var(--text); font: 15px Inter;
}
.modal input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232,194,106,.18); }
.form-error { min-height: 22px; color: var(--bad); font-size: 14px; margin: 0 0 10px; }
.success { color: var(--ok); text-align: center; font-size: 17px; }
.signup-done { text-align: center; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: #070b18; border-bottom: 1px solid var(--line); padding: 8px 20px; }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 0; }
  .menu-toggle { display: block; margin-left: auto; }
  .topbar-actions .btn-ghost, .topbar-actions .status-pill { display: none; }
  .features, .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); margin-top: -40px; }
  .stat, .stat:first-child, .stat:last-child { border-radius: 0; }
  .hero-bg { background-position: 70% center; }
}
@media (max-width: 520px) {
  .topbar-inner { gap: 12px; padding: 8px 16px; }
  .brand img { height: 38px; }
  .hero-content { padding: 24px 16px 70px; }
  .btn-lg { width: 100%; }
  .section { padding: 64px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg { animation: none; }
  html { scroll-behavior: auto; }
}
