/* ============================================================
   SAAS-V1 — STYLES.CSS — DataPulse
   Dark dashboard · Indigo + Cyan · Inter + Space Grotesk
   ============================================================ */

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #eef2ff;
  --primary-rgb: 99, 102, 241;
  --cyan: #06b6d4;
  --cyan-rgb: 6, 182, 212;

  --dark-950: #09090f;
  --dark-900: #0f0f17;
  --dark-800: #16161f;
  --dark-700: #1e1e2a;
  --dark-600: #2a2a3a;
  --dark-500: #3e3e52;
  --dark-400: #5a5a72;
  --dark-300: #8888a0;
  --dark-200: #b0b0c4;
  --dark-100: #dddde8;

  --white: #ffffff;
  --canvas: var(--dark-950);
  --canvas-alt: var(--dark-900);
  --ink: var(--dark-100);
  --ink-soft: var(--dark-200);
  --muted: var(--dark-300);
  --border: var(--dark-600);

  --font-main: 'Inter', system-ui, sans-serif;
  --font-display: 'Space Grotesk', system-ui, sans-serif;

  --fs-xs: clamp(0.7rem, 0.65rem + 0.25vw, 0.78rem);
  --fs-sm: clamp(0.82rem, 0.76rem + 0.3vw, 0.9rem);
  --fs-base: clamp(0.92rem, 0.86rem + 0.3vw, 1rem);
  --fs-md: clamp(1rem, 0.9rem + 0.5vw, 1.15rem);
  --fs-lg: clamp(1.15rem, 1rem + 0.75vw, 1.4rem);
  --fs-xl: clamp(1.4rem, 1.1rem + 1.5vw, 2rem);
  --fs-2xl: clamp(1.8rem, 1.3rem + 2.5vw, 2.8rem);
  --fs-3xl: clamp(2.2rem, 1.5rem + 3.5vw, 3.6rem);
  --fs-4xl: clamp(2.8rem, 1.8rem + 5vw, 4.5rem);

  --section-py: clamp(60px, 8vw, 120px);
  --container-max: 1140px;
  --container-px: clamp(16px, 4vw, 32px);

  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 20px; --radius-2xl: 28px; --radius-full: 9999px;
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4); --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
  --ease: cubic-bezier(0.4, 0, 0.2, 1); --duration: 0.35s;
  --z-sticky: 200; --z-overlay: 300; --z-preloader: 500;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; overflow-x: hidden; }
body { font-family: var(--font-main); font-size: var(--fs-base); color: var(--ink); background: var(--canvas); line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--duration) var(--ease); }
ul, ol { list-style: none; }
button { border: none; background: none; cursor: pointer; font: inherit; color: inherit; }
::selection { background: rgba(var(--primary-rgb), 0.2); }

.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--container-px); }
.kicker { display: inline-block; font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary); margin-bottom: 14px; }
.section-title { font-family: var(--font-display); font-size: var(--fs-3xl); font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; color: var(--white); margin-bottom: 14px; }
.text-gradient { background: linear-gradient(135deg, var(--primary), var(--cyan)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.section-lead { font-size: var(--fs-md); color: var(--muted); max-width: 560px; line-height: 1.8; }
.section-header { margin-bottom: 48px; }
.section-header--center { text-align: center; }
.section-header--center .section-lead { margin: 0 auto; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; font-size: var(--fs-sm); border-radius: var(--radius-full); padding: 12px 28px; transition: all var(--duration) var(--ease); border: 2px solid transparent; white-space: nowrap; }
.btn .material-icons { font-size: 18px; }
.btn--primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: var(--white); box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.3); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(var(--primary-rgb), 0.4); }
.btn--outline { border-color: var(--border); color: var(--ink); }
.btn--outline:hover { border-color: var(--primary); color: var(--primary); }
.btn--ghost { color: var(--ink-soft); }
.btn--ghost:hover { color: var(--white); }
.btn--white { background: var(--white); color: var(--dark-900); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
.btn--white:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.3); }
.btn--outline-white { border-color: rgba(255,255,255,0.2); color: var(--white); }
.btn--outline-white:hover { border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.05); }
.btn--sm { padding: 8px 20px; font-size: var(--fs-xs); }
.btn--lg { padding: 16px 36px; font-size: var(--fs-base); }
.btn--block { width: 100%; }

/* PRELOADER */
.preloader { position: fixed; inset: 0; z-index: var(--z-preloader); background: var(--dark-950); display: flex; align-items: center; justify-content: center; transition: opacity 0.5s var(--ease), visibility 0.5s var(--ease); }
.preloader.loaded { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader__spinner { width: 32px; height: 32px; border: 3px solid var(--dark-600); border-top-color: var(--primary); border-radius: 50%; margin: 0 auto 12px; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.preloader__text { font-family: var(--font-display); font-size: var(--fs-sm); font-weight: 700; color: var(--white); letter-spacing: 0.08em; }

.scroll-progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: calc(var(--z-sticky) + 1); background: linear-gradient(90deg, var(--primary), var(--cyan)); transform-origin: left; transform: scaleX(0); }

/* NAVBAR */
.navbar { position: sticky; top: 0; z-index: var(--z-sticky); background: rgba(9,9,15,0.88); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid rgba(255,255,255,0.04); transition: box-shadow var(--duration); }
.navbar.scrolled { box-shadow: 0 4px 30px rgba(0,0,0,0.5); }
.navbar__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.navbar__brand { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 700; color: var(--white); display: flex; align-items: center; gap: 8px; }
.navbar__icon { color: var(--primary); font-size: 1.2em; }
.navbar__list { display: flex; gap: 4px; }
.navbar__link { padding: 6px 14px; font-size: var(--fs-xs); font-weight: 600; color: var(--dark-300); border-radius: var(--radius-md); transition: color var(--duration), background var(--duration); }
.navbar__link:hover, .navbar__link.active { color: var(--white); background: rgba(255,255,255,0.05); }
.navbar__actions { display: flex; align-items: center; gap: 8px; }
.navbar__burger { display: none; width: 28px; height: 20px; position: relative; }
.navbar__burger span { display: block; height: 2px; background: var(--white); border-radius: 2px; position: absolute; left: 0; right: 0; transition: all var(--duration); }
.navbar__burger span:nth-child(1) { top: 0; }
.navbar__burger span:nth-child(2) { bottom: 0; }
.navbar__burger.active span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.navbar__burger.active span:nth-child(2) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* HERO */
.hero { padding: clamp(80px, 10vw, 120px) 0 0; text-align: center; position: relative; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero__grid-pattern { position: absolute; inset: 0; background-image: linear-gradient(rgba(99,102,241,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(99,102,241,0.04) 1px, transparent 1px); background-size: 60px 60px; mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, black, transparent); }
.hero__glow { position: absolute; top: -100px; left: 50%; transform: translateX(-50%); width: 600px; height: 400px; background: radial-gradient(ellipse, rgba(var(--primary-rgb), 0.12), transparent 70%); filter: blur(40px); }
.hero__content { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.hero__badge { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-xs); font-weight: 700; color: var(--primary); padding: 6px 16px; border: 1px solid rgba(var(--primary-rgb), 0.2); border-radius: var(--radius-full); background: rgba(var(--primary-rgb), 0.06); margin-bottom: 24px; }
.hero__badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); animation: dotPulse 2s infinite; }
@keyframes dotPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.hero__title { font-family: var(--font-display); font-size: var(--fs-4xl); font-weight: 700; line-height: 1.05; color: var(--white); margin-bottom: 20px; letter-spacing: -0.04em; }
.hero__title-gradient { background: linear-gradient(135deg, var(--primary), var(--cyan)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero__lead { font-size: var(--fs-md); color: var(--muted); max-width: 580px; margin: 0 auto 32px; line-height: 1.8; }
.hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.hero__metrics { display: flex; justify-content: center; gap: 32px; flex-wrap: wrap; margin-bottom: 60px; }
.hero__metrics div { text-align: center; }
.hero__metrics strong { display: block; font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 700; color: var(--white); }
.hero__metrics span { font-size: var(--fs-xs); color: var(--muted); }

/* HERO DASHBOARD MOCK */
.hero__dashboard { position: relative; z-index: 1; margin-bottom: -60px; }
.hero__screen { border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--dark-800); overflow: hidden; box-shadow: var(--shadow-lg); }
.screen__topbar { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.screen__dots { display: flex; gap: 6px; }
.screen__dots span { width: 10px; height: 10px; border-radius: 50%; }
.screen__dots span:nth-child(1) { background: #ef4444; }
.screen__dots span:nth-child(2) { background: #f59e0b; }
.screen__dots span:nth-child(3) { background: #22c55e; }
.screen__topbar > span { font-size: var(--fs-xs); color: var(--muted); }
.screen__body { display: flex; min-height: 240px; }
.screen__sidebar { width: 48px; border-right: 1px solid var(--border); padding: 14px 10px; display: flex; flex-direction: column; gap: 10px; }
.screen__sb-item { width: 28px; height: 28px; border-radius: var(--radius-sm); background: var(--dark-700); }
.screen__sb-item.active { background: rgba(var(--primary-rgb), 0.15); border: 1px solid rgba(var(--primary-rgb), 0.3); }
.screen__main { flex: 1; padding: 18px; }
.screen__cards { display: flex; gap: 12px; margin-bottom: 18px; }
.screen__card { flex: 1; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--dark-700); }
.screen__card span { font-size: var(--fs-xs); color: var(--muted); display: block; margin-bottom: 4px; }
.screen__card strong { font-family: var(--font-display); font-size: var(--fs-lg); color: var(--white); font-weight: 700; }
.screen__card em { font-size: var(--fs-xs); color: #22c55e; font-style: normal; font-weight: 700; margin-left: 4px; }
.screen__chart { display: flex; align-items: flex-end; gap: 6px; height: 100px; }
.screen__bar { flex: 1; background: var(--dark-600); border-radius: 3px 3px 0 0; }
.screen__bar--accent { background: var(--primary); }

/* LOGOS */
.logos { padding: 40px 0 calc(40px + 60px); border-bottom: 1px solid var(--border); overflow: hidden; }
.logos__label { text-align: center; font-size: var(--fs-xs); font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 18px; }
.logos__track { display: flex; gap: 48px; width: max-content; }
.logos__track span { font-size: var(--fs-lg); font-weight: 900; color: var(--dark-500); white-space: nowrap; letter-spacing: -0.02em; }

/* FEATURES */
.features { padding: var(--section-py) 0; }
.features__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--dark-800); transition: all var(--duration); }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(var(--primary-rgb), 0.15); }
.feature-card__icon { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: var(--radius-lg); background: rgba(var(--primary-rgb), 0.1); color: var(--primary); margin-bottom: 16px; }
.feature-card__icon .material-icons { font-size: 24px; }
.feature-card h3 { font-family: var(--font-display); font-size: var(--fs-base); font-weight: 700; color: var(--white); margin-bottom: 8px; }
.feature-card p { font-size: var(--fs-sm); color: var(--muted); line-height: 1.7; }

/* PRICING */
.pricing { padding: var(--section-py) 0; background: var(--dark-900); }
.pricing__toggle { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 36px; }
.pricing__toggle-label { font-size: var(--fs-sm); font-weight: 700; color: var(--muted); cursor: pointer; transition: color var(--duration); }
.pricing__toggle-label.active { color: var(--white); }
.pricing__toggle-label em { font-style: normal; color: var(--primary); font-size: var(--fs-xs); }
.pricing__toggle-switch { width: 44px; height: 24px; border-radius: 12px; background: var(--dark-600); position: relative; cursor: pointer; transition: background var(--duration); }
.pricing__toggle-switch span { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--white); transition: transform var(--duration); }
.pricing__toggle-switch.yearly { background: var(--primary); }
.pricing__toggle-switch.yearly span { transform: translateX(20px); }
.pricing__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.price-card { padding: 32px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--dark-800); position: relative; transition: all var(--duration); }
.price-card:hover { transform: translateY(-4px); }
.price-card--popular { border-color: rgba(var(--primary-rgb), 0.3); background: linear-gradient(to bottom, rgba(var(--primary-rgb), 0.06), var(--dark-800)); }
.price-card__badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); color: var(--white); font-size: var(--fs-xs); font-weight: 800; padding: 4px 14px; border-radius: var(--radius-full); }
.price-card h3 { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 700; color: var(--white); margin-bottom: 6px; }
.price-card__desc { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 20px; line-height: 1.5; }
.price-card__price { margin-bottom: 24px; }
.price-card__amount { font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 700; color: var(--white); }
.price-card__price span { font-size: var(--fs-sm); color: var(--muted); }
.price-card ul { display: grid; gap: 10px; margin-bottom: 24px; }
.price-card li { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--ink-soft); }
.price-card li .material-icons { font-size: 18px; color: var(--primary); }

/* TESTIMONIALS */
.testimonials { padding: var(--section-py) 0; }
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.testi-card { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--dark-800); transition: all var(--duration); }
.testi-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.testi-card--accent { background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.12), rgba(var(--cyan-rgb), 0.08)); border-color: rgba(var(--primary-rgb), 0.15); }
.testi-card blockquote { font-size: var(--fs-sm); color: var(--ink-soft); line-height: 1.7; font-style: italic; margin-bottom: 20px; }
.testi-card__author { display: flex; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--border); }
.testi-card--accent .testi-card__author { border-top-color: rgba(var(--primary-rgb), 0.1); }
.testi-card__author img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.testi-card__author strong { display: block; font-size: var(--fs-sm); font-weight: 800; color: var(--white); }
.testi-card__author span { font-size: var(--fs-xs); color: var(--muted); }

/* CTA */
.cta { padding: var(--section-py) 0; text-align: center; position: relative; overflow: hidden; }
.cta__bg { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.08), rgba(var(--cyan-rgb), 0.04)); }
.cta p { font-size: var(--fs-md); color: var(--muted); margin-bottom: 28px; }
.cta__inner { position: relative; z-index: 1; }
.cta__actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* FAQ */
.faq { padding: var(--section-py) 0; }
.faq__layout { display: grid; grid-template-columns: 0.4fr 0.6fr; gap: 48px; align-items: start; }
.faq__list { display: grid; gap: 10px; }
.faq__item { background: var(--dark-800); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: all var(--duration); }
.faq__item[open] { border-color: rgba(var(--primary-rgb), 0.2); }
.faq__q { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 22px; cursor: pointer; font-size: var(--fs-base); font-weight: 700; color: var(--white); list-style: none; }
.faq__q::-webkit-details-marker { display: none; }
.faq__q .material-icons { color: var(--primary); font-size: 20px; transition: transform var(--duration); flex-shrink: 0; }
.faq__item[open] .faq__q .material-icons { transform: rotate(180deg); }
.faq__a { padding: 0 22px 18px; }
.faq__a p { font-size: var(--fs-sm); color: var(--muted); line-height: 1.8; }

/* FOOTER */
.footer { padding: 48px 0 0; border-top: 1px solid var(--border); }
.footer__top { display: grid; grid-template-columns: 1.5fr 2fr; gap: 48px; padding-bottom: 36px; }
.footer__logo { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 700; color: var(--white); display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.footer__logo span { color: var(--primary); }
.footer__brand p { font-size: var(--fs-sm); color: var(--dark-400); line-height: 1.6; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer__cols h5 { font-size: var(--fs-sm); font-weight: 800; color: var(--white); margin-bottom: 12px; }
.footer__cols a { display: block; font-size: var(--fs-sm); color: var(--dark-400); padding: 3px 0; transition: color var(--duration); }
.footer__cols a:hover { color: var(--primary); }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--dark-500); flex-wrap: wrap; gap: 10px; }
.footer__bottom div { display: flex; gap: 16px; }
.footer__bottom a { color: var(--dark-500); transition: color var(--duration); }
.footer__bottom a:hover { color: var(--primary); }

.back-to-top { position: fixed; bottom: 28px; right: 28px; width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: var(--white); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.3); z-index: var(--z-overlay); opacity: 0; visibility: hidden; transform: translateY(16px); transition: all var(--duration); }
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.4); }

@media (max-width: 1024px) {
  .features__grid { grid-template-columns: repeat(2, 1fr); }
  .pricing__grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .testi-grid { grid-template-columns: 1fr; }
  .faq__layout { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; }
  .screen__cards { flex-direction: column; }
  .navbar__menu { position: fixed; inset: 0; width: 100vw; height: 100dvh; background: var(--dark-950); z-index: var(--z-overlay); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.4s var(--ease), visibility 0s linear 0.4s; }
  .navbar__menu.open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.4s var(--ease); }
  .navbar__list { flex-direction: column; gap: 8px; }
  .navbar__link { font-size: var(--fs-lg); padding: 12px 24px; }
  .navbar__burger { display: block; position: relative; z-index: calc(var(--z-overlay) + 1); }
}
@media (max-width: 768px) {
  .features__grid { grid-template-columns: 1fr; }
  .hero__metrics { gap: 20px; }
  .screen__sidebar { display: none; }
}
@media (max-width: 480px) {
  .hero__title { font-size: var(--fs-2xl); }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  .cta__actions { flex-direction: column; align-items: center; }
  .footer__cols { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; text-align: center; }
}
