:root {
  --bg: #05060a;
  --bg-soft: #0b0d16;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-2: rgba(255, 255, 255, 0.07);
  --stroke: rgba(255, 255, 255, 0.1);
  --stroke-2: rgba(255, 255, 255, 0.16);
  --text: #f2f4fb;
  --muted: #9aa3bd;
  --accent: #7c5cff;
  --accent-2: #18d3c8;
  --accent-3: #ff7ac0;
  --radius: 22px;
  --radius-sm: 14px;
  --maxw: 1160px;
  --shadow: 0 30px 80px -40px rgba(124, 92, 255, 0.55);
  font-family: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
h1, h2, h3 { font-family: "Space Grotesk", sans-serif; line-height: 1.08; margin: 0; letter-spacing: -0.02em; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }

.grad {
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-3) 50%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.muted { color: var(--muted); }

/* background orbs + grid */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; }
.orb--1 { width: 520px; height: 520px; background: var(--accent); top: -160px; left: -120px; }
.orb--2 { width: 460px; height: 460px; background: var(--accent-2); top: 30%; right: -160px; opacity: 0.4; }
.orb--3 { width: 420px; height: 420px; background: var(--accent-3); bottom: -180px; left: 30%; opacity: 0.32; }
.grid-fade {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--stroke) 1px, transparent 1px),
    linear-gradient(90deg, var(--stroke) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at 50% 20%, #000 0%, transparent 70%);
  opacity: 0.5;
}

/* layout */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: 92px 0; }
.section__head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section__head h2 { font-size: clamp(28px, 4vw, 44px); margin: 14px 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); font-weight: 600;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 12px var(--accent-2); }

/* topbar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto; padding: 16px 22px;
  backdrop-filter: blur(14px);
}
.topbar::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(5,6,10,0.85), rgba(5,6,10,0.2));
  border-bottom: 1px solid var(--stroke);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  font-family: "Space Grotesk"; font-weight: 700; box-shadow: var(--shadow);
}
.brand__name strong { display: block; font-size: 15px; letter-spacing: 0.04em; }
.brand__name small { color: var(--muted); font-size: 11px; }
.nav { display: flex; align-items: center; gap: 26px; font-size: 15px; }
.nav a { color: var(--muted); transition: color 0.2s; }
.nav a:hover { color: var(--text); }
.nav__cta {
  padding: 9px 16px; border-radius: 999px; color: var(--text) !important;
  background: var(--panel-2); border: 1px solid var(--stroke-2);
}
.nav__cta:hover { background: var(--accent); border-color: var(--accent); }
.burger { display: none; background: none; border: 0; flex-direction: column; gap: 5px; cursor: pointer; }
.burger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.3s; }

/* hero */
.hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center;
  padding: 70px 0 40px;
}
.hero__copy h1 { font-size: clamp(38px, 6vw, 68px); margin: 18px 0 20px; }
.lead { font-size: clamp(16px, 1.4vw, 19px); color: var(--muted); max-width: 540px; }
.hero__actions { display: flex; gap: 14px; margin: 32px 0; flex-wrap: wrap; }
.button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 24px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: transform 0.18s, box-shadow 0.2s, background 0.2s;
}
.button:hover { transform: translateY(-2px); }
.button--primary { background: linear-gradient(120deg, var(--accent), var(--accent-3)); color: #fff; box-shadow: var(--shadow); }
.button--ghost { background: var(--panel); border-color: var(--stroke-2); color: var(--text); }
.button--ghost:hover { background: var(--panel-2); }
.hero__trust { display: flex; gap: 30px; flex-wrap: wrap; margin-top: 8px; }
.hero__trust div { display: flex; flex-direction: column; }
.hero__trust strong { font-family: "Space Grotesk"; font-size: 28px; }
.hero__trust span { color: var(--muted); font-size: 13px; }

.hero__stage { position: relative; min-height: 420px; border-radius: 28px; overflow: hidden;
  border: 1px solid var(--stroke); background: radial-gradient(circle at 60% 40%, rgba(124,92,255,0.18), transparent 70%); }
.stage-glow { position: absolute; inset: 0; background: radial-gradient(circle at 50% 60%, rgba(24,211,200,0.18), transparent 65%); }
.spline { width: 100%; height: 100%; min-height: 420px; display: block; }
.stage-fallback { position: absolute; inset: 0; pointer-events: none; }
.chip {
  position: absolute; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--panel-2); border: 1px solid var(--stroke-2); backdrop-filter: blur(8px);
  animation: float 5s ease-in-out infinite;
}
.chip--ai { top: 26px; left: 26px; }
.chip--prompt { bottom: 30px; right: 26px; animation-delay: 1.5s; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* marquee */
.marquee { overflow: hidden; border-block: 1px solid var(--stroke); margin: 30px 0; padding: 16px 0; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee__track { display: flex; gap: 26px; white-space: nowrap; width: max-content; animation: scroll 28s linear infinite; font-family: "Space Grotesk"; font-size: 22px; color: var(--muted); }
.marquee__track span:nth-child(3n) { color: var(--accent); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* bento */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.bento__card {
  position: relative; padding: 28px; border-radius: var(--radius); overflow: hidden;
  background: var(--panel); border: 1px solid var(--stroke); transition: transform 0.25s, border-color 0.25s;
}
.bento__card:hover { transform: translateY(-4px); border-color: var(--stroke-2); }
.bento__card--lg { grid-column: span 2; }
.bento__card--accent { background: linear-gradient(150deg, rgba(124,92,255,0.18), rgba(255,122,192,0.08)); border-color: rgba(124,92,255,0.4); }
.bento__card .num { font-family: "Space Grotesk"; font-size: 13px; color: var(--accent-2); font-weight: 700; }
.bento__card h3 { font-size: 20px; margin: 12px 0 8px; }
.bento__card p { color: var(--muted); font-size: 15px; }
.card-link { display: inline-block; margin-top: 14px; color: var(--accent-3); font-weight: 600; }
.card-shine { position: absolute; width: 200px; height: 200px; background: radial-gradient(circle, rgba(124,92,255,0.4), transparent 70%); bottom: -60px; right: -40px; filter: blur(20px); }

/* lessons */
.lesson-toolbar { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 30px; }
.chip-filter {
  padding: 9px 18px; border-radius: 999px; background: var(--panel); border: 1px solid var(--stroke);
  color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer; transition: 0.2s;
}
.chip-filter:hover { color: var(--text); }
.chip-filter.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.lessons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.lesson-card {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: var(--radius-sm);
  background: var(--panel); border: 1px solid var(--stroke); transition: transform 0.22s, border-color 0.22s, background 0.22s;
}
.lesson-card:hover { transform: translateY(-4px); border-color: var(--accent); background: var(--panel-2); }
.lesson-card__top { display: flex; align-items: center; justify-content: space-between; }
.lesson-card__number { font-family: "Space Grotesk"; font-size: 22px; color: var(--accent); font-weight: 700; }
.lesson-card__tag { font-size: 11px; padding: 4px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--stroke); color: var(--muted); }
.lesson-card h3 { font-size: 16px; }
.lesson-card p { font-size: 13px; color: var(--muted); flex: 1; }
.lesson-card__project { font-size: 12px; color: var(--accent-2); font-weight: 600; }
.lesson-card__open { font-size: 13px; color: var(--text); opacity: 0.7; }

/* result */
.result { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.result h2 { font-size: clamp(26px, 3.4vw, 40px); margin: 14px 0; }
.checklist { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 32px; color: var(--text); }
.checklist li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: rgba(24,211,200,0.16); color: var(--accent-2); font-size: 13px; }
.device { border-radius: var(--radius); border: 1px solid var(--stroke); background: var(--bg-soft); padding: 18px; box-shadow: var(--shadow); }
.device__bar { display: flex; gap: 7px; margin-bottom: 16px; }
.device__bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--stroke-2); }
.device__hero { border-radius: 14px; padding: 30px 22px; background: linear-gradient(135deg, var(--accent), var(--accent-3)); margin-bottom: 14px; }
.device__hero p { font-size: 12px; opacity: 0.85; }
.device__hero h3 { font-size: 24px; }
.device__grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 14px; }
.device__grid span { height: 54px; border-radius: 10px; background: var(--panel-2); }
.device__cta { text-align: center; padding: 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--stroke); font-weight: 600; }

/* format */
.format-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; padding-block: 40px; }
.format__item { padding: 26px; border-radius: var(--radius-sm); background: var(--panel); border: 1px solid var(--stroke); }
.format__item h3 { font-size: 18px; margin-bottom: 8px; }
.format__item p { color: var(--muted); font-size: 15px; }

/* signup */
.signup__card { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 44px; border-radius: 28px; background: linear-gradient(150deg, rgba(124,92,255,0.16), rgba(24,211,200,0.06)); border: 1px solid var(--stroke-2); }
.signup__card h2 { font-size: clamp(24px, 3vw, 34px); margin: 12px 0; }
.signup__form { display: grid; gap: 14px; }
.signup__form label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.signup__form input { padding: 13px 16px; border-radius: 12px; background: rgba(5,6,10,0.6); border: 1px solid var(--stroke-2); color: var(--text); font-size: 15px; }
.signup__form input:focus { outline: none; border-color: var(--accent); }
.signup__form .button { justify-content: center; margin-top: 6px; }

/* footer */
.footer { max-width: var(--maxw); margin: 40px auto 0; padding: 30px 22px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--stroke); flex-wrap: wrap; gap: 16px; }
.footer__brand { display: flex; align-items: center; gap: 12px; }
.footer__brand strong { display: block; }
.footer__brand small { color: var(--muted); }
.footer__phone { font-family: "Space Grotesk"; font-size: 18px; }

/* assistant fab */
.assistant-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 60; width: 60px; height: 60px; border-radius: 50%;
  border: 1px solid var(--stroke-2); background: linear-gradient(135deg, var(--accent), var(--accent-3));
  color: #fff; font-size: 24px; cursor: pointer; box-shadow: var(--shadow); display: grid; place-items: center;
}
.assistant-fab__pulse { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--accent-2); animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(1.5); opacity: 0; } }

/* assistant chat panel */
.assistant-panel {
  position: fixed; bottom: 96px; right: 24px; z-index: 60; width: min(370px, calc(100vw - 32px));
  height: 480px; max-height: calc(100vh - 130px); display: flex; flex-direction: column;
  background: var(--bg-soft); border: 1px solid var(--stroke-2); border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow); opacity: 0; transform: translateY(16px) scale(0.98); pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.assistant-panel.open { opacity: 1; transform: none; pointer-events: auto; }
.assistant-panel__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--stroke); background: linear-gradient(120deg, rgba(124,92,255,0.2), rgba(255,122,192,0.08)); }
.assistant-close { background: none; border: 0; color: var(--muted); font-size: 16px; cursor: pointer; }
.assistant-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.a-msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.a-msg--bot { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--stroke); border-bottom-left-radius: 4px; }
.a-msg--user { align-self: flex-end; background: linear-gradient(120deg, var(--accent), var(--accent-3)); color: #fff; border-bottom-right-radius: 4px; }
.a-typing { opacity: 0.6; font-style: italic; }
.assistant-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--stroke); }
.assistant-form input { flex: 1; padding: 11px 14px; border-radius: 12px; background: rgba(5,6,10,0.6); border: 1px solid var(--stroke-2); color: var(--text); font-size: 14px; }
.assistant-form input:focus { outline: none; border-color: var(--accent); }
.assistant-form button { width: 44px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; font-size: 16px; cursor: pointer; }

/* reveal animation */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s cubic-bezier(.2,.7,.2,1), transform 0.7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* responsive */
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; }
  .hero__stage { min-height: 320px; order: -1; }
  .bento, .lessons { grid-template-columns: 1fr 1fr; }
  .bento__card--lg { grid-column: span 2; }
  .result, .signup__card { grid-template-columns: 1fr; }
  .format-row { grid-template-columns: 1fr; }
  .nav { display: none; }
  .burger { display: flex; }
  .nav.open { display: flex; position: absolute; top: 70px; right: 22px; flex-direction: column; padding: 18px; background: var(--bg-soft); border: 1px solid var(--stroke); border-radius: 16px; }
}
@media (max-width: 560px) {
  .lessons, .bento { grid-template-columns: 1fr; }
  .bento__card--lg { grid-column: span 1; }
  .section { padding: 64px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee__track, .chip, .assistant-fab__pulse { animation: none; }
}
