/*
Theme Name: Automotriz
Theme URI: https://automotriz.io
Author: Automotriz
Author URI: https://automotriz.io
Description: Tema de la landing y contenido de Automotriz — SaaS para talleres de mecánica en Colombia. Tema oscuro, hero scroll-driven, páginas legales y blog integrados.
Version: 1.2.1
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.0
License: Propietaria
Text Domain: automotriz
*/

/* ---------- Tokens (fuente: mockup exportado) ---------- */
:root {
  --bg: #0a0a0a;
  --surface: #18181b;
  --surface-2: #1f1f23;
  --fg: #e4e4e7;
  --muted: #a1a1aa;
  --border: #27272a;
  --accent: #10b981;
  --accent-hover: oklch(from var(--accent) calc(l - 0.08) c h);
  --accent-soft: oklch(from var(--accent) l c h / 0.12);
  --amber: #f59e0b;
  --on-accent: #052e22;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: var(--on-accent); }

h1, h2, h3, .display { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.08; }

a { color: inherit; text-decoration: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-title { font-size: clamp(30px, 4.2vw, 44px); margin-bottom: 16px; }
.section-sub { color: var(--muted); font-size: 17px; max-width: 560px; }

/* ---------- Entrada escalonada al cargar ---------- */
.load-in { opacity: 0; transform: translateY(18px); transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out); }
body.loaded .load-in { opacity: 1; transform: none; }
.load-in:nth-child(1) { transition-delay: 0.05s; }
.load-in:nth-child(2) { transition-delay: 0.13s; }
.load-in:nth-child(3) { transition-delay: 0.21s; }

/* ---------- Reveal al hacer scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.38s var(--ease-out), transform 0.38s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: oklch(from var(--bg) l c h / 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; max-width: 1120px; margin: 0 auto; }
.nav-logo { font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 28px; align-items: center; list-style: none; }
.nav-links a.link { font-size: 14px; color: var(--muted); transition: color 0.25s ease; }
.nav-links a.link:hover { color: var(--fg); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  min-height: 48px; padding: 0 26px; border-radius: 10px;
  cursor: pointer; border: 1px solid transparent;
  transition: background-color 0.25s ease, transform 0.25s var(--ease-out), border-color 0.25s ease, color 0.25s ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 14px; }

/* ---------- Hero scroll-driven ---------- */
.hero-scroll { position: relative; height: 300vh; }
.hero-sticky {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: flex; align-items: center;
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 72px);
  align-items: center; width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px;
}
.hero-acts { position: relative; min-height: 300px; }
.hero-act {
  position: absolute; inset: 0;
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.38s var(--ease-out), transform 0.38s var(--ease-out);
  pointer-events: none;
  display: flex; flex-direction: column; justify-content: center;
}
.hero-act.active { opacity: 1; transform: none; pointer-events: auto; }
.hero-act .stagger > * {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.34s var(--ease-out), transform 0.34s var(--ease-out);
}
.hero-act.active .stagger > * { opacity: 1; transform: none; }
.hero-act.active .stagger > *:nth-child(1) { transition-delay: 0.00s; }
.hero-act.active .stagger > *:nth-child(2) { transition-delay: 0.08s; }
.hero-act.active .stagger > *:nth-child(3) { transition-delay: 0.16s; }
.hero-act h1, .hero-act h2 { font-size: clamp(34px, 4.6vw, 56px); margin: 10px 0 16px; }
.hero-act p { color: var(--muted); font-size: clamp(15px, 1.4vw, 18px); max-width: 460px; }
.hero-act .step-tag {
  font-family: var(--font-display); font-size: 12px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent);
}
.hero-cta-row { margin-top: 28px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.hero-micro { font-size: 13px; color: var(--muted); }

.scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--muted); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  transition: opacity 0.4s ease;
}
.scroll-hint.hidden { opacity: 0; }
.scroll-hint .line { width: 1px; height: 40px; background: var(--border); position: relative; overflow: hidden; }
.scroll-hint .line::after {
  content: ''; position: absolute; left: 0; top: -50%; width: 100%; height: 50%;
  background: var(--accent); animation: hintDrop 1.8s var(--ease-out) infinite;
}
@keyframes hintDrop { 0% { top: -50%; } 100% { top: 110%; } }

/* ---------- Teléfono (UI real del portal del cliente) ---------- */
.phone-stage { display: flex; justify-content: center; perspective: 1200px; }
.phone {
  width: min(300px, 72vw); aspect-ratio: 9 / 19.8;
  background: #000; border: 1px solid #3f3f46; border-radius: 46px;
  padding: 11px; position: relative; container-type: inline-size;
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255,255,255,0.04) inset;
  transform: translateZ(0);
}
.phone::before {
  content: ''; position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 24px; background: #000; border-radius: 14px; z-index: 6;
  border: 1px solid #26262a;
}
.phone-screen {
  position: absolute; inset: 3.7cqw; border-radius: 12cqw; overflow: hidden;
  background: var(--bg); display: flex; flex-direction: column;
}
.app-statusbar {
  height: 9.5cqw; flex: none; display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 6.5cqw 1.5cqw; font-size: 3.5cqw; color: var(--muted); font-weight: 500;
}
.status-bars { display: flex; gap: 0.66cqw; align-items: flex-end; }
.status-bars i { width: 1cqw; border-radius: 0.33cqw; background: var(--muted); }
.status-bars i:nth-child(1) { height: 1.3cqw; }
.status-bars i:nth-child(2) { height: 2cqw; }
.status-bars i:nth-child(3) { height: 2.7cqw; }

/* Portal del cliente: réplica de /estado/[token] */
.portal-header { flex: none; text-align: center; padding: 1.3cqw 4.7cqw 2.3cqw; border-bottom: 1px solid var(--border); }
.portal-taller { font-size: 3.2cqw; color: var(--muted); }
.placa {
  display: inline-block; margin-top: 1.3cqw; background: #f5c400; border-radius: 2cqw; padding: 0.8cqw;
  box-shadow: 0 0.33cqw 0.66cqw rgba(0, 0, 0, 0.45);
}
.placa-marco {
  display: block; border: 0.55cqw solid #18181b; border-radius: 1.2cqw; padding: 0.7cqw 2.7cqw;
  box-shadow: inset 0 0.33cqw 0.33cqw rgba(255, 255, 255, 0.25);
  font-family: var(--font-display); font-weight: 900; font-size: 4.5cqw; line-height: 1.1;
  letter-spacing: 0.16em; color: #18181b; white-space: nowrap;
}
.portal-vehiculo { font-family: var(--font-display); font-weight: 700; font-size: 4.5cqw; margin-top: 1.2cqw; }
.portal-orden { font-size: 3cqw; color: #71717a; margin-top: 0.5cqw; }
.portal-chip {
  display: inline-block; margin-top: 1.7cqw; font-size: 3.2cqw; font-weight: 500;
  padding: 0.9cqw 3.3cqw; border-radius: 999px; white-space: nowrap;
  transition: background-color 0.35s ease, color 0.35s ease;
}
.portal-chip.sky { background: rgba(14, 165, 233, 0.16); color: #38bdf8; }
.portal-chip.amber { background: rgba(245, 158, 11, 0.14); color: #fbbf24; }
.portal-chip.orange { background: rgba(249, 115, 22, 0.16); color: #fb923c; }
.portal-chip.violet { background: rgba(139, 92, 246, 0.18); color: #a78bfa; }
.portal-chip.emerald { background: rgba(16, 185, 129, 0.16); color: #34d399; }
.portal-vivo {
  margin-top: 1.5cqw; font-size: 2.9cqw; color: #71717a;
  display: flex; align-items: center; justify-content: center; gap: 1.7cqw;
}
.vivo-dot { position: relative; display: inline-flex; width: 2.3cqw; height: 2.3cqw; flex: none; }
.vivo-ping {
  position: absolute; inset: 0; border-radius: 50%; background: #34d399; opacity: 0.6;
  animation: tlPing 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.vivo-core { position: relative; width: 2.3cqw; height: 2.3cqw; border-radius: 50%; background: #34d399; }

.app-scroll { flex: 1; overflow: hidden; position: relative; }
.app-scroll-inner {
  display: flex; flex-direction: column; gap: 2.3cqw; padding: 2.7cqw 4cqw 3.3cqw;
}
.pcard { background: var(--surface); border: 1px solid var(--border); border-radius: 4cqw; padding: 2.7cqw 3.7cqw; }
.pcard h4 {
  font-size: 3.1cqw; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: #a1a1aa; margin-bottom: 2cqw;
}

/* Línea de tiempo de estados (el "Progreso" del portal) */
.timeline { list-style: none; }
.timeline li { display: flex; gap: 3.3cqw; }
.tl-rail { display: flex; flex-direction: column; align-items: center; width: 4.7cqw; flex: none; }
.tl-dot {
  position: relative; width: 4cqw; height: 4cqw; border-radius: 50%; flex: none;
  border: 0.33cqw solid #3f3f46; background: #18181b;
  transition: background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.tl-ping { display: none; }
.timeline li.current .tl-dot {
  background: #34d399; border-color: transparent; box-shadow: 0 0 0 1.3cqw rgba(52, 211, 153, 0.2);
}
.timeline li.current .tl-ping {
  display: block; position: absolute; inset: 0; border-radius: 50%;
  background: #34d399; opacity: 0.7; animation: tlPing 1.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes tlPing {
  0% { transform: scale(1); opacity: 0.7; }
  80%, 100% { transform: scale(2.3); opacity: 0; }
}
.timeline li.done .tl-dot { background: #10b981; border-color: transparent; }
.tl-line { width: 0.66cqw; flex: 1; min-height: 3cqw; background: #27272a; transition: background-color 0.35s ease; }
.timeline li.done .tl-line { background: rgba(16, 185, 129, 0.5); }
.tl-body { padding-bottom: 2.2cqw; }
.timeline li.tl-last .tl-body { padding-bottom: 0; }
.tl-body p { font-size: 3.8cqw; line-height: 1.3; color: #52525b; transition: color 0.35s ease; }
.timeline li.done .tl-body p { color: #e4e4e7; font-weight: 500; }
.timeline li.current .tl-body p { color: #6ee7b7; font-weight: 600; }
.en-curso { display: none; font-style: normal; font-size: 3.2cqw; color: #34d399; margin-left: 2cqw; }
.timeline li.current .en-curso { display: inline; animation: enCurso 1.6s ease-in-out infinite; }
@keyframes enCurso { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.tl-body time { display: none; font-size: 3cqw; line-height: 1.3; color: #71717a; margin-top: 0.33cqw; }
.timeline li.done .tl-body time, .timeline li.current .tl-body time { display: block; }

/* Notas del taller: aparecen cuando llega una actualización */
.pcard-notas {
  opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; border-width: 0; overflow: hidden;
  transition: opacity 0.45s var(--ease-out), max-height 0.45s var(--ease-out),
    padding 0.45s var(--ease-out), border-width 0.45s var(--ease-out);
}
.pcard-notas.visible { opacity: 1; max-height: 80cqw; padding: 2.7cqw 3.7cqw; border-width: 1px; }
.nota {
  background: rgba(39, 39, 42, 0.5); border: 0 solid var(--border); border-radius: 2.7cqw;
  opacity: 0; transform: translateY(8px) scale(0.98); max-height: 0; padding: 0 3.3cqw; overflow: hidden;
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out),
    max-height 0.4s var(--ease-out), padding 0.4s var(--ease-out), margin 0.4s var(--ease-out);
}
.nota.visible { opacity: 1; transform: none; max-height: 40cqw; padding: 2.2cqw 3cqw; border-width: 1px; }
.nota.visible + .nota.visible { margin-top: 2cqw; }
.nota p { font-size: 3.5cqw; line-height: 1.4; }
.nota time { display: block; margin-top: 1cqw; font-size: 3cqw; color: #71717a; }

/* Cotización: aparece cuando la orden pasa a "Esperando tu aprobación";
   tras aprobarse colapsa a una línea resumen */
.quote {
  opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; border-width: 0; overflow: hidden;
  transition: opacity 0.45s var(--ease-out), max-height 0.45s var(--ease-out),
    padding 0.45s var(--ease-out), border-width 0.45s var(--ease-out);
}
.quote.visible { opacity: 1; max-height: 75cqw; padding: 2.7cqw 3.7cqw; border-width: 1px; }
.quote-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 3.3cqw;
  padding: 1.5cqw 0; border-bottom: 1px solid var(--border); font-size: 3.5cqw; line-height: 1.3;
}
.quote-row .amount { font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; }
.quote-row.impuestos { color: var(--muted); font-size: 3.3cqw; }
.quote-row.total { border-bottom: none; padding-top: 2.2cqw; }
.quote-row.total .label { font-weight: 600; }
.quote-row.total .amount { font-family: var(--font-display); font-weight: 700; font-size: 4.3cqw; color: var(--accent); }
.quote-compactada { display: none; align-items: center; gap: 2cqw; font-size: 3.6cqw; font-weight: 500; }
.quote-compactada svg { width: 4cqw; height: 4cqw; stroke: #34d399; flex: none; }
.quote-compactada .amount {
  margin-left: auto; font-family: var(--font-display); font-weight: 700; font-size: 4.3cqw;
  color: var(--accent); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.quote.compact .quote-rows, .quote.compact h4 { display: none; }
.quote.compact .quote-compactada { display: flex; }
.portal-note {
  padding: 0.66cqw 1.3cqw; font-size: 3.3cqw; color: var(--muted);
  display: flex; align-items: center; justify-content: center; gap: 2cqw;
}
.portal-note svg { width: 3.7cqw; height: 3.7cqw; stroke: var(--accent); flex: none; }

.app-footer {
  flex: none; padding: 2.3cqw 4cqw 3.3cqw; max-height: 24cqw;
  transition: opacity 0.35s ease, max-height 0.45s var(--ease-out), padding 0.45s var(--ease-out);
}
.app-footer.gone { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; overflow: hidden; }
.send-btn {
  width: 100%; min-height: 12.5cqw; border: none; border-radius: 3.7cqw;
  background: var(--accent); color: var(--on-accent);
  font-family: var(--font-body); font-weight: 600; font-size: 4.3cqw;
  display: flex; align-items: center; justify-content: center; gap: 2.7cqw;
  transition: transform 0.18s var(--ease-out), box-shadow 0.3s ease;
}
.send-btn.tapped { transform: scale(0.96); box-shadow: 0 0 0 2cqw var(--accent-soft); }

/* ---------- Secciones ---------- */
section.block { padding: clamp(80px, 10vw, 130px) 0; }

/* Problema */
.problem-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.problem-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 28px 26px; transition: transform 0.3s var(--ease-out), border-color 0.3s ease;
}
.problem-card:hover { transform: scale(1.02); border-color: #3f3f46; }
.problem-card .quote-mark { font-family: var(--font-display); font-size: 34px; font-weight: 700; color: var(--amber); line-height: 1; margin-bottom: 14px; }
.problem-card p { font-size: 15.5px; color: var(--fg); }

/* Cómo funciona */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.step-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 26px; display: flex; flex-direction: column; gap: 18px;
  transition: transform 0.3s var(--ease-out), border-color 0.3s ease;
}
.step-card:hover { transform: scale(1.02); border-color: #3f3f46; }
.step-num {
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
  color: var(--accent); letter-spacing: 0.14em;
}
.step-card h3 { font-size: 19px; }
.step-card > p { font-size: 14.5px; color: var(--muted); }
.mini-mock {
  margin-top: auto; background: var(--bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px; font-size: 12px;
}
.mini-mock .mm-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.mini-mock .mm-row:last-child { border-bottom: none; }
.mini-mock .mm-label { color: var(--muted); }
.mini-mock .mm-ok { color: var(--accent); font-weight: 600; }
.mini-mock .mm-btn {
  margin-top: 10px; text-align: center; background: var(--accent-soft); color: var(--accent);
  font-weight: 600; border-radius: 8px; padding: 8px; font-size: 12px;
}

/* Beneficios */
.benefits { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 48px; }
.benefit-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 30px 28px; transition: transform 0.3s var(--ease-out), border-color 0.3s ease;
}
.benefit-card:hover { transform: scale(1.02); border-color: oklch(from var(--accent) l c h / 0.45); }
.benefit-icon {
  width: 44px; height: 44px; border-radius: 11px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.benefit-icon svg { width: 22px; height: 22px; stroke: var(--accent); stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.benefit-card h3 { font-size: 19px; margin-bottom: 8px; }
.benefit-card p { font-size: 14.5px; color: var(--muted); }

/* Precios */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; align-items: stretch; }
.price-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 32px 28px; display: flex; flex-direction: column; position: relative;
  transition: transform 0.3s var(--ease-out), border-color 0.3s ease;
}
.price-card:hover { transform: scale(1.02); }
.price-card.featured { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), var(--surface) 45%); }
.price-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 600;
  padding: 5px 14px; border-radius: 999px; white-space: nowrap;
}
.price-name { font-family: var(--font-display); font-weight: 600; font-size: 17px; }
.price-amount { font-family: var(--font-display); font-weight: 700; font-size: 40px; margin: 14px 0 2px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.price-period { font-size: 13.5px; color: var(--muted); margin-bottom: 22px; }
.price-features { list-style: none; display: flex; flex-direction: column; gap: 11px; font-size: 14px; color: var(--fg); margin-bottom: 28px; }
.price-features li { display: flex; gap: 10px; align-items: flex-start; }
.price-features svg { width: 16px; height: 16px; stroke: var(--accent); stroke-width: 2.2; fill: none; flex: none; margin-top: 3px; stroke-linecap: round; stroke-linejoin: round; }
.price-card .btn { margin-top: auto; width: 100%; }
.pricing-note {
  margin-top: 28px; text-align: center; font-size: 15px; color: var(--muted);
}
.pricing-note strong { color: var(--fg); font-weight: 600; }
.pricing-warn {
  margin-top: 14px; display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--amber);
}
.pricing-warn .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); flex: none; }

/* FAQ */
.faq-list { margin-top: 44px; max-width: 760px; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  gap: 20px; padding: 22px 4px; font-family: var(--font-display); font-weight: 600; font-size: 17px;
  transition: color 0.25s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent); }
.faq-item summary .plus { flex: none; width: 22px; height: 22px; position: relative; transition: transform 0.3s var(--ease-out); }
.faq-item summary .plus::before, .faq-item summary .plus::after {
  content: ''; position: absolute; background: var(--accent); border-radius: 2px;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.faq-item summary .plus::before { width: 14px; height: 2px; }
.faq-item summary .plus::after { width: 2px; height: 14px; }
.faq-item[open] summary .plus { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 4px 24px; color: var(--muted); font-size: 15px; max-width: 640px; }

/* CTA final */
.final-cta { text-align: center; }
.final-cta h2 { font-size: clamp(32px, 4.6vw, 52px); margin-bottom: 18px; }
.final-cta p { color: var(--muted); font-size: 17px; margin-bottom: 34px; }
.final-cta .micro { margin-top: 16px; font-size: 13.5px; color: var(--muted); }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 44px 0 52px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; list-style: none; }
.footer-links a { font-size: 14px; color: var(--muted); transition: color 0.25s ease; }
.footer-links a:hover { color: var(--fg); }
.footer-note { font-size: 13px; color: var(--muted); }

/* ---------- Atmósfera: grano, glow y rejilla ---------- */
.noise {
  position: fixed; inset: 0; z-index: 200; pointer-events: none; opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.7'/%3E%3C/svg%3E");
}

.cursor-glow {
  position: fixed; top: 0; left: 0; z-index: 3; pointer-events: none;
  width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle, oklch(from var(--accent) l c h / 0.09), transparent 62%);
  opacity: 0; transition: opacity 0.7s ease;
  will-change: transform;
}

.scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 60;
  width: 100%; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: 0 50%;
}

.hero-sticky::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(58% 48% at 76% 42%, oklch(from var(--accent) l c h / 0.08), transparent 70%),
    radial-gradient(42% 36% at 12% 82%, oklch(from var(--accent) l c h / 0.05), transparent 70%);
}
.hero-sticky::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.55;
  background-image: radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(72% 62% at 50% 46%, #000, transparent 78%);
  mask-image: radial-gradient(72% 62% at 50% 46%, #000, transparent 78%);
}
.hero-grid { position: relative; z-index: 1; }

/* ---------- Interacción de mouse ---------- */
.phone-stage { position: relative; }
.phone-stage::before {
  content: ''; position: absolute; top: 50%; left: 50%; z-index: -1;
  width: 440px; height: 440px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, oklch(from var(--accent) l c h / 0.13), transparent 65%);
}
.phone { will-change: transform; }

.spot { position: relative; }
.spot::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(250px circle at var(--mx, 50%) var(--my, 50%), oklch(from var(--accent) l c h / 0.09), transparent 65%);
  opacity: 0; transition: opacity 0.35s ease;
}
.spot:hover::before { opacity: 1; }

.nav-links a.link { position: relative; }
.nav-links a.link::after {
  content: ''; position: absolute; left: 0; bottom: -5px; width: 100%; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: right;
  transition: transform 0.3s var(--ease-out);
}
.nav-links a.link:hover::after { transform: scaleX(1); transform-origin: left; }

@media (hover: none), (prefers-reduced-motion: reduce) {
  .cursor-glow { display: none; }
}

/* ---------- Páginas legales y contenido ---------- */
.legal-topbar { border-bottom: 1px solid var(--border); }
.legal-topbar-inner { max-width: 760px; margin: 0 auto; padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; }
.legal-topbar .back { font-size: 14px; color: var(--muted); }
.legal-topbar .back:hover { color: var(--fg); }
.legal-main { max-width: 760px; margin: 0 auto; padding: 64px 24px 100px; }
.legal-main h1.entry-title { font-size: clamp(30px, 5vw, 40px); letter-spacing: -0.02em; margin-bottom: 8px; }
.legal-main .updated { color: var(--muted); font-size: 14px; margin-bottom: 44px; }
.legal-content h2 { font-family: var(--font-display); font-size: 21px; letter-spacing: -0.01em; margin: 40px 0 12px; }
.legal-content p, .legal-content li { font-size: 15.5px; color: var(--fg); }
.legal-content p { margin-bottom: 14px; }
.legal-content ul { padding-left: 22px; margin: 10px 0 16px; }
.legal-content li { margin-bottom: 6px; }
.legal-content a { color: var(--accent); }
.legal-content a:hover { text-decoration: underline; }
.legal-content .notice {
  background: oklch(0.75 0.15 75 / 0.1); border: 1px solid oklch(0.75 0.15 75 / 0.35);
  color: var(--amber); border-radius: 12px; padding: 16px 20px; font-size: 14.5px; margin: 20px 0;
}
.legal-content .notice a { color: var(--amber); text-decoration: underline; }

/* ---------- Blog / noticias ---------- */
.blog-main { max-width: 1120px; margin: 0 auto; padding: 140px 24px 100px; }
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
.post-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 28px 26px; display: flex; flex-direction: column; gap: 12px;
  transition: transform 0.3s var(--ease-out), border-color 0.3s ease;
}
.post-card:hover { transform: scale(1.02); border-color: #3f3f46; }
.post-card .post-date { font-size: 12.5px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.post-card h2 { font-size: 20px; line-height: 1.25; }
.post-card h2 a:hover { color: var(--accent); }
.post-card p { font-size: 14.5px; color: var(--muted); }
.post-card .read-more { margin-top: auto; font-size: 14px; font-weight: 600; color: var(--accent); }
.single-main { max-width: 760px; margin: 0 auto; padding: 140px 24px 100px; }
.posts-navigation, .post-navigation { max-width: 760px; margin: 0 auto 60px; padding: 0 24px; font-size: 14px; }
.posts-navigation a, .post-navigation a { color: var(--accent); }
.pagination { margin-top: 40px; display: flex; gap: 14px; font-size: 14px; }
.pagination a, .pagination .current { padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; }
.pagination .current { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

/* ---------- 404 ---------- */
.error-main { max-width: 760px; margin: 0 auto; padding: 180px 24px; text-align: center; }
.error-main h1 { font-size: clamp(48px, 8vw, 84px); margin-bottom: 16px; }
.error-main p { color: var(--muted); margin-bottom: 30px; }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .hero-scroll { height: 210vh; }
  .hero-grid { grid-template-columns: 1fr; gap: 18px; align-content: center; padding-top: 64px; }
  .hero-acts { min-height: 200px; }
  .hero-act h1, .hero-act h2 { font-size: clamp(30px, 7.4vw, 40px); }
  .hero-act p { font-size: 15px; max-width: 100%; }
  .phone { width: min(270px, 62vw); }
  .scroll-hint { display: none; }
  .problem-list, .steps, .pricing, .posts-grid { grid-template-columns: 1fr; }
  .benefits { grid-template-columns: 1fr; }
  .price-card.featured { order: -1; }
  .nav-links li:not(.nav-cta-li) { display: none; }
}

@media (max-width: 639px) {
  .hero-grid { padding-top: 54px; gap: 12px; }
  .hero-acts { min-height: 168px; }
  .hero-act h1, .hero-act h2 { font-size: clamp(24px, 6.6vw, 30px); margin: 8px 0 10px; }
  .hero-act p { font-size: 13.5px; }
  .hero-cta-row { margin-top: 14px; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 10px 14px; }
  .phone { width: min(240px, 62vw); }
}

/* Pantallas bajitas (iPhone SE y similares): teléfono más compacto para que
   quepa completo en el viewport sticky sin recortarse */
@media (max-width: 639px) and (max-height: 730px) {
  .hero-acts { min-height: 140px; }
  .phone { width: min(180px, 50vw); }
}

@media (max-height: 520px) and (max-width: 1023px) {
  .hero-grid { padding-top: 52px; gap: 10px; }
  .hero-acts { min-height: 150px; }
  .phone { width: 130px; }
  .hero-micro { display: none; }
}

/* Escritorio con ventana bajita: el teléfono (ahora más alto) no debe recortarse */
@media (min-width: 1024px) and (max-height: 800px) {
  .phone { width: 268px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-scroll { height: auto; }
  .hero-sticky { position: static; height: auto; padding: 120px 0 80px; overflow: visible; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-acts { min-height: 0; display: flex; flex-direction: column; gap: 40px; }
  .hero-act { position: static; opacity: 1; transform: none; pointer-events: auto; }
  .hero-act .stagger > * { opacity: 1; transform: none; }
  .scroll-hint { display: none; }
  .load-in, .reveal { opacity: 1; transform: none; }
}

/* ---------- Banner de cookies ---------- */
.cookie-banner {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
  z-index: 90; width: min(560px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 14px;
  background: oklch(from var(--surface) l c h / 0.94); backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px;
  box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.7);
  animation: cookieIn 0.5s var(--ease-out) 0.6s backwards;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { font-size: 13px; color: var(--muted); flex: 1; line-height: 1.45; }
.cookie-banner a { color: var(--accent); text-decoration: underline; }
.cookie-banner .btn { flex: none; }
.cookie-banner.bye {
  opacity: 0; transform: translateX(-50%) translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
@keyframes cookieIn {
  from { opacity: 0; transform: translateX(-50%) translateY(14px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@media (max-width: 639px) {
  .cookie-banner { flex-direction: column; align-items: stretch; text-align: center; gap: 10px; }
}
