:root {
  --ink: #1b1530;
  --ink-soft: #4a4368;
  --paper: #faf8ff;
  --gold: #f6c453;
  --gold-deep: #d99a2b;
  --purple: #6d3bd1;
  --purple-deep: #4527a0;
  --purple-glow: #a78bfa;
  --teal: #2dd4bf;
  --shadow: 0 20px 60px -20px rgba(74, 32, 140, 0.45);
  --radius: 18px;
  font-size: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Poppins', system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: 'Cinzel', serif;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--ink);
}

p { margin: 0 0 1em; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.container {
  width: min(1140px, 92%);
  margin: 0 auto;
}

em { font-style: normal; color: var(--gold-deep); }

/* ───────────────────────── Floating rune background ───────────────────────── */

.rune-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.rune-field span {
  position: absolute;
  font-family: 'Cinzel', serif;
  font-size: clamp(28px, 4vw, 56px);
  color: rgba(109, 59, 209, 0.07);
  animation: drift 38s linear infinite;
}
.rune-field span:nth-child(1) { top: 8%;  left: 6%;  animation-duration: 42s; }
.rune-field span:nth-child(2) { top: 22%; left: 82%; animation-duration: 50s; animation-delay: -6s; }
.rune-field span:nth-child(3) { top: 48%; left: 14%; animation-duration: 36s; animation-delay: -14s; }
.rune-field span:nth-child(4) { top: 64%; left: 70%; animation-duration: 46s; animation-delay: -2s; }
.rune-field span:nth-child(5) { top: 80%; left: 30%; animation-duration: 40s; animation-delay: -20s; }
.rune-field span:nth-child(6) { top: 12%; left: 46%; animation-duration: 52s; animation-delay: -28s; }
.rune-field span:nth-child(7) { top: 88%; left: 60%; animation-duration: 34s; animation-delay: -10s; }
.rune-field span:nth-child(8) { top: 36%; left: 92%; animation-duration: 44s; animation-delay: -32s; }

@keyframes drift {
  0%   { transform: translateY(0) rotate(0deg); }
  50%  { transform: translateY(-40px) rotate(12deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

/* ───────────────────────── Header ───────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(250, 248, 255, 0.78);
  border-bottom: 1px solid rgba(109, 59, 209, 0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}
.brand-logo { width: 38px; height: 38px; border-radius: 50%; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-weight: 500;
}
.main-nav a:not(.btn) {
  position: relative;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
.main-nav a:not(.btn):hover { color: var(--purple-deep); }
.main-nav a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.main-nav a:not(.btn):hover::after { transform: scaleX(1); }

/* ───────────────────────── Buttons ───────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: #3a2200;
  box-shadow: 0 10px 30px -8px rgba(217, 154, 43, 0.65);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -8px rgba(217, 154, 43, 0.8); }

.btn-ghost {
  background: var(--purple);
  color: #fff;
}
.btn-ghost:hover { background: var(--purple-deep); transform: translateY(-1px); }

.btn-outline {
  border-color: rgba(255,255,255,0.7);
  color: #fff;
}
.btn-outline:hover { background: rgba(255,255,255,0.16); transform: translateY(-2px); }

.btn-lg { padding: 15px 30px; font-size: 1.05rem; }

/* ───────────────────────── Hero ───────────────────────── */

.hero {
  position: relative;
  isolation: isolate;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: -2%;
  background-size: cover;
  background-position: center;
  z-index: -2;
  transform: scale(1.04);
  filter: saturate(1.1);
}
.hero-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(80% 60% at 50% 30%, rgba(27, 21, 48, 0.35) 0%, rgba(27, 21, 48, 0.78) 100%),
    linear-gradient(180deg, rgba(27,21,48,0.55) 0%, rgba(27,21,48,0.85) 100%);
}

.hero-inner {
  position: relative;
  padding: 130px 0 100px;
  color: #fff;
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  margin-bottom: 22px;
  backdrop-filter: blur(6px);
}

.hero h1 {
  font-size: clamp(2.2rem, 5.6vw, 3.6rem);
  color: #fff;
  text-shadow: 0 6px 30px rgba(0,0,0,0.45);
}
.hero .accent {
  background: linear-gradient(135deg, var(--gold) 0%, #fff7e0 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: 1.08rem;
  color: rgba(255,255,255,0.88);
  max-width: 640px;
  margin: 18px auto 32px;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.hero-note {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.7);
}
.hero-note em { color: var(--gold); }

/* ───────────────────────── Sections ───────────────────────── */

.section {
  position: relative;
  padding: 100px 0;
  z-index: 1;
}

.section-title {
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  text-align: center;
}
.section-title.light { color: #fff; text-shadow: 0 4px 24px rgba(0,0,0,0.5); }

.section-lead {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
  color: var(--ink-soft);
  font-size: 1.05rem;
}
.section-lead.light { color: rgba(255,255,255,0.85); }

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ───────────────────────── Feature grid ───────────────────────── */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.feature-card {
  background: #fff;
  border: 1px solid rgba(109, 59, 209, 0.1);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(246, 196, 83, 0.6);
  box-shadow: 0 26px 60px -18px rgba(74, 32, 140, 0.55);
}
.feature-icon {
  font-size: 2rem;
  margin-bottom: 14px;
  display: inline-block;
}
.feature-card h3 { font-size: 1.12rem; }
.feature-card p { color: var(--ink-soft); margin-bottom: 0; font-size: 0.96rem; }

/* ───────────────────────── Classes ───────────────────────── */

.section-classes {
  background:
    radial-gradient(60% 50% at 85% 0%, rgba(246, 196, 83, 0.16) 0%, transparent 60%),
    radial-gradient(60% 60% at 10% 100%, rgba(109, 59, 209, 0.12) 0%, transparent 60%),
    var(--paper);
}

.class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 26px;
}

.class-card {
  background: linear-gradient(180deg, #ffffff 0%, #f4effe 100%);
  border: 1px solid rgba(109, 59, 209, 0.14);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.class-card:hover { transform: translateY(-8px) rotate(-0.5deg); box-shadow: 0 30px 70px -18px rgba(74, 32, 140, 0.5); }
.class-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  object-position: top center;
  background: linear-gradient(180deg, #efe7ff 0%, #d9c9fb 100%);
}
.class-card h3 { margin: 22px 0 4px; font-size: 1.18rem; }
.class-card .class-domain {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 10px;
}
.class-card p:last-child { padding: 0 22px 26px; color: var(--ink-soft); font-size: 0.94rem; margin-bottom: 0; }

/* ───────────────────────── Video section ───────────────────────── */

.section-video {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
}
.hero-bg-dark { z-index: -2; }
.hero-veil-dark {
  z-index: -1;
  background: linear-gradient(180deg, rgba(20, 16, 38, 0.88) 0%, rgba(20, 16, 38, 0.94) 100%);
}

.video-frame {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 80px -16px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.18);
  aspect-ratio: 16 / 9;
  background: #000;
}
.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.video-fallback {
  text-align: center;
  margin-top: 18px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
}
.video-fallback a { color: var(--gold); font-weight: 600; }
.video-fallback a:hover { text-decoration: underline; }

/* ───────────────────────── Final CTA ───────────────────────── */

.cta-final {
  background: linear-gradient(135deg, var(--purple-deep) 0%, var(--purple) 100%);
  color: #fff;
  overflow: hidden;
}
.cta-final-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 48px;
}
.cta-final h2 { color: #fff; }
.cta-final p { color: rgba(255,255,255,0.85); font-size: 1.05rem; }
.boss-portrait {
  width: 200px;
  filter: drop-shadow(0 24px 50px rgba(0,0,0,0.5));
  animation: float 5s ease-in-out infinite;
}
.boss-portrait img { border-radius: 14px; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

@media (max-width: 720px) {
  .cta-final-inner { grid-template-columns: 1fr; text-align: center; }
  .boss-portrait { margin: 0 auto; width: 160px; }
}

/* ───────────────────────── Footer ───────────────────────── */

.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  padding: 56px 0 30px;
}
.footer-inner { text-align: center; }
.brand-footer {
  justify-content: center;
  color: #fff;
  margin-bottom: 14px;
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin: 18px 0 28px;
  font-size: 0.92rem;
}
.footer-links a:hover { color: var(--gold); }
.footer-copy { font-size: 0.82rem; color: rgba(255,255,255,0.45); margin: 0; }

/* ───────────────────────── Responsive ───────────────────────── */

@media (max-width: 760px) {
  .main-nav { gap: 16px; }
  .main-nav a:not(.btn) { display: none; }
  .hero-inner { padding: 110px 0 80px; }
  .section { padding: 70px 0; }
}
