:root {
  --bg: #08090b;
  --bg-2: #0e1013;
  --fg: #eef0f2;
  --muted: #8b929c;
  --accent: #c8ff5a;
  --accent-2: #7c8cff;
  --line: rgba(255,255,255,0.08);
  --radius: 18px;
  --ff-display: 'Space Grotesk', sans-serif;
  --ff-body: 'Inter', sans-serif;
  --ff-mono: 'JetBrains Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { background: var(--bg); }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--ff-body);
  overflow-x: hidden;
  cursor: none;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; background: none; border: none; color: inherit; cursor: none; }
em { font-style: normal; color: var(--accent); }

::selection { background: var(--accent); color: #0a0a0a; }

/* ---------- Custom cursor ---------- */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--accent);
}
.cursor-ring {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.35);
  transition: width .25s ease, height .25s ease, border-color .25s ease, background .25s ease;
}
.cursor-ring.is-hover {
  width: 64px; height: 64px;
  background: rgba(200,255,90,0.08);
  border-color: var(--accent);
}
.cursor-ring.has-label {
  width: 84px; height: 84px;
  background: var(--accent); border-color: var(--accent);
}
.cursor-label {
  font-family: var(--ff-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase; color: #0a0a0a;
  opacity: 0; transition: opacity .2s ease;
}
.cursor-ring.has-label .cursor-label { opacity: 1; }
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
  body { cursor: auto; }
}

/* ---------- Overlays ---------- */
.noise-overlay {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 40;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.grid-overlay {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black, transparent);
}

.progress-bar {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 9998;
}

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 10000;
  display: flex; align-items: center; justify-content: center;
}
.loader-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.loader-mark { font-family: var(--ff-display); font-size: 14px; letter-spacing: 0.3em; color: var(--muted); }
.loader-bar { width: 160px; height: 1px; background: var(--line); overflow: hidden; }
.loader-fill { width: 0%; height: 100%; background: var(--accent); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 48px;
  transition: padding .4s ease, background .4s ease, backdrop-filter .4s ease, border-color .4s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  padding: 16px 48px;
  background: rgba(8,9,11,0.7);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-logo {
  font-family: var(--ff-display); font-weight: 600; font-size: 18px;
  display: flex; align-items: center; gap: 8px; letter-spacing: 0.02em;
}
.logo-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.nav-links { display: flex; gap: 40px; }
.nav-links a { position: relative; font-size: 14px; color: var(--muted); transition: color .3s ease; }
.nav-links a span { position: relative; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -4px; width: 0; height: 1px;
  background: var(--accent); transition: width .3s ease;
}
.nav-links a:hover { color: var(--fg); }
.nav-links a:hover::after { width: 100%; }
.nav-cta {
  font-size: 13px; padding: 10px 22px; border: 1px solid var(--line); border-radius: 100px;
  transition: border-color .3s ease, background .3s ease;
}
.nav-cta:hover { border-color: var(--accent); background: rgba(200,255,90,0.06); }
.nav-burger { display: none; flex-direction: column; gap: 5px; width: 24px; }
.nav-burger span { display: block; height: 1px; background: var(--fg); width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}
#heroCanvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 40%, transparent 0%, var(--bg) 85%);
  z-index: 1; pointer-events: none;
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 900px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--ff-mono); font-size: 12.5px; letter-spacing: 0.08em;
  color: var(--muted); text-transform: uppercase;
  border: 1px solid var(--line); padding: 8px 16px; border-radius: 100px;
  margin-bottom: 28px;
}
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(1.4); } }

.hero-title {
  font-family: var(--ff-display); font-weight: 700;
  font-size: clamp(48px, 9vw, 118px);
  line-height: 0.98; letter-spacing: -0.02em;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line span.reveal-inner { display: inline-block; will-change: transform; }

.hero-sub {
  margin-top: 30px; max-width: 560px;
  font-size: 18px; line-height: 1.6; color: var(--muted);
}
.hero-sub strong { color: var(--fg); font-weight: 600; }

.hero-actions { margin-top: 44px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--ff-body); font-weight: 600; font-size: 15px;
  padding: 16px 26px; border-radius: 100px;
  position: relative; isolation: isolate;
}
.btn svg { width: 16px; height: 16px; transition: transform .3s ease; }
.btn-primary { background: var(--accent); color: #0a0a0a; overflow: hidden; }
.btn-primary:hover svg { transform: translateX(4px); }
.btn-primary::before {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.55), transparent);
  transform: skewX(-20deg); transition: left .6s ease; pointer-events: none;
}
.btn-primary:hover::before { left: 130%; }
.btn-ghost { border: 1px solid var(--line); color: var(--fg); }
.btn-ghost:hover { border-color: rgba(255,255,255,0.4); }

.scroll-cue {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--muted);
  z-index: 2;
}
.scroll-cue-line { width: 1px; height: 40px; background: var(--line); position: relative; overflow: hidden; }
.scroll-cue-dot { position: absolute; top: -20px; left: 0; width: 100%; height: 20px; background: linear-gradient(var(--accent), transparent); animation: scrollDown 2s ease-in-out infinite; }
@keyframes scrollDown { 0% { top: -20px; } 100% { top: 40px; } }

/* ---------- Marquee ---------- */
.marquee-section { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 26px 0; overflow: hidden; }
.marquee-track {
  display: flex; width: max-content; gap: 24px;
  font-family: var(--ff-mono); font-size: 15px; letter-spacing: 0.05em; color: var(--muted);
  white-space: nowrap;
  animation: marqueeScroll 26s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track .dot { color: var(--accent); }
.marquee-track span:not(.dot) { transition: color .3s ease, text-shadow .3s ease; }
.marquee-track span:not(.dot):hover { color: var(--accent); text-shadow: 0 0 20px rgba(200,255,90,0.5); }
@keyframes marqueeScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Section shared ---------- */
section { position: relative; padding: 160px 48px; z-index: 2; }
.section-head { max-width: 780px; margin: 0 auto 90px; text-align: center; }
.section-tag {
  display: inline-block; font-family: var(--ff-mono); font-size: 12.5px; letter-spacing: 0.1em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 18px;
}
.section-title {
  font-family: var(--ff-display); font-weight: 600; font-size: clamp(30px, 4.5vw, 52px);
  line-height: 1.15; letter-spacing: -0.01em;
}
.reveal-line { display: block; overflow: hidden; }
.reveal-line > span { display: inline-block; will-change: transform; }

/* ---------- Capability ---------- */
.capability-pin {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center;
  min-height: 60vh;
}
.capability-visual {
  position: relative; height: 440px;
  display: flex; align-items: center; justify-content: center;
}
.orbit-ring { position: absolute; border: 1px solid var(--line); border-radius: 50%; }
.ring-1 { width: 160px; height: 160px; }
.ring-2 { width: 280px; height: 280px; border-style: dashed; opacity: .6; }
.ring-3 { width: 400px; height: 400px; opacity: .35; }
.orbit-core {
  width: 92px; height: 92px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--accent), var(--accent-2) 120%);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-display); font-weight: 700; color: #060606; font-size: 20px;
  box-shadow: 0 0 60px rgba(200,255,90,0.35);
  z-index: 2;
}
.orbit-node {
  position: absolute; padding: 8px 16px; border-radius: 100px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.03);
  font-family: var(--ff-mono); font-size: 12px; color: var(--fg);
  backdrop-filter: blur(6px);
}
/* centering offset for these is applied via GSAP (xPercent/yPercent) in
   capability.js, not CSS transform -- they also animate scale/opacity on
   entrance, and GSAP's inline transform would otherwise silently override
   a CSS-authored translate */
.node-1 { top: 6%; left: 50%; }
.node-2 { top: 50%; right: -2%; }
.node-3 { bottom: 6%; left: 50%; }
.node-4 { top: 50%; left: -2%; }

.capability-steps { display: flex; flex-direction: column; gap: 46px; }
.cap-step { opacity: 0.25; transition: opacity .4s ease; padding-left: 26px; border-left: 1px solid var(--line); }
.cap-step.is-active { opacity: 1; border-left-color: var(--accent); }
.cap-num { font-family: var(--ff-mono); color: var(--accent); font-size: 13px; }
.cap-step h3 { font-family: var(--ff-display); font-size: 22px; margin: 10px 0 8px; font-weight: 600; }
.cap-step p { color: var(--muted); line-height: 1.6; max-width: 420px; }

/* ---------- Stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
  max-width: 760px; margin: 0 auto; padding: 60px 48px;
}
.stat-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 44px 32px; text-align: center;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
  transform-style: preserve-3d;
}
.stat-num {
  display: block; font-family: var(--ff-display); font-weight: 700;
  font-size: clamp(40px, 5vw, 58px); color: var(--accent); letter-spacing: -0.02em;
}
.stat-label { display: block; margin-top: 12px; color: var(--muted); font-size: 14.5px; line-height: 1.5; }

/* ---------- Course ---------- */
.course-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.course-grid-single { max-width: 640px; grid-template-columns: 1fr; }
.course-card {
  position: relative; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 40px 30px; transform-style: preserve-3d;
  transition: border-color .4s ease;
}
.course-card:hover { border-color: rgba(255,255,255,0.25); }
.course-card h3 { font-family: var(--ff-display); font-size: 22px; margin: 24px 0 12px; font-weight: 600; }
.course-card p { color: var(--muted); line-height: 1.6; font-size: 15px; }
.course-grid-single .course-card { text-align: center; }
.course-grid-single .course-card p { margin: 0 auto 28px; max-width: 480px; }
.course-grid-single .course-card .btn { margin: 0 auto; }
.card-glow {
  position: absolute; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(200,255,90,0.12), transparent 70%);
  top: var(--y, 50%); left: var(--x, 50%); transform: translate(-50%, -50%);
  opacity: 0; transition: opacity .3s ease; pointer-events: none;
}
.course-card:hover .card-glow { opacity: 1; }

/* ---------- Playbook ---------- */
.playbook-card {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 60px; align-items: center;
  border: 1px solid var(--line); border-radius: 28px; padding: 70px;
  background: linear-gradient(135deg, rgba(124,140,255,0.06), rgba(200,255,90,0.04));
  position: relative; overflow: hidden;
}
.playbook-text h2 { font-family: var(--ff-display); font-size: clamp(28px, 4vw, 42px); margin: 16px 0 18px; font-weight: 600; }
.playbook-text p { color: var(--muted); line-height: 1.7; margin-bottom: 30px; max-width: 480px; }
.playbook-form { display: flex; gap: 12px; flex-wrap: wrap; }
.playbook-form input {
  flex: 1 1 240px; background: rgba(255,255,255,0.03); border: 1px solid var(--line);
  border-radius: 100px; color: var(--fg); font-size: 15px; font-family: var(--ff-body);
  padding: 16px 22px; transition: border-color .3s ease;
}
.playbook-form input:focus { outline: none; border-color: var(--accent); }
.playbook-visual { position: relative; height: 320px; }
.floating-doc {
  position: absolute; padding: 14px 20px; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(10,10,12,0.6);
  backdrop-filter: blur(8px);
  font-family: var(--ff-mono); font-size: 13px; color: var(--fg);
  box-shadow: 0 20px 40px rgba(0,0,0,0.35);
}
.doc-1 { top: 8%; left: 10%; }
.doc-2 { top: 30%; right: 5%; }
.doc-3 { top: 55%; left: 0%; }
.doc-4 { bottom: 10%; right: 20%; }
.doc-5 { top: 2%; right: 35%; }

/* ---------- Contact ---------- */
.contact-telegram { margin-top: 18px; color: var(--muted); font-size: 15px; }
.contact-telegram a { color: var(--accent); transition: color .3s ease; }
.contact-telegram a:hover { color: var(--fg); }

.contact-grid { max-width: 900px; margin: 0 auto; }

.contact-form { display: flex; flex-direction: column; gap: 26px; }
.field { position: relative; }
.field input, .field textarea {
  width: 100%; background: transparent; border: none; border-bottom: 1px solid var(--line);
  color: var(--fg); font-size: 17px; font-family: var(--ff-body); padding: 14px 4px; resize: none;
  transition: border-color .3s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field label {
  position: absolute; left: 4px; top: 14px; color: var(--muted); font-size: 17px;
  pointer-events: none; transition: all .25s ease;
}
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label {
  top: -14px; font-size: 12.5px; color: var(--accent);
}
.field-select { display: flex; flex-direction: column; gap: 10px; }
.field-select-label { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.field-select select {
  width: 100%; background: transparent; border: none; border-bottom: 1px solid var(--line);
  color: var(--fg); font-size: 17px; font-family: var(--ff-body); padding: 14px 4px;
  transition: border-color .3s ease; cursor: none; appearance: none;
}
.field-select select:focus { outline: none; border-color: var(--accent); }
.field-select select option { background: var(--bg-2); color: var(--fg); }
.btn-submit { align-self: flex-start; margin-top: 10px; cursor: none; }

/* ---------- Success modal ---------- */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(8px);
}
.modal-card {
  max-width: 420px; text-align: center; padding: 48px 40px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-2);
}
.modal-card h3 { font-family: var(--ff-display); font-size: 26px; color: var(--accent); margin-bottom: 14px; }
.modal-card p { color: var(--muted); line-height: 1.6; margin-bottom: 28px; }
.modal-card .btn { margin: 0 auto; }

/* ---------- Footer ---------- */
.footer {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px;
  padding: 50px 48px; border-top: 1px solid var(--line);
}
.footer-brand { display: flex; flex-direction: column; gap: 6px; }
.footer-tagline { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.footer-links { display: flex; gap: 30px; }
.footer-links a { color: var(--muted); font-size: 14px; transition: color .3s ease; }
.footer-links a:hover { color: var(--accent); }
.footer-copy { color: var(--muted); font-size: 13px; font-family: var(--ff-mono); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links {
    display: flex; flex-direction: column; align-items: center; gap: 28px;
    position: fixed; top: 0; right: 0;
    width: 70vw; max-width: 320px; height: 100svh;
    padding-top: 120px;
    background: rgba(8,9,11,0.97); backdrop-filter: blur(14px);
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    transition: transform .45s cubic-bezier(.16,1,.3,1);
    z-index: 90;
  }
  .nav-links.is-open { transform: translateX(0); }
  .nav-links a { font-size: 18px; }
  .nav-burger { display: flex; z-index: 101; }
  .nav-burger span { transition: transform .3s ease, opacity .3s ease; }
  .nav-burger.is-open span:first-child { transform: translateY(3px) rotate(45deg); }
  .nav-burger.is-open span:last-child { transform: translateY(-3px) rotate(-45deg); }
  section { padding: 110px 24px; }
  .capability-pin { grid-template-columns: 1fr; gap: 60px; }
  .capability-visual { height: 320px; }
  .stats { grid-template-columns: 1fr; }
  .course-grid { grid-template-columns: 1fr; }
  .playbook-card { grid-template-columns: 1fr; padding: 40px 28px; }
  .playbook-visual { height: 200px; }
}
