/* 30labs — hoja de estilo única. Tokens arriba, secciones abajo. */

:root {
  --bg: #ffffff;
  --bg-2: #eae6dc;
  --card: #ffffff;
  --card-on-2: #ffffff;

  --ink: #17150f;
  --ink-muted: #55524a;
  --ink-dim: #7c786d;

  --line: #ddd7c8;
  --line-strong: #c9c2ae;

  --dark: #17150f;
  --dark-2: #211e16;
  --dark-line: #35311f;
  --paper-fg: #f7f4ec;
  --paper-muted: #b6b0a0;

  --accent: #b3552e;

  /* Píldora invertida (CTA primario, estado activo del switch de idioma):
     fondo/texto desacoplados de --ink/--paper-fg para poder invertir su
     polaridad en dark mode sin romper el contraste. */
  --inverse-bg: #17150f;
  --inverse-fg: #f7f4ec;
  --inverse-bg-hover: #000000;
  --inverse-overlay: rgba(255, 255, 255, 0.16);

  --shadow-color: rgba(23, 21, 15, 0.22);

  --display: "Clash Display", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Switzer", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1200px;
  --pad: clamp(20px, 5vw, 48px);
  --section: clamp(64px, 9vw, 112px);
  --radius-card: 22px;
  --radius-sm: 12px;
  --radius-pill: 999px;
}

/* Dark mode: solo se sobrescribe el pack "de superficie" (bg/card/ink/line).
   El pack --dark-2/--dark-line/--paper-fg/--paper-muted representa las
   bandas oscuras intencionales (CTA, footer, .why-card) y se queda igual en
   ambos temas — si cambiara también, el ritmo alternado claro/oscuro se
   aplanaría. --accent tampoco cambia: ya está probado sobre --dark
   (.cta-inner .eyebrow-num). */
:root[data-theme="dark"] {
  --bg: #211d15;
  --bg-2: #2b2519;
  --card: #39321f;
  --card-on-2: #39321f;

  --ink: #f3efe4;
  --ink-muted: #b8b2a2;
  --ink-dim: #8f897a;

  --line: #544c37;
  --line-strong: #7a6f4f;

  --inverse-bg: #f7f4ec;
  --inverse-fg: #17150f;
  --inverse-bg-hover: #ffffff;
  --inverse-overlay: rgba(23, 21, 15, 0.16);

  --shadow-color: rgba(0, 0, 0, 0.55);
}

/* Mismos valores que :root[data-theme="dark"] de arriba, para visitantes sin
   JavaScript (theme-init.js no pudo poner data-theme) cuyo sistema operativo
   pide modo oscuro. El guard :not([data-theme]) es seguro por construcción:
   con JS, theme-init.js siempre deja data-theme puesto, así que este bloque
   nunca compite con el de arriba. Si se retoca la paleta, actualizar aquí,
   arriba y THEME_COLOR en main.js. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #211d15;
    --bg-2: #2b2519;
    --card: #39321f;
    --card-on-2: #39321f;

    --ink: #f3efe4;
    --ink-muted: #b8b2a2;
    --ink-dim: #8f897a;

    --line: #544c37;
    --line-strong: #7a6f4f;

    --inverse-bg: #f7f4ec;
    --inverse-fg: #17150f;
    --inverse-bg-hover: #ffffff;
    --inverse-overlay: rgba(23, 21, 15, 0.16);

    --shadow-color: rgba(0, 0, 0, 0.55);
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0.01ms !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: clamp(38px, 6.2vw, 80px); }
h2 { font-size: clamp(30px, 4.2vw, 48px); }
h3 { font-size: clamp(21px, 2.2vw, 25px); }

p { margin: 0; text-wrap: pretty; }

ul { margin: 0; padding: 0; list-style: none; }

button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

strong { font-weight: 600; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--pad);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

.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;
}

/* --- Botones --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 54px;
  padding: 0 26px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 16.5px;
  transition: background 160ms ease-out, color 160ms ease-out, transform 160ms ease-out;
}
.btn-primary { background: var(--inverse-bg); color: var(--inverse-fg); }
.btn-primary:hover { background: var(--inverse-bg-hover); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); background: var(--bg-2); }
.btn-sm { height: 42px; padding: 0 18px 0 20px; font-size: 14.5px; }
.btn > span:first-child { display: inline-block; transition: transform 220ms cubic-bezier(.22, 1, .36, 1); }
.btn:hover > span:first-child { transform: translateX(-2px); }
.btn-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--inverse-overlay);
  font-size: 13px;
  flex-shrink: 0;
  transition: transform 220ms cubic-bezier(.22, 1, .36, 1);
}
.btn:hover .btn-arrow { transform: translateX(3px); }
.btn-sm .btn-arrow { width: 20px; height: 20px; font-size: 11px; }

/* --- Nav --- */

.nav {
  position: static;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 4vw, 40px);
  padding-block: 14px;
}
.brand { display: flex; align-items: center; }

/* El logo es medio y medio: "Labs" es texto vivo en Clash Display y el "30" es
   el monograma de la marca. Va como máscara de logo-marca.svg sobre
   currentColor — no como <img> — para que herede el color del header, el del
   footer y el del modo oscuro sin duplicar el archivo. Las cuatro medidas de
   .b-mark las imprime marca/generar.py al final: si cambian ahí tienen que
   cambiar aquí, o el logo del header y logo.svg dejan de coincidir (ver
   README). El "30 " del HTML no se ve, pero es lo que leen el lector de
   pantalla y el respaldo de abajo si el navegador no soporta máscaras. */
.brand-name {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 400;
  white-space: nowrap;
}
.brand-name .b-word { letter-spacing: -0.01em; }
.brand-name .b-mark {
  display: inline-block;
  width: 1.317em;
  height: 0.687em;
  margin-right: 0.181em;
  vertical-align: -0.0086em;
  background: currentColor;
  -webkit-mask: url("/logo-marca.svg") no-repeat center / contain;
          mask: url("/logo-marca.svg") no-repeat center / contain;
  overflow: hidden;
  text-indent: -999em;
}
@supports not ((mask-image: url("/logo-marca.svg")) or (-webkit-mask-image: url("/logo-marca.svg"))) {
  .brand-name .b-mark {
    width: auto; height: auto; margin-right: 0; overflow: visible;
    background: none; text-indent: 0; vertical-align: baseline;
    letter-spacing: -0.12em; word-spacing: 0.06em;
  }
}

.nav-links { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 32px); }
.nav-links a { color: var(--ink-muted); font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--ink); }

.nav-right { display: flex; align-items: center; gap: 14px; }

.lang-switch {
  position: relative;
  display: flex;
  align-items: center;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--bg-2);
  gap: 2px;
}
.lang-switch::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 34px;
  height: calc(100% - 6px);
  border-radius: var(--radius-pill);
  background: var(--inverse-bg);
  transition: transform 220ms cubic-bezier(.22, 1, .36, 1);
}
.lang-switch[data-active="en"]::before { transform: translateX(36px); }
.lang-btn {
  position: relative;
  z-index: 1;
  width: 34px;
  padding-block: 6px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--ink-dim);
  transition: color 160ms ease-out;
}
.lang-btn[aria-pressed="true"] { color: var(--inverse-fg); }

/* --- Toggle de tema (claro/oscuro) ---
   Fijo en la esquina inferior derecha, fuera del nav, para que quede
   accesible en todas las páginas sin competir por espacio en el header. */

.theme-toggle {
  position: fixed;
  right: clamp(16px, 4vw, 28px);
  bottom: clamp(16px, 4vw, 28px);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink-dim);
  box-shadow: 0 16px 28px -16px var(--shadow-color);
  transition: color 160ms ease-out, background 160ms ease-out, border-color 160ms ease-out;
}
.theme-toggle:hover { color: var(--ink); background: var(--bg-2); border-color: var(--line-strong); }
.theme-icon { display: block; }
.theme-icon-moon { display: none; }
:root[data-theme="dark"] .theme-icon-sun { display: none; }
:root[data-theme="dark"] .theme-icon-moon { display: block; }

@media (max-width: 900px) { .nav-links { display: none; } }
@media (max-width: 520px) {
  .nav .btn-sm span:first-child { display: none; }
  .nav .btn-sm { width: 42px; height: 42px; padding: 0; }
}

/* --- Hero --- */

.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100svh - 80px);
  padding-block: clamp(48px, 7vw, 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: clamp(22px, 2.6vw, 30px);
}

/* Ventanas de código del hero ("terminal vivo") — generadas y animadas por
   animations.js (Motion). Capa puramente decorativa: pointer-events: none
   para no bloquear los CTA, y animation: none para no heredar la entrada
   hero-in de abajo. El resto (posición, tamaño, líneas) se pone inline
   desde JS porque cada ventana es distinta por breakpoint. */
.hero-anim {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  animation: none;
}

/* Entrada al cargar — en CSS puro, no con Motion: se aplica desde el primer
   pintado (nada de JS de por medio), así que no hay parpadeo posible. */
@keyframes hero-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero > * { animation: hero-in 0.6s cubic-bezier(.22, 1, .36, 1) both; }
.hero > *:nth-child(1) { animation-delay: 0s; }
.hero > *:nth-child(2) { animation-delay: 0.08s; }
.hero > *:nth-child(3) { animation-delay: 0.16s; }
.hero > *:nth-child(4) { animation-delay: 0.24s; }
.hero > *:nth-child(5) { animation-delay: 0.32s; }
.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.dot { width: 6px; height: 6px; border-radius: 999px; background: var(--accent); flex-shrink: 0; }
.hero h1 { max-width: 17ch; margin-inline: auto; }
.lede { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--ink-muted); max-width: 56ch; margin-inline: auto; }
.actions { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 22px;
  margin-top: clamp(8px, 1.4vw, 16px);
  padding-top: clamp(20px, 2.6vw, 28px);
  border-top: 1px solid var(--line);
  width: 100%;
  max-width: 620px;
  margin-inline: auto;
}
.trust-strip li {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-dim);
  position: relative;
  padding-left: 16px;
}
.trust-strip li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--line-strong);
}
.trust-strip li:first-child { padding-left: 0; }
.trust-strip li:first-child::before { display: none; }

@media (max-width: 620px) {
  .hero { min-height: calc(100svh - 72px); }
}

/* --- Secciones genéricas --- */

.section { padding-block: var(--section); }
.section-cream { background: var(--bg-2); padding-block: var(--section); }
.section-dark { background: var(--dark); color: var(--paper-fg); }
.section-head { display: flex; flex-direction: column; gap: 16px; max-width: 52ch; margin-bottom: clamp(36px, 5vw, 56px); }
.eyebrow-num {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.section-dark .eyebrow-num { color: var(--paper-muted); }
.section-head p { font-size: 18px; color: var(--ink-muted); }
.section-dark .section-head p { color: var(--paper-muted); }

/* --- Hover en tarjetas (servicios/casos/porqué/proceso) --- */

.service-card,
.case-row,
.why-card,
.process-step {
  transition: transform 220ms cubic-bezier(.22, 1, .36, 1), box-shadow 220ms ease-out, border-color 220ms ease-out;
}
.service-card:hover,
.case-row:hover,
.process-step:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 28px -16px var(--shadow-color);
}
.why-card:hover {
  transform: translateY(-4px);
  border-color: var(--paper-muted);
}

/* --- 01 Servicios --- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.service-card {
  background: var(--card-on-2);
  border-radius: var(--radius-card);
  padding: clamp(28px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.service-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.service-num {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
}
.service-icon { color: var(--accent); flex-shrink: 0; }
.service-icon svg { display: block; width: 28px; height: 28px; }
.service-icon .js-spark,
.service-icon .js-flow { transform-box: fill-box; transform-origin: center; }
.service-card p { font-size: 16px; color: var(--ink-muted); line-height: 1.6; }

@media (max-width: 760px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* --- 02 Casos --- */

.cases-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.case-row {
  background: var(--bg-2);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  align-items: stretch;
}
.case-row:nth-child(even) {
  flex-direction: row-reverse;
}
.case-row-media {
  position: relative;
  flex: 0 0 46%;
  min-height: 340px;
  background: var(--card-on-2);
}
.case-row-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.case-row-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: clamp(32px, 4vw, 56px);
}
.case-tag {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.case-row-body p { font-size: 15.5px; color: var(--ink-muted); line-height: 1.6; }
.case-row-body p strong { color: var(--ink); }

@media (max-width: 760px) {
  .case-row,
  .case-row:nth-child(even) {
    flex-direction: column;
  }
  .case-row-media { min-height: 0; aspect-ratio: 16 / 9; flex-basis: auto; }
}

/* --- 03 Por qué (dark) --- */

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.why-card {
  background: var(--dark-2);
  border: 1px solid var(--dark-line);
  border-radius: var(--radius-card);
  padding: clamp(24px, 2.6vw, 28px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.why-card h3 { font-size: 18px; }
.why-card p { font-size: 15px; color: var(--paper-muted); line-height: 1.6; }

@media (max-width: 900px) { .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .why-grid { grid-template-columns: 1fr; } }

/* --- 04 Cómo trabajamos --- */

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.process-step {
  background: var(--card-on-2);
  border-radius: var(--radius-card);
  padding: clamp(26px, 3vw, 34px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.process-icon { color: var(--accent); }
.process-icon svg { display: block; width: 30px; height: 30px; }
.process-label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.process-step p { font-size: 16px; color: var(--ink-muted); line-height: 1.6; }

/* Entrada escalonada al hacer scroll (.reveal-pending la activa main.js;
   sin JS, la tarjeta se queda visible por defecto — ver comentario arriba
   del archivo sobre progressive enhancement). El ícono además hace un
   pequeño "pop" con un retraso corto, después del fade-up de la tarjeta. */
@keyframes process-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.process-step.reveal-pending { opacity: 0; }
.process-step.reveal-pending.is-visible {
  animation: process-in 640ms cubic-bezier(.22, 1, .36, 1) forwards;
}
.process-step.reveal-pending:nth-child(1).is-visible { animation-delay: 0ms; }
.process-step.reveal-pending:nth-child(2).is-visible { animation-delay: 90ms; }
.process-step.reveal-pending:nth-child(3).is-visible { animation-delay: 180ms; }
.process-step.reveal-pending:nth-child(4).is-visible { animation-delay: 270ms; }

.process-step.reveal-pending .process-icon svg {
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 380ms cubic-bezier(.22, 1, .36, 1) 160ms, transform 380ms cubic-bezier(.22, 1, .36, 1) 160ms;
}
.process-step.reveal-pending.is-visible .process-icon svg {
  opacity: 1;
  transform: scale(1);
}

@media (max-width: 900px) {
  .process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .process-grid { grid-template-columns: 1fr; }
}

/* --- CTA --- */

/* --dark-2 (no --dark, el mismo tono del footer) para que el CTA se lea como
   su propia banda y no se funda con el footer justo debajo. */
.cta { background: var(--dark-2); }

.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(18px, 2.4vw, 26px);
  max-width: 680px;
  margin-inline: auto;
}
.cta-inner .eyebrow-num { color: var(--accent); }
.cta-inner h2 { font-size: clamp(34px, 4.6vw, 56px); }
.cta-sub { font-size: 18px; color: var(--paper-muted); }
.btn-lg { height: 64px; padding: 0 34px; font-size: 18px; }

.cta-contact {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14.5px;
  color: var(--paper-muted);
}
.cta-contact a:hover { color: var(--paper-fg); }

/* --- Footer --- */

.footer { background: var(--dark); color: var(--paper-fg); border-top: 1px solid var(--dark-line); }

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: clamp(28px, 4vw, 40px);
  padding-block: clamp(48px, 7vw, 72px);
}

.footer-intro { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.footer-intro .btn-ghost { border-color: var(--dark-line); color: var(--paper-fg); }
.footer-intro .btn-ghost:hover { border-color: var(--paper-fg); background: var(--dark-2); }
.footer-intro-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-muted);
}
.footer-intro-copy { font-size: 13.5px; color: var(--paper-muted); max-width: 26ch; line-height: 1.5; }

.footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.footer-col-title {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-muted);
  margin-bottom: 4px;
}
.footer-col a { font-size: 13px; color: var(--paper-muted); }
.footer-col a:hover { color: var(--paper-fg); }

.footer .brand-name { font-size: 16.5px; }
.footer-intro .btn-sm { height: 38px; padding: 0 16px 0 18px; font-size: 13px; }

.footer-social { display: flex; align-items: center; gap: 14px; margin-top: 2px; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--dark-line);
  border-radius: 50%;
  color: var(--paper-muted);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.footer-social svg { width: 16px; height: 16px; fill: currentColor; }
.footer-social a:hover { color: var(--paper-fg); border-color: var(--paper-fg); background: var(--dark-2); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-block: 24px;
  border-top: 1px solid var(--dark-line);
}
.footer-legal-links { display: flex; gap: 20px; }
.footer-legal-links a { font-size: 12.5px; color: var(--paper-muted); }
.footer-legal-links a:hover { color: var(--paper-fg); }
.footer-legal { font-size: 12px; color: var(--paper-muted); }

@media (max-width: 900px) {
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-intro { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* --- Páginas internas (servicios, proceso, preguntas, contacto, legal) --- */

.page-hero {
  padding-block: clamp(48px, 7vw, 80px) clamp(32px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(18px, 2.2vw, 24px);
  max-width: 760px;
}
.back-link { font-size: 14px; font-weight: 600; color: var(--ink-dim); }
.back-link:hover { color: var(--ink); }

.prose { display: flex; flex-direction: column; gap: 16px; max-width: 66ch; }
.prose p { font-size: 16.5px; color: var(--ink-muted); line-height: 1.7; }
.prose a { color: var(--accent); text-decoration: underline; }
.prose ul { display: flex; flex-direction: column; gap: 10px; }
.prose li { font-size: 16px; color: var(--ink-muted); line-height: 1.6; padding-left: 22px; position: relative; }
.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

/* --- Documentos legales (/legal/*) --- */

.legal-doc { max-width: 72ch; gap: 14px; }
.legal-doc h2 {
  font-size: clamp(19px, 2vw, 22px);
  line-height: 1.25;
  margin-top: clamp(20px, 2.6vw, 30px);
  scroll-margin-top: 90px;
}
.legal-doc p { font-size: 16px; }
.legal-doc ul { gap: 8px; }

.legal-toc {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: 18px;
  margin-block: clamp(6px, 1.4vw, 12px);
}
.legal-toc-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 12px;
}
.legal-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: legal-toc;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px 28px;
}
.legal-toc li { counter-increment: legal-toc; padding-left: 0; font-size: 15px; }
.legal-toc li::before { content: none; }
.legal-toc a { font-size: 15px; color: var(--ink-muted); text-decoration: none; }
.legal-toc a::before {
  content: counter(legal-toc) ". ";
  color: var(--ink-dim);
}
.legal-toc a:hover { color: var(--accent); text-decoration: underline; }

.service-more { font-size: 14px; font-weight: 600; color: var(--accent); }
.service-more:hover { text-decoration: underline; }

.contact { display: flex; flex-direction: column; border-top: 1px solid var(--line); max-width: 560px; }
.contact a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
  min-height: 54px;
  border-bottom: 1px solid var(--line);
}
.contact a span:first-child { font-size: 16.5px; font-weight: 600; color: var(--ink); }
.contact a span:last-child { font-size: 14.5px; color: var(--ink-muted); }
.contact a:hover span:first-child { color: var(--accent); }
.contact-loc { margin-top: 28px; font-size: 14px; color: var(--ink-dim); }

/* --- FAQ (acordeón, usado en /preguntas) --- */

.faq-wrap { max-width: 880px; margin: 0 auto; padding-inline: var(--pad); }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 24px;
  font-size: clamp(17px, 1.8vw, 19px);
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.3;
  text-align: left;
}
.faq-q:hover { color: var(--accent); }
.faq-icon { flex-shrink: 0; transition: transform 200ms ease-out; }
.faq-q[aria-expanded="true"] .faq-icon { transform: rotate(180deg); }
/* Acordeón animado con CSS puro (grid-template-rows 0fr → 1fr): no necesita
   medir el alto por JS ni depender de Motion, y la regla global de
   prefers-reduced-motion de arriba ya cubre esta transición sin código extra. */
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 300ms ease, visibility 300ms;
}
.faq-a.is-open { grid-template-rows: 1fr; visibility: visible; }
.faq-a-inner { overflow: hidden; }
.faq-a-inner p { padding-bottom: 26px; }
.faq-a p { font-size: 16px; color: var(--ink-muted); max-width: 66ch; }
