/* ==========================================================================
   Geriatr-IA — Hoja de estilos
   Sistema de diseño: paleta institucional cálida, tipografía editorial,
   escala de espaciado de 4px, radios contenidos, sombras mínimas.
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */

:root {
  /* Color */
  --ink:          #12211f;
  --ink-2:        #2c3d3a;
  --muted:        #64756f;   /* texto secundario — AA sobre papel y blanco */
  --muted-2:      #5f706b;   /* etiquetas pequeñas y texto de 10-13px */

  --paper:        #fbf9f6;
  --paper-2:      #f4f1ea;
  --surface:      #ffffff;

  --line:         #e5ded3;
  --line-strong:  #d3c9b9;

  --brand:        #0e4f4a;
  --brand-700:    #0a3b37;
  --brand-500:    #16665f;
  --brand-100:    #e2eeeb;

  --accent:       #b4762c;
  --accent-ink:   #8a5a1b;
  --accent-100:   #f6ecdb;

  --ok:           #2f6d46;
  --ok-ink:       #1f5334;
  --ok-100:       #e6f1e9;

  /* Tipografía */
  --font-display: "Newsreader", "Iowan Old Style", "Palatino Linotype",
                  Palatino, "Book Antiqua", Georgia, serif;
  --font-sans:    "Inter", "Segoe UI Variable Text", "Segoe UI", -apple-system,
                  BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;

  --fs-hero:      clamp(2.5rem, 1.4rem + 4.4vw, 4.5rem);
  --fs-h2:        clamp(1.875rem, 1.3rem + 2.2vw, 2.875rem);
  --fs-h3:        clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  --fs-lead:      clamp(1.0625rem, 0.98rem + 0.4vw, 1.25rem);
  --fs-body:      1rem;
  --fs-sm:        0.9375rem;
  --fs-xs:        0.8125rem;
  --fs-eyebrow:   0.75rem;

  /* Espaciado (base 4px) */
  --s-1:  0.25rem;
  --s-2:  0.5rem;
  --s-3:  0.75rem;
  --s-4:  1rem;
  --s-5:  1.25rem;
  --s-6:  1.5rem;
  --s-8:  2rem;
  --s-10: 2.5rem;
  --s-12: 3rem;
  --s-16: 4rem;
  --s-20: 5rem;
  --s-24: 6rem;

  /* Formas */
  --r-sm: 3px;
  --r-md: 6px;
  --r-lg: 10px;
  --shadow-card: 0 1px 2px rgba(18, 33, 31, 0.04);
  --shadow-float: 0 18px 48px -24px rgba(18, 33, 31, 0.32);

  /* Layout */
  --wrap: 1180px;
  --wrap-narrow: 760px;
  --nav-h: 68px;
}

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

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + var(--s-6));
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

button { font: inherit; color: inherit; }

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

::selection { background: var(--accent-100); color: var(--ink); }

/* --- Utilidades de layout ----------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--s-6);
}

.section { padding-block: clamp(var(--s-16), 9vw, var(--s-24)); }
.section--tight { padding-block: clamp(var(--s-12), 6vw, var(--s-16)); }
.section--paper2 { background: var(--paper-2); }
.section--surface { background: var(--surface); }

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: var(--s-4);
  z-index: 100;
  padding: var(--s-2) var(--s-4);
  background: var(--brand);
  color: #fff;
  border-radius: var(--r-md);
  transform: translateY(-200%);
  transition: transform 0.15s ease;
}
.skip-link:focus-visible { transform: translateY(0); }

/* --- Tipografía de apoyo ------------------------------------------------ */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 0 0 var(--s-5);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.eyebrow--light { color: #d9b57e; }

.section-head { max-width: 62ch; margin-bottom: var(--s-12); }
.section-head h2 { font-size: var(--fs-h2); }
.section-head p {
  margin-top: var(--s-5);
  font-size: var(--fs-lead);
  color: var(--muted);
  line-height: 1.55;
}

.lead { font-size: var(--fs-lead); color: var(--muted); line-height: 1.6; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-6);
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease,
              color 0.16s ease, transform 0.16s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-700); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--ink); background: rgba(18, 33, 31, 0.03); }

.btn--light { background: #fff; color: var(--brand-700); }
.btn--light:hover { background: var(--accent-100); }

.btn--outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.btn--outline-light:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

.btn--block { width: 100%; }

.btn__arrow { transition: transform 0.16s ease; }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* --- Barra de navegación ------------------------------------------------ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(251, 249, 246, 0.86);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.nav.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(251, 249, 246, 0.95);
}
.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-6);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  text-decoration: none;
  flex-shrink: 0;
}
.brand__mark { width: 34px; height: 34px; flex-shrink: 0; }
.brand__word {
  font-family: var(--font-display);
  font-size: 1.3125rem;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
}
.brand__word b { font-weight: 600; color: var(--brand); }
.brand__word span { color: var(--accent-ink); font-weight: 600; }

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  margin-left: auto;
}
.nav__links a {
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav__links a:hover { color: var(--ink); background: rgba(18, 33, 31, 0.04); }
.nav__links a.is-active { color: var(--brand); font-weight: 550; }

.nav__cta { flex-shrink: 0; }

.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  width: 17px;
  height: 1.5px;
  background: var(--ink);
  position: relative;
  transition: background-color 0.15s ease;
}
.nav__toggle span::before,
.nav__toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 17px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.2s ease;
}
.nav__toggle span::before { top: -5px; }
.nav__toggle span::after { top: 5px; }
.nav__toggle[aria-expanded="true"] span { background: transparent; }
.nav__toggle[aria-expanded="true"] span::before { transform: translateY(5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span::after { transform: translateY(-5px) rotate(-45deg); }

.nav__drawer {
  display: none;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  padding: var(--s-4) 0 var(--s-6);
}
.nav__drawer.is-open { display: block; }
.nav__drawer ul { display: grid; gap: var(--s-1); }
.nav__drawer a {
  display: block;
  padding: var(--s-3) var(--s-2);
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  font-size: 1.0625rem;
  color: var(--ink-2);
}
.nav__drawer .btn { margin-top: var(--s-5); }

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

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(var(--s-12), 7vw, var(--s-20)) clamp(var(--s-16), 8vw, var(--s-24));
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 70% at 82% 8%, rgba(180, 118, 44, 0.07), transparent 70%),
    radial-gradient(52% 62% at 6% 92%, rgba(14, 79, 74, 0.07), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero > .wrap { position: relative; z-index: 1; }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(var(--s-12), 6vw, var(--s-16));
  align-items: center;
}
@media (min-width: 1024px) {
  .hero__grid { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); }
}

.hero h1 { font-size: var(--fs-hero); }
.hero h1 em {
  font-style: italic;
  color: var(--brand);
}
.hero__lead {
  margin-top: var(--s-6);
  max-width: 52ch;
  font-size: var(--fs-lead);
  color: var(--muted);
  line-height: 1.62;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-8);
}

.hero__trust {
  margin-top: var(--s-10);
  padding-top: var(--s-6);
  border-top: 1px solid var(--line);
  display: grid;
  gap: var(--s-4);
}
@media (min-width: 520px) {
  .hero__trust { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); }
}
.hero__trust div dt {
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 600;
}
.hero__trust div dd {
  margin: var(--s-1) 0 0;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  color: var(--ink-2);
  line-height: 1.35;
}

/* --- Mock de producto --------------------------------------------------- */

.mock-figure { margin: 0; }

.mock {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-float);
  overflow: hidden;
  font-size: 11px;
  line-height: 1.45;
}

.mock__chrome {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}
.mock__dots { display: flex; gap: 5px; }
.mock__dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.mock__url {
  flex: 1;
  padding: 3px var(--s-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-2);
  font-size: 10px;
  text-align: center;
  letter-spacing: 0.02em;
}

.mock__body { display: grid; grid-template-columns: 148px minmax(0, 1fr); }

.mock__sidebar {
  background: var(--brand-700);
  color: rgba(255, 255, 255, 0.72);
  padding: var(--s-4) var(--s-3);
  display: grid;
  align-content: start;
  gap: 2px;
}
.mock__sidebar strong {
  display: block;
  font-family: var(--font-display);
  font-size: 13px;
  color: #fff;
  padding: 0 var(--s-2) var(--s-4);
  letter-spacing: -0.01em;
}
.mock__sidebar a {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 6px var(--s-2);
  border-radius: var(--r-sm);
  text-decoration: none;
  font-size: 10.5px;
}
.mock__sidebar a i {
  width: 5px; height: 5px; border-radius: 1px;
  background: currentColor; opacity: 0.55; flex-shrink: 0;
}
.mock__sidebar a.is-on { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* En pantallas angostas la maqueta muestra solo el panel principal. */
@media (max-width: 560px) {
  .mock__body { grid-template-columns: minmax(0, 1fr); }
  .mock__sidebar { display: none; }
}

.mock__main { padding: var(--s-4); display: grid; gap: var(--s-3); background: var(--paper); }

.mock__topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
}
.mock__topline b { font-family: var(--font-display); font-size: 14px; font-weight: 500; }
.mock__topline span { color: var(--muted-2); font-size: 10px; }

.mock__kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); }
.mock__kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-3);
}
.mock__kpi dt {
  font-size: 9px; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--muted-2); font-weight: 600;
}
.mock__kpi dd {
  margin: 3px 0 0;
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1;
  color: var(--ink);
}
.mock__kpi dd small { font-size: 11px; color: var(--muted-2); }

.mock__panels { display: grid; gap: var(--s-2); }
@media (min-width: 720px) {
  .mock__panels { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
}

.mock__panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-3);
}
.mock__panel-title {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: var(--s-2);
}
.mock__row {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 5px 0;
  border-top: 1px solid var(--line);
}
.mock__row:first-of-type { border-top: 0; }
.mock__row b { font-weight: 550; font-size: 10.5px; }
.mock__row em { font-style: normal; color: var(--muted-2); font-size: 10px; margin-left: auto; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.pill--ok { background: var(--ok-100); color: var(--ok-ink); }
.pill--wait { background: var(--paper-2); color: var(--muted); }
.pill--warn { background: var(--accent-100); color: var(--accent-ink); }

.mock__panel--ai { background: var(--brand-100); border-color: #c9ded9; }
.mock__panel--ai .mock__panel-title { color: var(--brand); }
.mock__panel--ai p { font-size: 10.5px; color: var(--ink-2); }
.mock__panel--ai .mock__aifoot {
  margin-top: var(--s-3);
  padding-top: var(--s-2);
  border-top: 1px solid #c9ded9;
  font-size: 9px;
  color: var(--brand-500);
}

.mock-caption {
  margin-top: var(--s-3);
  font-size: var(--fs-xs);
  color: var(--muted-2);
  text-align: center;
}

/* --- Franja de contexto (problema) -------------------------------------- */

.problem__grid {
  display: grid;
  gap: var(--s-8);
}
@media (min-width: 900px) {
  .problem__grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: var(--s-16); }
}
.problem__intro h2 { font-size: var(--fs-h2); }
.problem__intro .lead { margin-top: var(--s-5); }

.problem__list { display: grid; gap: 0; }
.problem__list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s-5);
  align-items: start;
  padding: var(--s-5) 0;
  border-top: 1px solid var(--line);
}
.problem__list li:last-child { border-bottom: 1px solid var(--line); }
.problem__list .num {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  color: var(--accent-ink);
  padding-top: 4px;
  font-variant-numeric: tabular-nums;
}
.problem__list h3 { font-size: 1.0625rem; font-family: var(--font-sans); font-weight: 600; letter-spacing: 0; }
.problem__list p { margin-top: var(--s-1); color: var(--muted); font-size: var(--fs-sm); }

/* --- Módulos ------------------------------------------------------------ */

.modules {
  display: grid;
  gap: var(--s-5);
}
@media (min-width: 760px) { .modules { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.module {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--s-8);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.module:hover { border-color: var(--line-strong); transform: translateY(-2px); }

.module__top {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  margin-bottom: var(--s-5);
}
.module__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: var(--r-md);
  background: var(--brand-100);
  color: var(--brand);
  flex-shrink: 0;
}
.module__icon svg { width: 21px; height: 21px; }
.module__n {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}
.module h3 { font-size: var(--fs-h3); }
.module > p { margin-top: var(--s-3); color: var(--muted); font-size: var(--fs-sm); }

.module__features {
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line);
  display: grid;
  gap: var(--s-3);
}
.module__features li {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: var(--s-3);
  font-size: var(--fs-sm);
  color: var(--ink-2);
  line-height: 1.5;
}
.module__features li::before {
  content: "";
  width: 5px;
  height: 5px;
  margin-top: 9px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.75;
}

/* --- Timeline (un día) --------------------------------------------------- */

.day {
  display: grid;
  gap: 0;
  counter-reset: hora;
}
.day__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-2);
  padding: var(--s-6) 0;
  border-top: 1px solid var(--line);
}
@media (min-width: 800px) {
  .day__item {
    grid-template-columns: 92px 1fr minmax(0, 1.6fr);
    gap: var(--s-8);
    align-items: baseline;
  }
}
.day__item:last-child { border-bottom: 1px solid var(--line); }
.day__time {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--accent-ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.day__what { font-weight: 600; font-size: var(--fs-body); }
.day__how { color: var(--muted); font-size: var(--fs-sm); }

/* --- Sección IA (banda oscura) ------------------------------------------ */

.ia {
  background: var(--brand-700);
  color: rgba(255, 255, 255, 0.82);
  position: relative;
  overflow: hidden;
}
.ia::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(58% 76% at 88% 0%, rgba(180, 118, 44, 0.2), transparent 65%);
  pointer-events: none;
}
.ia > .wrap { position: relative; }
.ia h2, .ia h3 { color: #fff; }
.ia .section-head p { color: rgba(255, 255, 255, 0.72); }

.ia__grid {
  display: grid;
  gap: var(--s-6);
}
@media (min-width: 700px) { .ia__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1060px) { .ia__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.ia__card {
  padding: var(--s-6);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.045);
}
.ia__card h3 { font-size: 1.0625rem; font-family: var(--font-sans); font-weight: 600; letter-spacing: 0; }
.ia__card p { margin-top: var(--s-3); font-size: var(--fs-sm); color: rgba(255, 255, 255, 0.72); }
.ia__card svg { width: 22px; height: 22px; color: #d9b57e; margin-bottom: var(--s-5); }

.ia__note {
  margin-top: var(--s-10);
  padding: var(--s-6) var(--s-8);
  border-left: 2px solid var(--accent);
  background: rgba(0, 0, 0, 0.16);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.ia__note p { color: rgba(255, 255, 255, 0.9); font-size: var(--fs-sm); }
.ia__note p + p { margin-top: var(--s-3); color: rgba(255, 255, 255, 0.62); }
.ia__note strong { color: #fff; font-weight: 600; }

/* --- Indicadores --------------------------------------------------------- */

.kpis {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
@media (min-width: 640px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 980px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.kpi { background: var(--surface); padding: var(--s-6); }
.kpi dt {
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
  font-weight: 600;
}
.kpi dd {
  margin: var(--s-3) 0 0;
  font-family: var(--font-display);
  font-size: 1.1875rem;
  line-height: 1.3;
  color: var(--ink);
}
.kpi p { margin-top: var(--s-2); font-size: var(--fs-sm); color: var(--muted); }

/* --- Seguridad ----------------------------------------------------------- */

.secure {
  display: grid;
  gap: var(--s-8) var(--s-10);
}
@media (min-width: 700px) { .secure { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .secure { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.secure__item { display: grid; gap: var(--s-3); }
.secure__item svg { width: 22px; height: 22px; color: var(--brand); }
.secure__item h3 { font-size: 1.0625rem; font-family: var(--font-sans); font-weight: 600; letter-spacing: 0; }
.secure__item p { font-size: var(--fs-sm); color: var(--muted); }

/* --- Implementación ------------------------------------------------------ */

.phases { display: grid; gap: var(--s-5); }
@media (min-width: 640px) { .phases { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .phases { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.phase {
  padding: var(--s-6);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  display: grid;
  align-content: start;
  gap: var(--s-3);
}
.phase__when {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.phase h3 { font-size: 1.125rem; }
.phase p { font-size: var(--fs-sm); color: var(--muted); }
.phase__bar { height: 3px; border-radius: 999px; background: var(--brand-100); overflow: hidden; }
.phase__bar i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }

/* El avance de la barra refleja la posición de la fase en la secuencia. */
.phase:nth-child(1) .phase__bar i { width: 25%; }
.phase:nth-child(2) .phase__bar i { width: 50%; }
.phase:nth-child(3) .phase__bar i { width: 75%; }
.phase:nth-child(4) .phase__bar i { width: 100%; }

/* --- Planes --------------------------------------------------------------- */

.plans { display: grid; gap: var(--s-5); align-items: start; }
@media (min-width: 900px) { .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.plan {
  display: flex;
  flex-direction: column;
  padding: var(--s-8);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  height: 100%;
}
.plan--featured {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
  position: relative;
}
.plan__tag {
  position: absolute;
  top: calc(var(--s-3) * -1 - 4px);
  left: var(--s-8);
  padding: var(--s-1) var(--s-3);
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.plan h3 { font-size: 1.375rem; }
.plan__size { margin-top: var(--s-2); font-size: var(--fs-sm); color: var(--muted); }
.plan__price {
  margin: var(--s-6) 0;
  padding-bottom: var(--s-6);
  border-bottom: 1px solid var(--line);
}
.plan__price b {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  display: block;
  line-height: 1.15;
}
.plan__price span { font-size: var(--fs-xs); color: var(--muted-2); }
.plan__feats { display: grid; gap: var(--s-3); margin-bottom: var(--s-8); }
.plan__feats li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: var(--s-2);
  font-size: var(--fs-sm);
  color: var(--ink-2);
}
.plan__feats svg { width: 14px; height: 14px; margin-top: 5px; color: var(--brand); }
.plan .btn { margin-top: auto; }

/* --- FAQ ------------------------------------------------------------------ */

.faq { max-width: 840px; }
.faq details {
  border-top: 1px solid var(--line);
}
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-6);
  padding: var(--s-6) 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: 1.1875rem;
  color: var(--ink);
  transition: color 0.15s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--brand); }
.faq summary::after {
  content: "";
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  margin-top: 8px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p {
  padding: 0 var(--s-10) var(--s-6) 0;
  margin-top: calc(var(--s-2) * -1);
  color: var(--muted);
  font-size: var(--fs-sm);
  max-width: 68ch;
}

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

.contact {
  display: grid;
  gap: var(--s-12);
}
@media (min-width: 900px) {
  .contact { grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); gap: var(--s-16); }
}
.contact h2 { font-size: var(--fs-h2); }
.contact__intro p { margin-top: var(--s-5); font-size: var(--fs-lead); color: var(--muted); }

.contact__direct { margin-top: var(--s-10); display: grid; gap: var(--s-5); }
.contact__direct div dt {
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-weight: 600;
}
.contact__direct div dd { margin: var(--s-1) 0 0; font-size: 1.0625rem; }
.contact__direct a { color: var(--brand); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.contact__direct a:hover { text-decoration-color: currentColor; }

.form {
  padding: var(--s-8);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  display: grid;
  gap: var(--s-5);
}
.field { display: grid; gap: var(--s-2); }
.field label { font-size: var(--fs-sm); font-weight: 550; }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: var(--s-3) var(--s-4);
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--brand-100);
}
.field__row { display: grid; gap: var(--s-5); }
@media (min-width: 520px) { .field__row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.form__note { font-size: var(--fs-xs); color: var(--muted-2); }
.form__status {
  font-size: var(--fs-sm);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  background: var(--ok-100);
  color: var(--ok-ink);
}
.form__status[hidden] { display: none; }

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

.footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.6);
  padding-block: var(--s-16) var(--s-8);
  font-size: var(--fs-sm);
}
.footer__top {
  display: grid;
  gap: var(--s-10);
  padding-bottom: var(--s-10);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
@media (min-width: 780px) {
  .footer__top { grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: var(--s-12); }
}
.footer .brand__word { color: #fff; }
.footer .brand__word b { color: #fff; }
.footer .brand__word span { color: #d9b57e; }
.footer__about { margin-top: var(--s-5); max-width: 44ch; }
.footer h3 {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 600;
  margin-bottom: var(--s-4);
}
.footer ul { display: grid; gap: var(--s-2); }
.footer a { text-decoration: none; color: rgba(255, 255, 255, 0.72); }
.footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer__bottom {
  padding-top: var(--s-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.45);
}

/* --- Animación de entrada -------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* --- Responsive: navegación ------------------------------------------------ */

@media (max-width: 1000px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: inline-flex; }
}

/* --- Preferencias de movimiento -------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* --- Impresión -------------------------------------------------------------- */

@media print {
  :root { --wrap: 100%; }
  body { background: #fff; font-size: 10.5pt; }
  .nav, .nav__drawer, .hero__actions, .form, .skip-link,
  .footer__bottom, .btn { display: none !important; }
  .section { padding-block: 18pt; break-inside: avoid; }
  .hero { padding-block: 0 18pt; }
  .ia { background: #fff; color: var(--ink); }
  .ia h2, .ia h3 { color: var(--ink); }
  .ia .section-head p, .ia__card p, .ia__note p { color: var(--ink-2); }
  .ia__card { border-color: var(--line); background: #fff; }
  .ia__note { background: var(--paper-2); }
  .footer { background: #fff; color: var(--ink-2); border-top: 1px solid var(--line); }
  .footer .brand__word, .footer .brand__word b { color: var(--ink); }
  .footer a { color: var(--ink-2); }
  .module, .plan, .phase, .kpi { break-inside: avoid; box-shadow: none; }
  .mock { box-shadow: none; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .faq details { break-inside: avoid; }
  .faq details p { display: block; }
}
