/* =============================================================
   Clínica Solana — demo de sitio para clínicas (Divsours Care)
   Arquetipo: glassmorphism claro, azul médico + menta.
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:          #eef4fb;
  --bg-2:        #dfeaf8;
  --paper:       #ffffff;
  --ink:         #0a2240;
  --ink-soft:    #3a5272;
  --ink-mute:    #556b87;
  --navy:        #0d3b7a;
  --blue:        #1f6fe0;
  --blue-2:      #3b82f0;
  --sky:         #bcd8f5;
  --mint:        #6ee7a0;
  --mint-ink:    #0b3d24;
  --line:        rgba(10, 34, 64, 0.1);

  --glass:        rgba(255, 255, 255, 0.55);
  --glass-solid:  rgba(255, 255, 255, 0.86);
  --glass-border: rgba(255, 255, 255, 0.8);
  --shadow:       0 30px 60px -32px rgba(13, 59, 122, 0.45);
  --shadow-sm:    0 12px 30px -16px rgba(13, 59, 122, 0.35);

  --r-xl: 36px;
  --r-lg: 26px;
  --r-md: 18px;

  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --gutter: 16px;
  --container: 1200px;
  --nav-h: 76px;
}

@property --mesh-a {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; list-style: none; }
p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.02em; }
address { font-style: normal; }
::selection { background: var(--blue); color: #fff; }

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

/* =============================================================
   3. Utilidades
   ============================================================= */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.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-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: 0.6rem 1rem; border-radius: 10px;
  background: var(--navy); color: #fff; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* Vidrio: primero el respaldo sólido, luego el desenfoque si el navegador lo soporta */
.glass {
  background: var(--glass-solid);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}
@supports ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
  .glass {
    background: var(--glass);
    -webkit-backdrop-filter: blur(18px) saturate(170%);
    backdrop-filter: blur(18px) saturate(170%);
  }
}

/* =============================================================
   4. Tipografía
   ============================================================= */
h2 {
  font-size: clamp(2rem, 6vw, 3.1rem);
  font-weight: 800;
  color: var(--ink);
}
h3 { font-size: 1.15rem; font-weight: 700; }

.chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.01em;
}
.chip-glass {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--glass-border);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}
.chip-mint { background: var(--mint); color: var(--mint-ink); margin-bottom: 1rem; }

/* =============================================================
   5. Componentes
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-weight: 700; font-size: 0.95rem;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), background 0.3s;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  box-shadow: 0 14px 28px -14px rgba(13, 59, 122, 0.8);
}
.btn-light {
  color: var(--navy);
  background: #fff;
  padding-right: 0.45rem;
  box-shadow: var(--shadow-sm);
}
.btn-block { width: 100%; }
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); }
  .btn-primary:hover { box-shadow: 0 20px 36px -14px rgba(13, 59, 122, 0.85); }
}

.arrow-dot {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--mint); color: var(--mint-ink);
  flex: none;
  transition: transform 0.35s var(--ease-out);
}
.arrow-dot svg, .btn-round svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.arrow-white { background: #fff; color: var(--navy); }

.btn-round {
  display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: #fff; color: var(--navy);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease-out);
}
.btn-round-sm { width: 42px; height: 42px; }
@media (hover: hover) {
  .btn-round:hover { transform: rotate(-45deg); }
}

/* Botón magnético (lo arma main.js) */
.has-magnetic { position: relative; isolation: isolate; }
.magnetic-inner {
  display: inline-flex; align-items: center; justify-content: center; gap: inherit;
  will-change: transform;
}

/* ---------- Barra de demostración ---------- */
.demo-bar {
  position: relative; z-index: 60;
  background: var(--ink);
  color: #dbe7f7;
  font-size: 0.8rem;
  text-align: center;
  padding: 0.5rem var(--gutter);
}
.demo-bar strong { color: #fff; }
.demo-bar a {
  color: var(--mint);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-left: 0.25rem;
  white-space: nowrap;
}

/* ---------- Navegación ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  padding-top: 12px;
}
.nav-inner {
  display: flex; align-items: center; gap: 1rem;
  min-height: 60px;
}
.nav-inner::before {
  /* Pastilla de vidrio detrás de la barra */
  content: ""; position: absolute; inset: 0 var(--gutter);
  border-radius: 999px;
  z-index: -1;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}
.nav-inner { position: relative; padding-left: calc(var(--gutter) + 0.5rem); padding-right: calc(var(--gutter) + 0.4rem); }
.nav.is-scrolled .nav-inner::before { opacity: 1; }
@supports ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
  .nav-inner::before {
    background: rgba(255, 255, 255, 0.6);
    -webkit-backdrop-filter: blur(18px) saturate(170%);
    backdrop-filter: blur(18px) saturate(170%);
  }
}

.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 800; color: var(--ink); }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand-text small { font-size: 0.68rem; font-weight: 600; color: var(--ink-mute); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 3px; }

.nav-menu { display: none; margin-inline: auto; }
.nav-links { display: flex; gap: 0.3rem; }
.nav-links a {
  position: relative;
  display: block;
  padding: 0.5rem 0.85rem;
  font-size: 0.92rem; font-weight: 600;
  color: var(--ink-soft);
  border-radius: 999px;
  transition: color 0.25s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0.85rem; right: 0.85rem; bottom: 0.3rem;
  height: 2px; border-radius: 2px;
  background: var(--blue);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.45s var(--ease-out);
}
.nav-links a:hover, .nav-links a[aria-current="true"] { color: var(--ink); }
.nav-links a:hover::after, .nav-links a[aria-current="true"]::after { transform: scaleX(1); transform-origin: left; }

.nav-cta { display: none; }

.nav-toggle {
  margin-left: auto;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; box-shadow: var(--shadow-sm);
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink);
  transition: transform 0.35s var(--ease-out), opacity 0.2s;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% + 10px);
  padding: 1rem;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}
.mobile-menu ul { display: grid; gap: 0.15rem; margin-bottom: 0.9rem; }
.mobile-menu a:not(.btn) {
  display: block; padding: 0.75rem 0.9rem; border-radius: 14px;
  font-weight: 700; font-size: 1.05rem;
}
.mobile-menu a:not(.btn):hover { background: var(--bg); }
.mobile-menu .btn { width: 100%; }

/* =============================================================
   6. Secciones
   ============================================================= */
section { position: relative; }

/* ---------- Hero ---------- */
.hero {
  padding: 2.5rem 0 3rem;
  margin-top: calc(-1 * (var(--nav-h) - 4px));
  padding-top: calc(var(--nav-h) + 1.5rem);
  isolation: isolate;
}
.hero-mesh {
  position: absolute; inset: -10% -10% 0; z-index: -2;
  background:
    radial-gradient(40% 45% at 20% 25%, #cfe4ff 0%, transparent 70%),
    radial-gradient(35% 40% at 85% 30%, #d6f6e6 0%, transparent 70%),
    radial-gradient(45% 50% at 60% 85%, #c4d6ff 0%, transparent 70%),
    linear-gradient(180deg, #e6f0fc 0%, var(--bg) 100%);
  filter: blur(40px) saturate(130%);
  animation: meshDrift 30s ease-in-out infinite;
  pointer-events: none;
}
@keyframes meshDrift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(-3%, 2%, 0) scale(1.08); }
}
.hero-word {
  position: absolute; z-index: -1;
  top: calc(var(--nav-h) - 0.5rem); left: 50%;
  transform: translateX(-50%);
  font-size: clamp(5rem, 24vw, 19rem);
  font-weight: 800; line-height: 0.8; letter-spacing: -0.05em;
  color: #fff;
  opacity: 0.75;
  white-space: nowrap;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 95%);
  mask-image: linear-gradient(180deg, #000 30%, transparent 95%);
}

.hero-grid { display: grid; gap: 2.5rem; }
.hero-copy { padding-top: 1.5rem; }
.hero-copy .chip { margin-bottom: 1.25rem; }
.pulse {
  width: 9px; height: 9px; border-radius: 50%;
  background: #18b765;
  box-shadow: 0 0 0 0 rgba(24, 183, 101, 0.5);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(24, 183, 101, 0.5); }
  70%  { box-shadow: 0 0 0 9px rgba(24, 183, 101, 0); }
  100% { box-shadow: 0 0 0 0 rgba(24, 183, 101, 0); }
}

.hero-title {
  font-size: clamp(2.6rem, 12.5vw, 3.8rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 1.4rem;
}
.hero-title .line { display: block; overflow: clip; padding-bottom: 0.06em; }
.hero-title .line-in { display: inline-flex; align-items: center; gap: 0.12em; }
.hero-title .line:nth-child(2) .line-in {
  background: linear-gradient(90deg, var(--navy), var(--blue-2));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.title-icon {
  width: 0.95em; height: 0.95em;
  object-fit: contain;
  transform: rotate(-12deg);
  filter: drop-shadow(0 6px 10px rgba(13, 59, 122, 0.25));
}

.hero-sub { max-width: 34rem; color: var(--ink-soft); font-size: 1.02rem; margin-bottom: 1.75rem; }
.hero-sub strong { color: var(--ink); }
.hero-actions { display: flex; align-items: center; gap: 0.75rem; }

.hero-visual {
  position: relative;
  padding-bottom: 1rem;
}
.portrait {
  position: relative;
  width: 64%;
  max-width: 360px;
  aspect-ratio: 3 / 4;
  border-radius: 999px 999px var(--r-xl) var(--r-xl);
  overflow: hidden;
  background: linear-gradient(180deg, #b9d5f2, #a7c8eb);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }

.float-chip {
  position: absolute; z-index: 3;
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  border-radius: 16px;
  font-size: 0.82rem; line-height: 1.25; color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}
@supports ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
  .float-chip {
    background: rgba(255, 255, 255, 0.66);
    -webkit-backdrop-filter: blur(14px) saturate(170%);
    backdrop-filter: blur(14px) saturate(170%);
  }
}
.float-chip small { color: var(--ink-mute); font-size: 0.72rem; }
.float-chip strong { font-size: 1.05rem; }
.chip-slots { top: 7%; right: 0; }
.chip-years { bottom: 9%; left: 0; }
.chip-icon {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--navy); color: #fff;
}
.chip-icon svg { width: 18px; height: 18px; fill: currentColor; }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #18b765;
  box-shadow: 0 0 0 4px rgba(24, 183, 101, 0.18);
}

.organ { pointer-events: none; }
.organ img { filter: drop-shadow(0 30px 40px rgba(13, 59, 122, 0.22)); }
.organ-hero {
  position: absolute; z-index: 2;
  right: -3%; bottom: 0;
  width: 50%;
  max-width: 340px;
}
.organ-hero img { animation: bob 7s ease-in-out infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-14px) rotate(1.5deg); }
}
.chip-organ { display: none; left: 4%; bottom: 4%; font-weight: 700; color: var(--navy); white-space: nowrap; }

/* ---------- Servicios ---------- */
.services { padding: 1rem 0 4rem; }
.service-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 78%;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  padding: 0.5rem var(--gutter) 1.5rem;
  margin-inline: calc(-1 * var(--gutter));
  scrollbar-width: none;
  touch-action: pan-x pan-y;
}
.service-row::-webkit-scrollbar { display: none; }
.service-card { scroll-snap-align: start; }
.service-card a {
  position: relative;
  display: flex; align-items: flex-end; justify-content: flex-end;
  min-height: 230px;
  padding: 1.25rem;
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.7));
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.service-card h3 { max-width: 11ch; text-align: right; position: relative; z-index: 2; }
.service-img {
  position: absolute; z-index: 1;
  left: -6%; top: 50%;
  width: 62%;
  transform: translateY(-50%);
  filter: drop-shadow(0 18px 24px rgba(13, 59, 122, 0.18));
  transition: transform 0.7s var(--ease-out);
}
.service-card .arrow-dot { position: absolute; top: 1.1rem; right: 1.1rem; z-index: 2; }
.service-card.is-accent a {
  color: #fff;
  background:
    radial-gradient(42% 52% at 28% 50%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.55) 45%, transparent 75%),
    linear-gradient(160deg, #3b82f0 0%, #1a56b8 100%);
}
@media (hover: hover) {
  .service-card a:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
  .service-card a:hover .service-img { transform: translateY(-50%) scale(1.07) rotate(-3deg); }
  .service-card a:hover .arrow-dot { transform: rotate(45deg); }
}

.also { margin-top: 1rem; }
.also-title { font-weight: 700; font-size: 0.9rem; color: var(--ink-mute); margin-bottom: 0.75rem; }
.pill-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill-list li {
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 0.88rem; font-weight: 600; color: var(--ink-soft);
}

/* ---------- Nosotros ---------- */
.about { padding: 4rem 0; }
.about-grid { display: grid; gap: 2.5rem; align-items: center; }
.about-media { position: relative; }
.about-media > img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
}
.about-card {
  position: absolute; right: 4%; bottom: -1.5rem;
  width: min(62%, 240px);
  padding: 1rem 1.1rem;
  border-radius: var(--r-md);
}
.about-badge {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.25rem 0.75rem 0.25rem 0.25rem;
  border-radius: 999px; background: #fff;
  font-weight: 800; font-size: 0.85rem;
  margin-bottom: 0.6rem;
}
.about-badge .brand-mark { width: 26px; height: 26px; }
.about-since { font-size: 1.6rem; font-weight: 800; line-height: 1; color: var(--navy); }
.about-since small { display: block; font-size: 0.75rem; font-weight: 700; color: var(--ink-mute); margin-bottom: 2px; }
.about-note { margin-top: 0.5rem; font-size: 0.85rem; font-weight: 600; line-height: 1.35; }

.about-copy h2 { margin-bottom: 1rem; }
.about-copy > p { color: var(--ink-soft); max-width: 34rem; }
.about-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.25rem; margin-top: 1.75rem; }
.link-quiet { display: inline-flex; align-items: center; gap: 0.7rem; font-weight: 700; font-size: 0.92rem; }
.link-quiet small { display: block; font-weight: 600; color: var(--ink-mute); font-size: 0.75rem; }

.stats {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 1rem;
  margin-top: 4.5rem;
  text-align: center;
}
.stats > div { display: flex; flex-direction: column-reverse; gap: 0.35rem; }
.stats dd { font-size: clamp(2rem, 8vw, 3.2rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--ink); }
.stats dt { font-size: 0.85rem; font-weight: 600; color: var(--ink-mute); }

/* ---------- Médicos ---------- */
.team { padding: 4rem 0; }
.section-head { margin-bottom: 2rem; }
.team-grid { display: grid; gap: 1.25rem; }
.doctor {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: linear-gradient(180deg, #b9d5f2, #a7c8eb);
  box-shadow: var(--shadow-sm);
  isolation: isolate;
}
.doctor img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover; object-position: 50% 10%;
  transition: transform 0.8s var(--ease-out);
}
.doctor-info {
  position: absolute; left: 0.75rem; right: 0.75rem; bottom: 0.75rem;
  padding: 1rem 1.1rem;
  border-radius: var(--r-md);
}
.doctor-info h3 { font-size: 1.1rem; }
.doctor-role { font-size: 0.8rem; font-weight: 700; color: var(--blue); margin: 0.15rem 0 0.35rem; }
.doctor-info p:not(.doctor-role) { font-size: 0.88rem; color: var(--ink-soft); line-height: 1.4; }
.doctor-info a {
  display: inline-block; margin-top: 0.6rem;
  font-size: 0.85rem; font-weight: 700; color: var(--navy);
  text-decoration: underline; text-decoration-color: rgba(13, 59, 122, 0.3); text-underline-offset: 4px;
}
@media (hover: hover) {
  .doctor:hover img { transform: scale(1.04); }
  .doctor-info a:hover { text-decoration-color: currentColor; }
}

/* ---------- Agenda ---------- */
.agenda { padding: 4rem 0; }
.agenda-halo {
  position: absolute; inset: -10% -10% -10%; z-index: -1;
  background:
    radial-gradient(35% 40% at 80% 40%, rgba(110, 231, 160, 0.28), transparent 70%),
    radial-gradient(40% 45% at 15% 60%, rgba(59, 130, 240, 0.18), transparent 70%);
  filter: blur(30px);
  pointer-events: none;
}
.agenda-grid { display: grid; gap: 2.5rem; align-items: start; }
.agenda-copy h2 { margin-bottom: 1rem; }
.agenda-copy > p { color: var(--ink-soft); max-width: 30rem; }
.steps { display: grid; gap: 0.6rem; margin: 1.75rem 0; counter-reset: none; }
.steps li { display: flex; align-items: center; gap: 0.85rem; font-weight: 700; }
.step-num {
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 14px; flex: none;
  background: #fff; border: 1px solid var(--line);
  font-size: 0.85rem; color: var(--blue);
}
.agenda-photo {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
}

.agenda-card {
  padding: 1.25rem;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
}
.agenda-mock { display: grid; gap: 1.1rem; }
.agenda-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.agenda-title { font-size: 1.2rem; font-weight: 800; }
.agenda-month { font-size: 0.85rem; font-weight: 700; color: var(--ink-mute); }

.field { border: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { display: block; font-size: 0.8rem; font-weight: 700; color: var(--ink-mute); margin-bottom: 0.45rem; padding: 0; }
.field select {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 2.5rem 0.7rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a2240' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.9rem center / 18px;
  font-weight: 600;
  -webkit-appearance: none; appearance: none;
}

.agenda-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.45rem; }
.agenda-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.45rem; }
.day, .slot { position: relative; cursor: pointer; }
.day input, .slot input {
  position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer;
}
.day span, .slot span {
  display: grid; place-items: center;
  min-height: 48px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 700;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.3s var(--ease-out);
}
.day span { padding: 0.5rem 0; line-height: 1.1; font-size: 1.05rem; }
.day small { display: block; font-size: 0.7rem; font-weight: 600; color: var(--ink-mute); }
.day input:checked + span, .slot input:checked + span {
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: #fff; border-color: transparent;
}
.day input:checked + span small { color: #cfe0f7; }
.day input:focus-visible + span, .slot input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.slot input:disabled + span { color: #9aa9bd; background: transparent; text-decoration: line-through; cursor: not-allowed; }
.slot input:disabled { cursor: not-allowed; }
@media (hover: hover) {
  .day:hover input:not(:checked) + span, .slot:hover input:not(:checked):not(:disabled) + span { border-color: var(--blue); }
}
.agenda-note {
  font-size: 0.8rem; color: var(--ink-mute); text-align: center;
}
.agenda-note.is-highlight { color: var(--navy); font-weight: 700; }

/* ---------- Preguntas ---------- */
.faq { padding: 4rem 0; }
.faq-grid { display: grid; gap: 1rem; }
.faq-list { display: grid; gap: 0.75rem; }
.faq-item { border-radius: var(--r-md); }
.faq-item summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 3.5rem 1.1rem 1.2rem;
  font-weight: 700;
  border-radius: var(--r-md);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; position: absolute; right: 1rem; top: 50%;
  width: 30px; height: 30px; margin-top: -15px; border-radius: 50%;
  background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b3d24' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") no-repeat center / 16px;
  transition: transform 0.4s var(--ease-out);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 1.2rem 1.2rem; color: var(--ink-soft); max-width: 40rem; }

/* ---------- CTA final ---------- */
.final-cta { padding: 2rem 0 5rem; }
.final-card {
  position: relative;
  display: grid; gap: 1.25rem; justify-items: start;
  padding: 2rem 1.5rem;
  border-radius: var(--r-xl);
  color: #fff;
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(110, 231, 160, 0.35), transparent 60%),
    linear-gradient(135deg, var(--navy) 0%, #1a5fcc 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
}
.final-card h2 { color: #fff; font-size: clamp(1.8rem, 6vw, 2.6rem); }
.final-card p { color: #d6e4f8; margin-top: 0.4rem; }
.final-organ {
  position: absolute; z-index: -1;
  right: -12%; bottom: -30%;
  width: 60%; max-width: 320px;
  opacity: 0.4;
}

/* ---------- Pie ---------- */
.footer {
  background: var(--ink);
  color: #c7d5e8;
  /* Abajo deja lugar para que el botón de WhatsApp no tape el último renglón */
  padding: 3.5rem 0 calc(1.5rem + 80px);
  font-size: 0.92rem;
}
.footer .brand { color: #fff; }
.footer .brand-text small { color: #9fb3cf; }
.footer-grid { display: grid; gap: 2rem; }
.footer-brand p { margin-top: 0.8rem; }
.footer-title { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; margin-bottom: 0.7rem; }
.footer ul { display: grid; gap: 0.35rem; }
.footer a:not(.brand) { text-decoration: underline; text-decoration-color: rgba(199, 213, 232, 0.3); text-underline-offset: 4px; }
.footer a:hover { color: #fff; text-decoration-color: currentColor; }
.footer small { color: #9fb3cf; }
.footer-bottom {
  display: grid; gap: 0.5rem;
  margin-top: 2.5rem; padding-top: 1.25rem;
  border-top: 1px solid rgba(199, 213, 232, 0.15);
  font-size: 0.8rem; color: #9fb3cf;
}

/* ---------- WhatsApp flotante ---------- */
.wa {
  position: fixed; z-index: 70;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 0.75rem;
  pointer-events: none;
}
.wa-fab {
  position: relative;
  display: grid; place-items: center;
  width: 60px; height: 60px; border-radius: 50%;
  background: #25d366;
  color: #fff;
  box-shadow: 0 14px 30px -10px rgba(18, 140, 70, 0.7), 0 4px 10px rgba(10, 34, 64, 0.15);
  pointer-events: auto;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.wa-fab svg { width: 30px; height: 30px; fill: currentColor; }
.wa-fab::before {
  /* Onda que late alrededor del botón */
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: #25d366;
  z-index: -1;
  animation: waRing 2.6s ease-out infinite;
}
@keyframes waRing {
  0%   { transform: scale(1); opacity: 0.45; }
  80%, 100% { transform: scale(1.55); opacity: 0; }
}
.wa-fab:focus-visible { outline-offset: 4px; border-radius: 50%; }
@media (hover: hover) {
  .wa-fab:hover { transform: scale(1.08); box-shadow: 0 18px 36px -10px rgba(18, 140, 70, 0.8), 0 4px 10px rgba(10, 34, 64, 0.15); }
}

.wa-tip {
  max-width: min(64vw, 260px);
  padding: 0.6rem 0.9rem;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font-size: 0.85rem; font-weight: 700; line-height: 1.3;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.wa:hover .wa-tip, .wa:focus-within .wa-tip, .wa.show-tip .wa-tip { opacity: 1; transform: none; }

/* Entrada: solo con JavaScript; sin JS el botón se ve desde el inicio */
.js .wa-fab { transform: scale(0); }
.js .wa.is-in .wa-fab { transform: none; transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
@media (hover: hover) {
  .js .wa.is-in .wa-fab:hover { transform: scale(1.08); transition-duration: 0.4s; }
}

/* =============================================================
   7. Efectos: entradas al hacer scroll
   ============================================================= */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s var(--ease-soft), transform 0.9s var(--ease-out);
}
.js [data-reveal].is-revealed { opacity: 1; transform: none; }
/* Defensa: un elemento con reveal + split nunca debe quedar invisible */
.reveal[data-split], [data-reveal][data-split] { opacity: 1; transform: none; }

/* Escalonado ligero dentro de filas */
.service-row > :nth-child(2), .team-grid > :nth-child(2) { transition-delay: 0.08s; }
.service-row > :nth-child(3), .team-grid > :nth-child(3) { transition-delay: 0.16s; }

/* =============================================================
   8. Responsive
   ============================================================= */
@media (min-width: 540px) {
  :root { --gutter: 24px; }
  .service-row { grid-auto-columns: 46%; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .final-card { padding: 2.5rem; }
}

@media (min-width: 720px) {
  .portrait { width: 56%; margin-left: 6%; }
  .chip-organ { display: inline-flex; }
  .chip-slots { right: auto; left: 50%; }
  .agenda-days { gap: 0.6rem; }
  .agenda-slots { grid-template-columns: repeat(6, 1fr); }
  .agenda-card { padding: 1.75rem; }
  .faq-grid { grid-template-columns: 0.8fr 1.2fr; gap: 3rem; align-items: start; }
  .faq .section-head { position: sticky; top: calc(var(--nav-h) + 1.5rem); }
  .final-card { grid-template-columns: 1fr auto; align-items: center; padding: 3rem; }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 0.8fr; }
  .footer-bottom { grid-template-columns: 1fr auto; }
}

@media (min-width: 960px) {
  :root { --nav-h: 84px; }
  .nav-menu { display: block; }
  .nav-cta { display: inline-flex; }
  .nav-toggle, .mobile-menu { display: none !important; }

  .hero { padding-bottom: 4rem; }
  .hero-grid { grid-template-columns: 1fr 1.08fr; align-items: center; gap: 2rem; }
  .hero-copy { padding-top: 0; }
  .hero-title { font-size: clamp(3rem, 5.6vw, 4.9rem); }
  .hero-visual { min-height: 0; padding: 1.5rem 0; }
  .portrait { width: 60%; max-width: 390px; margin-left: 6%; }
  .organ-hero { right: -1%; bottom: 6%; width: 50%; max-width: 380px; }
  .chip-slots { left: 50%; top: 9%; }
  .chip-years { left: 0; bottom: 14%; }

  .services { padding-top: 0; }
  .service-row {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
    margin-inline: 0;
    padding: 0 0 0.5rem;
  }
  .service-card a { min-height: 250px; }
  .also { display: flex; align-items: center; gap: 1.25rem; margin-top: 1.5rem; }
  .also-title { margin: 0; white-space: nowrap; }

  .about { padding: 6rem 0 5rem; }
  .about-grid { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .about-card { right: -6%; bottom: 8%; }

  .team { padding: 5rem 0; }
  .team .section-head h2 { max-width: 18ch; }
  .team-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

  .agenda { padding: 6rem 0; }
  .agenda-grid { grid-template-columns: 1fr 1.05fr; gap: 4rem; align-items: center; }
  .agenda-card { padding: 2rem; }

}

@media (min-width: 1280px) {
  .organ-hero { right: -4%; }
}

/* =============================================================
   9. Reducir movimiento: solo lo intrusivo
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse { animation: none; }
  .wa-fab::before { animation: none; opacity: 0; }
}
