/* ===== Light Theme (default) ===== */
:root {
  --bg: #fafafa;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: rgba(255, 255, 255, 1);
  --bg-alt: #f3f2f8;
  --text: #1a1a1f;
  --text-muted: #6b6b7b;
  --accent: #7c3aed;
  --accent-hover: #6d28d9;
  --accent-glow: rgba(124, 58, 237, 0.18);
  --accent-dim: rgba(124, 58, 237, 0.07);
  --border: rgba(0, 0, 0, 0.07);
  --border-hover: rgba(124, 58, 237, 0.3);
  --white: #ffffff;
  --card-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
  --card-shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.08);
  --hero-glow-opacity: .35;
  --cta-glow-opacity: .3;
  --step-num-color: rgba(124, 58, 237, 0.15);
  --highlight-border: rgba(124, 58, 237, 0.15);
  --highlight-icon-border: rgba(124, 58, 237, 0.12);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-full: 9999px;
  --transition: .25s cubic-bezier(.4, 0, .2, 1);
  --max-w: 1200px;
}

/* ===== Dark Theme (auto) ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a12;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.07);
    --bg-alt: #0e0e1a;
    --text: #eeeef0;
    --text-muted: #8b8b9e;
    --accent: #8b5cf6;
    --accent-hover: #a78bfa;
    --accent-glow: rgba(139, 92, 246, 0.25);
    --accent-dim: rgba(139, 92, 246, 0.08);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(139, 92, 246, 0.3);
    --white: #ffffff;
    --card-shadow: none;
    --card-shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.3);
    --hero-glow-opacity: .6;
    --cta-glow-opacity: .5;
    --step-num-color: rgba(139, 92, 246, 0.2);
    --highlight-border: rgba(139, 92, 246, 0.25);
    --highlight-icon-border: rgba(139, 92, 246, 0.2);
  }
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ===== Scroll Progress ===== */
.scroll-progress { position: fixed; top: 0; left: 0; width: 100%; height: 2px; z-index: 9999; }
.scroll-progress__bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), #c084fc); transition: width .08s linear; }

/* ===== Reveal ===== */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== Container ===== */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 2rem; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 16px 36px; font-family: inherit; font-size: 16px; font-weight: 600;
  line-height: 1; text-decoration: none; border: none; border-radius: var(--radius);
  cursor: pointer; transition: all var(--transition); letter-spacing: -0.01em;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; min-height: 52px;
}
.btn--primary {
  background: linear-gradient(135deg, var(--accent), #a855f7);
  color: var(--white); box-shadow: 0 4px 20px var(--accent-glow);
}
.btn--primary:hover { background: linear-gradient(135deg, var(--accent-hover), var(--accent)); box-shadow: 0 8px 40px var(--accent-glow); transform: translateY(-2px); }
.btn--primary:active { transform: translateY(0); box-shadow: 0 2px 12px var(--accent-glow); }
.btn--ghost { background: var(--bg-card); color: var(--text); border: 1px solid var(--border-hover); box-shadow: var(--card-shadow); }
.btn--ghost:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); box-shadow: 0 4px 20px var(--accent-glow); transform: translateY(-2px); }
.btn--lg { padding: 20px 56px; font-size: 18px; }

/* ===== Hero ===== */
.hero { position: relative; padding: 160px 0 130px; text-align: center; overflow: hidden; }
.hero__glow { position: absolute; top: -200px; left: 50%; transform: translateX(-50%); width: 800px; height: 800px; background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%); pointer-events: none; opacity: var(--hero-glow-opacity); }
.hero__label { display: inline-block; padding: 6px 16px; margin-bottom: 32px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: var(--accent-dim); border: 1px solid var(--highlight-icon-border); border-radius: var(--radius-full); }
.hero__title { margin: 0 0 24px; font-size: clamp(28px, 4.5vw, 44px); font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; color: var(--text-muted); }
.hero__brand { display: block; font-size: clamp(40px, 7vw, 72px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin-bottom: 12px; background: linear-gradient(135deg, var(--accent), #c084fc, var(--accent)); background-size: 200% 200%; -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; animation: brand-shimmer 4s ease-in-out infinite; }
@keyframes brand-shimmer { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.hero__dash { display: none; }
.hero__subtitle { margin: 0 auto 40px; max-width: 520px; font-size: 18px; line-height: 1.7; color: var(--text-muted); }
.hero__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }

/* ===== Section ===== */
.section { padding: 96px 0; }
.section--alt { background: var(--bg-alt); }
.section__label { display: block; margin-bottom: 12px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); text-align: center; }
.section__title { margin: 0 0 56px; font-size: clamp(24px, 4vw, 40px); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; text-align: center; color: var(--text); }

/* ===== Carousel Wrapper (desktop: no arrows, mobile: arrows) ===== */
.carousel-wrapper { display: block; }
.carousel-arrow { display: none; flex-shrink: 0; width: 44px; height: 44px; align-items: center; justify-content: center; font-size: 18px; font-weight: 600; color: var(--accent); background: var(--accent-dim); border: 1px solid var(--border); border-radius: 50%; cursor: pointer; transition: all var(--transition); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.carousel-arrow:hover { background: var(--accent); color: var(--white); border-color: var(--accent); }
.carousel-arrow:active { transform: scale(0.95); }

/* ===== Grid (desktop: grid, mobile: horizontal scroll) ===== */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ===== Cards ===== */
.card { padding: 32px 28px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--card-shadow); transition: all var(--transition); position: relative; overflow: hidden; }
.card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--accent-glow), transparent); opacity: 0; transition: opacity var(--transition); }
.card:hover { background: var(--bg-card-hover); border-color: var(--border-hover); transform: translateY(-4px); box-shadow: var(--card-shadow-hover); }
.card:hover::before { opacity: 1; }
.card__icon { font-size: 32px; margin-bottom: 20px; display: block; line-height: 1; transition: transform var(--transition); }
.card:hover .card__icon { transform: scale(1.2); }
.card__title { margin: 0 0 10px; font-size: 17px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; line-height: 1.3; }
.card__text { margin: 0; font-size: 15px; color: var(--text-muted); line-height: 1.65; }

/* ===== Highlight Block ===== */
.highlight { display: flex; align-items: center; gap: 48px; max-width: 840px; margin: 0 auto; padding: 56px 64px; background: var(--bg-card); border: 1px solid var(--highlight-border); border-radius: 20px; box-shadow: var(--card-shadow), 0 0 80px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.04); transition: all .35s cubic-bezier(.4,0,.2,1); position: relative; overflow: hidden; }
.highlight::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.highlight:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--card-shadow-hover), 0 0 120px var(--accent-glow); }
.highlight__icon { flex-shrink: 0; width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; font-size: 44px; background: var(--accent-dim); border: 1px solid var(--highlight-icon-border); border-radius: var(--radius); transition: transform .35s cubic-bezier(.4,0,.2,1); box-shadow: 0 0 40px var(--accent-glow); }
.highlight:hover .highlight__icon { transform: scale(1.15) rotate(-5deg); }
.highlight__label { display: inline-block; padding: 4px 14px; margin-bottom: 12px; font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); background: var(--accent-dim); border-radius: var(--radius-full); }
.highlight__title { margin: 0 0 16px; font-size: clamp(22px, 3vw, 32px); font-weight: 800; color: var(--text); letter-spacing: -0.02em; line-height: 1.2; }
.highlight__text { margin: 0; font-size: 16px; color: var(--text-muted); line-height: 1.75; }

/* ===== Screenshots ===== */
.screenshots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; max-width: 840px; margin: 0 auto; justify-items: center; }
.screenshot { text-align: center; transition: transform var(--transition); }
.screenshot:hover { transform: translateY(-4px); }
.screenshot img { display: block; width: 240px; height: auto; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--card-shadow); transition: box-shadow var(--transition); }
.screenshot:hover img { box-shadow: var(--card-shadow-hover); border-color: var(--border-hover); }
.screenshot__caption { margin: 12px 0 0; font-size: 14px; font-weight: 500; color: var(--text-muted); }

/* ===== Videos ===== */
.videos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; max-width: 960px; margin: 0 auto; }
.video { margin: 0; text-align: center; }
.video video { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--border); background: #000; box-shadow: var(--card-shadow); }
.video__caption { margin: 12px 0 0; font-size: 14px; font-weight: 500; color: var(--text-muted); }
@media (max-width: 720px) { .videos { grid-template-columns: 1fr; gap: 24px; } }

/* ===== Plugin Tags ===== */
.plugin-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.plugin-tag { display: inline-block; padding: 8px 18px; font-size: 14px; font-weight: 600; color: var(--accent); background: var(--accent-dim); border: 1px solid var(--highlight-border); border-radius: var(--radius-full); transition: all var(--transition); }
.plugin-tag:hover { background: var(--accent); color: var(--white); border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 4px 16px var(--accent-glow); }

/* ===== Platforms ===== */
.platforms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.platform { padding: 24px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--card-shadow); text-align: center; transition: all var(--transition); }
.platform:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--card-shadow-hover); }
.platform--active { border-color: var(--highlight-border); background: var(--accent-dim); }
.platform__name { display: block; font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.platform__status { font-size: 13px; color: var(--text-muted); }
.platform--active .platform__status { color: var(--accent); font-weight: 500; }

/* ===== Steps ===== */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps--centered { max-width: 900px; margin: 0 auto; }
.steps--centered .step { text-align: center; }
.step { padding: 28px 22px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--card-shadow); transition: all var(--transition); }
.step:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--card-shadow-hover); }
.step__num { display: block; font-size: 28px; font-weight: 800; color: var(--step-num-color); margin-bottom: 14px; letter-spacing: -0.02em; transition: color var(--transition); }
.step:hover .step__num { color: var(--accent); }
.step__title { margin: 0 0 8px; font-size: 15px; font-weight: 600; color: var(--text); }
.step__text { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ===== CTA ===== */
.cta { position: relative; text-align: center; padding: 120px 0; overflow: hidden; }
.cta__glow { position: absolute; bottom: -300px; left: 50%; transform: translateX(-50%); width: 600px; height: 600px; background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%); pointer-events: none; opacity: var(--cta-glow-opacity); }
.cta__title { margin: 0 0 16px; font-size: clamp(28px, 5vw, 48px); font-weight: 800; color: var(--text); letter-spacing: -0.03em; position: relative; }
.cta__text { margin: 0 auto 40px; max-width: 460px; font-size: 17px; color: var(--text-muted); line-height: 1.7; position: relative; }
.cta__actions { position: relative; }

/* ===== Footer ===== */
.footer { padding: 48px 0; border-top: 1px solid var(--border); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; }
.footer__brand { margin: 0; font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
.footer__text { margin: 0; font-size: 14px; color: var(--text-muted); }
.footer__link { font-size: 14px; font-weight: 500; color: var(--accent); text-decoration: none; transition: color var(--transition); }
.footer__link:hover { color: var(--accent-hover); }

/* ==========================================================
   RESPONSIVE
   ========================================================== */

/* ----- Ultra-wide (2560+) ----- */
@media (min-width: 1600px) {
  .grid { grid-template-columns: repeat(5, 1fr); }
}

/* ----- Large desktop (1200-1600) ----- */
@media (max-width: 1200px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}

/* ----- Small desktop / large tablet (860-1200) ----- */
@media (max-width: 860px) {
  .container { padding: 0 1.5rem; }
  .hero { padding: 120px 0 96px; }
  .section { padding: 72px 0; }
  .section__title { margin-bottom: 40px; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .platforms { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; max-width: 480px; }
  .highlight { padding: 44px; gap: 32px; max-width: 100%; }
  .highlight__icon { width: 80px; height: 80px; font-size: 36px; }
  .cta { padding: 88px 0; }
}

/* ----- Tablet / small screen (640-860) ----- */
@media (max-width: 640px) {
  .container { padding: 0 1.25rem; }
  .hero { padding: 88px 0 64px; }
  .hero__title { font-size: 26px; }
  .hero__brand { font-size: 40px; }
  .hero__subtitle { font-size: 15px; max-width: 100%; }
  .hero__label { margin-bottom: 20px; font-size: 12px; }
  .hero__glow { width: 360px; height: 360px; top: -120px; }
  .hero__actions { flex-direction: column; align-items: stretch; gap: 10px; }
  .section { padding: 56px 0; }
  .section__label { font-size: 12px; }
  .section__title { font-size: 22px; margin-bottom: 32px; }

  /* Carousel mode */
  .carousel-wrapper { display: flex; align-items: center; gap: 8px; }
  .carousel-arrow { display: flex; width: 40px; height: 40px; min-width: 40px; font-size: 16px; }
  .grid {
    display: flex; flex-wrap: nowrap; justify-content: flex-start;
    overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px; scrollbar-width: thin; scrollbar-color: var(--accent-dim) transparent;
  }
  .grid::-webkit-scrollbar { height: 4px; }
  .grid::-webkit-scrollbar-track { background: transparent; }
  .grid::-webkit-scrollbar-thumb { background: var(--accent-dim); border-radius: var(--radius-full); }
  .grid .card { flex: 0 0 260px; min-width: 260px; scroll-snap-align: start; }

  .card { padding: 28px 24px; }
  .card__icon { font-size: 28px; margin-bottom: 16px; }
  .card__title { font-size: 16px; }
  .card__text { font-size: 14px; }
  .highlight { flex-direction: column; text-align: center; padding: 36px 24px; gap: 20px; border-radius: var(--radius); }
  .highlight__icon { width: 72px; height: 72px; font-size: 32px; }
  .highlight__title { font-size: 22px; }
  .highlight__text { font-size: 14px; }
  .plugin-tags { justify-content: center; }
  .screenshots { grid-template-columns: 1fr; gap: 28px; }
  .screenshot img { width: 220px; }
  .platforms { grid-template-columns: 1fr 1fr; gap: 12px; }
  .platform { padding: 20px 16px; }
  .platform__name { font-size: 14px; }
  .steps { grid-template-columns: 1fr; gap: 12px; }
  .step { padding: 24px 20px; display: flex; gap: 16px; align-items: flex-start; }
  .step__num { font-size: 24px; margin-bottom: 0; flex-shrink: 0; }
  .step__title { font-size: 14px; }
  .step__text { font-size: 12px; }
  .cta { padding: 64px 0; }
  .cta__title { font-size: 26px; }
  .cta__text { font-size: 15px; margin-bottom: 32px; }
  .cta__glow { width: 300px; height: 300px; bottom: -180px; }
  .btn--lg { padding: 16px 40px; font-size: 15px; }
  .footer { padding: 32px 0; }
  .footer__inner { flex-direction: column; gap: 6px; text-align: center; }
  .footer__brand { font-size: 15px; }
  .footer__text { font-size: 13px; }
}

/* ----- Small phones (380-) ----- */
@media (max-width: 380px) {
  .container { padding: 0 1rem; }
  .hero { padding: 72px 0 48px; }
  .hero__title { font-size: 22px; }
  .hero__brand { font-size: 36px; }
  .hero__subtitle { font-size: 14px; }
  .grid .card { flex: 0 0 70vw; min-width: 200px; }
  .carousel-arrow { width: 34px; height: 34px; min-width: 34px; font-size: 14px; }
  .carousel-wrapper { gap: 4px; }
  .platforms { grid-template-columns: 1fr; }
  .highlight { padding: 28px 20px; }
  .highlight__icon { width: 60px; height: 60px; font-size: 28px; }
  .highlight__title { font-size: 20px; }
  .screenshot img { width: 200px; }
  .cta__title { font-size: 22px; }
}
