/* ==========================================================================
   DeltaX Advisory — hoja de estilos única
   Estética: oscura, monocroma, minimalista, futurista.
   Sin dependencias. Sin animaciones de entrada (solo transiciones de estado).
   ========================================================================== */

/* ==========================================================================
   Tipografías autohospedadas
   Inter y JetBrains Mono se sirven desde este mismo dominio. Al no depender de
   Google Fonts, la política de contenido puede quedarse en 'self' y la IP del
   visitante no sale hacia terceros.

   Ambas son SIL Open Font License 1.1; las licencias completas están en fonts/.
   Solo se incluye el subconjunto "latin", que cubre el castellano completo.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/inter-latin-300.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/inter-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/inter-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* ---- Paleta de marca DeltaX -------------------------------------------
     Azul Royal Profundo y Oro Premium. El brand system declara el oro como
     #D4AF37, pero el degradado real del isotipo va de #C9A23C a #FFF18C: se
     usan esos extremos y #DEBA54 como tono medio, medidos sobre el archivo.

     El verde, el amarillo y el rojo NO son colores de marca: se reservan para
     estados funcionales (éxito y error). */
  --marca-azul:    #002D5A;

  --bg:            #002D5A;
  --bg-deep:       #001E3D;
  --bg-soft:       rgba(255, 255, 255, 0.055);
  --line:          rgba(255, 255, 255, 0.16);
  --line-strong:   rgba(255, 255, 255, 0.30);

  --fg:            #F2F6FA;
  --fg-dim:        rgba(242, 246, 250, 0.78);
  --fg-faint:      rgba(242, 246, 250, 0.64);
    /* Variables del módulo escalera (faltaban: se usaban sin definir) */
  --ev-soft:        rgba(255, 255, 255, 0.035);
  --ev-accent-soft: rgba(222, 186, 84, 0.14);
  --ev-accent-line: rgba(222, 186, 84, 0.48);

  /* El oro se toma del degradado real del isotipo: va de #C9A23C a #FFF18C,
     con #DEBA54 como tono medio. Un oro plano al lado del logo cantaba. */
  --oro-sombra:    #C9A23C;
  --oro-luz:       #FFF18C;
  --accent:        #DEBA54;
  --accent-fuerte: #F0D77B;
  --accent-soft:   rgba(222, 186, 84, 0.16);
  --accent-line:   rgba(222, 186, 84, 0.48);

  /* Estados funcionales, no de marca */
  --danger:        #FFB3B3;
  --ok:            #A9E6C4;

  --radius:        14px;
  --radius-sm:     9px;
  --maxw:          620px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { 
  -webkit-text-size-adjust: 100%; 
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ---------- Capas decorativas de fondo ------------------------------------ */

.fx-grid,
.fx-glow { position: fixed; inset: 0; pointer-events: none; z-index: 0; }

.fx-grid {
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  /* El grid se desvanece hacia los bordes: da profundidad sin ruido. */
  -webkit-mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, #000 0%, transparent 78%);
          mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, #000 0%, transparent 78%);
}

.fx-glow {
  background:
    radial-gradient(ellipse 55% 40% at 50% -8%, rgba(212,175,55,0.14), transparent 70%),
    radial-gradient(ellipse 45% 35% at 50% 106%, rgba(255,255,255,0.05), transparent 70%);
}

/* ---------- Contenedor ---------------------------------------------------- */

.shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(40px, 9vh, 96px) 24px 64px;
}

/* ---------- Marca --------------------------------------------------------- */

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(40px, 8vh, 72px);
}

/* Pastilla blanca con el isotipo oficial. Es necesaria: el azul del isotipo
   (#002B5F) y el fondo de la página (#002D5A) son casi el mismo color, así que
   sin ella el triángulo sería invisible. */
.brand-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  background: #FFFFFF;
  border-radius: 7px;
  line-height: 0;
}

.brand-chip img { display: block; }

.brand-name {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg);
}

/* ---------- Intro --------------------------------------------------------- */

.eyebrow {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

.intro h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 6.2vw, 46px);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--fg);
}

.intro h1 .dim { color: var(--fg-dim); }

/* El eslogan de marca, como descriptor bajo la promesa. En oro y mono para que
   se lea como identidad y no como una línea más del titular. */
.descriptor {
  margin: 0 0 20px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--accent);
}

.lede {
  margin: 0 0 14px;
  max-width: 46ch;
  font-size: 15px;
  font-weight: 300;
  color: var(--fg-dim);
}

.lede strong { color: var(--fg); font-weight: 500; }

/* Credencial, ubicación y promesa de respuesta. */
.trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 clamp(30px, 5.5vh, 44px);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

.trust-sep { color: var(--accent); opacity: 0.8; }

/* ---------- Títulos de sección -------------------------------------------- */

.section-title {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

/* ---------- Problemas que resolvemos -------------------------------------- */

.problemas { margin: 0 0 clamp(34px, 6vh, 52px); }

.problemas-lista {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.problemas-lista li {
  position: relative;
  margin: 0 0 9px;
  padding-left: 22px;
  font-size: 14.5px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--fg-dim);
}

/* Guion dorado en lugar de viñeta. */
.problemas-lista li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 10px;
  height: 1px;
  background: var(--accent);
  opacity: 0.85;
}

/* El puente entre el problema y la solución. */
.puente {
  margin: 0;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--fg-dim);
}

.puente strong { color: var(--fg); font-weight: 500; }

.escalera { margin: 0 0 clamp(34px, 6vh, 52px); }

/* Pestañas de servicio */
.ev-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 0 0 12px;
}
.ev-tab {
  padding: 12px 8px 11px;
  background: var(--ev-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.18s ease, background-color 0.18s ease;
  font-family: var(--mono);
}
.ev-tab .n {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 4px;
}
.ev-tab .t {
  display: block;
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--fg-dim);
  line-height: 1.35;
}
.ev-tab:hover { border-color: var(--ev-accent-line); }
.ev-tab.on {
  background: var(--ev-accent-soft);
  border-color: var(--accent);
}
.ev-tab.on .t { color: var(--fg); }

/* Peldaños de la escalera (etapa del negocio) */
.ev-ladder {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin: 0 0 18px;
}
.ev-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-faint);
  text-align: center;
  background: var(--ev-soft);
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}
.ev-step:nth-child(1) { height: 34px; }
.ev-step:nth-child(2) { height: 44px; }
.ev-step:nth-child(3) { height: 54px; }
.ev-step:nth-child(4) { height: 64px; }
.ev-step.on {
  border-color: var(--accent);
  background: var(--ev-accent-soft);
  color: var(--fg);
}

/* Panel de detalle */
.ev-panel {
  padding: 22px 20px 20px;
  background: var(--ev-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.ev-q {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.35;
  color: var(--fg);
}
.ev-promise {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}
.ev-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin: 0 0 14px;
}
.ev-cell {
  background: var(--bg);
  padding: 11px 13px;
}
.ev-cell .k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-faint);
  margin-bottom: 4px;
}
.ev-cell .v {
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--fg-dim);
}
.ev-cell .v strong {
  color: var(--fg);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.ev-next {
  margin: 0 0 18px;
  padding-left: 12px;
  border-left: 2px solid var(--accent);
  font-size: 13px;
  font-weight: 300;
  line-height: 1.55;
  color: var(--fg-dim);
}
.ev-next strong { color: var(--fg); font-weight: 500; }
.ev-scope h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.35;
  color: var(--fg);
}
.ev-scope ul {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.ev-scope li {
  position: relative;
  padding: 7px 0 7px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--fg-dim);
}
.ev-scope li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 15px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 1px;
  transform: rotate(45deg);
}
.ev-scope .ev-not {
  margin: 0;
  padding-left: 12px;
  border-left: 2px solid var(--accent);
  font-size: 13px;
  font-weight: 300;
  line-height: 1.55;
  color: var(--fg-dim);
}
.ev-scope[hidden], .ev-proyectos[hidden] { display: none; }

/* CTA del servicio activo */
.ev-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg);
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
.ev-cta:hover {
  border-color: var(--accent);
  background: var(--ev-accent-soft);
}

/* Tabla de los 9 proyectos especiales */
.ev-proyectos { margin-top: 28px; }
.ev-proyectos .ev-sub {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-faint);
}
.ev-table-wrap { overflow-x: auto; }
.ev-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-weight: 300;
}
.ev-table th {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-faint);
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-strong);
}
.ev-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  color: var(--fg-dim);
  line-height: 1.45;
  vertical-align: top;
}
.ev-table td:first-child { white-space: nowrap; color: var(--fg); }
.ev-table .ev-price { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev-table tr:hover td { background: var(--ev-soft); }

@media (max-width: 560px) {
  .ev-tabs { grid-template-columns: 1fr 1fr; }
  .ev-grid { grid-template-columns: 1fr; }
  .ev-step { font-size: 9px; }
}
@media (max-width: 480px) {
  .ev-ladder { gap: 4px; }
  .ev-step { padding: 6px 3px; }
  .ev-cell { padding: 9px 11px; }
}

/* ---------- Proceso ------------------------------------------------------- */

.proceso { margin: 0 0 clamp(34px, 6vh, 52px); }

.proceso-intro {
  margin: 0 0 22px;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--fg-dim);
}

.proceso-lista {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.proceso-lista li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.proceso-num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.proceso-lista h3 {
  margin: 0 0 5px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--fg);
}

.proceso-lista p {
  margin: 0;
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.55;
  color: var(--fg-dim);
}

/* ---------- Diagnóstico Express ------------------------------------------ */

.diagnostico {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(190px, 0.65fr);
  gap: clamp(24px, 5vw, 44px);
  align-items: start;
  margin: 0 0 clamp(34px, 6vh, 52px);
  padding: clamp(24px, 4vw, 34px);
  background: linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.018));
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.diagnostico h2 {
  margin: 10px 0 12px;
  font-size: clamp(23px, 4vw, 32px);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.18;
  color: var(--fg);
}

.diagnostico-lede {
  margin: 0 0 20px;
  font-size: 14.5px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--fg-dim);
}

.diagnostico-lista {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.diagnostico-lista li {
  position: relative;
  margin: 0 0 9px;
  padding-left: 20px;
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--fg-dim);
}

.diagnostico-lista li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 7px;
  height: 7px;
  border: 1px solid var(--accent);
  transform: rotate(45deg);
}

.diagnostico-nota {
  margin: 0 0 24px;
  padding: 13px 15px;
  border-left: 2px solid var(--accent);
  background: var(--bg-soft);
  font-size: 12.5px;
  font-weight: 300;
  line-height: 1.55;
  color: var(--fg-faint);
}

.diagnostico-card {
  padding: 20px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.diagnostico-card-label {
  margin: 0 0 3px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

.diagnostico-card-value {
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
}

.diagnostico-card-note {
  margin: 20px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.07em;
  line-height: 1.5;
  color: var(--accent);
}

/* ---------- FAQ ----------------------------------------------------------- */

.faq { margin: 0 0 clamp(34px, 6vh, 52px); }

.faq-list {
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  position: relative;
  padding: 17px 38px 17px 0;
  cursor: pointer;
  list-style: none;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--fg);
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 18px;
  color: var(--accent);
  transition: transform 0.18s ease;
}

.faq details[open] summary::after { content: "−"; }

.faq details p {
  margin: -2px 0 18px;
  padding-right: 38px;
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--fg-dim);
}

/* ---------- Perfil y credenciales ----------------------------------------- */

.perfil { margin: 0 0 clamp(34px, 6vh, 52px); }

.perfil-nombre {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--fg);
}

.perfil-rol {
  margin: 0 0 20px;
  font-size: 13.5px;
  font-weight: 300;
  color: var(--fg-faint);
}

.credenciales {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.credenciales li {
  position: relative;
  padding: 13px 0 13px 22px;
  border-bottom: 1px solid var(--line);
}

/* El mismo rombo de oro que identifica los niveles: unifica el lenguaje. */
.credenciales li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 21px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 1px;
  transform: rotate(45deg);
}

.credenciales strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
}

.credenciales span {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--fg-dim);
}

.credenciales a {
  color: var(--fg-dim);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-line);
  transition: color 0.18s ease;
}

.credenciales a:hover { color: var(--fg); }

/* ---------- Encabezado de la tarjeta del formulario ------------------------ */

.card-head { margin: 0 0 24px; }

.card-head h2 {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--fg);
}

.card-head p {
  margin: 0;
  font-size: 13.5px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--fg-faint);
}

/* ---------- Tarjeta del formulario --------------------------------------- */

.card {
  position: relative;
  padding: clamp(24px, 4.4vw, 34px);
  background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.018));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  margin: 0;
}

/* Hairline superior: el detalle de marca, en oro. */
.card-rail {
  position: absolute;
  top: -1px; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line), transparent);
}

/* ---------- Campos -------------------------------------------------------- */

.field { margin-bottom: 22px; }

.field label,
.consent label {
  display: block;
  margin-bottom: 9px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

.req { color: var(--fg); }
.opt {
  font-family: var(--font);
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  color: var(--fg-faint);
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 13px 15px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--fg);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.5;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

textarea { resize: vertical; min-height: 118px; }

input::placeholder,
textarea::placeholder { color: var(--fg-faint); opacity: 1; }

input[type="text"]:hover,
input[type="email"]:hover,
textarea:hover { border-color: var(--line-strong); }

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.20);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Estado de error: borde rojo + mensaje bajo el campo. */
.field.invalid input,
.field.invalid textarea,
.consent.invalid input[type="checkbox"] { border-color: var(--danger); }

.error {
  margin: 8px 0 0;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--danger);
}

/* ---------- Honeypot ------------------------------------------------------ */

/* Fuera de pantalla y sin foco: invisible para personas, visible para bots. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Consentimiento ------------------------------------------------ */

.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 11px;
  align-items: start;
  margin: 4px 0 26px;
}

.consent input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  margin: 3px 0 0;
  flex: none;
  background: var(--bg-soft);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.consent input[type="checkbox"]:hover { border-color: var(--accent); }

.consent input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
  /* Marca de verificación dibujada con un SVG en línea (sin peticiones extra),
     en azul de marca para que contraste sobre el oro. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.4l3 3 6-6.8' stroke='%23002D5A' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 100%;
  background-repeat: no-repeat;
}

.consent input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.consent label {
  margin: 0;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.55;
  color: var(--fg-dim);
  cursor: pointer;
}

.consent .error { grid-column: 2; }

/* ---------- Verificación anti-bot (Cloudflare Turnstile) ------------------ */

/* Mientras no haya sitekey configurada, el contenedor está vacío y no ocupa
   espacio, así que el formulario se ve exactamente igual que antes. */
.turnstile-slot {
  margin: 0 0 22px;
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: 65px;
  overflow: hidden;
}
.turnstile-slot:empty { display: none; }

/* ---------- Botón --------------------------------------------------------- */

.btn {
  position: relative;
  width: 100%;
  padding: 15px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--oro-sombra), var(--accent) 52%, var(--oro-luz));
  color: var(--marca-azul);
  border: 1px solid var(--oro-sombra);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.btn-hero {
  width: auto;
  margin-top: 0;
  text-decoration: none;
  padding: 14px 22px;
}

.btn-cal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  background: var(--bg-soft);
  color: var(--accent);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-cal:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-fuerte);
  box-shadow: 0 0 16px rgba(222, 186, 84, 0.2);
}

.btn-cal:active {
  transform: translateY(1px);
}

.btn-cal:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn-cal-secundario {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 8px;
  margin: 18px 0 0;
  padding: 14px 20px;
  background: var(--bg-soft);
  color: var(--accent);
  border: 1px dashed var(--accent-line);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-cal-secundario:hover {
  border-style: solid;
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-fuerte);
  box-shadow: 0 0 16px rgba(222, 186, 84, 0.2);
}

.btn-cal-secundario:active {
  transform: translateY(1px);
}

.btn-cal-secundario:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* En hover se aclara el oro en lugar de bajar la opacidad: así el texto oscuro
   no se vuelve translúcido sobre el azul y el contraste se mantiene. */
.btn:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--accent), var(--accent-fuerte) 55%, var(--oro-luz));
  border-color: var(--accent-fuerte);
  box-shadow: 0 0 28px rgba(222, 186, 84, 0.34);
}
.btn:active:not(:disabled) { transform: translateY(1px); }

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(222, 186, 84, 0.55);
}

.btn:disabled { cursor: not-allowed; opacity: 0.55; }

.btn-spinner {
  display: none;
  width: 13px;
  height: 13px;
  border: 1.5px solid rgba(0, 45, 90, 0.30);
  border-top-color: var(--marca-azul);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn.loading .btn-spinner { display: inline-block; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Mensaje de estado -------------------------------------------- */

.status {
  margin: 18px 0 0;
  min-height: 0;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.55;
}

.status:empty { margin: 0; }

.status.ok   { color: var(--ok); }
.status.err  { color: var(--danger); }

/* ---------- Botón de WhatsApp --------------------------------------------- */

/* El atributo hidden no basta: display:flex lo anularía. De ahí la regla
   explícita [hidden]. Sin número configurado, el botón no se muestra. */
.wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 18px 0 0;
  padding: 14px 20px;
  background: var(--bg-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--fg);
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.wa:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-fuerte);
}

.wa:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.wa[hidden] { display: none; }

/* ---------- Redes sociales ------------------------------------------------ */

.social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 26px 0 0;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--fg-dim);
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.social-link:hover {
  color: var(--accent-fuerte);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.social-link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Sin URL configurada el icono desaparece: nunca queda un enlace muerto.
   El [hidden] explícito es necesario porque display:inline-flex lo anularía. */
.social-link[hidden] { display: none; }

.social svg { display: block; }

/* ---------- Pie ----------------------------------------------------------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: clamp(36px, 7vh, 56px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--fg-faint);
}

.foot a {
  color: var(--fg-dim);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.foot a:hover { color: var(--fg); border-bottom-color: var(--line-strong); }

.foot-sep { color: var(--accent); opacity: 0.55; }

/* ---------- Página legal -------------------------------------------------- */

.legal { max-width: 680px; }

.legal h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 5vw, 34px);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.legal h2 {
  margin: 38px 0 10px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg);
}

.legal p,
.legal li { font-size: 14.5px; font-weight: 300; color: var(--fg-dim); }

.legal ul { padding-left: 20px; }

.legal a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--line-strong); }

.legal .updated { font-family: var(--mono); font-size: 11.5px; color: var(--fg-faint); letter-spacing: 0.06em; }

.note {
  margin-top: 40px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.028);
}

.note p { margin: 0; font-size: 13.5px; }

.back {
  display: inline-block;
  margin-bottom: 34px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  text-decoration: none;
}

.back:hover { color: var(--fg); }

/* ---------- Accesibilidad ------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- Modal de Agendamiento Cal.com --------------------------------- */

.cal-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 14px;
  background: rgba(0, 20, 42, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.cal-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.cal-modal-content {
  position: relative;
  width: 100%;
  max-width: 900px;
  height: 90vh;
  max-height: 720px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 32px rgba(222, 186, 84, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cal-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--line);
}

.cal-modal-title {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.cal-modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--fg-dim);
  cursor: pointer;
  transition: all 0.18s ease;
}

.cal-modal-close:hover {
  background: var(--bg-soft);
  color: var(--fg);
  border-color: var(--accent);
}

.cal-modal-iframe {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
  background: var(--bg);
}

/* ---------- Móvil --------------------------------------------------------- */

@media (max-width: 480px) {
  .shell { padding: 32px 14px 44px; }
  .diagnostico { grid-template-columns: 1fr; }
  .diagnostico-card { order: -1; }
  .proceso-lista li { grid-template-columns: 34px 1fr; }
  .faq details p { padding-right: 0; }
  .card { padding: 22px 14px; }
  .foot { flex-direction: column; align-items: flex-start; gap: 7px; }
  .foot-sep { display: none; }
  .cal-modal { padding: 10px 8px; }
  .cal-modal-content { height: 94vh; max-height: none; }
}
