/* ==========================================================================
   NexaFit Systems — hoja de estilo
   Sistema de diseño: estructura Linear (DESIGN.md) + paleta de marca
   (Azul Noche Profundo #0B132B · Gris Titanio #8D99AE · Blanco Puro #FFFFFF)
   ========================================================================== */

:root {
  /* ---- Superficies: escalera navy (equivalente a void→carbon→obsidian→slate) */
  --void:      #070c1c;   /* lienzo de página */
  --carbon:    #0B132B;   /* AZUL NOCHE PROFUNDO — superficie de tarjetas y nav */
  --obsidian:  #101a3a;   /* paneles elevados */
  --slate:     #16224a;   /* relleno interactivo */

  /* ---- Bordes */
  --graphite:  #1c2749;   /* hairline estructural */
  --smoke:     #2a375f;   /* hairline de mayor contraste */

  /* ---- Texto */
  --ash:       #5e6a86;   /* metadatos, iconos inactivos */
  --fog:       #8D99AE;   /* GRIS TITANIO — texto secundario */
  --mist:      #C6CFDE;   /* cuerpo */
  --paper:     #FFFFFF;   /* BLANCO PURO — titulares y máximo contraste */

  /* ---- Acento funcional (único color cromático del sistema) */
  --accent:      #17C8DE;
  --accent-dim:  rgba(23, 200, 222, .14);
  --accent-line: rgba(23, 200, 222, .32);

  /* ---- Tipografía */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* ---- Layout */
  --page: 1200px;
  --gap-section: 96px;
  --pad-card: 24px;

  /* ---- Radios (vocabulario cerrado: 2 / 6 / 12 / pill) */
  --r-sm: 2px;
  --r-md: 6px;
  --r-xl: 12px;
  --r-pill: 9999px;

  /* ---- Sombras */
  --sh-sm: rgba(0,0,0,.4) 0 2px 4px 0;
  --sh-line: inset 0 0 0 1px var(--graphite);
  --sh-xl: rgba(3,6,16,.6) 0 4px 32px 0;
}

/* ===== Reset ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--void);
  color: var(--mist);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  font-feature-settings: 'cv01' on, 'ss03' on, 'zero' on;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; padding: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--paper); color: var(--carbon);
  padding: 8px 16px; border-radius: var(--r-md); font-size: 13px;
}
.skip-link:focus { left: 16px; }

.wrap { width: 100%; max-width: var(--page); margin-inline: auto; padding-inline: 24px; }
.mono { font-family: var(--font-mono); letter-spacing: -.013em; }
.ok { color: var(--accent); }
.muted-title { color: var(--fog); }

/* ===== Tipografía ======================================================= */
h1, h2, h3 { font-weight: 500; color: var(--paper); }

h1 {
  font-size: clamp(38px, 6.4vw, 64px);
  line-height: 1.02;
  letter-spacing: -.022em;
}
h2 {
  font-size: clamp(30px, 4.4vw, 48px);
  line-height: 1.04;
  letter-spacing: -.022em;
}
h3 { font-size: 20px; line-height: 1.3; letter-spacing: -.014em; }

.kicker {
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--ash);
  margin-bottom: 20px;
}

.lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--fog);
}

/* Reparte las líneas por igual: evita palabras sueltas al final de titulares y textos */
h1, h2 { text-wrap: balance; }
.lede, .hero__lede > p, .split p, .cta p { text-wrap: balance; }

/* ===== Botones ========================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  padding: 11px 18px;
  font-size: 14px; font-weight: 500; letter-spacing: -.011em;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.btn--primary { background: var(--paper); color: var(--carbon); }
.btn--primary:hover { background: var(--mist); }
.btn--primary:active { transform: translateY(1px); }

.btn--ghost { border-color: var(--graphite); color: var(--mist); background: transparent; }
.btn--ghost:hover { border-color: var(--smoke); background: rgba(255,255,255,.03); }

.btn--pill {
  background: var(--paper); color: var(--carbon);
  border-radius: var(--r-pill); padding: 9px 18px; font-size: 13px;
}
.btn--pill:hover { background: var(--mist); }

.btn--link {
  background: transparent; color: var(--mist); padding: 11px 4px;
}
.btn--link:hover { color: var(--paper); }
.btn--link span { transition: transform .18s ease; }
.btn--link:hover span { transform: translateX(3px); }

.btn--block { width: 100%; padding: 14px 18px; }

/* ===== Badges =========================================================== */
.badge {
  display: inline-block;
  background: rgba(255,255,255,.06);
  color: var(--fog);
  border-radius: var(--r-sm);
  padding: 2px 6px;
  font-size: 10px;
  letter-spacing: .06em;
}
.badge--ok { background: var(--accent-dim); color: var(--accent); }
.badge--accent { background: var(--accent-dim); color: var(--accent); }

/* ===== Logo ============================================================= */
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--paper); }
.logo__mark { height: 26px; width: auto; flex: none; }
.logo__word { height: 13px; width: auto; flex: none; }

/* ===== Nav ============================================================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7,12,28,.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background-color .2s ease;
}
.nav.is-stuck { border-bottom-color: var(--graphite); background: rgba(7,12,28,.9); }

.nav__inner {
  max-width: var(--page); margin-inline: auto;
  padding: 14px 24px;
  display: flex; align-items: center; gap: 32px;
}
.nav__links { display: flex; align-items: center; gap: 4px; margin-right: auto; }
.nav__links a {
  font-size: 13px; color: var(--mist); padding: 8px 12px; border-radius: var(--r-md);
  transition: color .16s ease, background-color .16s ease;
}
.nav__links a:hover { color: var(--paper); background: rgba(255,255,255,.04); }

.nav__actions { display: flex; align-items: center; gap: 8px; }
.nav__ghost { padding: 8px 14px; font-size: 13px; }

.nav__toggle {
  display: none; background: transparent; border: 1px solid var(--graphite);
  border-radius: var(--r-md); width: 38px; height: 34px; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.nav__toggle span { display: block; width: 15px; height: 1px; background: var(--mist); transition: transform .2s ease, opacity .2s ease; }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(2.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-2.5px) rotate(-45deg); }

.nav__mobile[hidden] { display: none; }
.nav__mobile {
  border-top: 1px solid var(--graphite);
  padding: 12px 24px 20px;
  display: flex; flex-direction: column; gap: 2px;
  background: var(--carbon);
}
.nav__mobile a { padding: 12px 4px; font-size: 15px; color: var(--mist); }
.nav__mobile .btn { margin-top: 12px; justify-content: center; }

@media (min-width: 901px) {
  .nav__mobile { display: none; }
}
@media (max-width: 900px) {
  .nav__links, .nav__ghost { display: none; }
  .nav__inner { gap: 16px; justify-content: space-between; }
  .nav__toggle { display: flex; }
}
@media (max-width: 460px) {
  .nav__actions .btn--pill { display: none; }
}

/* ===== Reveal ===========================================================
   Solo se ocultan si JS está activo (la clase .js la pone un script en el
   <head>). Sin JS, la página se ve entera. */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===== Hero ============================================================= */
.hero { position: relative; padding: 96px 0 0; overflow: hidden; }
.hero__floor {
  position: absolute; inset: auto 0 0 0; height: 62%;
  background: linear-gradient(180deg, rgba(11,19,43,0) 0%, rgba(21,34,74,.45) 62%, rgba(120,140,180,.11) 100%);
  pointer-events: none;
}
.hero .wrap { position: relative; }


.hero__title { max-width: 900px; margin-inline: auto; text-align: center; }

.hero__lede {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px;
  margin: 32px auto 0; max-width: 720px; text-align: center;
}
.hero__lede > p { font-size: 17px; line-height: 1.62; color: var(--fog); }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }

.metrics {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; margin-top: 48px;
  background: var(--graphite);
  border: 1px solid var(--graphite); border-radius: var(--r-xl);
  overflow: hidden;
}
.metrics li {
  background: var(--carbon);
  padding: 24px;
  display: flex; flex-direction: column; gap: 8px;
}
.metrics strong { font-size: 26px; font-weight: 500; color: var(--paper); letter-spacing: -.03em; }
.metrics span { font-size: 13px; color: var(--fog); line-height: 1.4; }

@media (max-width: 780px) {
  .hero { padding-top: 56px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) { .metrics { grid-template-columns: 1fr; } }

/* ===== Frame (tarjeta de producto) ====================================== */
.frame {
  margin-top: 56px;
  background: var(--carbon);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-line), var(--sh-xl);
  padding: var(--pad-card);
}
.frame--sm { margin-top: 0; padding: 16px; }
.frame--flow { padding: 16px; overflow-x: auto; }

/* ===== Chat ============================================================= */
.chat { display: flex; flex-direction: column; gap: 0; }
.chat__head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-bottom: 16px; border-bottom: 1px solid var(--graphite);
  flex-wrap: wrap;
}
.chat__channel { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; row-gap: 6px; font-size: 13px; color: var(--mist); }
.chat__channel .sep { color: var(--ash); }
.chat__channel .mono { font-size: 12px; color: var(--fog); }
.chat__channel > span { white-space: nowrap; }
.chat__status { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--accent); letter-spacing: .06em; }

.ico { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.pulse {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-line); }
  50%      { box-shadow: 0 0 0 5px rgba(23,200,222,0); }
}
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

.chat__body { padding: 24px 0 8px; display: flex; flex-direction: column; gap: 18px; }
.chat__daymark { font-size: 10px; letter-spacing: .1em; color: var(--ash); text-align: center; }

.msg { display: flex; flex-direction: column; gap: 6px; max-width: 74%; }
.msg--in { align-self: flex-start; align-items: flex-start; }
.msg--out { align-self: flex-end; align-items: flex-end; }

.msg__bubble {
  border-radius: var(--r-xl);
  padding: 12px 16px;
  font-size: 15px; line-height: 1.5;
  letter-spacing: -.011em;
}
.msg--in .msg__bubble {
  background: var(--obsidian); color: var(--mist);
  border-bottom-left-radius: var(--r-sm);
  box-shadow: inset 0 0 0 1px var(--graphite);
}
.msg--out .msg__bubble {
  background: var(--paper); color: var(--carbon);
  border-bottom-right-radius: var(--r-sm);
  font-weight: 400;
}
.msg--out .msg__bubble strong { font-weight: 600; }
.msg__meta { font-size: 11px; color: var(--ash); }

/* animación de entrada escalonada */
.js .chat.is-playing .msg,
.js .chat.is-playing .booking { opacity: 0; transform: translateY(8px); }
.js .chat.is-playing .msg.is-shown,
.js .chat.is-playing .booking.is-shown { opacity: 1; transform: none; transition: opacity .4s ease, transform .4s ease; }

.booking {
  margin-top: 6px;
  border: 1px solid var(--accent-line);
  background: linear-gradient(180deg, var(--accent-dim), rgba(23,200,222,.03));
  border-radius: var(--r-xl);
  padding: 16px 18px;
}
.booking__head { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--paper); margin-bottom: 14px; }
.booking__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.booking__grid dt { font-size: 11px; color: var(--ash); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; font-family: var(--font-mono); }
.booking__grid dd { font-size: 14px; color: var(--mist); }

.chat__foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--graphite); margin-top: 20px; padding-top: 16px;
  font-size: 10px; letter-spacing: .08em; color: var(--ash);
}

@media (max-width: 680px) {
  .msg { max-width: 92%; }
  .booking__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Strip de integraciones =========================================== */
.strip { padding: 72px 0 0; }
.strip__label { font-size: 10px; letter-spacing: .12em; color: var(--ash); text-align: center; margin-bottom: 28px; }
.strip__logos {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 28px 56px;
}
.strip__logos li { color: var(--ash); line-height: 0; transition: color .2s ease; }
.strip__logos svg { display: block; height: 26px; width: auto; fill: currentColor; }
.strip__logos li:hover { color: var(--mist); }

/* ===== Secciones ======================================================== */
.section { padding: var(--gap-section) 0; }
.sect-head { margin-bottom: 56px; }
.sect-head .lede { margin-top: 24px; }

/* ===== Timeline ========================================================= */
.timeline ol {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--graphite);
  border: 1px solid var(--graphite); border-radius: var(--r-xl); overflow: hidden;
}
.timeline li { background: var(--carbon); padding: 28px 24px; position: relative; }
.timeline li::before {
  content: ''; position: absolute; top: 0; left: 0; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--accent-line), transparent);
  opacity: .5;
}
.timeline li.cold::before { background: linear-gradient(90deg, #7d3a4a, transparent); opacity: .6; }
.timeline .t { font-size: 12px; color: var(--accent); letter-spacing: .04em; }
.timeline li.cold .t { color: #d0798a; }
.timeline h3 { font-size: 17px; margin: 12px 0 8px; }
.timeline p { font-size: 14px; color: var(--fog); line-height: 1.55; }

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

/* ===== Cards ============================================================ */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.card {
  background: var(--carbon);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-line);
  padding: var(--pad-card);
  transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: inset 0 0 0 1px var(--smoke); transform: translateY(-2px); }
.card__num { font-size: 10px; letter-spacing: .1em; color: var(--ash); }
.card h3 { font-size: 18px; margin: 14px 0 10px; }
.card p { font-size: 14px; color: var(--fog); line-height: 1.6; }

@media (max-width: 860px) { .cards-3 { grid-template-columns: 1fr; } }

.note {
  margin-top: 32px; font-size: 14px; color: var(--ash);
  border-left: 1px solid var(--graphite); padding-left: 16px;
}
.note .mono { font-size: 11px; letter-spacing: .08em; }
.note a { color: var(--mist); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--smoke); }
.note a:hover { color: var(--paper); text-decoration-color: var(--accent); }

/* ===== Diagrama de flujo ================================================ */
.flow { width: 100%; min-width: 900px; height: auto; color: var(--ash); }
.flow__cap { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; fill: var(--ash); }
.flow__cap.accent { fill: var(--accent); }
.flow .node rect { fill: var(--obsidian); stroke: var(--graphite); stroke-width: 1; }
.flow .node text { font-family: var(--font-sans); font-size: 13px; fill: var(--mist); }
.flow .node--out rect { fill: rgba(255,255,255,.02); }
.flow .engine rect { fill: rgba(23,200,222,.04); stroke: var(--accent-line); stroke-width: 1; }
.flow .step circle { fill: var(--accent); }
.flow .step text { font-family: var(--font-sans); font-size: 13px; fill: var(--mist); }
.flow .link { fill: none; stroke: var(--smoke); stroke-width: 1; color: var(--smoke); }

/* ===== Split ============================================================ */
.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
  margin-top: 80px;
}
.split--rev .split__text { order: 2; }
.split h3 { font-size: 26px; line-height: 1.2; letter-spacing: -.02em; margin-bottom: 16px; }
.split p { color: var(--fog); font-size: 15px; line-height: 1.65; }
.split .kicker { margin-bottom: 14px; }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 32px; margin-top: 56px; }
  .split--rev .split__text { order: 0; }
}

.ticks { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.ticks li {
  position: relative; padding-left: 24px;
  font-size: 14px; color: var(--fog); line-height: 1.5;
}
.ticks li::before {
  content: ''; position: absolute; left: 0; top: 7px;
  width: 9px; height: 5px;
  border-left: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent);
  transform: rotate(-45deg);
}
.ticks--lg li { font-size: 15px; color: var(--mist); }

/* ===== Visual: latencia ================================================= */
.latency { display: flex; flex-direction: column; gap: 18px; padding: 8px; }
.latency__row { display: grid; grid-template-columns: 118px 1fr auto; align-items: center; gap: 14px; }
.latency__label { font-size: 13px; color: var(--fog); }
.latency__bar { height: 6px; background: var(--obsidian); border-radius: var(--r-pill); overflow: hidden; box-shadow: inset 0 0 0 1px var(--graphite); }
.latency__fill { display: block; height: 100%; border-radius: var(--r-pill); width: 0; transition: width 1.1s cubic-bezier(.22,1,.36,1); }
.latency__fill--slow { background: linear-gradient(90deg, #4a3350, #8a4a5e); }
.latency__fill--fast { background: linear-gradient(90deg, var(--accent), #7fe6f2); }
.is-in .latency__fill--slow { width: 100%; }
.is-in .latency__fill--fast { width: 7%; }
.latency__val { font-size: 12px; color: var(--fog); }
.latency__note { font-size: 9px; letter-spacing: .1em; color: var(--ash); border-top: 1px solid var(--graphite); padding-top: 14px; }

@media (max-width: 520px) {
  .latency__row { grid-template-columns: 1fr; gap: 6px; }
}

/* ===== Visual: agenda =================================================== */
.agenda { padding: 4px; }
.agenda__head {
  display: flex; justify-content: space-between; font-size: 10px; letter-spacing: .1em;
  color: var(--ash); padding: 6px 8px 14px; border-bottom: 1px solid var(--graphite);
}
.agenda ul { display: flex; flex-direction: column; }
.agenda li {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 8px; font-size: 14px; color: var(--ash);
  border-bottom: 1px solid var(--graphite);
}
.agenda li:last-child { border-bottom: 0; }
.agenda li .mono { font-size: 12px; color: var(--fog); min-width: 42px; }
.agenda li .badge { margin-left: auto; }
.agenda li.taken { color: var(--fog); }
.agenda li.new { color: var(--paper); background: var(--accent-dim); border-radius: var(--r-md); border-bottom-color: transparent; }
.agenda li.new .mono { color: var(--accent); }

/* ===== Visual: secuencia ================================================ */
.seq { display: flex; flex-direction: column; gap: 10px; padding: 4px; }
.seq__item {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center;
  padding: 14px 12px;
  border-radius: var(--r-md);
  box-shadow: inset 0 0 0 1px var(--graphite);
  background: rgba(255,255,255,.015);
}
.seq__item .mono { font-size: 11px; color: var(--ash); }
.seq__item p { font-size: 13px; color: var(--fog); line-height: 1.45; }
.seq__item.done { background: rgba(255,255,255,.03); }
.seq__item.done p { color: var(--mist); }

@media (max-width: 520px) {
  .seq__item { grid-template-columns: 52px 1fr; }
  .seq__item .badge { grid-column: 2; justify-self: start; }
}

/* ===== Tiers ============================================================ */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.tier {
  display: flex; flex-direction: column;
  background: var(--carbon);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-line);
  padding: 28px 24px;
}
.tier--feat {
  background: var(--obsidian);
  box-shadow: inset 0 0 0 1px var(--accent-line), var(--sh-xl);
}
.tier__tag { font-size: 10px; letter-spacing: .12em; color: var(--ash); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tier h3 { font-size: 24px; line-height: 1.15; letter-spacing: -.02em; margin: 16px 0 10px; }
.tier__sub { font-size: 14px; color: var(--fog); padding-bottom: 22px; border-bottom: 1px solid var(--graphite); }
.tier .ticks { margin-top: 22px; margin-bottom: 28px; }
.tier__cta { margin-top: auto; width: 100%; }

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

/* ===== Contacto / formulario ============================================ */
.section--contact {
  background: var(--carbon);
  border-top: 1px solid var(--graphite);
  border-bottom: 1px solid var(--graphite);
}
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.contact__copy .lede { margin: 24px 0 28px; }
.contact__foot { font-size: 10px; letter-spacing: .1em; color: var(--ash); margin-top: 32px; border-top: 1px solid var(--graphite); padding-top: 20px; }

@media (max-width: 900px) { .contact { grid-template-columns: 1fr; gap: 48px; } }

.form {
  background: var(--void);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-line);
  padding: 28px;
  display: flex; flex-direction: column; gap: 18px;
}
.form__title { font-size: 15px; font-weight: 500; color: var(--paper); padding-bottom: 18px; border-bottom: 1px solid var(--graphite); }

.field { display: flex; flex-direction: column; gap: 7px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }

.field label { font-size: 13px; color: var(--mist); }
.field .opt { color: var(--ash); }

.field input, .field select, .field textarea {
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--r-md);
  padding: 11px 13px;
  font-size: 14px; color: var(--mist);
  transition: border-color .16s ease, background-color .16s ease;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 76px; font-family: inherit; }
.field input::placeholder, .field textarea::placeholder { color: var(--ash); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(255,255,255,.14); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--mist); background: rgba(255,255,255,.04);
}
.field select { appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--fog) 50%), linear-gradient(135deg, var(--fog) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}
.field select option { background: var(--carbon); color: var(--mist); }

.field.has-error input, .field.has-error select { border-color: #b8556a; }
.field__err { font-size: 12px; color: #d0798a; display: none; }
.field.has-error .field__err { display: block; }

.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--fog); line-height: 1.45; cursor: pointer; }
.check input {
  appearance: none; width: 16px; height: 16px; flex: none; margin-top: 1px;
  border: 1px solid rgba(255,255,255,.16); border-radius: var(--r-sm);
  background: rgba(255,255,255,.02); cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease;
}
.check input:checked { background: var(--paper); border-color: var(--paper); }
.check input:checked::after {
  content: ''; display: block; width: 8px; height: 4px; margin: 3px auto 0;
  border-left: 1.6px solid var(--carbon); border-bottom: 1.6px solid var(--carbon);
  transform: rotate(-45deg);
}

.form__note { font-size: 10px; letter-spacing: .1em; color: var(--ash); text-align: center; }

.form__ok {
  display: flex; align-items: flex-start; gap: 12px;
  border: 1px solid var(--accent-line); background: var(--accent-dim);
  border-radius: var(--r-md); padding: 16px;
}
.form__ok p { font-size: 14px; color: var(--mist); line-height: 1.5; }
.form__ok strong { color: var(--paper); font-weight: 500; }

/* ===== FAQ ============================================================== */
.faq { border-top: 1px solid var(--graphite); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--graphite); }
.faq summary {
  list-style: none; cursor: pointer;
  padding: 24px 40px 24px 0; position: relative;
  font-size: 17px; color: var(--paper); letter-spacing: -.012em;
  transition: color .16s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--mist); }
.faq summary::after {
  content: ''; position: absolute; right: 6px; top: 31px;
  width: 10px; height: 10px;
  border-right: 1.5px solid var(--fog); border-bottom: 1.5px solid var(--fog);
  transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 34px; }
.faq details > div { padding: 0 40px 26px 0; }
.faq details p { font-size: 15px; line-height: 1.65; color: var(--fog); max-width: 68ch; }

/* ===== CTA final ======================================================== */
.cta { padding: 128px 0; text-align: center; position: relative; }
.cta::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 100%, rgba(23,200,222,.07), transparent 70%);
  pointer-events: none;
}
.cta .wrap { position: relative; }
.cta p { color: var(--fog); font-size: 17px; margin-top: 20px; }
.cta__row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }

/* ===== Footer =========================================================== */
.footer { border-top: 1px solid var(--graphite); background: var(--carbon); padding: 72px 0 0; }
.footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; }
.footer__brand p { font-size: 14px; color: var(--fog); line-height: 1.6; margin-top: 20px; max-width: 42ch; }
.footer__col { display: flex; flex-direction: column; gap: 12px; }
.footer__h { font-size: 10px; letter-spacing: .12em; color: var(--ash); margin-bottom: 4px; }
.footer__col a { font-size: 14px; color: var(--fog); transition: color .16s ease; }
.footer__col a:hover { color: var(--paper); }

.footer__base {
  margin-top: 64px; border-top: 1px solid var(--graphite);
  padding-top: 24px; padding-bottom: 32px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.footer__base p { font-size: 11px; letter-spacing: .06em; color: var(--ash); }
.footer__base a:hover { color: var(--mist); }

@media (max-width: 900px) {
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 520px) {
  .footer__inner { grid-template-columns: 1fr; }
  :root { --gap-section: 72px; }
}

/* Campo trampa antispam de Netlify Forms: fuera de la vista y del foco. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ==========================================================================
   Páginas legales — aviso legal, privacidad, cookies
   ========================================================================== */

.legal { padding: 72px 0 96px; }
.legal__inner { max-width: 760px; }

.legal__back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--fog); margin-bottom: 32px;
  transition: color .16s ease;
}
.legal__back:hover { color: var(--mist); }

.legal h1 { font-size: clamp(32px, 5vw, 48px); margin-bottom: 16px; }
.legal__updated {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
  color: var(--ash); padding-bottom: 32px; border-bottom: 1px solid var(--graphite);
}

.legal h2 {
  font-size: 22px; line-height: 1.3; letter-spacing: -.014em;
  margin: 48px 0 16px; padding-top: 8px;
}
.legal h3 { font-size: 17px; margin: 28px 0 10px; color: var(--mist); }

.legal p { font-size: 15px; line-height: 1.7; color: var(--fog); margin-bottom: 16px; }
.legal strong { color: var(--mist); font-weight: 500; }

.legal ul { margin: 0 0 16px; }
.legal ul li {
  position: relative; padding-left: 20px; margin-bottom: 10px;
  font-size: 15px; line-height: 1.65; color: var(--fog);
}
.legal ul li::before {
  content: ''; position: absolute; left: 2px; top: 11px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--smoke);
}

.legal a:not(.legal__back):not(.btn) {
  color: var(--mist); text-decoration: underline;
  text-underline-offset: 3px; text-decoration-color: var(--smoke);
}
.legal a:not(.legal__back):not(.btn):hover {
  color: var(--paper); text-decoration-color: var(--accent);
}

/* Tabla de datos identificativos */
.legal__table {
  width: 100%; border-collapse: collapse; margin: 8px 0 24px;
  border: 1px solid var(--graphite); border-radius: var(--r-xl); overflow: hidden;
}
.legal__table th, .legal__table td {
  text-align: left; padding: 14px 16px; font-size: 14px;
  border-bottom: 1px solid var(--graphite); vertical-align: top;
}
.legal__table tr:last-child th, .legal__table tr:last-child td { border-bottom: 0; }
.legal__table th { color: var(--ash); font-weight: 400; width: 38%; background: rgba(255,255,255,.015); }
.legal__table td { color: var(--mist); }

/* Hueco que tiene que rellenar el titular — imposible de pasar por alto */
.ph {
  display: inline-block;
  background: rgba(235,87,87,.12);
  border: 1px dashed #b8556a;
  color: #e9a3ae;
  border-radius: var(--r-sm);
  padding: 1px 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .02em;
}

/* Aviso de "esto hay que revisarlo" en la cabecera de la página */
.legal__notice {
  border: 1px solid #7d3a4a;
  background: rgba(235,87,87,.07);
  border-radius: var(--r-xl);
  padding: 18px 20px;
  margin: 32px 0 8px;
}
.legal__notice p { color: var(--mist); font-size: 14px; margin: 0; }
.legal__notice p + p { margin-top: 10px; }
.legal__notice strong { color: #e9a3ae; }
