/* ==========================================================================
   MedPA Healthcare - hoja de estilos
   Paleta: azul marino del logo (tinta) + morado #4720B7 del sitio original (acento único).
   Radios: tarjetas 24px, imágenes 28px, botones y pastillas 999px, campos 14px.
   Tema: claro por defecto; el oscuro solo se activa con el botón (data-theme="dark").
   Capas (z-index): 10 header, 20 menú móvil, 30 aviso.
   ========================================================================== */

@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Work Sans";
  src: url("../fonts/worksans-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f6f6fb;
  --surface: #ffffff;
  --surface-2: #eeecf8;
  --ink: #0e1242;
  --ink-2: #4a4e70;
  --line: #dddbee;
  --accent: #4720b7;
  --accent-hover: #3a1897;
  --accent-soft: #ebe6fb;
  --accent-ink: #ffffff;
  --band-bg: #13174a;
  --band-ink: #f3f2fc;
  --band-ink-2: #c3c2e0;
  --shadow: 0 1px 2px rgb(30 22 90 / .06), 0 12px 32px -12px rgb(30 22 90 / .18);
  --shadow-lg: 0 30px 60px -24px rgb(30 22 90 / .35);

  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Work Sans", system-ui, sans-serif;

  --r-card: 24px;
  --r-media: 28px;
  --r-field: 14px;

  --container: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.16, 1, .3, 1);

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0a0c22;
  --surface: #12153a;
  --surface-2: #1a1d4a;
  --ink: #eef0fa;
  --ink-2: #b4b7d6;
  --line: #262a5e;
  --accent: #8f78f3;
  --accent-hover: #a693f7;
  --accent-soft: #221c55;
  --accent-ink: #0a0c22;
  --band-bg: #1a1552;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 12px 32px -12px rgb(0 0 0 / .5);
  --shadow-lg: 0 30px 60px -24px rgb(0 0 0 / .7);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 30;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 18px; border-radius: 999px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: clamp(72px, 10vw, 128px); }
.section--tight { padding-block: clamp(56px, 7vw, 88px); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8125rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
}
.lead { font-size: clamp(1.0625rem, 1.3vw, 1.25rem); color: var(--ink-2); max-width: 60ch; }
.muted { color: var(--ink-2); }
.h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
.h3 { font-size: clamp(1.375rem, 2vw, 1.75rem); }
.stack > * + * { margin-top: 20px; }

/* ---------- Botones ---------- */
.btn {
  --_bg: var(--accent); --_fg: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border-radius: 999px; border: 1.5px solid transparent;
  background: var(--_bg); color: var(--_fg);
  font: 600 1rem/1 var(--font-body); white-space: nowrap; text-decoration: none;
  cursor: pointer;
  transition: transform .35s var(--ease), background-color .25s, box-shadow .35s var(--ease), border-color .25s;
}
.btn:hover { background: var(--accent-hover); box-shadow: 0 14px 30px -12px color-mix(in srgb, var(--accent) 70%, transparent); transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn i { font-size: 1.2em; transition: transform .35s var(--ease); }
.btn:hover i.ph-arrow-right, .btn:hover i.ph-arrow-up-right { transform: translateX(3px); }
.btn--ghost { --_bg: transparent; --_fg: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--surface); border-color: var(--ink-2); box-shadow: none; }
.btn--light { --_bg: #ffffff; --_fg: #13174a; }
.btn--light:hover { background: #ecebfa; }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: .9375rem; }

.text-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; color: var(--accent); text-decoration: none;
}
.text-link i { transition: transform .35s var(--ease); }
.text-link:hover i { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 8px 24px -18px rgb(20 20 80 / .35); }
.nav { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand img { width: 40px; height: auto; }
.brand span { font-family: var(--font-display); font-size: 1.375rem; font-weight: 700; letter-spacing: -.02em; }
.brand small { display: block; font-size: .625rem; font-weight: 600; letter-spacing: .22em; color: var(--ink-2); margin-top: 2px; }
.brand .brand-text { line-height: 1; }

.nav-links { display: flex; align-items: center; gap: 4px; margin: 0 auto; padding: 0; list-style: none; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 999px;
  font-size: .9375rem; font-weight: 500; color: var(--ink-2); text-decoration: none;
  transition: color .2s, background-color .2s;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-2); }
.nav-links a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.nav-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink);
  font-size: 1.25rem; cursor: pointer; transition: background-color .2s, transform .2s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.95); }
.theme-toggle .ph-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ph-sun { display: inline; }
:root[data-theme="dark"] .theme-toggle .ph-moon { display: none; }
.menu-toggle { display: none; }

.mobile-menu {
  position: fixed; inset: 72px 0 0 0; z-index: 20;
  background: var(--bg); padding: 24px var(--gutter) 40px;
  display: flex; flex-direction: column; gap: 4px; overflow-y: auto;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: none; }
.mobile-menu a:not(.btn) {
  font-family: var(--font-display); font-size: 1.625rem; font-weight: 500;
  text-decoration: none; padding: 12px 0; border-bottom: 1px solid var(--line);
}
.mobile-menu a[aria-current="page"] { color: var(--accent); }
.mobile-menu .btn { margin-top: 24px; }

@media (max-width: 1100px) {
  .nav-links, .nav-actions .btn { display: none; }
  .menu-toggle { display: inline-grid; }
  .nav-actions { margin-left: auto; }
}

/* ---------- Hero (inicio) ---------- */
.hero { padding-block: clamp(40px, 6vw, 88px) clamp(64px, 8vw, 104px); }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(2.375rem, 4.2vw, 3.625rem); margin-top: 20px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { margin-top: 24px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero-media { position: relative; }
.hero-media > img {
  width: 100%; aspect-ratio: 4 / 4.4; object-fit: cover; object-position: 60% center;
  border-radius: var(--r-media); box-shadow: var(--shadow-lg);
}
.float-card {
  position: absolute; display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; padding: 14px 18px 14px 14px; box-shadow: var(--shadow);
}
.float-card strong { display: block; font-family: var(--font-display); font-size: 1.0625rem; font-weight: 600; line-height: 1.2; }
.float-card span { font-size: .8125rem; color: var(--ink-2); }
.float-card .icon-chip { width: 44px; height: 44px; }
.float-card--a { left: -28px; bottom: 40px; }
.float-card--b { right: -20px; top: 36px; }

.icon-chip {
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 52px; height: 52px; border-radius: 16px;
  background: var(--accent-soft); color: var(--accent); font-size: 1.5rem;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media > img { aspect-ratio: 4 / 3; }
  .float-card--a { left: 12px; bottom: -24px; }
  .float-card--b { display: none; }
}

/* ---------- Tiendas ---------- */
.stores { display: flex; flex-wrap: wrap; gap: 10px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 18px 8px 14px; border-radius: 14px;
  background: var(--ink); color: var(--bg); text-decoration: none;
  transition: transform .3s var(--ease), opacity .2s;
}
.store-badge:hover { transform: translateY(-2px); opacity: .92; }
.store-badge i { font-size: 1.75rem; }
.store-badge small { display: block; font-size: .6875rem; opacity: .8; line-height: 1.1; }
.store-badge strong { display: block; font-family: var(--font-display); font-size: 1.0625rem; font-weight: 600; line-height: 1.15; }

/* ---------- Acerca de (split) ---------- */
.about { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.about-visual {
  position: relative; border-radius: var(--r-media); overflow: hidden;
  background: radial-gradient(120% 90% at 30% 20%, var(--accent-soft), var(--surface-2));
  padding: clamp(24px, 4vw, 48px);
}
.about-visual img { margin-inline: auto; max-height: 440px; width: auto; }
.about h2 { margin-top: 16px; }
.about .statement {
  margin-top: 28px; font-family: var(--font-display);
  font-size: clamp(1.375rem, 2.2vw, 1.875rem); font-weight: 400; line-height: 1.35; letter-spacing: -.01em;
}
.about .statement strong { font-weight: 600; color: var(--accent); }
.about .lead { margin-top: 20px; }
.about .text-link { margin-top: 28px; }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; } .about-visual { order: 2; } }

/* ---------- Banda destacada ---------- */
.band {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--r-media); background: var(--band-bg); color: var(--band-ink);
  display: grid; grid-template-columns: 1.3fr 1fr; align-items: stretch; min-height: 420px;
}
.band-copy { padding: clamp(32px, 5vw, 72px); display: flex; flex-direction: column; justify-content: center; gap: 28px; }
.band h2 { font-size: clamp(1.75rem, 2.8vw, 2.5rem); }
.band p { color: var(--band-ink-2); max-width: 46ch; }
.band-media { position: relative; }
.band-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.band-media::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, var(--band-bg) 0%, transparent 45%);
}
@media (max-width: 900px) {
  .band { grid-template-columns: 1fr; }
  .band-media { min-height: 260px; order: -1; }
  .band-media::before { background: linear-gradient(0deg, var(--band-bg) 0%, transparent 55%); }
}

/* ---------- Bento de servicios ---------- */
.section-head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head .lead { margin-top: 18px; }
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.tile {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
a.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.tile-body { padding: clamp(24px, 3vw, 36px); display: flex; flex-direction: column; gap: 12px; flex: 1; }
.tile-body p { color: var(--ink-2); }
.tile-media { overflow: hidden; }
.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
a.tile:hover .tile-media img { transform: scale(1.04); }
.tile .text-link { margin-top: auto; padding-top: 8px; }
.tile--wide { grid-column: span 4; flex-direction: row; }
.tile--wide .tile-media { flex: 1.1; min-height: 340px; }
.tile--wide .tile-body { flex: 1; justify-content: center; }
.tile--tall { grid-column: span 2; grid-row: span 2; }
.tile--tall .tile-media { height: 260px; flex-shrink: 0; }
.tile--half { grid-column: span 2; }
.tile--accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.tile--accent p { color: color-mix(in srgb, var(--accent-ink) 82%, transparent); }
.tile--accent .icon-chip { background: color-mix(in srgb, var(--accent-ink) 16%, transparent); color: var(--accent-ink); }
.tile--tint { background: var(--surface-2); }
@media (max-width: 1000px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .tile--wide { grid-column: span 2; }
  .tile--tall { grid-column: span 1; grid-row: span 2; }
  .tile--half { grid-column: span 1; }
}
@media (max-width: 680px) {
  .bento { grid-template-columns: 1fr; }
  .tile--wide, .tile--tall, .tile--half { grid-column: auto; grid-row: auto; }
  .tile--wide { flex-direction: column; }
  .tile--wide .tile-media { min-height: 220px; }
}

/* ---------- Declaración (confianza) ---------- */
.pledge { max-width: 900px; margin-inline: auto; text-align: center; }
.pledge .icon-chip { margin-inline: auto; }
.pledge blockquote {
  margin: 28px 0 0; font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.375rem); font-weight: 400; line-height: 1.3; letter-spacing: -.015em;
}
.pledge p { margin-top: 24px; color: var(--ink-2); }

/* ---------- Suscripción ---------- */
.subscribe {
  border-radius: var(--r-media); padding: clamp(32px, 5vw, 64px);
  background:
    radial-gradient(60% 120% at 100% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    var(--surface);
  border: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center;
}
.subscribe h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
.subscribe p { margin-top: 12px; color: var(--ink-2); }
@media (max-width: 860px) { .subscribe { grid-template-columns: 1fr; } }

/* ---------- Formularios ---------- */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; }
.field label { font-size: .9375rem; font-weight: 600; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--bg); border: 1.5px solid var(--line); border-radius: var(--r-field);
  padding: 14px 16px; transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: color-mix(in srgb, var(--ink-2) 85%, transparent); }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}
.field .hint { font-size: .8125rem; color: var(--ink-2); }
.field .error { font-size: .8125rem; color: #c0263d; font-weight: 500; display: none; }
:root[data-theme="dark"] .field .error { color: #ff8a9b; }
.field.is-invalid input, .field.is-invalid textarea { border-color: #c0263d; }
.field.is-invalid .error { display: block; }
.inline-form { display: flex; gap: 10px; }
.inline-form .field { flex: 1; }
.inline-form .btn { align-self: end; }
@media (max-width: 520px) { .inline-form { flex-direction: column; } .inline-form .btn { align-self: stretch; } }
.form-status {
  display: none; align-items: center; gap: 10px; padding: 14px 16px; border-radius: var(--r-field);
  background: var(--accent-soft); color: var(--ink); font-weight: 500;
}
.form-status i { color: var(--accent); font-size: 1.25rem; }
.form-status.is-visible { display: flex; }
.form-status.is-error { background: color-mix(in srgb, #c0263d 14%, transparent); }
.form-status.is-error i { color: #c0263d; }
.btn[disabled] { opacity: .65; pointer-events: none; }
.form-status a { color: var(--accent); font-weight: 600; }
/* Campo trampa anti-spam: invisible para personas, visible para bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Cabecera de página interna ---------- */
.page-hero { padding-block: clamp(48px, 7vw, 96px) clamp(40px, 5vw, 64px); }
.page-hero h1 { font-size: clamp(2.5rem, 5.5vw, 4.5rem); margin-top: 18px; max-width: 16ch; }
.page-hero .lead { margin-top: 24px; }
.page-hero--split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: end; }
.page-hero--split h1 { max-width: none; }
@media (max-width: 900px) { .page-hero--split { grid-template-columns: 1fr; } }
.page-hero--media { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.page-hero--media .hero-media > img { aspect-ratio: 4 / 4.2; object-position: 70% center; }
@media (max-width: 900px) {
  .page-hero--media { grid-template-columns: 1fr; }
  .page-hero--media .hero-media > img { aspect-ratio: 4 / 3; }
}

.wide-media { border-radius: var(--r-media); overflow: hidden; box-shadow: var(--shadow-lg); }
.wide-media img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
@media (max-width: 700px) { .wide-media img { aspect-ratio: 4 / 3; } }

/* Texto largo en dos columnas: título fijo a la izquierda */
.prose-split { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(32px, 6vw, 96px); }
.prose-split .sticky { position: sticky; top: 104px; align-self: start; }
.prose { display: grid; gap: 22px; font-size: 1.125rem; color: var(--ink-2); max-width: 64ch; }
.prose strong { color: var(--ink); font-weight: 600; }
@media (max-width: 860px) { .prose-split { grid-template-columns: 1fr; } .prose-split .sticky { position: static; } }

.callout {
  display: flex; gap: 18px; align-items: flex-start;
  border-radius: var(--r-card); padding: 24px 26px;
  background: var(--accent-soft); color: var(--ink);
}
.callout .icon-chip { background: var(--surface); }
.callout p { color: var(--ink); }

/* ---------- Características (gestor) ---------- */
.features { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
.feature {
  grid-column: span 4; border-radius: var(--r-card); padding: 30px;
  background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 14px;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature h3 { font-size: 1.3125rem; margin-top: 6px; }
.feature p { color: var(--ink-2); font-size: 1rem; }
.feature--lg { grid-column: span 7; background: var(--band-bg); border-color: var(--band-bg); color: var(--band-ink); justify-content: flex-end; min-height: 300px; }
.feature--lg p { color: var(--band-ink-2); }
.feature--lg .icon-chip { background: rgb(255 255 255 / .1); color: #fff; }
.feature--lg h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.feature--md { grid-column: span 5; background: var(--surface-2); }
@media (max-width: 1000px) { .feature, .feature--lg, .feature--md { grid-column: span 6; } }
@media (max-width: 640px) { .feature, .feature--lg, .feature--md { grid-column: span 12; } .feature--lg { min-height: 0; } }

/* ---------- Encabezado de sección con imagen ---------- */
.media-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.media-split img { border-radius: var(--r-media); width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }
@media (max-width: 860px) { .media-split { grid-template-columns: 1fr; } }

.checklist { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist i { color: var(--accent); font-size: 1.375rem; flex-shrink: 0; margin-top: 2px; }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.contact-card { border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); padding: clamp(24px, 4vw, 44px); }
.contact-list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 22px; }
.contact-list li { display: flex; gap: 16px; align-items: flex-start; }
.contact-list .icon-chip { width: 46px; height: 46px; font-size: 1.3rem; border-radius: 14px; }
.contact-list small { display: block; font-size: .8125rem; color: var(--ink-2); font-weight: 500; }
.contact-list a { text-decoration: none; font-weight: 600; }
.contact-list a:hover { color: var(--accent); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Legales ---------- */
.legal { max-width: 780px; }
.legal h2 { font-size: 1.5rem; margin: 48px 0 14px; scroll-margin-top: 100px; }
.legal h3 { font-size: 1.1875rem; margin: 32px 0 10px; }
.legal p, .legal li { color: var(--ink-2); font-size: 1.0625rem; }
.legal p + p { margin-top: 14px; }
.legal ul { padding-left: 1.2em; display: grid; gap: 8px; margin: 12px 0; }
.legal-layout { display: grid; grid-template-columns: 260px 1fr; gap: clamp(32px, 5vw, 80px); }
.legal-nav { position: sticky; top: 104px; align-self: start; display: grid; gap: 4px; }
.legal-nav a { text-decoration: none; padding: 10px 14px; border-radius: 12px; color: var(--ink-2); font-weight: 500; }
.legal-nav a:hover { background: var(--surface-2); color: var(--ink); }
.legal-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 860px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-nav { position: static; display: flex; flex-wrap: wrap; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 64px 32px; margin-top: clamp(40px, 6vw, 80px); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand img { width: 120px; }

/* Logo en blanco cuando el sitio está en modo oscuro (sistema o botón de tema) */
:root[data-theme="dark"] .brand img,
:root[data-theme="dark"] .footer-brand img { filter: brightness(0) invert(1); }
.footer-brand p { margin-top: 18px; color: var(--ink-2); font-size: .9375rem; max-width: 34ch; }
.site-footer h4 { font-size: .9375rem; font-weight: 600; margin-bottom: 16px; letter-spacing: 0; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer ul a { text-decoration: none; color: var(--ink-2); font-size: .9375rem; }
.site-footer ul a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center;
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line);
  color: var(--ink-2); font-size: .875rem;
}
.social { display: flex; gap: 8px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Movimiento ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
  .js .reveal.is-visible { opacity: 1; transform: none; }

  .hero-enter > * { animation: rise .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 110ms); }
  .hero-media { animation: rise-media 1.1s var(--ease) .15s both; }
  .float-card { animation: rise .9s var(--ease) both; animation-delay: .7s; }
  .float-card--b { animation-delay: .85s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes rise-media { from { opacity: 0; transform: translateY(32px) scale(.98); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
