/* ==========================================================================
   Estudio Folio · styles.css
   Mobile-first. Sin frameworks. Variables en :root.
   ========================================================================== */

:root {
  /* Paleta */
  --paper: #FAF8F5;        /* fondo principal */
  --paper-2: #F2EDE5;      /* bandas alternas */
  --desk: #E7E0D4;         /* fondo de maquetas */
  --sheet: #FFFDF9;        /* hojas y tarjetas */
  --ink: #161B26;          /* texto principal */
  --ink-2: #4A5163;        /* texto secundario */
  --navy: #1D3557;         /* primario */
  --navy-deep: #142640;
  --terra: #B85D3B;        /* acento (trazos, íconos, marcas) */
  --terra-ink: #9E4A2C;    /* acento para texto pequeño (contraste AA) */
  --terra-soft: #E9A88C;   /* acento sobre azul marino */
  --error: #A12C2C;
  --wa: #1DA851;

  --rule: rgba(22, 27, 38, 0.14);
  --rule-soft: rgba(22, 27, 38, 0.08);

  /* Tipografía */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --container: 1160px;
  --gutter: clamp(18px, 5vw, 40px);
  --header-h: 64px;
  --section-y: clamp(72px, 10vw, 128px);

  /* Radios con jerarquía: papel < controles < paneles */
  --r-paper: 3px;
  --r-ctrl: 6px;
  --r-panel: 12px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-optical-sizing: auto;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2rem, 1.45rem + 2.4vw, 3rem);
  line-height: 1.08;
}

h3 {
  font-size: 1.3125rem;
  line-height: 1.25;
  font-weight: 600;
}

p { text-wrap: pretty; }

@media (min-width: 960px) {
  body { font-size: 1.0625rem; }
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

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

.skip-link {
  position: absolute;
  left: 12px; top: -64px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--navy);
  color: var(--paper);
  border-radius: var(--r-ctrl);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 48px;
  padding: 0.75em 1.35em;
  border: 1px solid transparent;
  border-radius: var(--r-ctrl);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn--primary { background: var(--navy); color: var(--paper); }
.btn--primary:hover { background: var(--navy-deep); }
.btn--ghost { background: transparent; color: var(--ink); border-color: rgba(22, 27, 38, 0.32); }
.btn--ghost:hover { border-color: var(--ink); background: rgba(29, 53, 87, 0.04); }
.btn--sm { min-height: 40px; padding: 0.5em 1em; font-size: 0.9375rem; }
.btn--lg { min-height: 54px; padding: 0.85em 1.6em; font-size: 1.0313rem; }
.icon-wa { width: 20px; height: 20px; flex: none; }

/* ---------- Header / navegación ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: rgba(250, 248, 245, 0.92);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }

.nav {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}
.brand__mark { width: 19px; height: 27px; flex: none; }
.brand__name {
  font-family: var(--serif);
  font-size: 1.3125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav__toggle {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-right: -10px;
  border: 0;
  background: transparent;
  border-radius: var(--r-ctrl);
  cursor: pointer;
}
.nav__toggle svg { width: 24px; height: 24px; stroke: var(--ink); stroke-width: 1.6; fill: none; }
.nav__toggle path { transition: transform 0.25s var(--ease); transform-origin: 12px 12px; }
.nav__toggle[aria-expanded="true"] .l1 { transform: translateY(4px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .l2 { transform: translateY(-4px) rotate(-45deg); }

.nav__menu {
  position: absolute;
  top: var(--header-h);
  left: 0; right: 0;
  display: none;
  padding: 4px var(--gutter) 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 18px 30px -24px rgba(22, 27, 38, 0.35);
}
.nav__menu.is-open { display: block; }
.nav__links a {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 1.125rem;
  font-weight: 500;
  text-decoration: none;
}

@media (max-width: 379px) {
  .hide-xs { display: none; }
  .brand__name { font-size: 1.1875rem; }
}

@media (min-width: 900px) {
  .nav { gap: 28px; }
  .nav__toggle { display: none; }
  .nav__menu {
    position: static;
    display: block;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .nav__links { display: flex; gap: 28px; }
  .nav__links a {
    padding: 6px 0;
    border: 0;
    font-size: 0.9375rem;
    color: var(--ink-2);
    background: linear-gradient(var(--terra), var(--terra)) 0 100% / 0 1.5px no-repeat;
    transition: color 0.2s, background-size 0.25s var(--ease);
  }
  .nav__links a:hover,
  .nav__links a[aria-current="true"] { color: var(--ink); background-size: 100% 1.5px; }
}

/* ---------- Hero ---------- */
.hero {
  padding-top: calc(var(--header-h) + clamp(28px, 6vw, 72px));
  padding-bottom: clamp(48px, 7vw, 88px);
}

.hero__grid {
  display: grid;
  gap: clamp(48px, 7vw, 64px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.55rem, 1.4rem + 4.9vw, 4.5rem);
  line-height: 1.03;
  letter-spacing: -0.022em;
  max-width: 14ch;
}

.hero__lead {
  margin-top: 22px;
  max-width: 34rem;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-2);
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
}

@media (min-width: 520px) {
  .hero__actions { flex-direction: row; flex-wrap: wrap; }
}

@media (min-width: 960px) {
  .hero__grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); }
}

/* Franja de confianza */
.trust {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  margin-top: clamp(48px, 7vw, 80px);
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}
.trust li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.35;
}
.trust svg { width: 18px; height: 18px; flex: none; color: var(--terra); margin-top: 0.5px; }

@media (min-width: 900px) {
  .trust { grid-template-columns: repeat(4, auto); justify-content: space-between; }
  .trust li { align-items: center; }
}

/* ---------- Manuscrito (pieza principal del hero) ---------- */
.manuscript {
  width: 100%;
  max-width: 540px;
  margin-inline: auto;
}
@media (min-width: 960px) { .manuscript { margin-right: 0; } }

.manuscript__stack { position: relative; padding: 0 12px 12px 0; }

.sheet { border-radius: var(--r-paper); }
.sheet--under {
  position: absolute;
  inset: 12px 0 0 12px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
}
.sheet--page {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 29%;
  background: var(--sheet);
  border: 1px solid rgba(22, 27, 38, 0.1);
  box-shadow: 0 1px 0 rgba(22, 27, 38, 0.03), 0 28px 50px -30px rgba(29, 53, 87, 0.4);
}

.sheet__text {
  padding: clamp(18px, 4vw, 34px) clamp(14px, 3vw, 26px) clamp(16px, 3vw, 24px) clamp(18px, 4vw, 34px);
  border-right: 1px solid rgba(184, 93, 59, 0.4); /* línea de margen */
}

.sheet__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: clamp(14px, 3vw, 22px);
  border-bottom: 1px solid var(--rule);
  font-size: clamp(0.625rem, 0.58rem + 0.2vw, 0.75rem);
  color: var(--ink-2);
  white-space: nowrap;
}
.sheet__status { font-weight: 600; }
.st { display: none; }
.manuscript[data-state="draft"] .st--draft,
.manuscript[data-state="marked"] .st--marked { display: inline; color: var(--terra-ink); }
.manuscript[data-state="final"] .st--final,
html:not(.js) .st--final { display: inline; color: var(--navy); }
html:not(.js) .st--draft { display: none; }

.sheet__h {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(0.95rem, 0.85rem + 0.5vw, 1.2rem);
  margin-bottom: 4px;
}

.sheet__p {
  font-family: var(--serif);
  font-size: clamp(0.8125rem, 0.74rem + 0.38vw, 1rem);
  line-height: 2.15; /* doble espacio, como un borrador académico */
  transition: opacity 0.18s;
}
.sheet__p.is-applying { opacity: 0.12; }

.sheet__lines { margin-top: 10px; display: grid; gap: clamp(12px, 2.4vw, 18px); }
.sheet__lines span { height: 6px; border-radius: 2px; background: #ECE6DC; }
.sheet__lines span:nth-child(2) { width: 94%; }
.sheet__lines span:nth-child(3) { width: 97%; }
.sheet__lines span:nth-child(4) { width: 58%; }

.sheet__folio {
  margin-top: clamp(16px, 3vw, 26px);
  text-align: center;
  font-family: var(--serif);
  font-size: 0.8125rem;
  color: var(--ink-2);
}

/* Marcas de corrección */
.fx { position: relative; white-space: nowrap; }
.fx del { position: relative; text-decoration: none; }
.fx del::after {
  content: "";
  position: absolute;
  left: -2px; right: -2px; top: 54%;
  height: 1.5px;
  background: var(--terra);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s var(--ease);
}
.fx ins {
  position: absolute;
  left: -0.1em;
  bottom: 106%;
  translate: var(--shift, 0px) 0;
  font-size: 0.84em;
  font-style: italic;
  line-height: 1;
  color: var(--terra-ink);
  text-decoration: none;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.35s, transform 0.35s var(--ease);
  pointer-events: none;
}
.caret {
  position: absolute;
  left: -4px;
  bottom: -0.1em;
  width: 8px; height: 8px;
  opacity: 0;
  transition: opacity 0.3s;
}
.caret::before {
  content: "";
  position: absolute;
  inset: 2px 0 0;
  border-left: 1.5px solid var(--terra);
  border-top: 1.5px solid var(--terra);
  transform: rotate(45deg);
}

/* Estado: con correcciones (escalonado) */
.manuscript[data-state="marked"] .fx del::after { transform: scaleX(1); }
.manuscript[data-state="marked"] .fx ins { opacity: 1; transform: none; }
.manuscript[data-state="marked"] .caret { opacity: 1; }
.manuscript[data-state="marked"] .fx[data-note="2"] *,
.manuscript[data-state="marked"] .fx[data-note="2"] del::after { transition-delay: 0.55s; }
.manuscript[data-state="marked"] .fx[data-note="3"] *,
.manuscript[data-state="marked"] .fx[data-note="3"] del::after { transition-delay: 1.1s; }

/* Estado: versión final (también sin JS) */
.manuscript[data-state="final"] .fx del,
html:not(.js) .fx del { display: none; }
.manuscript[data-state="final"] .fx ins,
html:not(.js) .fx ins {
  position: static;
  translate: none;
  font-size: inherit;
  font-style: normal;
  line-height: inherit;
  color: inherit;
  opacity: 1;
  transform: none;
  background: linear-gradient(rgba(184, 93, 59, 0.2), rgba(184, 93, 59, 0.2)) 0 86% / 100% 0.32em no-repeat;
}
.manuscript[data-state="final"] .caret,
html:not(.js) .caret { display: none; }

/* Notas al margen */
.sheet__notes {
  position: relative;
  padding: clamp(60px, 11vw, 86px) clamp(8px, 1.6vw, 14px) 16px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(0.6875rem, 0.62rem + 0.3vw, 0.875rem);
  line-height: 1.25;
  color: var(--terra-ink);
}
.sheet__notes li { margin-bottom: 18px; }
.js .sheet__notes li {
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.4s, transform 0.4s var(--ease), top 0.35s var(--ease);
}
.sheet__notes.is-aligned li {
  position: absolute;
  left: clamp(8px, 1.6vw, 14px);
  right: clamp(6px, 1.2vw, 12px);
  margin: 0;
}
.manuscript[data-state="marked"] .sheet__notes li,
.manuscript[data-state="final"] .sheet__notes li { opacity: 1; transform: none; }
.manuscript[data-state="marked"] .sheet__notes li:nth-child(2) { transition-delay: 0.55s; }
.manuscript[data-state="marked"] .sheet__notes li:nth-child(3) { transition-delay: 1.1s; }
.manuscript[data-state="final"] .sheet__notes li,
html:not(.js) .sheet__notes li { color: var(--navy); padding-left: 13px; }
.manuscript[data-state="final"] .sheet__notes li::before,
html:not(.js) .sheet__notes li::before {
  content: "";
  position: absolute;
  left: 1px; top: 0.25em;
  width: 4px; height: 8px;
  border-right: 1.5px solid var(--terra);
  border-bottom: 1.5px solid var(--terra);
  transform: rotate(40deg);
}
.sheet__notes li { position: relative; }
.sheet__notes.is-aligned li { position: absolute; }

/* Barra bajo la hoja */
.manuscript__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-top: 18px;
}
.manuscript__bar figcaption {
  flex: 1 1 220px;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--ink-2);
}
.toggle {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--sheet);
}
.toggle button {
  min-height: 40px;
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.toggle button:hover { color: var(--ink); }
.toggle button[aria-pressed="true"] { background: var(--navy); color: var(--paper); }
html:not(.js) .toggle { display: none; }

/* ---------- Secciones ---------- */
.section { padding-block: var(--section-y); }
.section--tight-top { padding-top: calc(var(--section-y) * 0.45); }
.section--desk { background: var(--paper-2); }

.section-head { max-width: 40rem; margin-bottom: clamp(36px, 6vw, 60px); }
.section-head p {
  margin-top: 16px;
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  color: var(--ink-2);
}
.section-head a { color: var(--navy); font-weight: 600; text-underline-offset: 3px; }

/* ---------- Servicios: hojas con esquina doblada ---------- */
.services { display: grid; gap: 18px; }
@media (min-width: 720px) { .services { grid-template-columns: 1fr 1fr; gap: 24px; } }

.service {
  --fold: 30px;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px clamp(22px, 3vw, 34px) 28px;
  background: var(--sheet);
  border: 1px solid rgba(22, 27, 38, 0.12);
  border-radius: var(--r-paper);
  clip-path: polygon(0 0, calc(100% - var(--fold)) 0, 100% var(--fold), 100% 100%, 0 100%);
}
.service::after {
  content: "";
  position: absolute;
  top: -1px; right: -1px;
  width: var(--fold); height: var(--fold);
  background: linear-gradient(to left bottom, transparent 50%, #E8E1D5 50%);
  border-left: 1px solid rgba(22, 27, 38, 0.1);
  border-bottom: 1px solid rgba(22, 27, 38, 0.1);
  border-bottom-left-radius: 3px;
}

.service__icon {
  width: 44px; height: 44px;
  margin-bottom: 22px;
  fill: none;
  stroke: var(--navy);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.service__icon .accent { stroke: var(--terra); }
.service h3 { font-size: clamp(1.3125rem, 1.2rem + 0.4vw, 1.5rem); margin-bottom: 10px; }
.service > p { color: var(--ink-2); }

.service__list {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
}
.service__list li { position: relative; padding-left: 20px; }
.service__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.78em;
  width: 10px; height: 1.5px;
  background: var(--terra);
}

.service__link,
.level__cta {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 22px;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--navy);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: text-decoration-color 0.2s, color 0.2s;
}
.service__link:hover,
.level__cta:hover { color: var(--terra-ink); }

/* ---------- Niveles: tabla con estilo APA 7 ---------- */
.apa-label {
  margin-bottom: 14px;
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.45;
}
.apa-label strong { display: block; font-weight: 700; }
.apa-label em { display: block; }

.levels__grid {
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.level {
  display: flex;
  flex-direction: column;
  padding: 0 clamp(16px, 3vw, 30px) 26px;
}
.level + .level { border-top: 1px solid var(--ink); }
.level--pos { background: var(--paper-2); }

.level__head { padding: 22px 0 16px; border-bottom: 1px solid var(--ink); }
.level__head h3 { font-size: clamp(1.375rem, 1.25rem + 0.5vw, 1.625rem); font-weight: 500; }
.level__head p { margin-top: 4px; font-size: 0.9375rem; color: var(--ink-2); }

.level__rows > div { padding: 14px 0; border-bottom: 1px solid var(--rule-soft); }
.level__rows > div:last-child { border-bottom: 0; }
.level dt {
  margin-bottom: 3px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--terra-ink);
}
.level dd { line-height: 1.5; }

.apa-note { margin-top: 14px; font-size: 0.9375rem; color: var(--ink-2); max-width: 60rem; }
.apa-note em { font-style: italic; color: var(--ink); }
.apa-note a { color: var(--navy); font-weight: 600; text-underline-offset: 3px; }

@media (min-width: 860px) {
  .levels__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(6, auto);
  }
  .level {
    grid-row: 1 / -1;
    display: grid;
    grid-template-rows: subgrid;
    padding-bottom: 30px;
  }
  .level + .level { border-top: 0; }
  .level__rows { grid-row: 2 / 6; display: grid; grid-template-rows: subgrid; }
  .level__cta { align-self: end; justify-self: start; }
}

/* ---------- Muestras ---------- */
.samples { display: grid; gap: 44px; }
@media (min-width: 680px) and (max-width: 979px) {
  .samples { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
}
@media (min-width: 980px) { .samples { grid-template-columns: repeat(3, 1fr); gap: 28px; } }

.sample__stage {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  padding: 9%;
  background: var(--desk);
  border-radius: var(--r-ctrl);
  overflow: hidden;
}
.sample figcaption h3 { margin-top: 20px; font-size: 1.25rem; }
.sample figcaption p { margin-top: 6px; font-size: 0.9375rem; color: var(--ink-2); }

/* Muestra 1: portada APA + índice */
.mock-report { position: relative; width: 70%; aspect-ratio: 1 / 1.414; translate: -16% 2%; }
.page {
  position: absolute;
  inset: 0;
  background: var(--sheet);
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(22, 27, 38, 0.05), 0 16px 30px -18px rgba(22, 27, 38, 0.35);
  container-type: inline-size;
}
.page--index { transform: translate(40%, -5%) rotate(4deg); background: #FBF8F2; }
.page__in { position: absolute; inset: 0; padding: 10cqi 11cqi; font-family: var(--serif); color: var(--ink); }
.pg-num { position: absolute; top: 5.5cqi; right: 7cqi; font-size: 3.6cqi; }
.cv-title {
  margin-top: 26cqi;
  text-align: center;
  font-size: 6.1cqi;
  font-weight: 700;
  line-height: 1.32;
}
.cv-meta { margin-top: 12cqi; text-align: center; font-size: 4.1cqi; line-height: 2.05; }
.idx-title { text-align: center; font-weight: 700; font-size: 5cqi; margin-bottom: 6cqi; }
.idx { font-size: 3.9cqi; line-height: 2.2; }
.idx li { display: flex; align-items: baseline; gap: 1.5cqi; }
.idx i { flex: 1; border-bottom: 0.5cqi dotted rgba(22, 27, 38, 0.45); transform: translateY(-0.8cqi); }

/* Muestra 2: lámina ejecutiva (las unidades cqi se miden sobre .mock-deck) */
.mock-deck { width: 100%; container-type: inline-size; }
.slide {
  aspect-ratio: 16 / 9;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  padding: 6cqi 7cqi 4.5cqi;
  background: var(--navy);
  color: #fff;
  border-radius: 3px;
  box-shadow: 0 18px 34px -20px rgba(22, 27, 38, 0.55);
}
.slide__kicker { font-size: 2.7cqi; font-weight: 600; color: var(--terra-soft); }
.slide__title {
  margin-top: 1.6cqi;
  max-width: 60%;
  font-family: var(--serif);
  font-size: 5.4cqi;
  line-height: 1.08;
  font-weight: 500;
}
.slide__body { display: grid; grid-template-columns: 34% 1fr; gap: 6cqi; align-items: end; margin-top: 2cqi; }
.slide__note { font-size: 2.4cqi; line-height: 1.4; color: rgba(255, 255, 255, 0.72); padding-bottom: 5cqi; }
.chart {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.6cqi;
  align-items: end;
  height: 21cqi;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}
.bar {
  position: relative;
  height: calc(var(--v) / 7 * 100%);
  background: rgba(255, 255, 255, 0.26);
  border-radius: 1px 1px 0 0;
}
.bar--hl { background: var(--terra); }
.bar b {
  position: absolute;
  bottom: 100%; left: 0; right: 0;
  padding-bottom: 0.8cqi;
  text-align: center;
  font-size: 2.3cqi;
  font-weight: 600;
}
.bar span {
  position: absolute;
  top: 100%; left: 0; right: 0;
  padding-top: 1cqi;
  text-align: center;
  font-size: 2.1cqi;
  color: rgba(255, 255, 255, 0.72);
}
.slide__foot {
  display: flex;
  justify-content: space-between;
  margin-top: 6cqi;
  font-size: 2cqi;
  color: rgba(255, 255, 255, 0.6);
}
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
.thumbs span {
  aspect-ratio: 16 / 9;
  border-radius: 2px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0.45)) 16% 28% / 46% 9% no-repeat,
    linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.2)) 16% 62% / 66% 6% no-repeat,
    #2B4669;
  opacity: 0.75;
}
.thumbs .is-current { opacity: 1; outline: 2px solid var(--terra); outline-offset: 2px; }

/* Muestra 3: guion */
.mock-script { width: 100%; container-type: inline-size; }
.script {
  padding: 7cqi 6.5cqi 8cqi;
  background: var(--sheet);
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(22, 27, 38, 0.05), 0 16px 30px -18px rgba(22, 27, 38, 0.35);
}
.script__head { display: flex; justify-content: space-between; align-items: baseline; gap: 4cqi; padding-bottom: 3.5cqi; border-bottom: 1.5px solid var(--ink); }
.script__title { font-family: var(--serif); font-weight: 600; font-size: 5.4cqi; line-height: 1.1; }
.script__meta { font-size: 3.1cqi; color: var(--ink-2); white-space: nowrap; }
.script__cols,
.script__row { display: grid; grid-template-columns: 13cqi 13cqi 1fr; gap: 2.5cqi; }
.script__cols {
  padding: 2.6cqi 0;
  border-bottom: 1px solid var(--rule);
  font-size: 2.9cqi;
  font-weight: 600;
  color: var(--ink-2);
}
.script__row { padding: 3.4cqi 0; border-bottom: 1px solid var(--rule-soft); font-size: 3.5cqi; }
.script__row > span { font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.script__row p { font-family: var(--serif); font-size: 4cqi; line-height: 1.45; }
.script__row em { font-style: italic; color: var(--terra-ink); }
.script__row.is-current {
  margin-inline: -2.5cqi;
  padding-inline: 2.5cqi;
  background: rgba(184, 93, 59, 0.07);
  box-shadow: inset 2px 0 0 var(--terra);
}
.script__row.is-current > span { color: var(--terra-ink); }

/* ---------- Proceso ---------- */
.steps { position: relative; display: grid; }
.steps::before {
  content: "";
  position: absolute;
  left: 22px; top: 22px; bottom: 48px;
  width: 1px;
  background: rgba(29, 53, 87, 0.35);
  transform-origin: top;
}
.step { position: relative; padding: 0 0 36px 68px; }
.step:last-child { padding-bottom: 0; }
.step__num {
  position: absolute;
  left: 0; top: -6px;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--navy);
  border-radius: 50%;
  background: var(--paper);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--navy);
}
.step:last-child .step__num { background: var(--navy); color: var(--paper); }
.step h3 { margin-bottom: 8px; font-size: 1.25rem; }
.step p { color: var(--ink-2); }

@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 32px; }
  .steps::before { left: 22px; right: 0; top: 22px; bottom: auto; width: auto; height: 1px; transform-origin: left; }
  .step { padding: 72px 0 0; }
  .step__num { top: 0; }
  .step p { max-width: 26ch; }
}

/* ---------- Preguntas frecuentes ---------- */
.faq { display: grid; gap: 8px; }
@media (min-width: 960px) {
  .faq { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 64px; align-items: start; }
  .faq__head { position: sticky; top: calc(var(--header-h) + 32px); }
}

.faq__list { border-top: 1px solid var(--ink); }
.faq__item { border-bottom: 1px solid var(--rule); }
.faq__q { font-size: inherit; }
.faq__q button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  width: 100%;
  padding: 20px 0;
  border: 0;
  background: none;
  text-align: left;
  font-family: var(--serif);
  font-size: clamp(1.125rem, 1.02rem + 0.4vw, 1.3125rem);
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
  cursor: pointer;
}
.faq__q button:hover { color: var(--navy); }
.faq__icon { position: relative; flex: none; width: 18px; height: 18px; }
.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 18px; height: 1.5px;
  margin-top: -0.75px;
  background: var(--terra);
  transition: transform 0.3s var(--ease);
}
.faq__icon::after { transform: rotate(90deg); }
.faq__item.is-open .faq__icon::after { transform: rotate(0deg); }

.faq__a-in p { padding-bottom: 22px; max-width: 62ch; color: var(--ink-2); }

.js .faq__a {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 0.35s var(--ease), visibility 0s 0.35s;
}
.js .faq__a-in { overflow: hidden; min-height: 0; }
.js .faq__item.is-open .faq__a {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows 0.35s var(--ease), visibility 0s;
}

/* ---------- Cotizador ---------- */
.quote {
  padding-block: var(--section-y);
  background: var(--navy);
  color: var(--paper);
}
.quote__grid { display: grid; gap: 40px; }
@media (min-width: 960px) {
  .quote__grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 72px; align-items: start; }
  .quote__intro { position: sticky; top: calc(var(--header-h) + 32px); }
}

.quote h2 { color: var(--paper); }
.quote__lead { margin-top: 16px; font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem); color: rgba(250, 248, 245, 0.84); max-width: 32rem; }
.quote__points { margin-top: 28px; border-top: 1px solid rgba(250, 248, 245, 0.2); }
.quote__points li {
  position: relative;
  padding: 13px 0 13px 24px;
  border-bottom: 1px solid rgba(250, 248, 245, 0.2);
  font-size: 0.9688rem;
}
.quote__points li::before {
  content: "";
  position: absolute;
  left: 2px; top: 1.15em;
  width: 5px; height: 10px;
  border-right: 1.6px solid var(--terra-soft);
  border-bottom: 1.6px solid var(--terra-soft);
  transform: rotate(40deg);
}
.quote__mail { margin-top: 24px; font-size: 0.9375rem; color: rgba(250, 248, 245, 0.84); overflow-wrap: anywhere; }
.quote__mail a { color: var(--paper); font-weight: 600; text-underline-offset: 3px; }
.quote :focus-visible { outline-color: var(--terra-soft); }

.form {
  display: grid;
  gap: 22px;
  padding: clamp(20px, 4vw, 38px);
  background: var(--sheet);
  color: var(--ink);
  border-radius: var(--r-panel);
  box-shadow: 0 30px 60px -36px rgba(0, 0, 0, 0.6);
}
.form :focus-visible { outline-color: var(--navy); }

.field label,
.field legend {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
}
.field__top { display: flex; justify-content: space-between; align-items: baseline; }
.field__count { font-size: 0.8125rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }

.input {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid rgba(22, 27, 38, 0.24);
  border-radius: var(--r-ctrl);
  background: #fff;
  font-size: 1rem; /* 16px evita el zoom en iOS */
  line-height: 1.4;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.input::placeholder { color: #8A8F9C; }
.input:hover { border-color: rgba(22, 27, 38, 0.4); }
.input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(29, 53, 87, 0.18); }
.input--select {
  padding-right: 44px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 7.5l5 5 5-5' fill='none' stroke='%231D3557' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 14px center / 18px no-repeat;
  cursor: pointer;
}
.input--select:invalid { color: #8A8F9C; }
.input--select option { color: var(--ink); }
.input--area { min-height: 124px; resize: vertical; }
input[type="date"].input { text-align: left; }
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 0.7; }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; flex: 1 1 96px; }
.choice input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 10px;
  border: 1px solid rgba(22, 27, 38, 0.24);
  border-radius: var(--r-ctrl);
  background: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: center;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.choice input:hover + span { border-color: rgba(22, 27, 38, 0.4); }
.choice input:checked + span { background: var(--navy); border-color: var(--navy); color: var(--paper); }
.choice input:focus-visible + span { outline: 2px solid var(--navy); outline-offset: 2px; }

.field__error {
  display: none;
  margin-top: 7px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--error);
}
.field.has-error .field__error { display: block; }
.field.has-error .input,
.field.has-error .choice span { border-color: var(--error); }

.form__submit { width: 100%; margin-top: 4px; }
.form__hint { margin-top: -10px; font-size: 0.8125rem; text-align: center; color: var(--ink-2); }
.form__status {
  padding: 14px 16px;
  border-radius: var(--r-ctrl);
  background: #EEF2F7;
  border-left: 3px solid var(--navy);
  font-size: 0.9375rem;
}
.form__status a { color: var(--navy); font-weight: 600; }

/* ---------- Footer ---------- */
.footer {
  padding: clamp(56px, 8vw, 88px) 0 28px;
  background: var(--paper-2);
  font-size: 0.9375rem;
}
.footer__grid { display: grid; gap: 36px; }
@media (min-width: 760px) { .footer__grid { grid-template-columns: 1.5fr 1fr 1.2fr; gap: 48px; } }
.footer__brand p { margin-top: 14px; max-width: 30ch; color: var(--ink-2); }
.footer__title { margin-bottom: 12px; font-weight: 700; font-size: 0.875rem; }
.footer__col li + li { margin-top: 6px; }
.footer__col a { color: var(--ink-2); text-decoration: none; overflow-wrap: anywhere; }
.footer__col a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer__bottom {
  display: grid;
  gap: 8px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 0.8125rem;
  color: var(--ink-2);
}
.footer__bottom strong { color: var(--ink); }
@media (min-width: 760px) {
  .footer__bottom { grid-template-columns: 1fr auto; gap: 32px; }
}

/* ---------- Botón flotante de WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--wa);
  color: #fff;
  box-shadow: 0 10px 24px -8px rgba(22, 27, 38, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.92);
  transition: opacity 0.25s, transform 0.3s var(--ease), visibility 0s 0.3s;
}
.wa-float svg { width: 30px; height: 30px; }
.wa-float:hover { background: #17924A; }
.wa-float.is-visible,
html:not(.js) .wa-float {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.25s, transform 0.3s var(--ease), visibility 0s;
}
@media (min-width: 960px) {
  .wa-float { right: 28px; bottom: 28px; }
}

/* ---------- Animaciones al hacer scroll ---------- */
.js .reveal,
.js .stagger > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js .stagger > * { transition-delay: calc(var(--i, 0) * 90ms); }
.js .reveal.is-visible,
.js .stagger.is-visible > * { opacity: 1; transform: none; }

/* La línea del proceso se dibuja al entrar en pantalla */
.js .steps::before { transform: scaleY(0); transition: transform 1.1s var(--ease) 0.15s; }
.js .steps.is-visible::before { transform: none; }
@media (min-width: 900px) {
  .js .steps::before { transform: scaleX(0); }
  .js .steps.is-visible::before { transform: none; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .js .reveal,
  .js .stagger > * { opacity: 1; transform: none; }
  .js .steps::before { transform: none; }
}
