/* ═══════════════════════════════════════════════════════════════
   Autonofactu · landing — design system del producto
   Tokens y filosofía: minimalismo editorial (ver PLAN_LANDING.md §5)
   ═══════════════════════════════════════════════════════════════ */

/* Regla crítica del proyecto: nunca eliminar */
[hidden] { display: none !important; }

/* ── Fuentes self-hosted ─────────────────────────────────────── */
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-300.woff2") format("woff2");
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

/* ── Tokens ──────────────────────────────────────────────────── */
:root {
  --bg:                #FAF9F6;
  --surface:           #FFFFFF;
  --primary:           #2D5C3A;
  --primary-container: #4E8B5F;
  --on-primary:        #FFFFFF;
  --primary-light:     #E4EFE6;

  --text-primary:      #1A201B;
  --text-secondary:    #3F5244;
  --text-muted:        #6B7E6F;

  --sidebar-bg:        #2C2825;
  --text-sidebar:      rgba(255, 255, 255, 0.65);
  --verde-claro:       #7BBF8E;

  --danger:            #A64B42;
  --ambar:             #8A6D1E;
  --ambar-bg:          #F5EDD8;

  --border:            #E8E3DC;
  --radius-pill:       9999px;
  --radius-card:       20px;
  --container:         1120px;
}

/* ── Base ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; }

a { color: var(--primary); text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--primary-container);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -48px;
  background: var(--primary); color: var(--on-primary);
  padding: 10px 18px; border-radius: var(--radius-pill);
  z-index: 100; transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container.narrow { max-width: 760px; }

/* ── Tipografía ──────────────────────────────────────────────── */
h1 {
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0 0 20px;
}
h2 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 40px;
  text-align: center;
}
h3 { font-size: 17px; font-weight: 500; margin: 0 0 6px; }

p { margin: 0; }

.kicker {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 16px;
}

/* ── Botones ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.1s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-lg { padding: 14px 30px; font-size: 16px; }

.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-container); }

.btn-secondary { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-secondary:hover { background: var(--primary-light); }

.btn-ghost { color: var(--text-secondary); background: transparent; }
.btn-ghost:hover { color: var(--primary); background: var(--primary-light); }

/* ── Navegación ──────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 249, 246, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 66px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}
.brand-mark { width: 30px; height: 30px; border-radius: 8px; }
.brand-name { font-size: 17px; font-weight: 500; letter-spacing: -0.01em; }

.nav-links {
  display: flex;
  gap: 26px;
  margin-left: 12px;
}
.nav-links a {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 6px 2px;
}
.nav-links a:hover { color: var(--primary); }

.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-burger {
  display: none;
  margin-left: auto;
  width: 42px; height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-burger span {
  display: block;
  width: 16px; height: 1.8px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-burger[aria-expanded="true"] span:first-child { transform: translateY(3.4px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:last-child  { transform: translateY(-3.4px) rotate(-45deg); }

.nav-mobile {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 12px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-mobile a {
  padding: 12px 4px;
  font-size: 16px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
.nav-mobile a:last-child { border-bottom: 0; }
.nav-mobile .btn-primary {
  margin-top: 10px;
  color: var(--on-primary);
  justify-content: center;
  border-bottom: 0;
}

/* ── Secciones ───────────────────────────────────────────────── */
.section { padding: 96px 0; }
.section.alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ── S1 · Hero ───────────────────────────────────────────────── */
.hero { padding: 88px 0 72px; text-align: center; }

.chip {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 22px;
}

.hero-sub {
  max-width: 640px;
  margin: 0 auto 32px;
  font-size: 18px;
  color: var(--text-secondary);
}

.cta-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-micro {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Mockup con marco de navegador */
.browser {
  max-width: 860px;
  margin: 56px auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: 0 24px 60px -32px rgba(26, 32, 27, 0.18);
  overflow: hidden;
  text-align: left;
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.browser-bar .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--border);
}
.browser-url {
  margin: 0 auto;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px 14px;
}

.mock { display: flex; min-height: 320px; }

.mock-side {
  width: 64px;
  background: var(--sidebar-bg);
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  flex-shrink: 0;
}
.mock-logo span {
  display: block;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--primary-container);
}
.mock-nav { display: flex; flex-direction: column; gap: 14px; }
.mock-nav i {
  display: block;
  width: 22px; height: 22px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.14);
}
.mock-nav i.on { background: var(--verde-claro); }

.mock-main { flex: 1; padding: 22px 26px; min-width: 0; }

.mock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.mock-title { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.mock-sub { font-size: 12.5px; color: var(--text-muted); }
.mock-tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--primary);
  background: var(--primary-light);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.mock-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--border);
}
.mock-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  flex-shrink: 0;
}
.av1 { background: #4E8B5F; }
.av2 { background: #B08968; }
.av3 { background: #5E82A6; }
.av4 { background: #A26769; }

.mock-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mock-who b { font-size: 14px; font-weight: 500; }
.mock-who small { font-size: 12px; color: var(--text-muted); }
.mock-amount { font-size: 14px; font-weight: 500; }

.mock-check {
  width: 19px; height: 19px;
  border-radius: 6px;
  background: var(--primary);
  position: relative;
  flex-shrink: 0;
}
.mock-check::after {
  content: "";
  position: absolute;
  left: 6.5px; top: 3.5px;
  width: 4px; height: 8px;
  border: solid #fff;
  border-width: 0 1.8px 1.8px 0;
  transform: rotate(45deg);
}

.mock-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 2px;
}
.mock-total { font-size: 13px; color: var(--text-muted); }
.mock-total b { font-size: 17px; font-weight: 500; color: var(--text-primary); margin-left: 6px; }
.mock-btn {
  background: var(--primary);
  color: var(--on-primary);
  font-size: 13px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
}

/* Franja de confianza */
.trust {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.trust li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 8px 15px;
}
.trust svg {
  width: 15px; height: 15px;
  stroke: var(--primary);
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ── S2 · Gremios ────────────────────────────────────────────── */
.gremios { padding: 40px 0 64px; }
.chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.chips li {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
}
.chips .chip-more {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--text-muted);
  font-weight: 400;
}
.chips .chip-link { padding: 0; overflow: hidden; }
.chips .chip-link a {
  display: block;
  padding: 9px 18px;
  color: var(--primary);
  text-decoration: none;
  border-radius: var(--radius-pill);
  transition: background 0.15s ease, color 0.15s ease;
}
.chips .chip-link a:hover { background: var(--primary-container); color: #fff; }

/* ── S3 · Problema ───────────────────────────────────────────── */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
}
.card p { font-size: 14.5px; color: var(--text-secondary); }

.card-icon, .f-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--primary-light);
  margin-bottom: 16px;
}
.card-icon svg, .f-icon svg {
  width: 21px; height: 21px;
  stroke: var(--primary);
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.problema-cierre { text-align: center; margin-top: 56px; }
.linea-emocional {
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 300;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.problema-cierre p:last-child { color: var(--text-muted); }

/* ── S4 · Pasos ──────────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.step {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
  display: flex;
  flex-direction: column;
}
.step p { font-size: 14.5px; color: var(--text-secondary); }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--primary);
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
}

.vignette {
  margin-top: auto;
  padding-top: 22px;
}
.vignette > div { margin-bottom: 8px; }
.v-field {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  color: var(--text-secondary);
  padding: 9px 15px;
}
.v-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.v-pill {
  font-size: 12px;
  font-weight: 500;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
}
.v-btn {
  background: var(--primary);
  color: var(--on-primary);
  font-size: 12.5px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
}
.v-btn.solo { margin-left: auto; }

.v-mini {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px 12px;
  font-size: 12.5px;
  color: var(--text-secondary);
}
.v-mini .mock-avatar { width: 26px; height: 26px; font-size: 10px; }
.v-mini span:nth-child(2) { flex: 1; }
.v-mini b { font-weight: 500; color: var(--text-primary); }
.v-mini .mock-check { width: 16px; height: 16px; }
.v-mini .mock-check::after { left: 5.2px; top: 2.6px; width: 3.5px; height: 7px; }

.vignette.factura {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-top: auto;
}
.v-fac-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}
.v-fac-head b { font-weight: 500; }
.v-fac-head span { color: var(--text-muted); letter-spacing: 0; }
.v-fac-line {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-secondary);
  padding: 6px 0;
  border-top: 1px solid var(--border);
}
.v-fac-line.total { font-weight: 500; color: var(--text-primary); }
.v-fac-tag {
  display: inline-block;
  margin-top: 10px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: var(--radius-pill);
  padding: 4px 11px;
}

/* ── S5 · Features ───────────────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
}
.feature p { font-size: 14.5px; color: var(--text-secondary); }
.feature .f-icon { margin-bottom: 16px; }

/* ── S6 · Verifactu (sección oscura) ─────────────────────────── */
.section.dark {
  background: var(--sidebar-bg);
  color: rgba(255, 255, 255, 0.86);
}
.section.dark h2 { color: #fff; }
.dark-lede {
  text-align: center;
  color: var(--text-sidebar);
  max-width: 640px;
  margin: 0 auto 40px;
}

.fechas {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.fecha {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-card);
  padding: 18px 28px;
  text-align: center;
  min-width: 200px;
}
.fecha b {
  display: block;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: 4px;
}
.fecha span { font-size: 12.5px; color: var(--text-sidebar); line-height: 1.45; display: block; }
.fecha.destacada { border-color: var(--verde-claro); }
.fecha.destacada b { color: var(--verde-claro); }

.claim {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-card);
  padding: 26px 30px;
  max-width: 640px;
  margin: 0 auto;
}
.claim p { font-size: 15px; color: rgba(255, 255, 255, 0.8); }
.claim b { color: #fff; font-weight: 500; }
.claim-estado {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  color: #E8CE8B;
  background: rgba(232, 206, 139, 0.12);
  border: 1px solid rgba(232, 206, 139, 0.35);
  border-radius: var(--radius-pill);
  padding: 5px 13px;
  margin-bottom: 14px;
}

.dark-cta { text-align: center; margin-top: 44px; }
.dark-cta .btn-primary { background: var(--primary-container); }
.dark-cta .btn-primary:hover { background: var(--verde-claro); color: var(--sidebar-bg); }
.dark-cta p { margin-top: 12px; font-size: 14px; color: var(--text-sidebar); }
.dark-link {
  display: inline-block;
  margin-top: 22px;
  font-size: 14px;
  color: var(--verde-claro);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.dark-link:hover { color: #fff; }

/* ── S7 · Comparativa ────────────────────────────────────────── */
.tabla-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}
.tabla {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 14.5px;
}
.tabla th, .tabla td {
  padding: 16px 20px;
  text-align: left;
  vertical-align: top;
}
.tabla thead th {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.tabla thead th small { font-weight: 400; }
.tabla tbody tr + tr th, .tabla tbody tr + tr td { border-top: 1px solid var(--border); }
.tabla tbody th {
  font-weight: 500;
  font-size: 14px;
  color: var(--text-primary);
  width: 22%;
}
.tabla td { color: var(--text-secondary); }
.tabla td small { color: var(--text-muted); }
.tabla .destacado { background: var(--primary-light); color: var(--primary); font-weight: 500; }
.tabla thead th.destacado { color: var(--primary); font-size: 14px; }
.tabla .mal { color: var(--danger); }

/* ── S8 · Historia ───────────────────────────────────────────── */
.historia {
  margin: 0;
  text-align: center;
}
.historia blockquote {
  margin: 0 auto;
  max-width: 620px;
  font-size: clamp(18px, 2.6vw, 22px);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.55;
  color: var(--text-primary);
}

/* ── S9 · Precios ────────────────────────────────────────────── */
.planes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 840px;
  margin: 0 auto;
}
.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 34px 30px 30px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.plan.pro { border: 2px solid var(--primary); }

.plan-ribbon {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--on-primary);
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  max-width: calc(100% - 24px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.plan h3 { font-size: 20px; font-weight: 500; }
.plan-para { font-size: 14px; color: var(--text-muted); margin-bottom: 18px; }
.plan-precio {
  font-size: 38px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.plan-precio span { font-size: 14px; font-weight: 400; color: var(--text-muted); letter-spacing: 0; }
.plan-precio .plan-precio-antes {
  font-size: 22px;
  font-weight: 400;
  color: var(--text-muted);
  text-decoration: line-through;
  letter-spacing: 0;
  margin-right: 8px;
}
.plan-precio-nota {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin: 4px 0 0;
  line-height: 1.5;
}

.plan-beta {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ambar);
  background: var(--ambar-bg);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  align-self: flex-start;
  margin-bottom: 6px;
}

.plan ul {
  list-style: none;
  margin: 18px 0 26px;
  padding: 0;
  flex: 1;
}
.plan li {
  font-size: 14.5px;
  color: var(--text-secondary);
  padding: 7px 0 7px 26px;
  position: relative;
}
.plan li::before {
  content: "✓";
  position: absolute;
  left: 2px;
  color: var(--primary);
  font-weight: 500;
}
.plan .btn { width: 100%; }

.planes-nota {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 28px;
}

/* ── S10 · FAQ ───────────────────────────────────────────────── */
.faq details {
  border-bottom: 1px solid var(--border);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 40px 20px 0;
  font-size: 16px;
  font-weight: 500;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 300;
  color: var(--primary);
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p {
  padding: 0 0 22px;
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 640px;
}

/* ── S11 · CTA final ─────────────────────────────────────────── */
.cta-final {
  background: var(--primary-light);
  border-radius: 28px;
  padding: 72px 32px;
  text-align: center;
}
.cta-final h2 { margin-bottom: 12px; }
.cta-final > p { color: var(--text-secondary); margin-bottom: 28px; }
.cta-micro { margin-top: 14px; font-size: 13px; color: var(--text-muted); }

/* ── S12 · Footer ────────────────────────────────────────────── */
.footer {
  background: var(--sidebar-bg);
  color: var(--text-sidebar);
  padding: 64px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}
.footer .brand.claro { color: #fff; }
.footer-brand p { margin-top: 14px; font-size: 14px; max-width: 260px; }

.footer-col h3 {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0 14px;
}
.footer-col h3.mt { margin-top: 26px; }
.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--text-sidebar);
  padding: 5px 0;
}
.footer-col a:hover { color: var(--verde-claro); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 22px;
  padding-bottom: 22px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}
.footer-bottom a { color: inherit; }
.footer-bottom a:hover { color: var(--verde-claro); }

/* Acciones de nav siempre visibles (páginas legales y 404, sin menú móvil) */
.nav-actions.always { display: flex; }

/* ── CTA fija en móvil ───────────────────────────────────────── */
.cta-sticky {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
}
.cta-sticky .btn { width: 100%; }

/* ── Páginas legales y 404 ───────────────────────────────────── */
.legal { max-width: 760px; padding-top: 56px; padding-bottom: 96px; }
.legal h1 {
  font-size: clamp(28px, 4vw, 38px);
  margin-bottom: 8px;
}
.legal .fecha-rev { color: var(--text-muted); font-size: 13.5px; margin-bottom: 40px; }
.legal h2 {
  font-size: 20px;
  font-weight: 500;
  text-align: left;
  margin: 38px 0 12px;
}
.legal p, .legal li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}
.legal ul { padding-left: 22px; margin: 0 0 12px; }
.legal li { margin-bottom: 6px; }
.legal h3 { font-size: 16px; font-weight: 600; color: var(--text-primary); margin: 24px 0 8px; }
.legal-divider { border: none; border-top: 1px solid var(--border); margin: 48px 0; }
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 16px;
  font-size: 14px;
}
.legal-table th, .legal-table td {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: top;
}
.legal-table th { color: var(--text-primary); font-weight: 600; background: var(--bg); }

/* ── Guía Verifactu (contenido SEO) ──────────────────────────── */
.guia .lede { font-size: 17px; color: var(--text-secondary); line-height: 1.7; margin: 0 0 30px; }
.guia h2 { font-size: 22px; }
.guia h3 { font-size: 16.5px; font-weight: 600; color: var(--text-primary); margin: 24px 0 8px; }
.guia strong { color: var(--text-primary); font-weight: 600; }
.guia-tldr { background: var(--primary-light); border-radius: var(--radius-card); padding: 22px 26px; margin: 0 0 40px; }
.guia-tldr h2 { margin: 0 0 10px !important; font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--primary); }
.guia-tldr p { margin-bottom: 8px; color: var(--text-secondary); }
.guia-tldr p:last-child { margin-bottom: 0; }
.guia-fechas { display: flex; gap: 14px; flex-wrap: wrap; margin: 8px 0 26px; }
.guia-fechas .gf { flex: 1; min-width: 200px; border: 1px solid var(--border); border-radius: var(--radius-card); padding: 18px 22px; background: var(--surface); }
.guia-fechas .gf b { display: block; font-size: 22px; font-weight: 500; color: var(--primary); margin-bottom: 4px; letter-spacing: -0.01em; }
.guia-fechas .gf span { font-size: 13px; color: var(--text-muted); line-height: 1.45; }
.guia-fechas .gf.destacada { border-color: var(--primary-container); background: var(--primary-light); }
.guia-cta { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 28px; margin: 40px 0; text-align: center; }
.guia-cta h3 { margin: 0 0 8px; font-size: 19px; }
.guia-cta p { margin: 0 auto 18px; max-width: 460px; }
.guia-estado { display: inline-block; font-size: 12.5px; font-weight: 500; color: var(--primary); background: var(--primary-light); border-radius: var(--radius-pill); padding: 4px 12px; margin-bottom: 10px; }
.guia-disclaimer { font-size: 13px; color: var(--text-muted); line-height: 1.6; border-top: 1px solid var(--border); margin-top: 48px; padding-top: 20px; }
.guia-disclaimer a { color: var(--text-secondary); }
.pendiente {
  background: var(--ambar-bg);
  color: var(--ambar);
  padding: 1px 7px;
  border-radius: 6px;
  font-weight: 500;
}

/* ── Centro de guías y artículos SEO ─────────────────────────── */
.guide-hub { padding-top: 56px; padding-bottom: 96px; }
.hub-hero { max-width: 680px; margin: 0 auto 52px; text-align: center; }
.hub-hero h1 { font-size: clamp(32px, 5vw, 48px); margin-bottom: 16px; }
.hub-hero p:last-child { color: var(--text-secondary); font-size: 17px; }
.guide-hub h2 { font-size: 22px; font-weight: 500; text-align: left; margin: 0 0 20px; }
.hub-section { margin-top: 46px; }
.hub-section:first-of-type { margin-top: 0; }
.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.topic-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.topic-card:hover {
  border-color: var(--primary-container);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -28px rgba(26, 32, 27, 0.38);
}
.topic-card .topic-label {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
}
.topic-card h3 { font-size: 18px; line-height: 1.28; margin-bottom: 10px; }
.topic-card p { color: var(--text-secondary); font-size: 14px; line-height: 1.6; }
.topic-card .topic-link { margin-top: auto; padding-top: 18px; font-size: 14px; font-weight: 500; }

.article-page { max-width: 820px; padding-top: 56px; padding-bottom: 96px; }
.article-breadcrumb { color: var(--text-muted); font-size: 13.5px; margin-bottom: 36px; }
.article-header { max-width: 760px; margin-bottom: 38px; }
.article-eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.article-page h1 { font-size: clamp(30px, 4.8vw, 48px); margin-bottom: 16px; }
.article-page .lede { color: var(--text-secondary); font-size: 18px; line-height: 1.7; }
.article-meta { margin-top: 16px; color: var(--text-muted); font-size: 13px; }
.article-page h2 {
  margin: 42px 0 14px;
  color: var(--text-primary);
  font-size: 25px;
  font-weight: 500;
  line-height: 1.22;
  text-align: left;
}
.article-page h3 { margin: 26px 0 8px; font-size: 18px; }
.article-page p, .article-page li { color: var(--text-secondary); font-size: 16px; line-height: 1.75; }
.article-page p { margin-bottom: 15px; }
.article-page ul, .article-page ol { margin: 0 0 18px; padding-left: 22px; }
.article-page li { margin-bottom: 7px; }
.article-page strong { color: var(--text-primary); font-weight: 600; }
.article-tldr {
  margin: 0 0 38px;
  padding: 24px 26px;
  border-radius: var(--radius-card);
  background: var(--primary-light);
}
.article-tldr h2 { margin: 0 0 9px; color: var(--primary); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.article-tldr p { margin: 0; }
.article-example {
  margin: 24px 0;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
}
.article-example h3 { margin-top: 0; }
.article-example p:last-child { margin-bottom: 0; }
.article-steps { counter-reset: article-step; list-style: none; padding: 0 !important; }
.article-steps li {
  position: relative;
  padding: 4px 0 18px 48px;
  margin: 0;
}
.article-steps li::before {
  counter-increment: article-step;
  content: counter(article-step);
  position: absolute;
  top: 3px;
  left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--primary);
  border-radius: 50%;
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
}
.article-cta {
  margin: 44px 0;
  padding: 32px;
  border-radius: var(--radius-card);
  background: var(--primary-light);
  text-align: center;
}
.article-cta h2 { margin: 0 0 9px; font-size: 24px; text-align: center; }
.article-cta p { max-width: 550px; margin: 0 auto 20px; }
.article-cta .btn { color: var(--on-primary); }
.article-related { margin-top: 48px; padding-top: 30px; border-top: 1px solid var(--border); }
.article-related h2 { margin-top: 0; }
.article-related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.related-link {
  display: block;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
}
.related-link:hover { border-color: var(--primary-container); color: var(--primary); }
.article-sources { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); }
.article-sources h2 { margin: 0 0 10px; color: var(--text-muted); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.article-sources p, .article-sources li { color: var(--text-muted); font-size: 13px; line-height: 1.65; }
.article-sources a { color: var(--text-secondary); }

.pagina-404 {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 96px 24px;
}
.pagina-404 h1 { margin-bottom: 10px; }
.pagina-404 p { color: var(--text-secondary); margin-bottom: 30px; }

/* ── Animación de aparición ──────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.in { opacity: 1; transform: none; }
/* Sin JS o con movimiento reducido: todo visible */
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .faq summary::after { transition: none; }
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 960px) {
  .nav-links, .nav-actions { display: none; }
  .nav-burger { display: flex; }

  .cards-3, .steps, .features { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .hub-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .container { padding: 0 16px; }
  .section { padding: 64px 0; }
  .hero { padding: 56px 0 48px; }
  .hero-sub { font-size: 16px; }

  .cta-row { flex-direction: column; align-items: stretch; max-width: 340px; margin: 0 auto; }

  .features { grid-template-columns: 1fr; }
  .hub-grid, .article-related-grid { grid-template-columns: 1fr; }
  .guide-hub, .article-page { padding-top: 42px; padding-bottom: 72px; }
  .hub-hero { margin-bottom: 40px; }
  .article-page .lede { font-size: 17px; }
  .article-tldr, .article-cta { padding: 22px 20px; }
  .planes { grid-template-columns: 1fr; }
  .plan.pro { order: -1; }

  .mock-side { display: none; }
  .mock-main { padding: 16px; }
  .mock-tag { display: none; }

  .fechas { gap: 10px; }
  .fecha { min-width: 0; flex: 1; padding: 14px 12px; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .cta-final { padding: 56px 20px; }

  /* Deja sitio a la CTA fija cuando está visible */
  body.con-cta-fija { padding-bottom: 68px; }
}

@media (min-width: 721px) {
  .cta-sticky { display: none; }
}
