/* ============================================================
   GENERATION 6573 — Design tokens
   ============================================================ */
:root {
  --bg: #0a0a12;
  --bg-elev: #12121e;
  --bg-elev-2: #191927;
  --border: #26263a;
  --border-soft: #1c1c2c;
  --text: #edEDf5;
  --text-muted: #9a9ab2;
  --text-faint: #62627a;

  --cyan: #38bdf8;
  --purple: #8b5cf6;
  --magenta: #d946ef;
  --grad: linear-gradient(90deg, var(--cyan), var(--purple) 55%, var(--magenta));
  --grad-soft: linear-gradient(135deg, rgba(56,189,248,0.14), rgba(139,92,246,0.14));

  --font-display: "Space Grotesk", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --container: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 800px 500px at 15% -10%, rgba(139,92,246,0.16), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 0%, rgba(56,189,248,0.12), transparent 55%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

::selection { background: rgba(139,92,246,0.4); color: #fff; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { color: var(--text-muted); margin: 0 0 1em; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--purple);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--grad);
}

.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad);
  color: #08080d;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -8px rgba(139,92,246,0.55); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--purple); background: rgba(139,92,246,0.08); }

.btn-sm { padding: 9px 18px; font-size: 13.5px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10,10,18,0.72);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}
.brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 4px;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
}
.brand-tag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--text-faint);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav-links a:not(.btn) {
  font-size: 14.5px;
  color: var(--text-muted);
  transition: color 0.15s ease;
  position: relative;
}
.nav-links a:not(.btn):hover { color: var(--text); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--grad);
  border-radius: 2px;
}
.nav-cta { display: none; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  color: var(--text);
}
@media (min-width: 860px) { .nav-cta { display: inline-flex; } }
@media (max-width: 859px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 24px 24px;
    gap: 18px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links .btn { width: 100%; text-align: center; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 84px 0 60px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero { padding: 52px 0 40px; text-align: center; }
  .hero .eyebrow { justify-content: center; }
}
.hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  margin-bottom: 22px;
}
.hero p.lead {
  font-size: 17.5px;
  max-width: 46ch;
  margin-bottom: 32px;
}
@media (max-width: 900px) { .hero p.lead { margin-left: auto; margin-right: auto; } }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
@media (max-width: 900px) { .hero-actions { justify-content: center; } }

.hero-strip {
  margin-top: 44px;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.08em;
}
@media (max-width: 900px) { .hero-strip { justify-content: center; } }
.hero-strip span { color: var(--cyan); }

/* Orbit graphic */
.orbit-wrap {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  aspect-ratio: 1;
}
.orbit-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border);
}
.orbit-ring.r2 {
  inset: 34px;
  border: 1.5px dashed var(--border);
  animation: spin 40s linear infinite;
}
.orbit-core {
  position: absolute;
  inset: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: radial-gradient(circle at 30% 20%, rgba(139,92,246,0.18), transparent 65%);
}
.orbit-core .num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 46px;
}
.orbit-core .lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--text-faint);
  margin-top: 6px;
}
.orbit-node {
  position: absolute;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  animation: float 6s ease-in-out infinite;
}
.orbit-node svg { width: 20px; height: 20px; }
.orbit-node.n1 { top: -4%; left: 14%; animation-delay: 0s; color: var(--cyan); }
.orbit-node.n2 { top: -4%; right: 14%; animation-delay: 1.2s; color: var(--purple); }
.orbit-node.n3 { bottom: -4%; left: 14%; animation-delay: 2.4s; color: var(--magenta); }
.orbit-node.n4 { bottom: -4%; right: 14%; animation-delay: 3.6s; color: var(--purple); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- Section shells ---------- */
section { padding: 76px 0; }
.section-head { max-width: 620px; margin-bottom: 46px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); }

.panel {
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}

/* ---------- Why / radial diagram ---------- */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 920px) { .why-grid { grid-template-columns: 1fr; } }

.compare-row {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--border-soft);
}
.compare-row:last-child { border-bottom: 1px solid var(--border-soft); }
.compare-icon {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--cyan);
}
.compare-icon svg { width: 18px; height: 18px; }
.compare-row p { margin: 0; font-size: 14.5px; }
.compare-row strong { color: var(--text); }

blockquote.pull {
  margin: 26px 0 0;
  padding: 18px 20px;
  border-left: 2px solid transparent;
  border-image: var(--grad) 1;
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--text);
}
blockquote.pull span { display: block; color: var(--purple); }

.radial {
  position: relative;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 1;
  margin: 0 auto;
}
.radial-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 34%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px dashed var(--border);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 10px;
  background: var(--bg);
}
.radial svg.lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.radial svg.lines path {
  fill: none;
  stroke: var(--border);
  stroke-width: 1.2;
  stroke-dasharray: 4 260;
  stroke-dashoffset: 0;
  transition: stroke-dasharray 1.1s ease;
}
.radial.in-view svg.lines path { stroke-dasharray: 260 0; }

.radial-node {
  position: absolute;
  width: 108px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.radial.in-view .radial-node { opacity: 1; transform: translateY(0); }
.radial-node .ic {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  display: flex; align-items: center; justify-content: center;
  color: var(--cyan);
}
.radial-node .ic svg { width: 19px; height: 19px; }
.radial-node span { font-size: 12px; color: var(--text-muted); line-height: 1.3; }

/* ---------- Course preview grid ---------- */
.grade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.grade-card {
  padding: 22px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background: var(--bg-elev);
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.grade-card:hover { border-color: var(--purple); transform: translateY(-3px); }
.grade-card .g-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.12em;
}
.grade-card h3 { font-size: 18px; margin: 6px 0 8px; }
.grade-card p { font-size: 13.5px; margin: 0; }

/* ---------- Demo card ---------- */
.demo-card {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  padding: 34px 38px;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background: linear-gradient(135deg, rgba(56,189,248,0.07), rgba(139,92,246,0.07));
}
.demo-card-icon {
  flex: none;
  position: relative;
  width: 74px; height: 74px;
  border-radius: 50%;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.demo-card-icon::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px dashed var(--border);
}
.demo-card-icon svg { width: 26px; height: 26px; color: var(--cyan); }
.demo-card-body { flex: 1 1 320px; }
.demo-card-body h2 { font-size: 21px; margin-bottom: 8px; }
.demo-card-body p { margin-bottom: 0; font-size: 14.5px; }
.demo-card-actions { flex: none; }
.demo-card.compact {
  padding: 22px 26px;
  gap: 20px;
}
.demo-card.compact .demo-card-icon { width: 54px; height: 54px; }
.demo-card.compact .demo-card-icon svg { width: 20px; height: 20px; }
.demo-card.compact .demo-card-body h2 { font-size: 17px; margin-bottom: 4px; }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.gallery-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border-soft);
  background: var(--bg-elev);
}
.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.gallery-card:hover img { transform: scale(1.04); }
.gallery-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 16px 12px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.75));
  font-size: 13px;
  color: #fff;
}
.gallery-empty {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-faint);
  text-align: center;
  padding: 20px;
}
.gallery-empty svg { width: 26px; height: 26px; opacity: 0.6; }
.gallery-empty span { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.04em; max-width: 22ch; }
.gallery-note {
  margin-top: 28px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: var(--bg-elev);
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.gallery-note code {
  color: var(--cyan);
  background: rgba(56,189,248,0.08);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ---------- CTA banner ---------- */
.cta-banner {
  border-radius: 20px;
  padding: 54px 40px;
  background: var(--grad-soft);
  border: 1px solid var(--border-soft);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner h2 { font-size: clamp(24px, 3.2vw, 32px); max-width: 640px; margin: 0 auto 14px; }
.cta-banner p { max-width: 520px; margin: 0 auto 28px; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border-soft);
  padding: 48px 0 28px;
  margin-top: 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-grid ul a { font-size: 14px; color: var(--text-muted); }
.footer-grid ul a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 22px;
  border-top: 1px solid var(--border-soft);
  font-size: 12.5px;
  color: var(--text-faint);
}

/* ============================================================
   COURSES PAGE
   ============================================================ */
.page-header {
  padding: 60px 0 20px;
  text-align: center;
}
.page-header h1 { font-size: clamp(30px, 4.4vw, 44px); }
.page-header p { max-width: 560px; margin: 0 auto; }

.timeline {
  position: relative;
  max-width: 880px;
  margin: 40px auto 0;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(var(--cyan), var(--purple), var(--magenta));
  opacity: 0.5;
}
@media (max-width: 640px) { .timeline::before { left: 21px; } }

.tl-item {
  position: relative;
  padding-left: 76px;
  margin-bottom: 14px;
}
@media (max-width: 640px) { .tl-item { padding-left: 58px; } }

.tl-badge {
  position: absolute;
  left: 0; top: 8px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  z-index: 1;
}
@media (max-width: 640px) { .tl-badge { width: 44px; height: 44px; } }
.tl-badge .gnum { font-family: var(--font-mono); font-size: 9px; color: var(--text-faint); letter-spacing: 0.1em; }
.tl-badge .num { font-family: var(--font-display); font-weight: 700; font-size: 19px; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.tl-card {
  border: 1px solid var(--border-soft);
  background: var(--bg-elev);
  border-radius: var(--radius);
  overflow: hidden;
}
.tl-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  background: none;
  border: none;
  color: var(--text);
  text-align: left;
}
.tl-head h3 { margin: 0 0 4px; font-size: 17px; }
.tl-head .theme { font-size: 13.5px; color: var(--text-muted); }
.tl-chevron { flex: none; width: 20px; height: 20px; color: var(--text-faint); transition: transform 0.25s ease; }
.tl-card.open .tl-chevron { transform: rotate(180deg); }

.tl-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.tl-card.open .tl-body { max-height: 900px; }
.tl-body-inner { padding: 0 22px 24px; }
.tl-body-inner p { font-size: 14.5px; margin-bottom: 14px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.chip {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.tl-list { margin: 0; padding-left: 18px; }
.tl-list li { font-size: 14px; color: var(--text-muted); margin-bottom: 6px; }
.tl-list li::marker { color: var(--purple); }

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-info-card {
  padding: 30px 26px;
}
.contact-info-row {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--border-soft);
}
.contact-info-row:first-of-type { border-top: none; padding-top: 0; }
.contact-info-row .ic {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--cyan);
}
.contact-info-row .ic svg { width: 17px; height: 17px; }
.contact-info-row .lbl { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 3px; }
.contact-info-row .val { font-size: 14.5px; color: var(--text); }

.form-card { padding: 32px; }
.form-card h2 { font-size: 22px; margin-bottom: 6px; }
.form-card > p { margin-bottom: 26px; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 7px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14.5px;
  transition: border-color 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--purple);
  outline: none;
}
.field textarea { resize: vertical; min-height: 90px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }

.form-note { font-size: 12.5px; color: var(--text-faint); margin-top: 14px; }

.form-status {
  display: none;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 18px;
}
.form-status.show { display: block; }
.form-status.ok { background: rgba(56,189,248,0.1); border: 1px solid rgba(56,189,248,0.35); color: var(--cyan); }
.form-status.err { background: rgba(217,70,239,0.1); border: 1px solid rgba(217,70,239,0.35); color: var(--magenta); }

.config-warning {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #fbbf24;
  background: rgba(251,191,36,0.08);
  border: 1px solid rgba(251,191,36,0.3);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  display: none;
}
.config-warning.show { display: block; }
