/* ==========================================================================
   SmartWork: web del producto (landing)
   Mismo tema que la app: cemento, tinta azul de sello y una única señal ámbar.
   Lo memorable es el lector de la portada; el resto de la página es sobrio.
   ========================================================================== */

:root {
  color-scheme: light;

  --paper: #eceff2;
  --surface: #ffffff;
  --surface-sunk: #f5f7f9;
  --ink: #172033;
  --ink-2: #4a5568;
  --ink-3: #6b7587;
  --line: #d5dbe3;
  --line-strong: #b9c2cf;

  --primary: #2148a8;
  --primary-ink: #ffffff;
  --primary-wash: #e6ecfa;
  --signal: #f2a900;
  --ok: #1f7a50;
  --alert: #b4322b;
  --alert-wash: #fbe7e5;
  --ok-wash: #e3f2ea;

  --chrome: #172033;
  --chrome-2: #222d44;
  --chrome-ink: #f3f5f8;
  --chrome-muted: #9ea9bb;

  --whatsapp: #1f7a50;

  --radius-s: 4px;
  --radius-m: 8px;

  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-cond: "Barlow Semi Condensed", "Barlow", "Arial Narrow", system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: 2rem;
  --step-4: 2.75rem;
  --step-5: 3.75rem;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #10151d;
    --surface: #19202b;
    --surface-sunk: #151b25;
    --ink: #e6eaf0;
    --ink-2: #b4bdca;
    --ink-3: #8a94a5;
    --line: #2b3546;
    --line-strong: #3b475b;
    --primary: #7fa2ff;
    --primary-ink: #0d1424;
    --primary-wash: #1e2a44;
    --signal: #f5b82e;
    --ok: #4cc38a;
    --alert: #ff8a80;
    --alert-wash: #3a1c1a;
    --ok-wash: #15332a;
    --chrome: #0b1019;
    --chrome-2: #161e2c;
    --whatsapp: #2e9e68;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #10151d;
  --surface: #19202b;
  --surface-sunk: #151b25;
  --ink: #e6eaf0;
  --ink-2: #b4bdca;
  --ink-3: #8a94a5;
  --line: #2b3546;
  --line-strong: #3b475b;
  --primary: #7fa2ff;
  --primary-ink: #0d1424;
  --primary-wash: #1e2a44;
  --signal: #f5b82e;
  --ok: #4cc38a;
  --alert: #ff8a80;
  --alert-wash: #3a1c1a;
  --ok-wash: #15332a;
  --chrome: #0b1019;
  --chrome-2: #161e2c;
  --whatsapp: #2e9e68;
}

/* ---------- Base ---------- */

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

[hidden] { display: none !important; }

h1, h2, h3 {
  font-family: var(--font-cond);
  line-height: 1.12;
  margin: 0 0 0.6em;
  font-weight: 700;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 5.2vw, var(--step-5)); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.75rem, 3.4vw, var(--step-4)); }
h3 { font-size: var(--step-1); font-weight: 600; margin-bottom: 0.35em; }

p { margin: 0 0 1em; max-width: 68ch; }

a { color: var(--primary); text-underline-offset: 0.18em; }

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

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

.narrow { max-width: 50rem; }

.small { font-size: var(--step--1); color: var(--ink-3); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 50;
  padding: 0.6rem 1rem;
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-s);
}

.skip-link:focus { top: 1rem; }

/* Datos que tienes que rellenar tú (aviso legal, privacidad). */
.todo {
  background: var(--signal);
  color: #172033;
  padding: 0 0.25em;
  border-radius: 2px;
  font-weight: 600;
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 1.15rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover { border-color: var(--ink-3); }

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-ink);
}

.btn-primary:hover { filter: brightness(1.08); border-color: var(--primary); }

.btn-large { min-height: 3.25rem; padding: 0.7rem 1.5rem; font-size: var(--step-1); }

.btn-whatsapp { border-color: var(--whatsapp); color: var(--whatsapp); }
.btn-whatsapp:hover { background: var(--ok-wash); border-color: var(--whatsapp); }

.btn:disabled { opacity: 0.6; cursor: progress; }

/* ---------- Cabecera ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-cond);
  font-size: var(--step-2);
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.site-nav { display: flex; gap: 1.5rem; margin-left: auto; }

.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 500;
}

.site-nav a:hover { color: var(--ink); text-decoration: underline; }

.btn-header { min-height: 2.5rem; }

/* ---------- Portada ---------- */

.hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(3rem, 7vw, 5rem); }

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}

.lead { font-size: var(--step-1); color: var(--ink-2); max-width: 38rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 1.5rem; }

.hero-facts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  color: var(--ink-2);
  font-size: var(--step--1);
  font-weight: 500;
}

.hero-facts li { display: inline-flex; align-items: center; gap: 0.45rem; }

.hero-facts li::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--primary);
}

/* El lector: el único elemento llamativo de la página. */
.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 22rem;
}

.dial {
  --size: min(20rem, 70vw);
  --ring: #3a4458;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: #0f1524;
  padding: calc(var(--size) * 0.045);
  box-shadow:
    0 0 0 calc(var(--size) * 0.035) #263049,
    0 1.5rem 3rem -1rem rgba(23, 32, 51, 0.45);
  transition: none;
}

.dial-face {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #0c1220;
  border: calc(var(--size) * 0.03) solid var(--ring);
  color: #f4f6f8;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  transition: border-color 0.35s ease;
}

.dial-idle, .dial-result {
  grid-area: 1 / 1;
  display: grid;
  justify-items: center;
  gap: 0.15rem;
  transition: opacity 0.35s ease;
}

.dial-result { opacity: 0; }

.dial-brand { color: #6a8fee; font-weight: 600; font-size: calc(var(--size) * 0.055); }

.dial-time {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: calc(var(--size) * 0.19);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.dial-date, .dial-hint { color: #9aa3b2; font-size: calc(var(--size) * 0.05); }

.dial-hint { margin-top: 0.4rem; color: #f4f6f8; }

.dial-result-title {
  color: #3fb27f;
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: calc(var(--size) * 0.09);
}

.dial-result-name { font-weight: 600; font-size: calc(var(--size) * 0.065); }

.tap-card {
  position: absolute;
  right: 2%;
  bottom: 4%;
  width: 9.5rem;
  aspect-ratio: 1.586;
  border-radius: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 0.75rem 1.5rem -0.75rem rgba(23, 32, 51, 0.5);
  padding: 0.7rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: var(--font-cond);
  font-weight: 600;
  color: var(--ink-2);
  transform: rotate(-8deg);
}

/* La secuencia de la portada: la tarjeta toca el lector y se retira; el anillo se pone verde y sale «Entrada». */
.hero-visual.is-tapping .tap-card { animation: card-tap 1.5s cubic-bezier(.3, .7, .3, 1) both; }
.hero-visual.is-tapped .dial-face { border-color: #3fb27f; }
.hero-visual.is-tapped .dial-idle { opacity: 0; }
.hero-visual.is-tapped .dial-result { opacity: 1; }

@keyframes card-tap {
  0% { transform: rotate(-8deg); }
  50% { transform: translate(-34%, -40%) rotate(-3deg) scale(0.97); }
  62% { transform: translate(-34%, -40%) rotate(-3deg) scale(0.97); }
  100% { transform: rotate(-8deg); }
}

/* ---------- Secciones ---------- */

.section { padding: clamp(3rem, 8vw, 5.5rem) 0; }

.section-sunk { background: var(--surface-sunk); border-block: 1px solid var(--line); }

.section-dark { background: var(--chrome); color: var(--chrome-ink); }
.section-dark p { color: #c9d0dc; }

/* Cómo funciona: una secuencia de verdad, así que va numerada. */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-top: 3.25rem;
  border-top: 3px solid var(--ink);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0.65rem;
  left: 0;
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: var(--step-3);
  line-height: 1;
  color: var(--primary);
}

.steps p { color: var(--ink-2); }

/* Formas de fichar */
.ways {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.way {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 1.75rem;
}

.way-icon { width: 3rem; height: 3rem; color: var(--primary); margin-bottom: 1rem; }
.way p { color: var(--ink-2); margin-bottom: 0; }

.soon { margin: 1.5rem 0 0; color: var(--ink-2); }

/* Funciones: una lista, no tarjetas. */
.features {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 3rem;
}

.features li {
  position: relative;
  padding: 1.1rem 0 1.1rem 2.25rem;
  border-bottom: 1px solid var(--line);
}

.features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.35rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  border: 3px solid var(--primary);
}

.features h3 { margin-bottom: 0.15em; }
.features p { margin: 0; color: var(--ink-2); }

/* En el campo */
.campo {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.campo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.9rem;
}

.campo-list li {
  padding-left: 1.4rem;
  position: relative;
  color: var(--chrome-ink);
}

.campo-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--signal);
}

/* Normativa */
.law {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
}

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }

.checks li {
  position: relative;
  padding-left: 2rem;
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.3em;
  width: 0.55rem;
  height: 0.95rem;
  border: solid var(--ok);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

/* Preguntas frecuentes */
.faq { max-width: 50rem; margin-top: 1.5rem; border-top: 1px solid var(--line-strong); }

.faq details { border-bottom: 1px solid var(--line-strong); }

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 2.5rem 1.1rem 0;
  position: relative;
  font-family: var(--font-cond);
  font-weight: 600;
  font-size: var(--step-1);
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "";
  position: absolute;
  right: 0.4rem;
  top: 50%;
  width: 0.7rem;
  height: 0.7rem;
  border: solid var(--ink-2);
  border-width: 0 2px 2px 0;
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }

.faq details p { color: var(--ink-2); padding-bottom: 0.6rem; }

/* Pide tu demo */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-copy p { color: var(--ink-2); }

.whatsapp-box {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.whatsapp-box p { margin-bottom: 0.6rem; color: var(--ink); font-weight: 600; }

.demo-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.field { display: grid; gap: 0.35rem; margin-bottom: 1.1rem; }

.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }

.field label { font-weight: 600; }

.optional { font-weight: 400; color: var(--ink-3); }

.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface-sunk);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  padding: 0.6rem 0.75rem;
  min-height: 2.9rem;
}

.field textarea { resize: vertical; min-height: 6rem; }

.field input:focus, .field select:focus, .field textarea:focus {
  outline: 3px solid var(--primary-wash);
  border-color: var(--primary);
}

.field [aria-invalid="true"] { border-color: var(--alert); }

.field-error { color: var(--alert); font-size: var(--step--1); font-weight: 600; }

.field.check { grid-template-columns: auto 1fr; align-items: start; gap: 0.7rem; }
.field.check input { width: 1.25rem; height: 1.25rem; min-height: 0; margin: 0.2rem 0 0; accent-color: var(--primary); }
.field.check label { font-weight: 500; }
.field.check .field-error { grid-column: 2; }

.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.demo-form .btn-primary { width: 100%; }

.privacy-note { font-size: var(--step--1); color: var(--ink-3); margin: 1rem 0 0; }

.form-status {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-s);
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.form-status.error { background: var(--alert-wash); color: var(--alert); }

.form-done { text-align: center; padding: 1.5rem 0.5rem; }
.form-done h3 { font-size: var(--step-2); color: var(--ok); }
.form-done p { margin-left: auto; margin-right: auto; color: var(--ink-2); }

/* ---------- Páginas legales ---------- */

.legal { padding: clamp(2rem, 6vw, 4rem) 0 4rem; }
.legal h1 { font-size: clamp(2rem, 4.5vw, var(--step-4)); }
.legal h2 { font-size: var(--step-2); margin-top: 2rem; }
.legal p, .legal li { color: var(--ink-2); }
.legal ul { padding-left: 1.25rem; }
.legal .notice {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--signal);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-s);
  margin: 1.5rem 0 2rem;
}
.legal .notice p { margin: 0; color: var(--ink); }

/* ---------- Cabecera: menú en pantallas pequeñas ---------- */

.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 3px; text-underline-offset: 0.45em; }

.menu-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  place-items: center;
}

.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -6px; }
.menu-icon::after { top: 6px; }

.menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-icon::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Migas de pan y cabecera de página ---------- */

.breadcrumbs ol {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: var(--step--1);
  color: var(--ink-3);
}

.breadcrumbs li + li::before { content: "/"; margin-right: 0.35rem; color: var(--line-strong); }
.breadcrumbs a { color: var(--ink-2); }

.page-hero { padding: clamp(2rem, 6vw, 4rem) 0 clamp(2rem, 5vw, 3rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); max-width: 22ch; }
.page-hero .lead { max-width: 46rem; }
.page-hero-dark { background: var(--chrome); color: var(--chrome-ink); border-bottom: 0; }
.page-hero-dark .lead { color: #c9d0dc; }
.page-hero-dark .breadcrumbs a, .page-hero-dark .breadcrumbs ol { color: var(--chrome-muted); }

.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.hero-phone img { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 1.5rem 3rem -1.25rem rgba(0, 0, 0, 0.55); }
.page-hero .hero-actions { margin-top: 1.75rem; }

.byline { color: var(--ink-3); font-size: var(--step--1); margin-top: 1rem; }

.section-lead { color: var(--ink-2); font-size: var(--step-1); margin-bottom: 2rem; }

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.narrow-text > * { max-width: 50rem; }

.steps-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- Capturas de la aplicación ---------- */

.shot { margin: 0; }

.shot img, .phone-shot img {
  width: 100%;
  height: auto;
  background: var(--surface);
}

.shot img {
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius-m) var(--radius-m);
  box-shadow: 0 1.25rem 2.5rem -1.5rem rgba(23, 32, 51, 0.35);
}

/* Barra de navegador: solo para enmarcar la captura. */
.browser {
  display: flex;
  gap: 0.4rem;
  padding: 0.6rem 0.8rem;
  background: var(--chrome-2);
  border-radius: var(--radius-m) var(--radius-m) 0 0;
}

.browser span { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: #4a5570; }

.shot figcaption, .phone-shot figcaption { color: var(--ink-2); font-size: var(--step--1); margin-top: 0.75rem; }

.shot-main { margin-bottom: 2rem; }

.shot-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; margin-bottom: 2.5rem; }

.phones {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 15rem));
  justify-content: center;
  gap: 2rem;
  align-items: end;
}

.phone-shot { margin: 0; text-align: center; }

.phone-shot img {
  border: 0.55rem solid #0f1524;
  border-radius: 1.75rem;
  box-shadow: 0 1.25rem 2.5rem -1.25rem rgba(23, 32, 51, 0.45);
}

/* ---------- Sectores ---------- */

.sectors {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.sectors a {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.5rem 1.5rem 1.25rem;
  border-top: 3px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  border-radius: 0 0 var(--radius-m) var(--radius-m);
}

.sectors a:hover { border-top-color: var(--primary); }
.sectors a:hover h3 { color: var(--primary); }
.sectors p { color: var(--ink-2); flex: 1; }
.sectors .more { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 0.2em; }

/* ---------- Normativa en fondo oscuro ---------- */

.section-dark .checks li { color: var(--chrome-ink); }
.section-dark .checks li::before { border-color: #4cc38a; }
.section-dark .small { color: var(--chrome-muted); }
.link-light { color: #a9c0ff; font-weight: 600; }

.checks-plain li::before {
  border: 0;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--signal);
  transform: none;
  top: 0.55em;
  left: 0.2rem;
}

/* ---------- Tabla comparativa ---------- */

.table-wrap { overflow-x: auto; margin-top: 1.5rem; }

.compare {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  font-size: var(--step-0);
}

.compare th, .compare td { text-align: left; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { background: var(--surface-sunk); font-family: var(--font-cond); font-size: var(--step-1); }
.compare tbody th { font-weight: 600; width: 30%; }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare td:last-child { color: var(--ink); font-weight: 500; }
.compare thead th:last-child { color: var(--primary); }

/* ---------- Quién está detrás ---------- */

.about { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }

.about-mark {
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
}

.about-mark img { width: 4.5rem; height: 4.5rem; }

/* ---------- Contacto ---------- */

.contact-points { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: 0.6rem; color: var(--ink-2); }
.contact-points li { padding-left: 1.5rem; position: relative; }
.contact-points li::before { content: ""; position: absolute; left: 0.15rem; top: 0.35em; width: 0.45rem; height: 0.8rem; border: solid var(--ok); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }

.faq-more { margin-top: 1.5rem; color: var(--ink-2); }

/* ---------- Llamada final ---------- */

.cta-band { background: var(--primary); color: var(--primary-ink); padding: clamp(2.5rem, 6vw, 4rem) 0; }
.cta-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem 3rem; align-items: center; }
.cta-band h2 { margin-bottom: 0.3em; }
.cta-band p { color: inherit; opacity: 0.9; margin: 0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.cta-band .btn-primary { background: var(--primary-ink); color: var(--primary); border-color: var(--primary-ink); }
.btn-whatsapp-light { background: transparent; border-color: currentColor; color: inherit; }
.btn-whatsapp-light:hover { background: rgba(255, 255, 255, 0.12); border-color: currentColor; }
.page-hero:not(.page-hero-dark) .btn-whatsapp-light { color: var(--whatsapp); }

/* ---------- Guía ---------- */

.guide-layout {
  display: grid;
  grid-template-columns: 16rem minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  padding-top: clamp(2rem, 5vw, 3rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

.toc { position: sticky; top: 5.5rem; align-self: start; font-size: var(--step--1); }
.toc h2 { font-size: var(--step-1); margin-bottom: 0.6rem; }
.toc ol { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.45rem; color: var(--ink-3); }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--primary); text-decoration: underline; }

.prose { max-width: 46rem; }
.prose section { margin-bottom: 2.75rem; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.25rem; margin: 0 0 1em; display: grid; gap: 0.5rem; }
.prose .faq { margin-top: 0.5rem; }
.prose p { max-width: none; }
.prose .table-wrap { margin: 1.5rem 0; }
.compare-plain thead th:last-child, .compare-plain td:last-child { color: inherit; font-weight: inherit; }

.sources { border-top: 1px solid var(--line-strong); padding-top: 1.5rem; }
.sources h2 { font-size: var(--step-2); }
.sources li { color: var(--ink-2); }

/* ---------- Pie ---------- */

.site-footer {
  background: var(--chrome);
  color: var(--chrome-muted);
  padding: 3rem 0 2.5rem;
  font-size: var(--step--1);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.footer-grid h2 { font-family: var(--font); font-size: var(--step--1); font-weight: 600; color: var(--chrome-ink); margin-bottom: 0.75rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.footer-grid a { color: var(--chrome-muted); text-decoration: none; }
.footer-grid a:hover { color: var(--chrome-ink); text-decoration: underline; }
.footer-about p { color: var(--chrome-muted); max-width: 22rem; }
.footer-about .brand-footer { color: var(--chrome-ink); font-size: var(--step-1); margin-bottom: 0.6rem; }
.footer-credit { grid-column: 1 / -1; margin: 1rem 0 0; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.1); max-width: none; }

/* Botón flotante de WhatsApp: solo en el móvil. */
.whatsapp-float { display: none; }

/* ---------- Pantallas medianas ---------- */

@media (max-width: 1080px) {
  .site-nav { gap: 1rem; }
  .guide-layout { grid-template-columns: 1fr; }
  .toc { position: static; border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1.25rem; background: var(--surface); }
}

@media (max-width: 960px) {
  .menu-toggle { display: grid; }
  .header-inner .brand { margin-right: auto; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin: 0;
    padding: 0.75rem var(--gutter) 1.25rem;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1rem 1.5rem -1rem rgba(23, 32, 51, 0.3);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 0.8rem 0; border-bottom: 1px solid var(--line); font-size: var(--step-1); }
  .site-nav a:last-child { border-bottom: 0; }
  .header-inner { position: relative; gap: 0.75rem; }

  .hero-inner, .campo, .law, .contact, .two-col, .cta-inner { grid-template-columns: 1fr; }
  .page-hero-grid { grid-template-columns: minmax(0, 1fr) 11rem; }
  .hero-visual { min-height: 19rem; }
  .steps, .steps-4 { grid-template-columns: 1fr; gap: 1.5rem; }
  .sectors { grid-template-columns: 1fr; }
  .shot-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-about { grid-column: 1 / -1; }
}

/* ---------- Pantallas pequeñas ---------- */

@media (max-width: 640px) {
  .ways, .features, .field-row { grid-template-columns: 1fr; }
  .features { gap: 0; }
  .hero-actions .btn, .cta-actions .btn { width: 100%; }
  .tap-card { width: 7.5rem; right: 0; }
  .btn-header { display: none; }
  .phones {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 68%;
    justify-content: start;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(-1 * var(--gutter));
    padding: 0.5rem var(--gutter) 1rem;
    scroll-padding-inline: var(--gutter);
  }
  .phone-shot { scroll-snap-align: start; }
  .phone-shot img { border-width: 0.4rem; border-radius: 1.4rem; }
  .about { grid-template-columns: 1fr; }
  .page-hero-grid { grid-template-columns: 1fr; }
  .hero-phone { display: none; }
  .about-mark { width: 5.5rem; height: 5.5rem; }
  .about-mark img { width: 3rem; height: 3rem; }
  .compare th, .compare td { padding: 0.7rem 0.75rem; }
  .compare tbody th { width: auto; }
  .footer-grid { grid-template-columns: 1fr; }

  .whatsapp-float:not([hidden]) {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 30;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    background: var(--whatsapp);
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 0.5rem 1.25rem -0.4rem rgba(0, 0, 0, 0.45);
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .whatsapp-float svg { width: 1.2rem; height: 1.2rem; }
  .whatsapp-float.is-away { opacity: 0; transform: translateY(1rem); pointer-events: none; }

  .site-footer { padding-bottom: 5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-visual .tap-card, .dial-face, .dial-idle, .dial-result, .faq summary::after { animation: none !important; transition: none !important; }
}
