/* FUENTE LOCAL — Cambria Italic (subtítulos serif) */
@font-face {
  font-family: "Cambria";
  src: url("assets/cambria-italic.ttf") format("truetype");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

/* TOKENS — Paleta corporativa Leyva Capilar (BLOQUEADA) */
:root {
  --bg:            #FFFFFF;
  --bg-warm:       #ede7c7;
  --bg-green:      #cbc6ab;
  --bg-dark:       #434138;
  --green:         #656255;
  --green-deep:    #434138;
  --black:         #434138;
  --text:          #434138;
  --text-muted:    #6e6b5c;
  --border:        rgba(67, 65, 56, 0.10);
  --border-solid:  #a9a58e;
  --white:         #FFFFFF;
  --accent:        #a9a58e;

  --pastel-blue:   #e5e2d5;
  --pastel-beige:  #ede7c7;
  --pastel-yellow: #f3eed4;
  --pastel-green:  #d6d2bc;

  --font-heading:  "Bebas Neue", "Big Shoulders Display", "Archivo Black", sans-serif;
  --font-subtitle: "Cambria", "Lora", Georgia, "Times New Roman", serif;
  --font-body:     "Schibsted Grotesk", system-ui, -apple-system, sans-serif;

  --r-md:   8px;
  --r-lg:   14px;
  --r-xl:   22px;
  --r-pill: 50px;

  --shadow-card: 0px 4px 20px rgba(67, 65, 56, 0.08);
  --shadow-lift: 0px 18px 44px rgba(67, 65, 56, 0.16);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 84px;
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 0.9375rem;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; object-fit: cover; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.0;
  color: var(--black);
  letter-spacing: 0.01em;
}

::selection { background: var(--pastel-green); color: var(--green-deep); }

/* SISTEMA DE REVELADO AL SCROLL */
[data-reveal] {
  opacity: 0;
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
  transition-delay: var(--rd, 0ms);
  will-change: transform, opacity;
}
[data-reveal="up"]    { transform: translateY(30px); }
[data-reveal="left"]  { transform: translateX(-44px); }
[data-reveal="right"] { transform: translateX(44px); }
[data-reveal="scale"] { transform: translateY(22px) scale(0.96); }
[data-reveal].is-in {
  opacity: 1;
  transform: translate(0, 0) scale(1);
  will-change: auto;
}

/* SALIDA AL SCROLL — [data-exit] */
[data-exit] {
  transform: translate3d(var(--exit-x, 0px), var(--exit-y, 0px), 0);
  opacity: var(--exit-o, 1);
}

/* LAYOUT */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 60px;
}

.section       { padding: 110px 0; }
.section-warm  { background-color: var(--bg-warm); }
.section-green { background-color: var(--bg-green); }

.icon-green { color: var(--green); }

/* BOTONES */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 30px;
  border-radius: var(--r-pill);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  white-space: nowrap;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background-color 0.2s ease, color 0.2s ease,
              border-color 0.2s ease, box-shadow 0.25s ease,
              transform 0.2s var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.btn-primary {
  background-color: var(--green);
  color: var(--white);
  border-color: var(--green);
}
.btn-primary:hover {
  background-color: var(--green-deep);
  border-color: var(--green-deep);
  box-shadow: 0 10px 26px rgba(67, 65, 56, 0.32);
  transform: translateY(-2px) scale(1.02);
}

.btn-secondary {
  background-color: transparent;
  color: var(--black);
  border-color: var(--text);
}
.btn-secondary:hover {
  background-color: var(--pastel-yellow);
  border-color: var(--accent);
  color: var(--green-deep);
  box-shadow: 0 10px 26px rgba(169, 165, 142, 0.45);
  transform: translateY(-2px) scale(1.02);
}

/* HEADER — sticky, se compacta al hacer scroll */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 60px;
  background-color: var(--bg-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: padding 0.4s var(--ease-out), background-color 0.4s ease,
              box-shadow 0.4s ease;
}
.site-header.is-compact .navbar {
  padding-top: 9px;
  padding-bottom: 9px;
  background-color: rgba(67, 65, 56, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(67, 65, 56, 0.30);
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  padding: 6px 16px;
  border: 1.5px solid rgba(203, 198, 171, 0.32);
  border-radius: var(--r-md);
  background-color: rgba(255, 255, 255, 0.02);
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}
.logo:hover {
  border-color: var(--pastel-green);
  background-color: rgba(203, 198, 171, 0.10);
  box-shadow: 0 0 0 4px rgba(203, 198, 171, 0.12);
}
.logo:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.logo-img {
  display: block;
  height: 48px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  transition: height 0.4s var(--ease-out), transform 0.2s ease;
}
.site-header.is-compact .logo-img { height: 38px; }
.logo:hover .logo-img { transform: scale(1.03); }

.nav-list {
  display: flex;
  gap: 6px;
  align-items: center;
  list-style: none;
}
.nav-link {
  position: relative;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  display: inline-block;
  transition: color 0.25s ease;
}
/* subrayado animado */
.nav-link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background-color: var(--pastel-green);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease-out);
}
.nav-link:hover, .nav-link.is-active { color: var(--pastel-green); }
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }
.nav-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.nav-cta { font-size: 0.9375rem; padding: 12px 24px; }

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: rgba(255, 255, 255, 0.9);
  border-radius: var(--r-md);
}
.mobile-menu-btn:focus-visible { outline: 3px solid var(--accent); }

/* overlay móvil */
.mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 480;
  background-color: rgba(67, 65, 56, 0.97);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.mobile-overlay.is-open { opacity: 1; visibility: visible; }
.mobile-overlay a {
  font-family: var(--font-heading);
  font-size: 2rem;
  letter-spacing: 0.06em;
  color: var(--pastel-beige);
  text-decoration: none;
  padding: 10px 24px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out), color 0.2s ease;
}
.mobile-overlay.is-open a {
  opacity: 1;
  transform: translateY(0);
  transition-delay: var(--rd, 0ms);
}
.mobile-overlay a:hover { color: var(--white); }

/* HERO — composición editorial asimétrica */
.hero-section {
  position: relative;
  display: flex;
  align-items: center;
  gap: 72px;
  padding: 100px 60px 110px;
  max-width: 1280px;
  margin: 0 auto;
  overflow: visible;
}
/* rótulo display gigante de fondo */
.hero-watermark {
  position: absolute;
  top: 26px;
  right: -10px;
  font-family: var(--font-heading);
  font-size: clamp(5rem, 13vw, 11rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(169, 165, 142, 0.45);
  letter-spacing: 0.04em;
  text-shadow: 2px 3px 6px rgba(67, 65, 56, 0.10);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.hero-content { flex: 1.2; position: relative; z-index: 1; }

/* entrada escalonada al cargar */
.hero-stagger {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--rd, 0ms);
}
body.is-loaded .hero-stagger { opacity: 1; transform: translateY(0); }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.hero-eyebrow::before {
  content: "";
  width: 36px;
  height: 2px;
  background-color: var(--accent);
  border-radius: 2px;
}

.hero-title {
  font-size: clamp(3.6rem, 7.6vw, 6.2rem);
  margin-bottom: 26px;
  line-height: 0.92;
  font-weight: 700;
}

.hero-subtitle {
  font-family: var(--font-subtitle);
  font-style: italic;
  font-size: 1.1875rem;
  color: var(--text-muted);
  margin-bottom: 42px;
  line-height: 1.65;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

/* foto del doctor — marco orgánico + parallax */
.hero-figure {
  flex: 0 0 min(34vw, 360px);
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateX(44px);
  transition: opacity 0.9s var(--ease-out) 0.35s, transform 0.9s var(--ease-out) 0.35s;
}
body.is-loaded .hero-figure { opacity: 1; transform: translateX(0); }

.hero-figure::before {
  content: "";
  position: absolute;
  inset: -26px -26px 24% auto;
  width: 78%;
  background-color: var(--pastel-beige);
  border-radius: 48% 52% 46% 54% / 52% 46% 54% 48%;
  z-index: -1;
}
.hero-image-wrapper {
  border-radius: 160px 160px var(--r-lg) var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
}
.hero-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  transform: translateY(var(--parallax, 0px)) scale(1.04);
  transition: transform 0.1s linear;
}
.hero-figure figcaption {
  position: absolute;
  left: -34px;
  bottom: 34px;
  background-color: var(--bg-dark);
  color: var(--pastel-beige);
  font-family: var(--font-subtitle);
  font-style: italic;
  font-size: 0.875rem;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-card);
}

/* pilares */
.stats-row {
  display: flex;
  gap: 44px;
  padding-top: 44px;
  border-top: 1px solid var(--border-solid);
  flex-wrap: wrap;
}
.pillar-item { flex: 1; min-width: 180px; }
.pillar-num {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  color: var(--accent);
  line-height: 1;
  display: block;
  margin-bottom: 10px;
}
.pillar-item h4 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}
.pillar-item p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* CABECERA REUTILIZABLE DE SECCIÓN */
.section-header { max-width: 720px; margin-bottom: 64px; }
.section-header.is-centered { margin-left: auto; margin-right: auto; text-align: center; }
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.section-eyebrow::before {
  content: "";
  width: 30px;
  height: 2px;
  background-color: var(--accent);
  border-radius: 2px;
}
.section-header.is-centered .section-eyebrow::after {
  content: "";
  width: 30px;
  height: 2px;
  background-color: var(--accent);
  border-radius: 2px;
}
.section-title {
  font-size: clamp(2.6rem, 5vw, 4rem);
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

/* TRICOLOGÍA — video + servicios */
.tricologia-intro {
  display: flex;
  gap: 64px;
  align-items: flex-end;
  margin-bottom: 64px;
  flex-wrap: wrap;
}
.tricologia-intro .section-header { margin-bottom: 0; flex: 1 1 380px; }
.tricologia-quote {
  flex: 1 1 340px;
  font-family: var(--font-subtitle);
  font-style: italic;
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.8;
  border-left: 2px solid var(--accent);
  padding-left: 28px;
}

.video-container {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background-color: var(--bg-dark);
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow-lift);
  margin-bottom: 72px;
}
.video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}
.video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(67, 65, 56, 0.10), rgba(67, 65, 56, 0.42));
  cursor: pointer;
  transition: background 0.3s ease;
}
.video-overlay:hover { background: linear-gradient(180deg, rgba(67, 65, 56, 0.04), rgba(67, 65, 56, 0.30)); }
.play-btn {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background-color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 36px rgba(67, 65, 56, 0.45);
  transition: transform 0.3s var(--ease-out), background-color 0.2s ease;
}
.video-overlay:hover .play-btn {
  transform: scale(1.1);
  background-color: var(--green-deep);
}
.play-btn:focus-visible { outline: 3px solid var(--pastel-beige); outline-offset: 4px; }

/* anillo de pulso elegante */
@keyframes playPulse {
  0%   { box-shadow: 0 0 0 0 rgba(203, 198, 171, 0.55); }
  100% { box-shadow: 0 0 0 26px rgba(203, 198, 171, 0); }
}
.play-btn::before {
  content: "";
  position: absolute;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  animation: playPulse 2.4s var(--ease-out) infinite;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.service-card {
  position: relative;
  background-color: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 38px 30px 34px;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s ease, border-color 0.3s ease;
  overflow: hidden;
}
.service-card:hover {
  transform: translateY(-6px) scale(1.012);
  border-color: var(--accent);
  box-shadow: var(--shadow-lift);
}
.service-num {
  position: absolute;
  top: 18px;
  right: 24px;
  font-family: var(--font-heading);
  font-size: 2.6rem;
  color: var(--pastel-green);
  line-height: 1;
  transition: color 0.3s ease, transform 0.35s var(--ease-out);
}
.service-card:hover .service-num { color: var(--accent); transform: translateY(-3px); }
.service-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background-color: var(--pastel-beige);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  transition: background-color 0.3s ease, transform 0.35s var(--ease-out);
}
.service-card:hover .service-icon {
  background-color: var(--pastel-green);
  transform: scale(1.08) rotate(-4deg);
}
.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}
.service-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.service-card-clickable { cursor: pointer; }
.service-card-clickable:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.service-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  font-weight: 700;
  font-size: 0.8125rem;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: gap 0.3s var(--ease-out), color 0.2s ease;
}
.service-card-clickable:hover .service-card-cta { gap: 11px; color: var(--green-deep); }
.service-card-clickable[aria-expanded="true"] .service-card-cta { color: var(--green-deep); }

/* Panel expandible Toxina Botulínica */
.treatment-panel {
  margin-top: 26px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.treatment-panel.is-open { opacity: 1; transform: translateY(0); }
.treatment-panel-inner {
  position: relative;
  background-color: var(--white);
  border: 1.5px solid var(--border-solid);
  border-radius: var(--r-xl);
  padding: 26px;
  display: flex;
  justify-content: center;
  box-shadow: var(--shadow-lift);
}
.treatment-panel-inner img {
  max-width: 480px;
  width: 100%;
  border-radius: var(--r-lg);
}
.treatment-panel-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--border-solid);
  background-color: var(--white);
  color: var(--green);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.25s var(--ease-out);
  z-index: 2;
}
.treatment-panel-close:hover {
  background-color: var(--green);
  color: var(--white);
  transform: rotate(90deg);
}
.treatment-panel-close:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* GALERÍA — caso destacado con slider antes/después */
.alopecia-feature {
  display: flex;
  gap: 64px;
  align-items: center;
  flex-wrap: wrap;
}
.alopecia-feature-text { flex: 1 1 320px; }
.alopecia-feature-text .case-name {
  font-family: var(--font-heading);
  font-size: 2rem;
  letter-spacing: 0.04em;
  color: var(--black);
  margin-bottom: 18px;
  display: block;
}
.alopecia-feature-text p {
  font-family: var(--font-subtitle);
  font-style: italic;
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 34px;
}
.ba-hint {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* slider con divisor arrastrable */
.ba-slider {
  flex: 1 1 420px;
  position: relative;
  aspect-ratio: 4 / 5;
  max-width: 560px;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  background-color: var(--pastel-blue);
}
.ba-slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.ba-after-wrap {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 var(--ba-pos, 50%));
}
.ba-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--ba-pos, 50%);
  width: 3px;
  margin-left: -1.5px;
  background-color: var(--white);
  box-shadow: 0 0 14px rgba(67, 65, 56, 0.45);
  z-index: 3;
}
.ba-handle {
  position: absolute;
  top: 50%;
  left: var(--ba-pos, 50%);
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--white);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: 0 8px 24px rgba(67, 65, 56, 0.35);
  z-index: 4;
  transition: transform 0.2s var(--ease-out), background-color 0.2s ease;
}
.ba-slider:hover .ba-handle { transform: translate(-50%, -50%) scale(1.08); }
.ba-slider:focus-visible { outline: 4px solid var(--accent); outline-offset: 3px; }
.ba-slider.is-dragging .ba-handle {
  background-color: var(--pastel-beige);
  transform: translate(-50%, -50%) scale(1.12);
}
.ba-tag {
  position: absolute;
  top: 20px;
  z-index: 3;
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  letter-spacing: 0.12em;
  padding: 7px 18px 5px;
  border-radius: var(--r-pill);
  pointer-events: none;
}
.ba-tag-antes   { left: 20px;  background-color: rgba(255, 255, 255, 0.92); color: var(--green-deep); }
.ba-tag-despues { right: 20px; background-color: rgba(101, 98, 85, 0.92);  color: var(--white); }

.galeria-cta-row { text-align: center; margin-top: 72px; }

/* MODAL — galería de casos (cascada al abrir) */
.cases-modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  background-color: rgba(67, 65, 56, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.cases-modal[aria-hidden="false"] { opacity: 1; visibility: visible; }
body.cases-modal-open { overflow: hidden; }

.cases-modal-content {
  position: relative;
  background-color: var(--bg-warm);
  border-radius: var(--r-xl);
  max-width: 1180px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 64px 56px 56px;
  transform: translateY(34px) scale(0.97);
  transition: transform 0.5s var(--ease-out);
}
.cases-modal[aria-hidden="false"] .cases-modal-content { transform: translateY(0) scale(1); }

.cases-modal-close {
  position: sticky;
  top: 0px;
  margin-left: auto;
  margin-bottom: -30px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.5px solid var(--border-solid);
  background-color: var(--white);
  color: var(--green);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.25s var(--ease-out);
}
.cases-modal-close:hover {
  background-color: var(--green);
  color: var(--white);
  transform: rotate(90deg);
}
.cases-modal-close:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.cases-modal-title {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}
.cases-modal-subtitle {
  font-family: var(--font-subtitle);
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 42px;
}

.stories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.story-gif {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s ease;
  /* cascada al abrir el modal */
  opacity: 0;
  translate: 0 26px;
}
.cases-modal[aria-hidden="false"] .story-gif {
  opacity: 1;
  translate: 0 0;
  transition: opacity 0.55s var(--ease-out), translate 0.55s var(--ease-out),
              transform 0.35s var(--ease-out), box-shadow 0.35s ease;
  transition-delay: var(--rd, 0ms), var(--rd, 0ms), 0ms, 0ms;
}
.story-gif:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lift);
}
.story-gif:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.story-gif-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.story-after {
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
}
@media (hover: hover) {
  .story-gif:hover .story-after { opacity: 1; }
}
.story-gif.is-revealed .story-after { opacity: 1; }

.story-label {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  letter-spacing: 0.12em;
  padding: 6px 16px 4px;
  border-radius: var(--r-pill);
  background-color: rgba(255, 255, 255, 0.92);
  color: var(--green-deep);
  transition: background-color 0.3s ease, color 0.3s ease;
}
.story-label::after { content: "Antes"; }
@media (hover: hover) {
  .story-gif:hover .story-label { background-color: rgba(101, 98, 85, 0.94); color: var(--white); }
  .story-gif:hover .story-label::after { content: "Después"; }
}
.story-gif.is-revealed .story-label { background-color: rgba(101, 98, 85, 0.94); color: var(--white); }
.story-gif.is-revealed .story-label::after { content: "Después"; }

/* FOOTER */
.site-footer {
  background-color: var(--bg-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 96px 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 72px;
  margin-bottom: 64px;
}
.footer-logo { display: inline-block; margin-bottom: 26px; }
.footer-logo:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.footer-logo-img {
  height: 64px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.95;
  transition: opacity 0.2s ease, transform 0.25s var(--ease-out);
}
.footer-logo:hover .footer-logo-img { opacity: 1; transform: scale(1.02); }
.footer-desc {
  font-family: var(--font-subtitle);
  font-style: italic;
  font-size: 1.125rem;
  color: var(--pastel-beige);
  line-height: 1.7;
  max-width: 380px;
  margin-bottom: 34px;
}
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}
.footer-contact-item iconify-icon { color: var(--accent); flex-shrink: 0; margin-top: 3px; }

.footer-social-label {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  letter-spacing: 0.1em;
  color: var(--pastel-beige);
  margin-bottom: 14px;
}
.footer-social-cards { display: flex; gap: 12px; flex-wrap: wrap; }
.social-card {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 18px;
  border-radius: var(--r-pill);
  border: 1.5px solid rgba(203, 198, 171, 0.35);
  background-color: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.25s ease, background-color 0.25s ease,
              transform 0.25s var(--ease-out), box-shadow 0.25s ease;
}
.social-card:hover {
  border-color: var(--pastel-green);
  background-color: rgba(203, 198, 171, 0.12);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}
.social-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.social-card img { width: 22px; height: 22px; object-fit: contain; border-radius: 50%; }

.footer-col h3 {
  color: var(--pastel-beige);
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  margin-bottom: 22px;
}
.footer-map {
  border-radius: var(--r-lg);
  overflow: hidden;
  min-height: 460px;
  height: 100%;
}
.footer-map iframe {
  border: 0;
  border-radius: var(--r-lg);
  display: block;
  width: 100%;
  height: 100%;
  min-height: 460px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.footer-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(203, 198, 171, 0.4), transparent);
  margin-bottom: 28px;
}
.footer-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.6);
}
/* BOTONES FLOTANTES */
.floating-whatsapp {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 600;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--green);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(67, 65, 56, 0.40);
  transition: transform 0.3s var(--ease-out), background-color 0.2s ease;
}
.floating-whatsapp:hover {
  transform: scale(1.1) translateY(-2px);
  background-color: var(--green-deep);
}
.floating-whatsapp:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.back-to-top {
  position: fixed;
  right: 26px;
  bottom: 98px;
  z-index: 600;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.5px solid var(--border-solid);
  background-color: var(--white);
  color: var(--green);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.35s ease, visibility 0.35s ease,
              transform 0.35s var(--ease-out), background-color 0.2s ease, color 0.2s ease;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background-color: var(--green); color: var(--white); }
.back-to-top:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* TRASPLANTE CAPILAR — video de fondo inmersivo + cuadro de texto */
.transplante-section {
  position: relative;
  overflow: hidden;
}
.transplante-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
/* Overlay oscuro: garantiza legibilidad del texto sobre el video */
.transplante-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg,
              rgba(67, 65, 56, 0.74) 0%,
              rgba(67, 65, 56, 0.52) 45%,
              rgba(67, 65, 56, 0.78) 100%);
}
.transplante-section .container {
  position: relative;
  z-index: 2;
}
/* Tipografía clara sobre el video */
.transplante-section .section-title {
  color: var(--pastel-beige);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}
.transplante-section .section-eyebrow { color: var(--pastel-green); }
.transplante-section .section-eyebrow::before,
.transplante-section .section-header.is-centered .section-eyebrow::after {
  background-color: var(--pastel-green);
}

.transplante-layout {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 56px;
  flex-wrap: wrap;
}
.transplante-card {
  flex: 1 1 440px;
  align-self: center;
  background-color: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  padding: 46px 44px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease, border-color 0.3s ease;
}
.transplante-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background-color: var(--accent);
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 0.6s var(--ease-out);
}
.transplante-card.is-in::before { transform: scaleY(1); }
.transplante-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lift);
}
.transplante-text {
  font-family: var(--font-subtitle);
  font-style: italic;
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 32px;
  text-wrap: pretty;
}

/* Columna del segundo video — marco profesional sobre el fondo inmersivo */
.transplante-video-col {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}
.video-frame-pro {
  position: relative;
  width: min(360px, 82vw);
  background-color: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  padding: 14px;
  box-shadow: var(--shadow-lift);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease, border-color 0.3s ease;
}
.video-frame-pro:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}
.video-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: var(--r-lg);
  overflow: hidden;
  background-color: #000;
  cursor: pointer;
}
.video-screen video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.phone-video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(67, 65, 56, 0.18), rgba(67, 65, 56, 0.46));
  transition: background 0.3s ease;
}
.phone-video-overlay:hover { background: linear-gradient(180deg, rgba(67, 65, 56, 0.08), rgba(67, 65, 56, 0.34)); }
.phone-video-overlay .play-btn { width: 72px; height: 72px; }
.phone-video-overlay .play-btn::before { width: 72px; height: 72px; }

/* RESPONSIVO */
@media (max-width: 1024px) {
  .container { padding: 0 40px; }
  .navbar { padding-left: 40px; padding-right: 40px; }
  .hero-section { padding-left: 40px; padding-right: 40px; gap: 48px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .stories-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero-watermark { display: none; }
}

@media (max-width: 768px) {
  .container { padding: 0 24px; }
  .navbar { padding: 14px 24px; }
  .nav-list, .nav-cta { display: none; }
  .mobile-menu-btn { display: flex; }
  .section { padding: 80px 0; }

  .hero-section {
    flex-direction: column-reverse;
    padding: 56px 24px 72px;
    gap: 48px;
  }
  .hero-figure { flex: 0 0 auto; width: min(78vw, 320px); }
  .hero-figure figcaption { left: -10px; }
  .stats-row { flex-direction: column; gap: 30px; }

  .tricologia-intro { gap: 36px; }
  .services-grid { grid-template-columns: 1fr; }
  .transplante-layout { gap: 40px; }
  .transplante-card { padding: 36px 28px; flex-basis: 100%; }
  .stories-grid { grid-template-columns: 1fr; gap: 18px; }
  .cases-modal { padding: 14px; }
  .cases-modal-content { padding: 56px 22px 28px; }
  .alopecia-feature { gap: 40px; }
  .ba-slider { flex-basis: 100%; }
  .footer-map, .footer-map iframe { min-height: 320px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 3.2rem; }
  .btn { padding: 14px 24px; font-size: 0.9375rem; }
  .floating-whatsapp { right: 18px; bottom: 18px; }
  .back-to-top { right: 18px; bottom: 90px; }
}

/* MOVIMIENTO REDUCIDO */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal], .hero-stagger, .hero-figure {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .cases-modal .story-gif {
    opacity: 1;
    translate: 0 0;
    transition: none;
  }
  .transplante-card::before { transform: scaleY(1) !important; }
  .play-btn::before { animation: none; }
  .hero-image-wrapper img { transform: none !important; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
