/* ==========================================================================
   DHARMA — Hoja de estilos
   Implementa "DHARMA — Sistema de identidad de marca v1.0".
   Depende de tokens.css: aquí no hay ni un color ni un tamaño escrito a mano.
   ========================================================================== */

/* ---------- Tipografías autoalojadas ------------------------------------ */
/* Se sirven desde el propio dominio: sin conexión a Google, sin filtrar la IP
   de cada visitante a un tercero. Coherente con lo que la marca promete. */

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/manrope-latin.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+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/manrope-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/sourcesans3-latin.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+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/sourcesans3-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Reset ------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--dh-space-24);
}

body {
  font-family: var(--dh-font-body);
  font-size: var(--dh-font-size-body);
  line-height: var(--dh-line-height-body);
  letter-spacing: var(--dh-letter-spacing-body);
  color: var(--dh-color-text);
  background: var(--dh-color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
p, h1, h2, h3, h4, li { overflow-wrap: break-word; }

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

/* ---------- Accesibilidad ---------------------------------------------- */

/* El manual fija el foco en azul información, no en dorado: el dorado no
   alcanza contraste suficiente como señal funcional. */
:focus-visible {
  outline: var(--dh-border-focus);
  outline-offset: 2px;
  border-radius: var(--dh-radius-xs);
}

.skip-link {
  position: absolute;
  left: var(--dh-space-4);
  top: var(--dh-space-4);
  z-index: 200;
  padding: var(--dh-space-3) var(--dh-space-6);
  background: var(--dh-color-primary-900);
  color: var(--dh-color-surface);
  border-radius: var(--dh-radius-sm);
  text-decoration: none;
  font-weight: var(--dh-font-weight-semibold);
  transform: translateY(-160%);
  transition: transform var(--dh-duration-base) var(--dh-ease-standard);
}
.skip-link:focus-visible { transform: translateY(0); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Tipografía -------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--dh-font-display);
  font-weight: var(--dh-font-weight-semibold);
  color: var(--dh-color-primary-900);
  text-wrap: balance;
}

h1 { font-size: var(--dh-font-size-h1); line-height: var(--dh-line-height-h1); letter-spacing: var(--dh-letter-spacing-h1); }
h2 { font-size: var(--dh-font-size-h2); line-height: var(--dh-line-height-h2); letter-spacing: var(--dh-letter-spacing-h2); }
h3 { font-size: var(--dh-font-size-h3); line-height: var(--dh-line-height-h3); letter-spacing: var(--dh-letter-spacing-h3); }
h4 { font-size: var(--dh-font-size-h4); line-height: var(--dh-line-height-h4); letter-spacing: var(--dh-letter-spacing-h4); }

p { max-width: var(--dh-measure); text-wrap: pretty; }

a { color: var(--dh-color-info); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--dh-color-primary-900); }

strong, b { font-weight: var(--dh-font-weight-semibold); }

.lead {
  font-size: var(--dh-font-size-body-lg);
  line-height: var(--dh-line-height-body-lg);
  color: var(--dh-color-text-secondary);
  max-width: var(--dh-measure);
}

/* Microetiqueta. El texto va en gris secundario, no en dorado: a 12px el oro
   tinta no alcanza AA sobre el fondo cálido (4.31) ni sobre beige (3.80).
   El dorado queda en el filete, que es decorativo. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--dh-space-3);
  font-size: var(--dh-font-size-caption);
  font-weight: var(--dh-font-weight-semibold);
  letter-spacing: var(--dh-letter-spacing-label);
  text-transform: uppercase;
  color: var(--dh-color-text-secondary);
  margin-bottom: var(--dh-space-4);
}
.eyebrow::before {
  content: '';
  width: var(--dh-space-8);
  height: 2px;
  background: var(--dh-accent-on-light);
}

.caption {
  font-size: var(--dh-font-size-caption);
  line-height: var(--dh-line-height-caption);
  color: var(--dh-color-text-secondary);
}

.source {
  font-size: var(--dh-font-size-caption);
  line-height: var(--dh-line-height-caption);
  color: var(--dh-color-text-secondary);
  margin-top: var(--dh-space-6);
  padding-top: var(--dh-space-4);
  border-top: var(--dh-border-default);
  max-width: var(--dh-measure);
}

/* Encabezado que debe ser h3 por jerarquía, pero verse como h4. */
.h-sm {
  font-size: var(--dh-font-size-h4);
  line-height: var(--dh-line-height-h4);
  letter-spacing: var(--dh-letter-spacing-h4);
}

/* ---------- Layout ------------------------------------------------------ */

.container {
  width: 100%;
  max-width: var(--dh-width-page);
  margin-inline: auto;
  padding-inline: var(--dh-gutter);
}
.container--narrow { max-width: var(--dh-width-content); }

.section { padding-block: var(--dh-section-y); }
.section--tight { padding-block: calc(var(--dh-section-y) * 0.62); }

/* El manual advierte que no hay que alternar color en todas las secciones:
   el bloque de color se usa cuando cambia la función de la información. */
.section--sand { background: var(--dh-color-beige-100); }
.section--mist { background: var(--dh-color-sky-100); }
.section--surface { background: var(--dh-color-surface); }

.section--deep { background: var(--dh-color-primary-900); color: var(--dh-color-sky-100); }
.section--deep h2, .section--deep h3, .section--deep h4 { color: var(--dh-color-surface); }
.section--deep p, .section--deep li { color: var(--dh-color-sky-100); }
.section--deep .lead { color: var(--dh-color-sky-100); }
.section--deep .caption { color: var(--dh-color-sky-100); }
/* Sobre azul 900 el oro 500 rinde 5.07:1 — aquí sí puede ser texto. */
.section--deep .eyebrow { color: var(--dh-accent-on-dark); }
.section--deep .eyebrow::before { background: var(--dh-accent-on-dark); }
.section--deep .source { color: var(--dh-color-sky-100); border-top-color: rgba(255, 255, 255, 0.18); }
.section--deep a { color: var(--dh-color-sky-100); }
.section--deep a:hover { color: var(--dh-color-surface); }

.section-head { max-width: var(--dh-measure); margin-bottom: var(--dh-space-12); }
.section-head p { margin-top: var(--dh-space-4); }

.stack > * + * { margin-top: var(--dh-space-4); }
.stack-lg > * + * { margin-top: var(--dh-space-8); }

.grid { display: grid; gap: var(--dh-space-6); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }

.split { display: grid; gap: var(--dh-space-12); align-items: start; }
@media (min-width: 62rem) {
  .split { grid-template-columns: 1.15fr 1fr; gap: var(--dh-space-16); }
  .split--reverse > :first-child { order: 2; }
}

/* ---------- Header ------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--dh-color-bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: var(--dh-border-default);
  transition: box-shadow var(--dh-duration-base) var(--dh-ease-standard);
}
.site-header[data-scrolled='true'] { box-shadow: var(--dh-shadow-1); }

/* Filete dorado superior: gesto de identidad heredado de la presentación.
   Es decorativo, no transporta información. */
.site-header::before {
  content: '';
  display: block;
  height: 3px;
  background: var(--dh-color-gold-500);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--dh-space-6);
  min-height: var(--dh-space-16);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--dh-space-3);
  text-decoration: none;
  color: var(--dh-color-primary-900);
  flex-shrink: 0;
}

/* El logotipo lleva width/height en el marcado para reservar su espacio y
   evitar que el encabezado salte mientras carga. Aquí solo se hace fluido. */
.brand__logo {
  display: block;
  height: auto;
  max-width: 100%;
}

.brand__tag {
  font-size: var(--dh-font-size-caption);
  line-height: var(--dh-line-height-caption);
  color: var(--dh-color-text-secondary);
  letter-spacing: 0.02em;
  /* Separador vertical en vez de yuxtaposición: el logo ya tiene su propia
     área de resguardo y el texto no debe leerse como parte de la marca. */
  padding-left: var(--dh-space-3);
  border-left: var(--dh-border-default);
}
@media (max-width: 46rem) { .brand__tag { display: none; } }

.site-footer .brand__tag { border-left-color: rgba(255, 255, 255, 0.2); }

.nav { display: flex; align-items: center; gap: var(--dh-space-6); }

.nav__list {
  display: flex;
  align-items: center;
  gap: var(--dh-space-6);
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav__link {
  position: relative;
  font-size: var(--dh-font-size-small);
  font-weight: var(--dh-font-weight-medium);
  color: var(--dh-color-text);
  text-decoration: none;
  padding-block: var(--dh-space-2);
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--dh-accent-on-light);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dh-duration-base) var(--dh-ease-standard);
}
.nav__link:hover::after,
.nav__link[aria-current='page']::after { transform: scaleX(1); }
.nav__link[aria-current='page'] { color: var(--dh-color-primary-900); font-weight: var(--dh-font-weight-semibold); }

.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: var(--dh-control-height); height: var(--dh-control-height);
  background: none;
  border: var(--dh-border-default);
  border-radius: var(--dh-radius-sm);
  cursor: pointer;
  color: var(--dh-color-primary-900);
}

@media (max-width: 60rem) {
  .nav__toggle { display: inline-flex; }
  .nav__list {
    position: fixed;
    inset: auto 0 0 0;
    top: calc(var(--dh-space-16) + 3px);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--dh-color-bg);
    border-top: var(--dh-border-default);
    padding: var(--dh-space-4) var(--dh-gutter) var(--dh-space-12);
    overflow-y: auto;
    transform: translateY(-0.5rem);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dh-duration-base) var(--dh-ease-standard),
                transform var(--dh-duration-base) var(--dh-ease-standard),
                visibility var(--dh-duration-base);
  }
  .nav__list[data-open='true'] { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav__list > li { border-bottom: var(--dh-border-default); }
  .nav__link { display: block; padding: var(--dh-space-4) 0; font-size: var(--dh-font-size-body-lg); }
  .nav__link::after { display: none; }
  .nav .btn { margin-top: var(--dh-space-6); justify-content: center; }
}

/* ---------- Botones ----------------------------------------------------- */
/* Radio 8px, alto mínimo 44px, sin píldoras.
   Regla dura del manual: nunca fondo dorado con texto blanco. */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--dh-space-3);
  min-height: var(--dh-control-height);
  padding: var(--dh-space-3) var(--dh-space-6);
  border: var(--dh-border-width) solid transparent;
  border-radius: var(--dh-radius-sm);
  font-size: var(--dh-font-size-small);
  font-weight: var(--dh-font-weight-semibold);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dh-duration-base) var(--dh-ease-standard),
              border-color var(--dh-duration-base) var(--dh-ease-standard),
              color var(--dh-duration-base) var(--dh-ease-standard);
}

.btn--primary { background: var(--dh-color-primary-900); color: var(--dh-color-surface); }
.btn--primary:hover { background: var(--dh-color-primary-950); color: var(--dh-color-surface); }

.btn--secondary {
  background: transparent;
  color: var(--dh-color-primary-900);
  border-color: var(--dh-color-primary-900);
}
.btn--secondary:hover { background: var(--dh-seq-1); color: var(--dh-color-primary-900); }

.btn--ghost { background: transparent; color: var(--dh-color-primary-900); padding-inline: var(--dh-space-2); }
.btn--ghost:hover { color: var(--dh-color-primary-950); text-decoration: underline; }

/* Botón sobre fondo azul profundo. Fondo dorado con texto azul (5.07:1),
   que es la única combinación dorada que el manual autoriza. */
.btn--on-deep { background: var(--dh-color-gold-500); color: var(--dh-color-primary-900); }
.btn--on-deep:hover { background: var(--dh-color-surface); color: var(--dh-color-primary-900); }

/* Contorno claro sobre fondo azul profundo. */
.btn--outline-light {
  background: transparent;
  color: var(--dh-color-sky-100);
  border-color: var(--dh-color-sky-100);
}
.btn--outline-light:hover { background: var(--dh-color-surface); color: var(--dh-color-primary-900); border-color: var(--dh-color-surface); }

.btn--lg { min-height: var(--dh-control-height-lg); padding-inline: var(--dh-space-8); font-size: var(--dh-font-size-body); }
.btn--block { width: 100%; }

.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.55; cursor: not-allowed; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--dh-space-4); align-items: center; }

/* ---------- Hero -------------------------------------------------------- */

.hero {
  position: relative;
  background: var(--dh-color-primary-900);
  color: var(--dh-color-sky-100);
  overflow: hidden;
  padding-block: clamp(var(--dh-space-16), 2rem + 7vw, calc(var(--dh-space-24) + var(--dh-space-8)));
}

/* Velo decorativo, muy contenido: el manual limita el dorado a un 5-8% de
   superficie y prohíbe grandes áreas doradas. */
.hero__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60rem 30rem at 78% 12%, rgba(199, 154, 59, 0.13), transparent 62%),
    radial-gradient(46rem 26rem at 6% 90%, rgba(220, 234, 242, 0.10), transparent 60%);
  pointer-events: none;
}

.hero__inner { position: relative; }
.hero h1 { color: var(--dh-color-surface); max-width: 18ch; }
.hero .lead { color: var(--dh-color-sky-100); margin-top: var(--dh-space-6); max-width: 54ch; }
.hero .btn-row { margin-top: var(--dh-space-12); }
.hero .eyebrow { color: var(--dh-accent-on-dark); }
.hero .eyebrow::before { background: var(--dh-accent-on-dark); }

.hero__note {
  margin-top: var(--dh-space-8);
  font-size: var(--dh-font-size-caption);
  line-height: var(--dh-line-height-caption);
  color: var(--dh-color-sky-100);
  max-width: 48ch;
}

.page-hero {
  background: var(--dh-color-beige-100);
  border-bottom: var(--dh-border-default);
  padding-block: clamp(var(--dh-space-12), 2rem + 3.5vw, var(--dh-space-16));
}
.page-hero h1 { max-width: 22ch; }
.page-hero .lead { margin-top: var(--dh-space-4); }

/* ---------- Tarjetas ---------------------------------------------------- */

.card {
  background: var(--dh-color-surface);
  border: var(--dh-border-default);
  border-radius: var(--dh-radius-md);
  padding: var(--dh-space-8);
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--dh-space-3);
  transition: border-color var(--dh-duration-base) var(--dh-ease-standard),
              box-shadow var(--dh-duration-base) var(--dh-ease-standard);
}
.card h3, .card h4 { color: var(--dh-color-primary-900); }
.card p { color: var(--dh-color-text-secondary); font-size: var(--dh-font-size-small); max-width: none; }

/* Hover contenido: el manual pide elevación mínima, no transformaciones. */
.card:hover { border-color: var(--dh-color-disabled); box-shadow: var(--dh-shadow-1); }

.card--bordered-top { border-top: 3px solid var(--dh-accent-on-light); }
.card--flat { background: transparent; border: none; padding: 0; }
.card--flat:hover { box-shadow: none; border-color: transparent; }

/* Tarjeta sobre fondo azul profundo.
   El velo es OSCURO, no claro, y no es una decisión estética: un velo blanco
   aclara el fondo y hunde el contraste del título dorado a 4.24:1 (bajo AA).
   Oscureciendo un 15% el fondo efectivo queda en rgb(20,42,65) y el oro sube
   a 5.62:1. Además la tarjeta lee como panel hundido, que es lo correcto aquí. */
.card--on-deep {
  background: rgba(0, 0, 0, 0.15);
  border-color: rgba(255, 255, 255, 0.16);
}
.card--on-deep:hover { border-color: rgba(255, 255, 255, 0.3); box-shadow: none; }
.card--on-deep h3, .card--on-deep h4 { color: var(--dh-accent-on-dark); }
.card--on-deep p { color: var(--dh-color-sky-100); }

.card__num {
  font-family: var(--dh-font-display);
  font-size: var(--dh-font-size-h4);
  font-weight: var(--dh-font-weight-bold);
  color: var(--dh-accent-on-light);
  line-height: 1;
}

/* ---------- Cifras ------------------------------------------------------ */

.figures {
  display: grid;
  gap: var(--dh-space-6);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

.figure {
  padding: var(--dh-space-4) 0 var(--dh-space-4) var(--dh-space-6);
  border-left: 3px solid var(--dh-accent-on-light);
}
.figure__value {
  display: block;
  font-family: var(--dh-font-display);
  font-size: var(--dh-font-size-h2);
  font-weight: var(--dh-font-weight-bold);
  line-height: 1.05;
  letter-spacing: var(--dh-letter-spacing-h2);
  color: var(--dh-color-primary-900);
  font-variant-numeric: tabular-nums;
}
.figure__vs {
  font-size: 0.5em;
  font-weight: var(--dh-font-weight-regular);
  color: var(--dh-color-text-secondary);
}
.figure__label {
  display: block;
  margin-top: var(--dh-space-3);
  font-size: var(--dh-font-size-small);
  line-height: var(--dh-line-height-small);
  color: var(--dh-color-text-secondary);
}
.section--deep .figure { border-left-color: var(--dh-accent-on-dark); }
.section--deep .figure__value { color: var(--dh-accent-on-dark); }
.section--deep .figure__label { color: var(--dh-color-sky-100); }
.section--deep .figure__vs { color: var(--dh-color-sky-100); }

/* ---------- Secuencia de pasos ------------------------------------------ */

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--dh-space-6); }
@media (min-width: 52rem) {
  .steps--row { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
}

.step { position: relative; padding-top: var(--dh-space-6); border-top: 2px solid var(--dh-color-border); }
.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--dh-space-8); height: var(--dh-space-8);
  margin-bottom: var(--dh-space-3);
  border-radius: var(--dh-radius-round);
  background: var(--dh-color-primary-900);
  color: var(--dh-color-surface);
  font-size: var(--dh-font-size-caption);
  font-weight: var(--dh-font-weight-bold);
  font-variant-numeric: tabular-nums;
}
.step h3, .step h4 { margin-bottom: var(--dh-space-2); }
.step p { font-size: var(--dh-font-size-small); color: var(--dh-color-text-secondary); max-width: none; }
.section--deep .step { border-top-color: rgba(255, 255, 255, 0.22); }
.section--deep .step__num { background: var(--dh-accent-on-dark); color: var(--dh-color-primary-900); }
.section--deep .step p { color: var(--dh-color-sky-100); }

/* ---------- Listas con marca ------------------------------------------- */

.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--dh-space-3); }
.ticks li {
  position: relative;
  padding-left: var(--dh-space-8);
  font-size: var(--dh-font-size-small);
  line-height: var(--dh-line-height-small);
}
.ticks li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.45em;
  width: 0.65rem; height: 0.65rem;
  border-radius: var(--dh-radius-round);
  border: 2px solid var(--dh-accent-on-light);
}
.ticks--dense li { font-size: var(--dh-font-size-caption); line-height: var(--dh-line-height-caption); }
.section--deep .ticks li::before { border-color: var(--dh-accent-on-dark); }

.crosses { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--dh-space-3); }
.crosses li {
  position: relative;
  padding-left: var(--dh-space-8);
  font-size: var(--dh-font-size-small);
  line-height: var(--dh-line-height-small);
  color: var(--dh-color-text-secondary);
}
.crosses li::before {
  content: '';
  position: absolute;
  left: 0.15rem; top: 0.7em;
  width: 0.7rem; height: 2px;
  background: var(--dh-color-disabled);
}

/* ---------- Caja destacada --------------------------------------------- */
/* Formato del manual para la caja de recomendación del reporte:
   fondo beige, borde izquierdo 4px azul. */

.callout {
  border-left: 4px solid var(--dh-color-primary-900);
  background: var(--dh-color-beige-050);
  padding: var(--dh-space-6) var(--dh-space-8);
  border-radius: 0 var(--dh-radius-sm) var(--dh-radius-sm) 0;
}
.callout p { max-width: none; }
.callout--quiet { background: var(--dh-seq-1); border-left-color: var(--dh-color-info); }
.section--sand .callout { background: var(--dh-color-surface); }
.section--deep .callout {
  background: rgba(255, 255, 255, 0.06);
  border-left-color: var(--dh-accent-on-dark);
}

.pull {
  font-family: var(--dh-font-display);
  font-size: var(--dh-font-size-h3);
  line-height: var(--dh-line-height-h3);
  letter-spacing: var(--dh-letter-spacing-h3);
  color: var(--dh-color-primary-900);
  max-width: 32ch;
}
.section--deep .pull { color: var(--dh-color-surface); }

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

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--dh-font-size-small);
  min-width: 34rem;
}
.table caption {
  text-align: left;
  font-size: var(--dh-font-size-caption);
  color: var(--dh-color-text-secondary);
  padding-bottom: var(--dh-space-3);
}
.table th, .table td {
  text-align: left;
  padding: var(--dh-space-3) var(--dh-space-4);
  border-bottom: var(--dh-border-default);
  vertical-align: top;
}
.table thead th {
  font-weight: var(--dh-font-weight-semibold);
  color: var(--dh-color-primary-900);
  border-bottom-width: 2px;
  white-space: nowrap;
}
.table td:not(:first-child) { font-variant-numeric: tabular-nums; text-align: right; }

/* ---------- Cronograma -------------------------------------------------- */

.gantt {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--dh-font-size-caption);
  min-width: 44rem;
}
.gantt th, .gantt td { padding: var(--dh-space-2); border-bottom: var(--dh-border-default); }
.gantt thead th { color: var(--dh-color-primary-900); font-weight: var(--dh-font-weight-semibold); text-align: center; }
.gantt thead th:first-child { text-align: left; min-width: 15rem; }
.gantt tbody th {
  text-align: left;
  font-weight: var(--dh-font-weight-regular);
  color: var(--dh-color-text);
  white-space: normal;
}
.gantt td { text-align: center; }
.gantt .on {
  background: var(--dh-color-primary-900);
  border-radius: var(--dh-radius-xs);
  height: 0.7rem;
  display: block;
}
/* Los hitos usan dorado como jerarquía. El significado no descansa solo en el
   color: la fila lleva su etiqueta al costado. */
.gantt .on--accent { background: var(--dh-color-gold-500); }
.gantt__month { background: var(--dh-color-beige-100); font-weight: var(--dh-font-weight-semibold); }

/* ---------- Perfiles ---------------------------------------------------- */

.profile { display: grid; gap: var(--dh-space-6); align-items: start; }
@media (min-width: 46rem) { .profile { grid-template-columns: 12rem 1fr; gap: var(--dh-space-12); } }

.profile__photo {
  aspect-ratio: 1;
  border-radius: var(--dh-radius-md);
  background: var(--dh-color-sky-100);
  border: var(--dh-border-default);
  display: grid;
  place-items: center;
  font-family: var(--dh-font-display);
  font-size: var(--dh-font-size-h2);
  font-weight: var(--dh-font-weight-semibold);
  color: var(--dh-color-primary-900);
  overflow: hidden;
}
.profile__photo img { width: 100%; height: 100%; object-fit: cover; }

.profile__role {
  color: var(--dh-color-text-secondary);
  font-weight: var(--dh-font-weight-semibold);
  font-size: var(--dh-font-size-small);
}

.creds { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--dh-space-2); }
.creds li {
  font-size: var(--dh-font-size-caption);
  padding: var(--dh-space-1) var(--dh-space-3);
  border: var(--dh-border-default);
  border-radius: var(--dh-radius-xs);
  background: var(--dh-color-surface);
  color: var(--dh-color-text-secondary);
}

/* ---------- Preguntas frecuentes ---------------------------------------- */

.faq { display: grid; gap: var(--dh-space-3); }

.faq details {
  border: var(--dh-border-default);
  border-radius: var(--dh-radius-sm);
  background: var(--dh-color-surface);
  overflow: hidden;
}
.faq details[open] { border-color: var(--dh-color-info); }

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--dh-space-4);
  padding: var(--dh-space-4) var(--dh-space-6);
  font-weight: var(--dh-font-weight-semibold);
  font-size: var(--dh-font-size-small);
  color: var(--dh-color-primary-900);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '';
  flex-shrink: 0;
  width: 0.6rem; height: 0.6rem;
  border-right: 2px solid var(--dh-color-primary-900);
  border-bottom: 2px solid var(--dh-color-primary-900);
  transform: rotate(45deg) translate(-0.1rem, -0.1rem);
  transition: transform var(--dh-duration-base) var(--dh-ease-standard);
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-0.15rem, -0.15rem); }
.faq details > div { padding: 0 var(--dh-space-6) var(--dh-space-6); }
.faq details p { font-size: var(--dh-font-size-small); color: var(--dh-color-text-secondary); }

/* ---------- Formulario -------------------------------------------------- */

.form { display: grid; gap: var(--dh-space-6); max-width: var(--dh-width-form); }
.field { display: grid; gap: var(--dh-space-2); }

/* El manual exige labels siempre visibles: nunca depender del placeholder. */
.field label {
  font-size: var(--dh-font-size-small);
  font-weight: var(--dh-font-weight-semibold);
  color: var(--dh-color-primary-900);
}

.field__hint { font-size: var(--dh-font-size-caption); line-height: var(--dh-line-height-caption); color: var(--dh-color-text-secondary); }
.field .req { color: var(--dh-color-error); }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: var(--dh-control-height);
  padding: var(--dh-space-3) var(--dh-space-4);
  background: var(--dh-color-surface);
  border: var(--dh-border-default);
  border-radius: var(--dh-radius-xs);
  font-size: var(--dh-font-size-body);
  transition: border-color var(--dh-duration-fast) var(--dh-ease-standard),
              box-shadow var(--dh-duration-fast) var(--dh-ease-standard);
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--dh-color-disabled); }

.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border: var(--dh-border-focus);
  box-shadow: var(--dh-focus-ring);
}

.field[data-invalid='true'] input,
.field[data-invalid='true'] select,
.field[data-invalid='true'] textarea { border-color: var(--dh-color-error); }

/* El error se marca con texto además de color: nunca solo por color. */
.field__error {
  font-size: var(--dh-font-size-caption);
  line-height: var(--dh-line-height-caption);
  color: var(--dh-color-error);
  font-weight: var(--dh-font-weight-semibold);
}
.field__error:empty { display: none; }
.field__error::before { content: '⚠ '; }
/* En .field--check el error debe ocupar las dos columnas de la grilla. */
.field__error--full { grid-column: 1 / -1; }

.field--check { grid-template-columns: auto 1fr; align-items: start; gap: var(--dh-space-3); }
.field--check input { width: 1.15rem; height: 1.15rem; min-height: 0; margin-top: 0.2rem; accent-color: var(--dh-color-primary-900); }
.field--check label { font-weight: var(--dh-font-weight-regular); color: var(--dh-color-text); font-size: var(--dh-font-size-small); }

.form-grid { display: grid; gap: var(--dh-space-6); }
@media (min-width: 40rem) { .form-grid--2 { grid-template-columns: 1fr 1fr; } }

/* Campo trampa: invisible para personas, tentador para bots. */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-status {
  padding: var(--dh-space-4) var(--dh-space-6);
  border-radius: var(--dh-radius-sm);
  font-size: var(--dh-font-size-small);
  border: var(--dh-border-width) solid transparent;
}
.form-status:empty { display: none; }
.form-status[data-state='ok'] {
  background: color-mix(in srgb, var(--dh-color-success) 10%, var(--dh-color-surface));
  border-color: var(--dh-color-success);
  color: var(--dh-color-text);
}
.form-status[data-state='error'] {
  background: color-mix(in srgb, var(--dh-color-error) 8%, var(--dh-color-surface));
  border-color: var(--dh-color-error);
  color: var(--dh-color-text);
}

/* ---------- Cierre ------------------------------------------------------ */

.cta-band { background: var(--dh-color-primary-950); color: var(--dh-color-sky-100); }
.cta-band h2 { color: var(--dh-color-surface); max-width: 20ch; }
.cta-band p, .cta-band .lead { color: var(--dh-color-sky-100); }
.cta-band .eyebrow { color: var(--dh-accent-on-dark); }
.cta-band .eyebrow::before { background: var(--dh-accent-on-dark); }

/* ---------- Footer ------------------------------------------------------ */

.site-footer {
  background: var(--dh-color-primary-950);
  color: var(--dh-color-sky-100);
  padding-block: var(--dh-space-16) var(--dh-space-8);
  font-size: var(--dh-font-size-small);
}
.site-footer .brand { color: var(--dh-color-surface); }
.site-footer .brand__tag { color: var(--dh-color-sky-100); }

.site-footer__grid {
  display: grid;
  gap: var(--dh-space-8);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  padding-bottom: var(--dh-space-8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.site-footer h2 {
  font-family: var(--dh-font-body);
  font-size: var(--dh-font-size-caption);
  text-transform: uppercase;
  letter-spacing: var(--dh-letter-spacing-label);
  font-weight: var(--dh-font-weight-semibold);
  color: var(--dh-accent-on-dark);
  margin-bottom: var(--dh-space-4);
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--dh-space-3); }
.site-footer a { color: var(--dh-color-sky-100); text-decoration: none; }
.site-footer a:hover { color: var(--dh-color-surface); text-decoration: underline; }
.site-footer p { color: var(--dh-color-sky-100); max-width: 34ch; }

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  gap: var(--dh-space-4);
  justify-content: space-between;
  align-items: center;
  padding-top: var(--dh-space-6);
  font-size: var(--dh-font-size-caption);
  color: var(--dh-color-sky-100);
}
.site-footer__base--bare { border-top: none; padding-top: 0; }

/* ---------- Utilidades -------------------------------------------------- */

.mt-0 { margin-top: 0; }
.mt-3 { margin-top: var(--dh-space-3); }
.mt-4 { margin-top: var(--dh-space-4); }
.mt-5 { margin-top: var(--dh-space-6); }
.mt-6 { margin-top: var(--dh-space-8); }
.mt-7 { margin-top: var(--dh-space-12); }
.measure-narrow { max-width: var(--dh-measure-narrow); }
.text-center { text-align: center; }
.center-block { margin-inline: auto; }

/* Aparición al entrar en viewport.
   El estado oculto SOLO existe si main.js pudo activar la clase en <html>.
   Es deliberado: si el JS no carga o revienta, el contenido se ve igual. */
.dh-reveal-on [data-reveal] {
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 420ms var(--dh-ease-standard),
              transform 420ms var(--dh-ease-standard);
}
.dh-reveal-on [data-reveal='in'] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .dh-reveal-on [data-reveal] { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .nav, .btn { display: none !important; }
  body { color: #000; background: #fff; }
  .section { padding-block: var(--dh-space-4); }
}
