/* ============================================
   ElevaX — Design System
   Premium dark + light, purple accent
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');

:root {
  /* Dark (default) */
  --bg-0: #08080a;
  --bg-1: #0e0e11;
  --bg-2: #15151a;
  --bg-3: #1c1c22;
  --bg-elev: #1a1a20;
  --border: rgba(255,255,255,0.06);
  --border-strong: rgba(255,255,255,0.10);
  --border-bright: rgba(255,255,255,0.18);
  --text-0: #f4f4f6;
  --text-1: rgba(244,244,246,0.70);
  --text-2: rgba(244,244,246,0.46);
  --text-3: rgba(244,244,246,0.28);
  --accent: #2f6bff;
  --accent-2: #8b5cf6;
  --accent-soft: rgba(47,107,255,0.15);
  --accent-glow: rgba(86,86,255,0.38);
  --violet: #7c3aed;
  --grad-signature: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --mint: #00d9a3;
  --rose: #ff5b7a;
  --amber: #ffb547;
  --grid-line: rgba(255,255,255,0.04);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-soft: 0 1px 0 rgba(255,255,255,0.04) inset, 0 1px 2px rgba(0,0,0,0.4);
  --shadow-card: 0 1px 0 rgba(255,255,255,0.04) inset, 0 8px 28px rgba(0,0,0,0.35);
  --shadow-pop: 0 1px 0 rgba(255,255,255,0.06) inset, 0 20px 60px rgba(0,0,0,0.55);

  --container: 1200px;
  --gutter: clamp(20px, 4vw, 40px);

  --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

html[data-theme="light"] {
  --bg-0: #fafafa;
  --bg-1: #ffffff;
  --bg-2: #f5f5f7;
  --bg-3: #eeeef1;
  --bg-elev: #ffffff;
  --border: rgba(10,10,15,0.07);
  --border-strong: rgba(10,10,15,0.11);
  --border-bright: rgba(10,10,15,0.22);
  --text-0: #0c0c10;
  --text-1: rgba(12,12,16,0.70);
  --text-2: rgba(12,12,16,0.50);
  --text-3: rgba(12,12,16,0.32);
  --accent: #2563eb;
  --accent-2: #6d28d9;
  --accent-soft: rgba(37,99,235,0.09);
  --accent-glow: rgba(80,70,230,0.20);
  --violet: #7c3aed;
  --grad-signature: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --grid-line: rgba(10,10,15,0.04);
  --shadow-soft: 0 1px 2px rgba(10,10,15,0.06);
  --shadow-card: 0 1px 2px rgba(10,10,15,0.04), 0 12px 30px rgba(10,10,15,0.06);
  --shadow-pop: 0 1px 2px rgba(10,10,15,0.04), 0 24px 60px rgba(10,10,15,0.10);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg-0); color: var(--text-0); }
body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  background: var(--bg-0);
  color: var(--text-0);
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--accent-soft); color: var(--text-0); }

img, svg { display: block; max-width: 100%; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 999px;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--text-0);
}
h1 { font-size: clamp(40px, 6vw, 72px); }
h2 { font-size: clamp(32px, 4.4vw, 52px); }
h3 { font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -0.02em; }
h4 { font-size: 17px; letter-spacing: -0.01em; font-weight: 500; }

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

/* ============== Nav ============== */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg-0) 78%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-size: 16px;
}

/* Logo image — modo oscuro: se ve natural sobre nav dark */
.brand img {
  display: block;
  transition: opacity 0.2s;
}
.brand:hover img { opacity: 0.85; }

/* Modo claro: el fondo del logo es navy, lo envolvemos en un pill */
html[data-theme="light"] .brand img {
  background: #0F172A;
  border-radius: 8px;
  padding: 5px 14px;
  height: 36px !important;
}

/* .brand-mark legacy — mantenido por si alguna página lo usa aún */
.brand-mark {
  width: 24px; height: 24px;
  border-radius: 7px;
  background:
    radial-gradient(120% 80% at 30% 20%, #6ea8ff 0%, #2563eb 42%, #7c3aed 100%);
  position: relative;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.18) inset, 0 6px 14px var(--accent-glow);
}
.brand-mark::after {
  content: "";
  position: absolute; inset: 5px;
  border-radius: 4px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.85), rgba(255,255,255,0) 60%);
  mix-blend-mode: overlay;
  opacity: 0.7;
}

.nav-links {
  display: flex; align-items: center; gap: 4px;
}
.nav-links a {
  font-size: 14px;
  color: var(--text-1);
  padding: 8px 12px;
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text-0);
  background: var(--bg-2);
}
.nav-cta { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-1);
  transition: color .15s, background .15s, border-color .15s;
}
.icon-btn:hover { color: var(--text-0); background: var(--bg-2); border-color: var(--border-strong); }
.icon-btn svg { width: 16px; height: 16px; }

.lang-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 0 10px;
  height: 34px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-1);
  display: inline-flex; align-items: center; gap: 6px;
  transition: color .15s, background .15s, border-color .15s;
}
.lang-btn:hover { color: var(--text-0); background: var(--bg-2); border-color: var(--border-strong); }

/* ============== Buttons ============== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform .12s ease, background .15s, border-color .15s, color .15s, box-shadow .2s;
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--text-0);
  color: var(--bg-0);
  border-color: var(--text-0);
}
.btn-primary:hover {
  background: color-mix(in oklab, var(--text-0) 88%, transparent);
}

.btn-accent {
  background: var(--grad-signature);
  color: white;
  border-color: transparent;
  box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 8px 24px var(--accent-glow);
}
.btn-accent:hover { filter: brightness(1.08) saturate(1.05); }

.btn-ghost {
  background: transparent;
  color: var(--text-0);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--bg-2); border-color: var(--border-bright); }

.btn-link {
  background: transparent; border: 0; color: var(--text-1); padding: 0; height: auto;
  font-size: 14px;
}
.btn-link:hover { color: var(--text-0); }

.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; border-radius: 10px; }

/* ============== Card ============== */
.card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

/* ============== Background grid ============== */
.grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: -1px -1px;
  pointer-events: none;
  mask-image: radial-gradient(80% 60% at 50% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(80% 60% at 50% 40%, #000 30%, transparent 80%);
}

/* ============== Sections ============== */
section { position: relative; }
.section-pad {
  padding-block: clamp(64px, 9vw, 120px);
}
.section-pad-sm {
  padding-block: clamp(48px, 6vw, 80px);
}

.section-head {
  max-width: 720px;
  margin: 0 auto clamp(40px, 5vw, 64px);
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.section-head .lead {
  font-size: 17px;
  color: var(--text-1);
  text-wrap: balance;
}

/* ============== Footer ============== */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-0);
  padding-block: 56px 32px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 40px;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer h5 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-2);
  margin: 0 0 14px;
  font-weight: 500;
  font-family: var(--font-mono);
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer ul a {
  font-size: 14px; color: var(--text-1);
}
.footer ul a:hover { color: var(--text-0); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-2); font-size: 13px;
}
.footer-bottom .legal { display: flex; gap: 20px; }

/* ============== Utility ============== */
.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  color: var(--text-1);
  background: var(--bg-2);
}
.divider {
  height: 1px; background: var(--border); width: 100%;
}
.glow {
  position: absolute; pointer-events: none;
  width: 700px; height: 700px;
  background: radial-gradient(closest-side, var(--accent-glow), transparent 70%);
  filter: blur(40px);
  opacity: 0.55;
}

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-1);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.badge-accent {
  background: var(--accent-soft);
  border-color: color-mix(in oklab, var(--accent) 35%, transparent);
  color: var(--accent-2);
}

.text-mono { font-family: var(--font-mono); }
.text-muted { color: var(--text-2); }
.text-sub { color: var(--text-1); }
.text-grad {
  background: linear-gradient(180deg, var(--text-0) 30%, color-mix(in oklab, var(--text-0) 50%, transparent));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.text-accent {
  background: linear-gradient(120deg, #4f8bff, #7c3aed 70%, #a974ff);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* Hamburger button */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 16px;
  height: 2px;
  background: var(--text-1);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.15s ease;
}
.nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.nav-drawer {
  display: none;
  flex-direction: column;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-0);
  border-top: 1px solid var(--border);
  z-index: 49;
  overflow-y: auto;
  padding: 8px 24px 48px;
}
.nav-drawer.open { display: flex; }

.nav-drawer-links {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.nav-drawer-links a {
  display: block;
  padding: 16px 0;
  font-size: 17px;
  font-weight: 500;
  color: var(--text-1);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: color 0.15s;
}
.nav-drawer-links a:hover,
.nav-drawer-links a.active { color: var(--text-0); }

.nav-drawer-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 24px;
  flex-wrap: wrap;
}
.nav-drawer-foot .btn-link {
  font-size: 14px;
  color: var(--text-1);
  text-decoration: none;
  padding: 0 4px;
}
.nav-drawer-foot .btn-link:hover { color: var(--text-0); }

/* Mobile nav */
@media (max-width: 760px) {
  .nav-links { display: none; }
  .hide-mobile { display: none !important; }
  .nav-hamburger { display: flex; }
}

/* ============================================
   Mobile-friendly layout overrides (≤ 760px)
   ============================================ */
@media (max-width: 760px) {
  /* Generic multi-column grids → single column */
  .arch-grid,
  .lp-price-grid,
  .suite-grid,
  .cases-grid,
  .blog-grid,
  .team-grid,
  .stats-grid,
  .feat-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Footer grid → 2 columns max */
  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 32px 20px !important;
  }
  .footer-grid > div:first-child {
    grid-column: 1 / -1;
  }

  /* Pricing cards — full width, no horizontal scroll */
  .lp-price-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  /* Stat pills row → wrap */
  .stat-pills,
  .stats-row,
  .kpi-row {
    flex-wrap: wrap !important;
    gap: 10px !important;
  }
  .stat-pill,
  .kpi-card {
    flex: 1 1 calc(50% - 10px) !important;
    min-width: 120px !important;
  }

  /* Testimonials → single column */
  .testimonials-grid,
  .quotes-grid {
    grid-template-columns: 1fr !important;
  }

  /* Hero section — reduce padding and font scale */
  .lp-hero {
    padding-top: 80px !important;
    padding-bottom: 48px !important;
  }
  .lp-hero h1 {
    font-size: clamp(28px, 8vw, 40px) !important;
  }
  .lp-hero .hero-sub {
    font-size: 15px !important;
  }

  /* Section headings */
  .section-label { font-size: 11px !important; }
  .section-title { font-size: clamp(22px, 7vw, 32px) !important; }

  /* Cards — make sure they breathe */
  .arch-card,
  .feat-card,
  .suite-card,
  .lp-price-card,
  .blog-card,
  .case-card {
    padding: 20px !important;
  }

  /* Feature scene — stack panels */
  .fs-scene { height: auto !important; }
  .fs-sticky { position: static !important; }
  .fs-panel { opacity: 1 !important; transform: none !important; }

  /* Tables — allow horizontal scroll */
  .lp-table-wrap,
  .demo-table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* CTA button groups → stack vertically */
  .hero-cta,
  .cta-group {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .hero-cta .btn,
  .cta-group .btn {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
  }

  /* Container horizontal padding */
  .container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}
