/*
Theme Name: My Custom Theme
Author: Aap ka naam
Version: 1.0
*/
/* ===================================================================
   CODECRAFT ACADEMY — style.css
   Sections:
   1.  Design tokens (CSS variables) + theme
   2.  Base & resets
   3.  Utilities (container, buttons, section heads)
   4.  Preloader
   5.  Custom cursor
   6.  Scroll progress bar
   7.  Navbar + mobile menu
   8.  Hero
   9.  Features
   10. Roadmap
   11. Code playground
   12. Stats
   13. Testimonials
   14. FAQ
   15. Footer + back-to-top
   16. Reveal animations
   17. Keyframes
   18. Responsive
   =================================================================== */

/* ============ 1. DESIGN TOKENS ============ */
:root {
  /* Accent ramps */
  --c-primary: #6366f1;
  --c-primary-2: #8b5cf6;
  --c-accent: #06b6d4;
  --c-success: #10b981;
  --c-warning: #f59e0b;
  --c-error: #ef4444;

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
  --grad-soft: linear-gradient(135deg, rgba(99,102,241,.18), rgba(6,182,212,.12));
  --grad-text: linear-gradient(135deg, #818cf8, #06b6d4);

  /* Fonts */
  --font-display: "Space Grotesk", "Poppins", system-ui, sans-serif;
  --font-body: "Poppins", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Spacing (8px system) */
  --s-1: .5rem;  --s-2: 1rem;  --s-3: 1.5rem;  --s-4: 2rem;
  --s-5: 3rem;   --s-6: 4rem;  --s-7: 6rem;    --s-8: 8rem;

  /* Radius */
  --r-sm: 8px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-pill: 999px;

  /* Motion */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --t-fast: .25s; --t-mid: .4s; --t-slow: .7s;

  /* Layout */
  --container: 1200px;
  --nav-h: 80px;

  /* Shadows / glass */
  --shadow-sm: 0 2px 8px rgba(0,0,0,.18);
  --shadow-md: 0 8px 30px rgba(0,0,0,.28);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.4);
  --shadow-glow: 0 0 40px rgba(99,102,241,.35);
}

/* Dark theme (default) */
[data-theme="dark"] {
  --bg: #07070f;
  --bg-2: #0d0d1a;
  --bg-3: #12121f;
  --surface: rgba(255,255,255,.04);
  --surface-2: rgba(255,255,255,.06);
  --border: rgba(255,255,255,.09);
  --border-strong: rgba(255,255,255,.16);
  --text: #f4f4f8;
  --text-muted: #a0a0b8;
  --text-dim: #6b6b85;
  --glass-blur: 14px;
  --nav-bg: rgba(7,7,15,.65);
  --blob-1: rgba(99,102,241,.5);
  --blob-2: rgba(139,92,246,.4);
  --blob-3: rgba(6,182,212,.35);
  --blob-4: rgba(236,72,153,.3);
}

/* Light theme */
[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-2: #ffffff;
  --bg-3: #eef0f7;
  --surface: rgba(255,255,255,.7);
  --surface-2: rgba(255,255,255,.85);
  --border: rgba(15,15,35,.1);
  --border-strong: rgba(15,15,35,.18);
  --text: #14142b;
  --text-muted: #555570;
  --text-dim: #8888a0;
  --glass-blur: 16px;
  --nav-bg: rgba(255,255,255,.7);
  --blob-1: rgba(99,102,241,.35);
  --blob-2: rgba(139,92,246,.28);
  --blob-3: rgba(6,182,212,.25);
  --blob-4: rgba(236,72,153,.2);
  --shadow-lg: 0 20px 60px rgba(20,20,43,.12);
}

/* ============ 2. BASE & RESETS ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  transition: background var(--t-mid) var(--ease), color var(--t-mid) var(--ease);
}

body.no-scroll { overflow: hidden; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.02em;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
::selection { background: rgba(99,102,241,.35); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: var(--r-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--c-primary); }

/* ============ 3. UTILITIES ============ */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--s-4); }
.container--narrow { max-width: 820px; }

.section { padding: var(--s-8) 0; position: relative; }

.section__head { max-width: 680px; margin: 0 auto var(--s-6); text-align: center; }
.section__eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: var(--s-2);
}
.section__title { font-size: clamp(1.9rem, 4vw, 3rem); margin-bottom: var(--s-2); }
.section__lead { color: var(--text-muted); font-size: 1.05rem; }

.accent { color: var(--c-primary-2); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .8em 1.6em;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .01em;
  border: 1px solid transparent;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
  will-change: transform;
}
.btn--lg { padding: 1em 2em; font-size: 1.05rem; }
.btn--primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 8px 24px rgba(99,102,241,.35);
}
.btn--primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 36px rgba(99,102,241,.5), var(--shadow-glow);
}
.btn--ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(var(--glass-blur));
}
.btn--ghost:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: var(--c-primary);
  box-shadow: var(--shadow-glow);
}

/* ============ 4. PRELOADER ============ */
.preloader {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center;
  background: var(--bg);
  transition: opacity .6s var(--ease), visibility .6s var(--ease);
}
.preloader.is-hidden { opacity: 0; visibility: hidden; }
.preloader__inner { text-align: center; }
.preloader__logo {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 700;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: pulse 1.4s var(--ease) infinite;
}
.preloader__bar {
  width: 220px; height: 4px; margin: var(--s-3) auto var(--s-2);
  background: var(--surface-2); border-radius: var(--r-pill); overflow: hidden;
}
.preloader__bar span {
  display: block; height: 100%; width: 40%;
  background: var(--grad-primary); border-radius: var(--r-pill);
  animation: load 1.2s var(--ease) infinite;
}
.preloader__text {
  font-family: var(--font-mono); font-size: .8rem; color: var(--text-dim);
  letter-spacing: .1em; text-transform: uppercase;
}

/* ============ 5. CUSTOM CURSOR ============ */
.cursor, .cursor-dot {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 10000;
  border-radius: 50%; transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}
.cursor {
  width: 36px; height: 36px;
  border: 1.5px solid rgba(255,255,255,.6);
  transition: width .25s var(--ease), height .25s var(--ease), background .25s var(--ease);
}
.cursor-dot { width: 6px; height: 6px; background: #fff; }
.cursor.is-hover { width: 60px; height: 60px; background: rgba(255,255,255,.1); }
@media (hover: none) { .cursor, .cursor-dot { display: none; } }

/* ============ 6. SCROLL PROGRESS ============ */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--grad-primary); z-index: 1000;
  box-shadow: 0 0 12px rgba(99,102,241,.6);
  transition: width .1s linear;
}

/* ============ 7. NAVBAR + MOBILE MENU ============ */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 900;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: transparent;
  transition: height var(--t-mid) var(--ease), background var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease), backdrop-filter var(--t-mid) var(--ease);
}
.navbar.is-scrolled {
  height: 64px;
  background: var(--nav-bg);
  backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; width: 100%; }

.nav__logo { display: flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.nav__logo-mark {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--grad-primary); color: #fff;
  font-family: var(--font-mono); font-size: .9rem; font-weight: 700;
  box-shadow: var(--shadow-glow);
}

.nav__links { display: flex; gap: var(--s-3); }
.nav__link {
  position: relative; font-weight: 500; font-size: .95rem; color: var(--text-muted);
  padding: .3rem 0; transition: color var(--t-fast) var(--ease);
}
.nav__link::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px; border-radius: 2px;
  background: var(--grad-primary);
  transition: width var(--t-mid) var(--ease-out);
}
.nav__link:hover, .nav__link.is-active { color: var(--text); }
.nav__link:hover::after, .nav__link.is-active::after { width: 100%; }

.nav__actions { display: flex; align-items: center; gap: var(--s-2); }

/* Theme toggle */
.theme-toggle { display: grid; place-items: center; padding: 4px; }
.theme-toggle__track {
  position: relative; display: block;
  width: 56px; height: 30px; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--border);
  transition: background var(--t-mid) var(--ease);
}
.theme-toggle__thumb {
  position: absolute; top: 2px; left: 2px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--grad-primary);
  display: grid; place-items: center;
  transition: transform var(--t-mid) var(--ease-spring);
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
[data-theme="light"] .theme-toggle__thumb { transform: translateX(26px); }
.theme-toggle__icon { position: absolute; width: 14px; height: 14px; color: #fff; transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.icon-sun { opacity: 0; transform: rotate(-90deg) scale(.5); }
.icon-moon { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="light"] .icon-sun { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="light"] .icon-moon { opacity: 0; transform: rotate(90deg) scale(.5); }

/* Hamburger */
.nav__hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; z-index: 950; }
.nav__hamburger span {
  width: 26px; height: 2.5px; border-radius: 2px; background: var(--text);
  transition: transform var(--t-mid) var(--ease), opacity var(--t-fast) var(--ease);
}
.nav__hamburger.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav__hamburger.is-open span:nth-child(2) { opacity: 0; }
.nav__hamburger.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed; top: 0; right: 0; z-index: 940;
  width: min(320px, 85vw); height: 100vh;
  background: var(--bg-2);
  border-left: 1px solid var(--border);
  padding: var(--s-4);
  display: flex; flex-direction: column; gap: var(--s-3);
  transform: translateX(100%);
  transition: transform var(--t-mid) var(--ease-out);
  box-shadow: var(--shadow-lg);
}
.mobile-menu.is-open { transform: translateX(0); }
.mobile-menu__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-4); }
.mobile-menu__close { font-size: 2rem; line-height: 1; color: var(--text-muted); }
.mobile-menu__nav { display: flex; flex-direction: column; gap: var(--s-1); flex: 1; }
.mobile-menu__link {
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 600;
  padding: .8rem 0; border-bottom: 1px solid var(--border);
  color: var(--text); transition: color var(--t-fast) var(--ease), padding-left var(--t-fast) var(--ease);
}
.mobile-menu__link:hover { color: var(--c-primary-2); padding-left: .6rem; }
.mobile-menu__cta { margin-top: auto; }
.mobile-menu__overlay {
  position: fixed; inset: 0; z-index: 930; background: rgba(0,0,0,.5);
  opacity: 0; visibility: hidden; transition: opacity var(--t-mid) var(--ease), visibility var(--t-mid) var(--ease);
  backdrop-filter: blur(2px);
}
.mobile-menu__overlay.is-open { opacity: 1; visibility: visible; }

/* ============ 8. HERO ============ */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + var(--s-4)) 0 var(--s-7);
  overflow: hidden;
}
.hero__shapes { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.shape { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .8; will-change: transform; }
.shape--1 { width: 480px; height: 480px; background: var(--blob-1); top: -120px; left: -100px; animation: float1 18s var(--ease) infinite; }
.shape--2 { width: 380px; height: 380px; background: var(--blob-2); bottom: -80px; right: -60px; animation: float2 22s var(--ease) infinite; }
.shape--3 { width: 300px; height: 300px; background: var(--blob-3); top: 40%; left: 55%; animation: float3 20s var(--ease) infinite; }
.shape--4 { width: 220px; height: 220px; background: var(--blob-4); bottom: 20%; left: 10%; animation: float1 26s var(--ease) infinite; }

.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--s-6); align-items: center; }

.hero__badge {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem 1rem; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(var(--glass-blur));
  font-size: .82rem; font-weight: 500; color: var(--text-muted);
  margin-bottom: var(--s-3);
}
.hero__badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-success); box-shadow: 0 0 10px var(--c-success); animation: pulse 2s var(--ease) infinite; }

.hero__title { font-size: clamp(2.4rem, 5.5vw, 4.2rem); line-height: 1.08; margin-bottom: var(--s-3); }
.hero__line { display: block; overflow: hidden; }
.hero__line::before {
  content: attr(data-text);
  display: inline-block;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transform: translateY(110%); opacity: 0;
  animation: lineUp .8s var(--ease-out) forwards;
}
.hero__line:nth-child(2)::before { animation-delay: .25s; }
.hero__line:nth-child(3)::before { animation-delay: .5s; }

.hero__subtitle { font-size: 1.1rem; color: var(--text-muted); max-width: 540px; margin-bottom: var(--s-4); }
.hero__actions { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-bottom: var(--s-5); }

.hero__stats { display: flex; gap: var(--s-4); }
.hero__stat { display: flex; flex-direction: column; }
.hero__stat strong { font-family: var(--font-display); font-size: 1.6rem; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__stat span { font-size: .85rem; color: var(--text-dim); }

/* Terminal */
.hero__terminal { perspective: 1000px; }
.terminal {
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: rotateY(-6deg) rotateX(3deg);
  transition: transform var(--t-slow) var(--ease-out);
}
.hero__terminal:hover .terminal { transform: rotateY(0) rotateX(0) translateY(-6px); }
.terminal__bar {
  display: flex; align-items: center; gap: .5rem;
  padding: .8rem 1rem; background: rgba(0,0,0,.25);
  border-bottom: 1px solid var(--border);
}
.terminal__dot { width: 12px; height: 12px; border-radius: 50%; }
.terminal__dot--red { background: #ff5f57; }
.terminal__dot--yellow { background: #febc2e; }
.terminal__dot--green { background: #28c840; }
.terminal__title { margin-left: auto; font-family: var(--font-mono); font-size: .78rem; color: var(--text-dim); }
.terminal__body { padding: var(--s-3); font-family: var(--font-mono); font-size: .88rem; min-height: 260px; }
.terminal__line { margin-bottom: .4rem; white-space: pre-wrap; }
.terminal__line--out { color: var(--text-dim); padding-left: 1.4rem; opacity: 0; }
.terminal__line--out.show { animation: fadeUp .4s var(--ease) forwards; }
.t-prompt { color: var(--c-accent); }
.t-cmd { color: var(--text); }
.t-cursor { color: var(--c-primary-2); animation: blink 1s steps(2) infinite; }

.hero__scroll {
  position: absolute; bottom: var(--s-3); left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  color: var(--text-dim); z-index: 1;
}
.hero__scroll-mouse {
  width: 26px; height: 42px; border: 2px solid var(--border-strong); border-radius: var(--r-pill);
  display: grid; place-items: start center; padding-top: 7px;
}
.hero__scroll-mouse span { width: 4px; height: 8px; border-radius: 2px; background: var(--c-primary-2); animation: scrollDot 1.6s var(--ease) infinite; }
.hero__scroll-text { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .15em; text-transform: uppercase; }

/* ============ 9. FEATURES ============ */
.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s-3);
}
.feature-card {
  position: relative;
  padding: var(--s-4);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(var(--glass-blur));
  transform-style: preserve-3d;
  transition: box-shadow var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease);
  will-change: transform;
  overflow: hidden;
}
.feature-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: var(--grad-soft); opacity: 0; transition: opacity var(--t-mid) var(--ease);
}
.feature-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.feature-card:hover::before { opacity: 1; }
.feature-card > * { position: relative; transform: translateZ(40px); }
.feature-card__icon {
  width: 56px; height: 56px; border-radius: var(--r-md);
  display: grid; place-items: center; margin-bottom: var(--s-3);
  background: var(--grad-primary); color: #fff;
  box-shadow: var(--shadow-glow);
  transition: transform var(--t-mid) var(--ease-spring);
}
.feature-card:hover .feature-card__icon { transform: translateY(-4px) rotate(-8deg) scale(1.1); }
.feature-card__icon svg { width: 28px; height: 28px; }
.feature-card__title { font-size: 1.3rem; margin-bottom: var(--s-1); }
.feature-card__text { color: var(--text-muted); font-size: .95rem; }

/* ============ 10. ROADMAP ============ */
.roadmap__track { position: relative; max-width: 760px; margin: 0 auto; padding-left: 40px; }
.roadmap__line {
  position: absolute; left: 15px; top: 0; bottom: 0; width: 2px;
  background: var(--border); border-radius: 2px; overflow: hidden;
}
.roadmap__fill {
  position: absolute; top: 0; left: 0; width: 100%; height: 0%;
  background: var(--grad-primary); border-radius: 2px;
  box-shadow: 0 0 12px rgba(99,102,241,.6);
  transition: height .2s linear;
}
.roadmap__item { position: relative; margin-bottom: var(--s-2); }
.roadmap__item::before {
  content: ""; position: absolute; left: -33px; top: 22px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg-2); border: 3px solid var(--c-primary);
  z-index: 1; transition: transform var(--t-mid) var(--ease-spring), box-shadow var(--t-mid) var(--ease);
}
.roadmap__item.is-active::before { transform: scale(1.3); box-shadow: var(--shadow-glow); background: var(--c-primary); }
.roadmap__head {
  width: 100%; display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-3) var(--s-4);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); text-align: left;
  backdrop-filter: blur(var(--glass-blur));
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.roadmap__head:hover { border-color: var(--c-primary); background: var(--surface-2); }
.roadmap__num { font-family: var(--font-mono); font-size: .85rem; color: var(--c-accent); font-weight: 700; }
.roadmap__title { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; flex: 1; }
.roadmap__icon {
  position: relative; width: 22px; height: 22px; flex-shrink: 0;
}
.roadmap__icon::before, .roadmap__icon::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 12px; height: 2px; border-radius: 2px; background: var(--text);
  transform: translate(-50%, -50%); transition: transform var(--t-mid) var(--ease);
}
.roadmap__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.roadmap__item.is-open .roadmap__icon::after { transform: translate(-50%, -50%) rotate(0); }
.roadmap__panel {
  max-height: 0; overflow: hidden;
  transition: max-height var(--t-mid) var(--ease-out);
}
.roadmap__panel p { padding: var(--s-3) var(--s-4); color: var(--text-muted); }

/* ============ 11. CODE PLAYGROUND ============ */
.editor {
  max-width: 860px; margin: 0 auto;
  border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--border); background: var(--bg-3);
  box-shadow: var(--shadow-lg);
}
.editor__tabs {
  display: flex; align-items: center; gap: .2rem;
  padding: 0 .6rem; background: rgba(0,0,0,.25);
  border-bottom: 1px solid var(--border);
}
.editor__tab {
  padding: .9rem 1.2rem; font-family: var(--font-mono); font-size: .85rem;
  color: var(--text-dim); border-bottom: 2px solid transparent;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.editor__tab:hover { color: var(--text-muted); }
.editor__tab.is-active { color: var(--text); border-bottom-color: var(--c-primary); }
.editor__run { margin-left: auto; font-family: var(--font-mono); font-size: .8rem; color: var(--c-success); padding-right: 1rem; }
.editor__panels { padding: var(--s-4); min-height: 280px; }
.editor__panel {
  font-family: var(--font-mono); font-size: .9rem; line-height: 1.7;
  display: none; white-space: pre; tab-size: 2;
}
.editor__panel.is-active { display: block; animation: fadeUp .4s var(--ease); }
/* Syntax colors */
.c-tag { color: #f472b6; }
.c-attr { color: #fbbf24; }
.c-str { color: #34d399; }
.c-key { color: #818cf8; font-weight: 600; }
.c-prop { color: #7dd3fc; }
.c-num { color: #fb923c; }
.c-fn { color: #c4b5fd; }

/* ============ 12. STATS ============ */
.stats { padding: var(--s-7) 0; }
.stats__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--s-3); text-align: center;
}
.stat {
  padding: var(--s-4); border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(var(--glass-blur));
}
.stat__num {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat__label { color: var(--text-muted); font-size: .95rem; margin-top: .3rem; display: block; }

/* ============ 13. TESTIMONIALS ============ */
.slider { position: relative; max-width: 760px; margin: 0 auto; }
.slider__viewport { overflow: hidden; border-radius: var(--r-lg); }
.slider__track { display: flex; transition: transform var(--t-slow) var(--ease-out); }
.slide {
  flex: 0 0 100%; padding: var(--s-5); text-align: center;
  background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(var(--glass-blur));
}
.slide blockquote {
  font-family: var(--font-display); font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  line-height: 1.5; margin-bottom: var(--s-3); color: var(--text);
}
.slide figcaption { display: inline-flex; align-items: center; gap: .8rem; }
.slide__avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700;
  background: var(--grad-primary); color: #fff;
}
.slide__meta { text-align: left; display: flex; flex-direction: column; }
.slide__meta strong { font-size: 1rem; }
.slide__meta em { font-style: normal; font-size: .85rem; color: var(--text-dim); }

.slider__dots { display: flex; justify-content: center; gap: .5rem; margin-top: var(--s-3); }
.slider__dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border-strong); transition: all var(--t-fast) var(--ease);
}
.slider__dot.is-active { width: 28px; border-radius: var(--r-pill); background: var(--grad-primary); }
.slider__arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(var(--glass-blur));
  display: grid; place-items: center; font-size: 1.1rem; color: var(--text);
  transition: all var(--t-fast) var(--ease);
  z-index: 2;
}
.slider__arrow:hover { background: var(--grad-primary); color: #fff; border-color: transparent; box-shadow: var(--shadow-glow); }
.slider__arrow--prev { left: -10px; }
.slider__arrow--next { right: -10px; }

/* ============ 14. FAQ ============ */
.faq__list { display: flex; flex-direction: column; gap: var(--s-2); }
.faq__item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  overflow: hidden; transition: border-color var(--t-fast) var(--ease);
  backdrop-filter: blur(var(--glass-blur));
}
.faq__item.is-open { border-color: var(--c-primary); }
.faq__q {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-3) var(--s-4); text-align: left;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
}
.faq__icon { position: relative; width: 24px; height: 24px; flex-shrink: 0; }
.faq__icon::before, .faq__icon::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 14px; height: 2px; border-radius: 2px; background: var(--c-primary-2);
  transform: translate(-50%, -50%); transition: transform var(--t-mid) var(--ease-spring);
}
.faq__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq__item.is-open .faq__icon::before { transform: translate(-50%, -50%) rotate(135deg); }
.faq__item.is-open .faq__icon::after { transform: translate(-50%, -50%) rotate(-135deg); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height var(--t-mid) var(--ease-out); }
.faq__a p { padding: 0 var(--s-4) var(--s-3); color: var(--text-muted); }

/* ============ 15. FOOTER + BACK TO TOP ============ */
.footer { background: var(--bg-2); border-top: 1px solid var(--border); padding: var(--s-6) 0 var(--s-4); }
.footer__top { display: grid; grid-template-columns: 1fr 1.4fr; gap: var(--s-5); margin-bottom: var(--s-5); }
.footer__tagline { color: var(--text-muted); margin: var(--s-2) 0 var(--s-3); max-width: 340px; }
.footer__socials { display: flex; gap: var(--s-2); }
.footer__social {
  width: 42px; height: 42px; border-radius: var(--r-md);
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); transition: all var(--t-mid) var(--ease-spring);
}
.footer__social svg { width: 20px; height: 20px; }
.footer__social:hover { transform: translateY(-4px) rotate(8deg) scale(1.1); background: var(--grad-primary); color: #fff; border-color: transparent; box-shadow: var(--shadow-glow); }

.footer__links { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
.footer__col h4 { font-size: 1rem; margin-bottom: var(--s-2); }
.footer__col a { display: block; color: var(--text-muted); padding: .3rem 0; font-size: .95rem; transition: color var(--t-fast) var(--ease), padding-left var(--t-fast) var(--ease); }
.footer__col a:hover { color: var(--c-primary-2); padding-left: .4rem; }
.footer__newsletter p { color: var(--text-muted); font-size: .9rem; margin-bottom: var(--s-2); }
.newsletter { display: flex; gap: .5rem; }
.newsletter input {
  flex: 1; padding: .8em 1em; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font-family: inherit; font-size: .9rem; transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.newsletter input::placeholder { color: var(--text-dim); }
.newsletter input:focus { outline: none; border-color: var(--c-primary); box-shadow: var(--shadow-glow); }
.newsletter button { padding: .8em 1.4em; }
.newsletter__success { color: var(--c-success); font-size: .85rem; margin-top: var(--s-1); opacity: 0; transition: opacity var(--t-mid) var(--ease); }
.newsletter__success.show { opacity: 1; }

.footer__bottom {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-2);
  padding-top: var(--s-3); border-top: 1px solid var(--border);
  color: var(--text-dim); font-size: .88rem;
}
.footer__legal { display: flex; gap: var(--s-3); }
.footer__legal a { transition: color var(--t-fast) var(--ease); }
.footer__legal a:hover { color: var(--c-primary-2); }

.back-to-top {
  position: fixed; bottom: var(--s-4); right: var(--s-4); z-index: 800;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--grad-primary); color: #fff;
  display: grid; place-items: center;
  box-shadow: var(--shadow-md), var(--shadow-glow);
  opacity: 0; visibility: hidden; transform: translateY(20px);
  transition: opacity var(--t-mid) var(--ease), visibility var(--t-mid) var(--ease), transform var(--t-mid) var(--ease-spring);
}
.back-to-top svg { width: 22px; height: 22px; }
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-4px) scale(1.1); }

/* ============ 16. REVEAL ANIMATIONS ============ */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ============ 17. KEYFRAMES ============ */
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .6; transform: scale(.95); } }
@keyframes load { 0% { left: -40%; } 100% { left: 100%; } }
@keyframes lineUp { to { transform: translateY(0); opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }
@keyframes scrollDot { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(14px); } }
@keyframes float1 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(40px, 30px) scale(1.1); } }
@keyframes float2 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-50px, -40px) scale(1.05); } }
@keyframes float3 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-30px, 40px) scale(.95); } }

/* ============ 18. RESPONSIVE ============ */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; gap: var(--s-5); }
  .hero__terminal { max-width: 560px; }
  .footer__top { grid-template-columns: 1fr; gap: var(--s-4); }
}

@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__cta { display: none; }
  .nav__hamburger { display: flex; }
  .section { padding: var(--s-7) 0; }
  .hero__stats { gap: var(--s-3); flex-wrap: wrap; }
  .footer__links { grid-template-columns: 1fr 1fr; }
  .footer__newsletter { grid-column: 1 / -1; }
  .slider__arrow--prev { left: 0; }
  .slider__arrow--next { right: 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--s-3); }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .btn--lg { width: 100%; }
  .footer__links { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .shape { animation: none !important; }
}
