/* ==========================================================
   Géminis Servicios Profesionales
   Minimalista y práctico: fotografía real del rubro, titulares
   ligeros con marcador verde azulado, azul marino de la marca.
   ========================================================== */

:root {
  /* Marca (logo) */
  --navy-900: #002445;
  --navy: #003868;
  --blue: #0078b0;
  --teal: #00a890;
  --teal-600: #008878;
  --teal-700: #007d70;
  --mark: rgb(0 168 144 / 0.32);

  /* Neutros fríos */
  --ink: #0d2236;
  --ink-soft: #46596b;
  --line: #dde5eb;
  --surface: #ffffff;
  --surface-2: #f3f6f8;

  /* Tipografía */
  --font-display: "Lexend", "Albert Sans", system-ui, sans-serif;
  --font-body: "Albert Sans", system-ui, sans-serif;

  /* Movimiento */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  /* Ritmo */
  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(72px, 9vw, 128px);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--navy) var(--surface-2);
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--teal-600);
}

::selection { background: var(--teal); color: #fff; }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--surface-2); }
::-webkit-scrollbar-thumb { background: var(--navy); border-radius: 12px; border: 3px solid var(--surface-2); }

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--navy);
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.875rem, 1.4rem + 1.9vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 400;
}

h3 {
  font-size: 1.1875rem;
  line-height: 1.3;
  font-weight: 500;
}

p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-underline-offset: 0.2em; }

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

/* Marcador: banda verde azulada detrás de la palabra clave */
.mark {
  background: linear-gradient(transparent 58%, var(--mark) 58%, var(--mark) 92%, transparent 92%);
  -webkit-box-decoration-break: clone;
          box-decoration-break: clone;
  padding-inline: 0.06em;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px;
  text-decoration: none; font-weight: 600;
}
.skip:focus { top: 16px; }

/* ---------- Botones: rectos y sobrios ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 50px;
  padding: 0 26px;
  border: 1.5px solid transparent;
  border-radius: 2px;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn .icon { width: 1.15em; height: 1.15em; }
.btn .icon-arrow { transition: translate 260ms var(--ease-out); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 0.8125rem; }

.btn-primary { background: var(--teal-700); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgb(255 255 255 / 0.7); }

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--navy); }
  .btn:hover .icon-arrow { translate: 4px 0; }
  .btn-navy:hover { background: var(--teal-700); }
  .btn-outline:hover { background: var(--navy); color: #fff; }
  .btn-ghost-light:hover { background: #fff; color: var(--navy); border-color: #fff; }
}

/* ---------- Encabezado ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 20px -16px rgb(0 36 69 / 0.45);
}

.progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--teal);
  transform-origin: 0 50%;
  scale: 0 1;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 24px;
}
.brand img { height: 42px; width: auto; }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a:not(.btn) {
  padding: 10px 14px;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease;
}
.nav-cta { margin-left: 14px; }
@media (hover: hover) and (pointer: fine) {
  .nav a:not(.btn):hover { color: var(--teal-700); }
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
  color: var(--navy);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 160ms var(--ease-out);
}
.menu-toggle:active { transform: scale(0.95); }
.menu-toggle .icon { width: 22px; height: 22px; }

/* ---------- Portada: foto a todo el ancho ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(520px, 78vh, 720px);
  display: flex;
  align-items: center;
  color: #fff;
  background: var(--navy-900);
}
.hero-media {
  position: absolute;
  inset: 0 0 0 auto;
  width: 60%;
  z-index: -2;
  overflow: hidden;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 35%;
}
/* Capa de "vaho" que la pasada de limpieza retira */
.hero-wipe { display: none; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, var(--navy-900) 0%, var(--navy-900) 40%, rgb(0 36 69 / 0.8) 51%, rgb(0 46 90 / 0.3) 70%, rgb(0 56 104 / 0.1) 100%);
}
.hero-inner { padding-block: clamp(64px, 9vw, 112px); }

.hero h1 {
  max-width: 13em;
  color: #fff;
  font-size: clamp(2.375rem, 1.5rem + 3.4vw, 3.875rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 300;
}
.hero h1 .mark {
  background: linear-gradient(transparent 60%, rgb(0 168 144 / 0.75) 60%, rgb(0 168 144 / 0.75) 94%, transparent 94%);
  -webkit-box-decoration-break: clone;
          box-decoration-break: clone;
}

.lead {
  margin-top: 28px;
  max-width: 34em;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  color: #d9e6f0;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* ---------- Presentación ---------- */

.intro { padding-block: var(--section); }
.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(40px, 7vw, 104px);
  align-items: center;
}
.intro-copy p { margin-top: 24px; color: var(--ink-soft); max-width: 34em; }
.intro-copy .btn { margin-top: 32px; }

/* Marco desplazado azul marino, como en la referencia */
.framed {
  position: relative;
  margin: 0 22px 22px 0;
}
.framed::before {
  content: "";
  position: absolute;
  inset: -22px -22px auto auto;
  width: 62%;
  height: 58%;
  border: 6px solid var(--navy);
  border-left: 0;
  border-bottom: 0;
}
.framed img {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ---------- Servicios: mosaicos con foto ---------- */

.services {
  padding-block: var(--section);
  background: var(--surface-2);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px 64px;
  align-items: end;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.section-head p { color: var(--ink-soft); max-width: 30em; }

.tiles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.tile {
  position: relative;
  /* clip (no hidden): la proporción actúa como alto mínimo y el mosaico
     crece si el texto no cabe, en vez de cortarlo */
  overflow: clip;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: 4 / 3.4;
  background: var(--navy);
  color: #fff;
}
.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms var(--ease-out);
}
.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgb(0 36 69 / 0.15) 0%, rgb(0 36 69 / 0.55) 45%, rgb(0 36 69 / 0.92) 100%);
  transition: background-color 300ms ease;
}
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / 0.22) 48%, rgb(255 255 255 / 0.06) 54%, transparent 64%);
  translate: -110% 0;
}
.tile-body {
  position: relative;
  z-index: 2;
  padding-top: 56px;
  padding: 24px 24px 26px;
}
.tile h3 {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.tile h3::after {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  margin-top: 12px;
  background: var(--teal);
  transition: width 400ms var(--ease-out);
}
.tile p {
  margin-top: 12px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #dbe7f0;
}

@media (hover: hover) and (pointer: fine) {
  .tile p {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    translate: 0 8px;
    transition: max-height 400ms var(--ease-out), opacity 300ms ease, margin-top 400ms var(--ease-out), translate 400ms var(--ease-out);
  }
  .tile:hover img { transform: scale(1.06); }
  .tile:hover::after { translate: 110% 0; transition: translate 900ms var(--ease-out); }
  .tile:hover::before { background-color: rgb(0 36 69 / 0.3); }
  .tile:hover h3::after { width: 64px; }
  .tile:hover p { max-height: 8em; opacity: 1; margin-top: 12px; translate: 0 0; }
}

/* Sector salud: mosaicos grandes 2×2 */
.tiles-health { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.tiles-health .tile { aspect-ratio: 16 / 10; }
.tiles-health .tile h3 { font-size: 1.5rem; }
.tiles-health .tile-body { padding: 28px 30px 30px; }

/* Otros servicios: mosaicos compactos */
.more { padding-block: var(--section); }
.tiles-more { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tiles-more .tile { aspect-ratio: 4 / 5; }
.tiles-more .tile-body { padding: 20px 20px 22px; }
.tiles-more .tile h3 { font-size: 1.0625rem; }

.intro-copy p + p { margin-top: 16px; }

/* ---------- Diferencia ---------- */

.difference { padding-block: var(--section); }
.difference-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 104px);
  align-items: center;
}
.difference-photo { margin: 0; overflow: hidden; }
.difference-photo img { width: 100%; aspect-ratio: 4 / 4.4; object-fit: cover; }
.difference-copy > p { margin-top: 20px; color: var(--ink-soft); }

.checks {
  list-style: none;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
}
.checks li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-block: 15px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 1.0625rem;
  color: var(--navy);
}
.checks li:first-child { border-top: 1px solid var(--line); }
.checks .icon path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.checks .icon {
  width: 28px;
  height: 28px;
  padding: 5px;
  border-radius: 50%;
  background: var(--teal-700);
  color: #fff;
  stroke-width: 2.6;
}

/* ---------- Misión y visión ---------- */

.purpose {
  padding-block: clamp(64px, 8vw, 104px);
  background: var(--navy);
  color: #d4e2ee;
}
.purpose-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 6vw, 88px);
}
.purpose h2 {
  color: #fff;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
}
.purpose h2::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  margin-top: 16px;
  background: var(--teal);
}
.purpose p { margin-top: 22px; font-size: 1.0625rem; line-height: 1.7; max-width: 36em; }

/* ---------- Fundador ---------- */

.founder {
  padding-top: var(--section);
  background: var(--surface-2);
  overflow: hidden;
}
.founder-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: end;
}
.founder-photo img {
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
  mix-blend-mode: multiply;
  -webkit-mask-image: linear-gradient(180deg, #000 85%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 85%, transparent 100%);
}
.founder-copy { padding-bottom: var(--section); }
.founder-quote {
  margin-top: 26px;
  font-family: var(--font-display);
  font-size: clamp(1.1875rem, 1.05rem + 0.6vw, 1.5rem);
  font-weight: 300;
  line-height: 1.45;
  color: var(--navy);
  max-width: 30em;
}
.founder-copy > p:not(.founder-quote):not(.founder-role) { margin-top: 18px; color: var(--ink-soft); max-width: 34em; }
.founder-role { display: grid; margin-top: 32px; }
.founder-role strong { font-family: var(--font-display); font-weight: 500; color: var(--navy); }
.founder-role span { color: var(--teal-700); font-size: 0.9375rem; }

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

.contact { padding-block: var(--section); }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(40px, 7vw, 104px);
  align-items: start;
}
.contact-info > p { margin-top: 20px; color: var(--ink-soft); max-width: 28em; }

.contact-list { list-style: none; padding: 0; margin: 36px 0 0; display: grid; }
.contact-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding-block: 18px;
  border-top: 1px solid var(--line);
}
.contact-list li:last-child { border-bottom: 1px solid var(--line); }
.contact-list .icon { color: var(--teal-700); width: 24px; height: 24px; margin-top: 2px; }
.contact-list span { display: block; font-size: 0.8125rem; color: var(--ink-soft); }
.contact-list a {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  overflow-wrap: anywhere;
}
@media (hover: hover) and (pointer: fine) {
  .contact-list a:hover { text-decoration: underline; text-decoration-color: var(--teal); }
}

.quote {
  background: var(--surface-2);
  padding: clamp(24px, 4vw, 44px);
  border-top: 4px solid var(--navy);
}
.quote h3 { font-size: 1.5rem; font-weight: 400; margin-bottom: 24px; }

.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label { font-weight: 600; font-size: 0.9375rem; color: var(--ink); }
.optional { font-weight: 400; color: var(--ink-soft); }

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 2px;
  padding: 13px 14px;
  min-height: 50px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  appearance: none;
}
.field textarea { resize: vertical; min-height: 96px; }
.field ::placeholder { color: #5a6e80; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal-600);
  box-shadow: 0 0 0 4px rgb(0 168 144 / 0.16);
}
.field [aria-invalid="true"] { border-color: #c2412d; }

.select { position: relative; }
.select::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--navy);
  border-bottom: 2px solid var(--navy);
  translate: 0 -70%;
  rotate: 45deg;
  pointer-events: none;
}
.select select { padding-right: 40px; cursor: pointer; }
.select select:invalid { color: #5a6e80; }

.error { font-size: 0.875rem; color: #b13a28; }
.error:empty { display: none; }

.quote-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.quote-actions .btn { flex: 1 1 200px; }
.quote-note { margin-top: 16px; font-size: 0.875rem; color: var(--ink-soft); }

/* ---------- Pie ---------- */

.site-footer {
  background: var(--navy-900);
  color: #b9cddd;
  padding-top: 64px;
  font-size: 0.9375rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}
.footer-brand img { height: 44px; width: auto; filter: brightness(0) invert(1); }
.footer-brand p { margin-top: 18px; max-width: 22em; }
.footer-nav,
.footer-contact { display: grid; gap: 10px; align-content: start; }
.site-footer a { color: #e3edf5; text-decoration: none; overflow-wrap: anywhere; }
@media (hover: hover) and (pointer: fine) {
  .site-footer a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--teal); }
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 22px;
  border-top: 1px solid rgb(255 255 255 / 0.1);
  font-size: 0.8125rem;
  color: #8fa8bc;
}

/* ---------- WhatsApp flotante ---------- */

.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--teal-700);
  color: #fff;
  box-shadow: 0 4px 10px rgb(0 36 69 / 0.2), 0 14px 30px -8px rgb(0 60 52 / 0.5);
  transition: transform 160ms var(--ease-out), opacity 200ms ease, translate 300ms var(--ease-out);
}
.wa-float .icon { width: 26px; height: 26px; }
.wa-float:active { transform: scale(0.94); }
.js .wa-float:not(.is-visible) { opacity: 0; translate: 0 12px; pointer-events: none; }

/* ---------- Movimiento ----------
   Gesto de la marca: "limpieza que se nota". La foto aparece empañada y una
   pasada de luz la limpia; luego el marcador verde se pinta bajo las palabras
   clave. El mismo gesto, en pequeño, acompaña cada sección al hacer scroll. */

@media (prefers-reduced-motion: no-preference) {
  /* 1. Portada: pasada de limpieza */
  .hero-wipe {
    display: block;
    position: absolute;
    inset: 0;
    pointer-events: none;
    -webkit-backdrop-filter: blur(14px) saturate(0.35) brightness(1.18);
            backdrop-filter: blur(14px) saturate(0.35) brightness(1.18);
    background: rgb(214 228 238 / 0.35);
    -webkit-mask-image: linear-gradient(90deg, transparent 0 42%, #000 58% 100%);
            mask-image: linear-gradient(90deg, transparent 0 42%, #000 58% 100%);
    -webkit-mask-size: 250% 100%;
            mask-size: 250% 100%;
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    animation: wipe-clear 1500ms cubic-bezier(0.65, 0, 0.35, 1) 350ms both;
  }
  /* El brillo de la pasada: una franja de luz que cruza la foto */
  .hero-media::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 22%;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.28) 55%, rgb(255 255 255 / 0.5) 62%, transparent);
    mix-blend-mode: soft-light;
    translate: -100% 0;
    animation: streak 1500ms cubic-bezier(0.65, 0, 0.35, 1) 350ms both;
  }
  .hero-img { animation: settle 2600ms var(--ease-out) both; }

  .hero h1,
  .lead,
  .hero-actions {
    animation: hero-in 1000ms var(--ease-out) both;
  }
  .hero h1 { animation-delay: 120ms; }
  .lead { animation-delay: 260ms; }
  .hero-actions { animation-delay: 400ms; }
  .hero h1 .mark {
    background-repeat: no-repeat;
    background-size: 100% 100%;
    animation: mark-paint 700ms var(--ease-out) both;
    animation-delay: 1250ms;
  }
  .hero h1 .mark + .mark,
  .hero h1 .mark:last-child { animation-delay: 1500ms; }

  .wa-float { transition: transform 160ms var(--ease-out), opacity 300ms ease, translate 500ms var(--ease-out), scale 500ms var(--ease-out); }
  .js .wa-float:not(.is-visible) { scale: 0.8; }
}

@keyframes wipe-clear {
  from { -webkit-mask-position: 100% 0; mask-position: 100% 0; }
  to   { -webkit-mask-position: 0% 0;   mask-position: 0% 0; visibility: hidden; }
}
@keyframes streak { to { translate: 560% 0; } }
@keyframes settle { from { scale: 1.1; } }
@keyframes rise-in { from { opacity: 0; translate: 0 26px; } }
/* Portada: parte ya legible para capturas y miniaturas */
@keyframes hero-in { from { opacity: 0.5; translate: 0 18px; } }
@keyframes mark-paint { from { background-size: 0% 100%; } }

/* 2. Al hacer scroll: el mismo gesto, más corto */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* Barra de progreso de lectura bajo el encabezado */
    .progress {
      animation: progress linear both;
      animation-timeline: scroll(root);
    }

    /* Títulos: suben y su marcador se pinta */
    .section-head h2,
    .intro-copy h2,
    .difference-copy h2,
    .founder-copy h2,
    .contact-info h2 {
      animation: rise-in linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 25%;
    }
    main h2 .mark {
      background-repeat: no-repeat;
      background-size: 100% 100%;
      animation: mark-paint linear both;
      animation-timeline: view();
      animation-range: entry 70% cover 38%;
    }

    .section-head p,
    .intro-copy p,
    .intro-copy .btn,
    .difference-copy > p,
    .founder-copy > p,
    .contact-info > p,
    .contact-list li {
      animation: fade-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 22%;
    }

    /* Fotos: entran empañadas y se limpian */
    .tile {
      animation: tile-in linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 30%;
    }
    .tiles .tile:nth-child(2n) { animation-range: entry 8% cover 36%; }
    .tiles-more .tile:nth-child(3) { animation-range: entry 12% cover 40%; }
    .tiles-more .tile:nth-child(4) { animation-range: entry 18% cover 46%; }
    .tile img {
      animation: defog linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 45%;
    }
    .framed img,
    .difference-photo img {
      animation: wipe-in linear both, defog-flat linear both;
      animation-timeline: view(), view();
      animation-range: entry 0% cover 40%, entry 0% cover 50%;
    }
    .framed::before {
      animation: frame-draw linear both;
      animation-timeline: view();
      animation-range: entry 25% cover 45%;
    }

    /* Diferencias: cada check se dibuja al llegar a su fila */
    .checks li {
      animation: slide-in linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 18%;
    }
    .checks .icon {
      animation: check-pop linear both;
      animation-timeline: view();
      animation-range: entry 40% cover 24%;
    }
    .checks .icon path {
      animation: check-draw linear both;
      animation-timeline: view();
      animation-range: entry 50% cover 28%;
    }

    /* Misión y visión: la línea verde crece */
    .purpose article { animation: fade-rise linear both; animation-timeline: view(); animation-range: entry 0% cover 25%; }
    .purpose h2::after {
      transform-origin: 0 50%;
      animation: line-grow linear both;
      animation-timeline: view();
      animation-range: entry 40% cover 35%;
    }

    /* Fundador: profundidad suave entre foto y texto */
    .founder-photo img {
      animation: parallax linear both;
      animation-timeline: view();
      animation-range: cover 0% cover 100%;
    }

    .quote {
      animation: lift linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 30%;
    }
  }
}

@keyframes progress { to { scale: 1 1; } }
@keyframes fade-rise { from { opacity: 0; translate: 0 28px; } }
@keyframes tile-in { from { opacity: 0; translate: 0 60px; clip-path: inset(12% 0 0 0); } }
@keyframes defog { from { filter: blur(14px) saturate(0.3) brightness(1.2); scale: 1.14; } }
@keyframes defog-flat { from { filter: blur(14px) saturate(0.3) brightness(1.2); } }
@keyframes wipe-in { from { clip-path: inset(0 100% 0 0); } }
@keyframes frame-draw { from { clip-path: inset(0 0 100% 100%); } }
@keyframes slide-in { from { opacity: 0; translate: -24px 0; } }
@keyframes check-pop { from { scale: 0.4; opacity: 0; } 70% { scale: 1.12; opacity: 1; } }
@keyframes check-draw { from { stroke-dashoffset: 1; } }
@keyframes line-grow { from { scale: 0 1; } }
@keyframes parallax { from { translate: 0 70px; } to { translate: 0 -20px; } }
@keyframes lift { from { opacity: 0; translate: 0 70px; box-shadow: 0 0 0 rgb(0 36 69 / 0); } to { box-shadow: 0 30px 60px -40px rgb(0 36 69 / 0.4); } }

/* ---------- Responsive ---------- */

@media (min-width: 961px) and (max-width: 1260px) {
  .nav a:not(.btn) { padding: 10px 9px; letter-spacing: 0.05em; }
  .nav-cta { margin-left: 8px; padding: 0 14px; }
  .hero-media { width: 54%; }
  .hero::before { background: linear-gradient(90deg, var(--navy-900) 0%, var(--navy-900) 47%, rgb(0 36 69 / 0.8) 56%, rgb(0 46 90 / 0.3) 72%, rgb(0 56 104 / 0.1) 100%); }
  .hero h1 { font-size: 2.625rem; }
  .lead { max-width: 30em; }
}

@media (max-width: 960px) {
  .menu-toggle { display: inline-flex; }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgb(0 36 69 / 0.35);
    opacity: 0;
    translate: 0 -8px;
    visibility: hidden;
    transition: opacity 180ms ease-out, translate 220ms var(--ease-out), visibility 0s linear 220ms;
  }
  .nav.is-open {
    opacity: 1;
    translate: 0 0;
    visibility: visible;
    transition: opacity 180ms ease-out, translate 220ms var(--ease-out), visibility 0s;
  }
  .nav a:not(.btn) { padding: 16px 4px; border-bottom: 1px solid var(--line); }
  .nav-cta { margin: 16px 0 0; min-height: 50px; }

  .intro-grid,
  .difference-grid,
  .contact-grid,
  .founder-grid,
  .section-head,
  .purpose-grid { grid-template-columns: 1fr; }

  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles-more { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles-more .tile { aspect-ratio: 4 / 3.4; }
  .hero-media { width: 100%; }
  .hero::before { background: linear-gradient(90deg, rgb(0 36 69 / 0.94) 0%, rgb(0 36 69 / 0.78) 60%, rgb(0 36 69 / 0.5) 100%); }
  .difference-photo { order: 2; }
  .difference-photo img { aspect-ratio: 16 / 10; }

  .founder-grid { gap: 0; }
  .founder-copy { padding-bottom: 40px; order: -1; }
  .founder-photo img { max-width: 340px; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .header-inner { height: 66px; }
  .brand img { height: 34px; }
  html { scroll-padding-top: 74px; }

  .hero { min-height: 0; }
  .hero::before {
    background: linear-gradient(180deg, rgb(0 36 69 / 0.7) 0%, rgb(0 36 69 / 0.9) 100%);
  }
  .hero-media { width: 100%; }
  .hero-img { object-position: 70% 50%; }
  .hero-actions .btn { flex: 1 1 100%; }

  .framed { margin: 14px 14px 0 0; }
  .framed::before { inset: -14px -14px auto auto; border-width: 4px; }

  .tiles { grid-template-columns: 1fr; gap: 12px; }
  .tiles-health .tile,
  .tiles-more .tile { aspect-ratio: 4 / 3; }
  .tiles-more { grid-template-columns: 1fr; }
  .tiles-health .tile-body { padding: 24px; }
  .tiles-health .tile h3 { font-size: 1.25rem; }
  .tile { aspect-ratio: 4 / 3; }

  .footer-grid { grid-template-columns: 1fr; }
  .wa-float { right: 16px; bottom: 16px; width: 52px; height: 52px; }
}

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