/* =============================================================
   AURELIA · Medicina Estética
   Archetype: Glassmorphism Modern (adapted — discreet boutique luxury)
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  /* palette — warm porcelain + discreet gold + sage/blush */
  --bg:        #f4efe9;
  --bg-2:      #ece2d6;
  --paper:     #fffdfb;
  --ink:       #2b2620;
  --ink-soft:  #5f574d;
  --ink-mute:  #988d80;

  --accent:      #b4884e;   /* discreet gold-bronze */
  --accent-deep: #8a6128;   /* darker gold for text/buttons on light */
  --accent-soft: #e8d4b4;
  --sage:        #8ea892;
  --blush:       #e6c5b3;

  --glass:        rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.74);
  --glass-line:   rgba(255, 255, 255, 0.7);
  --line:         rgba(43, 38, 32, 0.12);

  --shadow-sm: 0 10px 30px -18px rgba(58, 44, 30, 0.40);
  --shadow:    0 30px 60px -32px rgba(58, 44, 30, 0.45);
  --shadow-lg: 0 50px 90px -40px rgba(58, 44, 30, 0.50);
  --gold-glow: 0 18px 40px -16px rgba(138, 97, 40, 0.55);

  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --serif: "Cormorant", Georgia, "Times New Roman", serif;

  --r-sm: 14px;
  --r:    20px;
  --r-lg: 30px;
  --r-xl: 40px;

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:     cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft:   cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --container: 1240px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* horizontal containment is handled by html{overflow-x:clip}.
     NOTE: do NOT also clip the body — clip on both axes/elements
     forces overflow-y to compute to clip and disables vertical scroll. */
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.06; letter-spacing: -0.02em; font-weight: 700; }
::selection { background: var(--accent); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 3px;
  border-radius: 6px;
}

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link {
  position: fixed; top: -120px; left: 1rem;
  padding: 0.7rem 1.1rem; background: var(--ink); color: var(--paper);
  z-index: 9999; border-radius: 10px; font-weight: 600;
  transition: top 0.25s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.section {
  position: relative;
  padding-block: clamp(4.5rem, 11vw, 9rem);
  padding-inline: var(--gutter);
}
.section > * { max-width: var(--container); margin-inline: auto; }

.section-head { max-width: 760px; margin-inline: auto; text-align: center; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-lead { color: var(--ink-soft); font-size: clamp(1rem, 1.4vw, 1.15rem); margin-top: 1rem; }

.eyebrow, .kicker {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  color: var(--accent-deep);
  letter-spacing: 0.01em;
}
.kicker { display: inline-flex; align-items: center; gap: 0.6rem; }
.kicker-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(180,136,78,0.18); }

/* =============================================================
   4. Typography scale
   ============================================================= */
h1, .hero-title { font-size: clamp(2.6rem, 6.4vw, 5rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.3rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
em, .em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  color: var(--accent-deep);
  letter-spacing: 0;
}

/* =============================================================
   5. Components
   ============================================================= */

/* Glass surface (solid fallback first — gotcha B.12) */
.glass {
  background: var(--glass-strong);
  border: 1px solid var(--glass-line);
  border-radius: var(--r);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.6);
}
@supports ((backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px))) {
  .glass {
    background: var(--glass);
    -webkit-backdrop-filter: blur(22px) saturate(165%);
    backdrop-filter: blur(22px) saturate(165%);
  }
}

/* Buttons */
.btn {
  --btn-bg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.005em;
  white-space: nowrap;
  transition: box-shadow 0.4s var(--ease-out), background 0.4s var(--ease-out),
              color 0.3s var(--ease-out), transform 0.35s var(--ease-out), filter 0.3s;
  will-change: transform;
}
.btn-lg { padding: 1.05rem 1.9rem; font-size: 1.02rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: var(--paper);
  box-shadow: var(--gold-glow);
}
.btn-primary:hover { box-shadow: 0 24px 50px -16px rgba(138,97,40,0.7); filter: brightness(1.04); }

.btn-ghost {
  background: var(--glass);
  border: 1px solid var(--line);
  color: var(--ink);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-deep); box-shadow: var(--shadow-sm); }

/* =============================================================
   6a. Custom cursor
   ============================================================= */
.cursor { display: none; position: fixed; inset: 0; pointer-events: none; z-index: 9000; opacity: 0; transition: opacity 0.3s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .cursor { display: block; } }
.cursor.is-ready { opacity: 1; }
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; border-radius: 50%; pointer-events: none; }
.cursor-dot { width: 7px; height: 7px; background: var(--accent-deep); margin: -3.5px 0 0 -3.5px; }
.cursor-ring {
  width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border: 1.5px solid rgba(138, 97, 40, 0.45);
  transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out),
              background 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}
.cursor.is-hover .cursor-ring { width: 58px; height: 58px; margin: -29px 0 0 -29px; background: rgba(180,136,78,0.12); border-color: rgba(138,97,40,0.6); }
html.has-cursor, html.has-cursor a, html.has-cursor button, html.has-cursor summary, html.has-cursor .ba-slider { cursor: none; }
html.has-cursor input, html.has-cursor textarea, html.has-cursor select { cursor: auto; }

/* =============================================================
   6b. Splash
   ============================================================= */
.splash {
  position: fixed; inset: 0; z-index: 9500;
  background: var(--bg);
  display: grid; place-items: center;
  animation: splashSafety 0.01s 4.5s forwards;   /* safety net (gotcha A.9) */
}
.splash.is-out { transform: translateY(-100%); transition: transform 0.95s var(--ease-in-out, cubic-bezier(0.76,0,0.24,1)); pointer-events: none; }
.splash-inner { text-align: center; display: grid; gap: 0.6rem; justify-items: center; }
.splash-mark { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: clamp(2.6rem, 8vw, 4.4rem); color: var(--ink); }
.splash-rule { display: block; height: 1px; width: 0; background: var(--accent); animation: splashRule 1.1s 0.15s var(--ease-out) forwards; }
.splash-sub { font-size: 0.78rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--ink-mute); opacity: 0; animation: splashSub 0.8s 0.5s var(--ease-out) forwards; }
@keyframes splashRule { to { width: 180px; } }
@keyframes splashSub { to { opacity: 1; } }
@keyframes splashSafety { to { transform: translateY(-100%); pointer-events: none; visibility: hidden; } }
html.splashing { overflow: hidden; }

/* =============================================================
   6c. Ambient mesh background
   ============================================================= */
.page-mesh { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.mesh-blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.6; will-change: transform; }
.mesh-blob--blush { width: 52vw; height: 52vw; top: -14vw; left: -10vw; background: radial-gradient(circle, var(--blush), transparent 68%); animation: drift1 26s ease-in-out infinite; }
.mesh-blob--sage  { width: 46vw; height: 46vw; bottom: -16vw; right: -8vw; background: radial-gradient(circle, var(--sage), transparent 66%); opacity: 0.42; animation: drift2 32s ease-in-out infinite; }
.mesh-blob--gold  { width: 40vw; height: 40vw; top: 38%; left: 44%; background: radial-gradient(circle, var(--accent-soft), transparent 68%); opacity: 0.5; animation: drift3 30s ease-in-out infinite; }
@keyframes drift1 { 0%,100% { transform: translate3d(0,0,0) scale(1); } 50% { transform: translate3d(6vw,4vw,0) scale(1.15); } }
@keyframes drift2 { 0%,100% { transform: translate3d(0,0,0) scale(1.1); } 50% { transform: translate3d(-5vw,-5vw,0) scale(0.95); } }
@keyframes drift3 { 0%,100% { transform: translate3d(-50%,-50%,0) scale(1); } 50% { transform: translate3d(-44%,-58%,0) scale(1.2); } }

/* =============================================================
   6d. Reveal
   ============================================================= */
/* Reveal hidden state ONLY when JS is active (html.js). Without JS the
   content stays fully visible — never hide content behind a script.
   NOTE: the .is-visible rule is scoped under html.js too, so it keeps a
   higher specificity than `html.js .reveal` and actually wins. */
html.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out); }
html.js .reveal.is-visible { opacity: 1; transform: none; }
html.js .reveal[data-split] { opacity: 1; transform: none; }   /* defensive (gotcha A.4.5) */

/* =============================================================
   7. Navigation
   ============================================================= */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; padding: 0.9rem var(--gutter); transition: padding 0.4s var(--ease-out); }
.nav-inner {
  max-width: var(--container); margin-inline: auto;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.55rem 0.7rem 0.55rem 1.1rem;
  border-radius: 100px;
  background: transparent;
  transition: background 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out), border-color 0.45s var(--ease-out);
  border: 1px solid transparent;
}
.nav.is-stuck .nav-inner {
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border-color: var(--glass-line);
  box-shadow: var(--shadow-sm);
}
.nav-brand { display: inline-flex; align-items: center; gap: 0.7rem; margin-right: auto; }
.nav-brand-mark {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: var(--paper); font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 1.4rem;
  box-shadow: var(--shadow-sm);
}
.nav-brand-text { font-weight: 700; font-size: 1.18rem; line-height: 1; letter-spacing: 0.01em; display: flex; flex-direction: column; gap: 3px; }
.nav-brand-text small { font-weight: 500; font-size: 0.6rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink-mute); }
.nav-links { display: none; gap: 1.6rem; }
.nav-links a { position: relative; font-weight: 500; font-size: 0.95rem; color: var(--ink-soft); padding: 0.3rem 0; transition: color 0.3s; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 1.5px; width: 100%; background: var(--accent-deep); transform: scaleX(0); transform-origin: right; transition: transform 0.4s var(--ease-out); }
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.is-current::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { display: none; }

.nav-toggle { display: inline-flex; flex-direction: column; gap: 5px; padding: 10px; margin-left: auto; }
.nav-toggle span { width: 26px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.4s var(--ease-out), opacity 0.3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.menu-mobile {
  position: fixed; inset: 0; z-index: 999;
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  backdrop-filter: blur(26px) saturate(160%);
  display: flex; flex-direction: column; justify-content: center; gap: 2rem;
  padding: var(--gutter);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out), visibility 0.4s;
}
.menu-mobile.is-open { opacity: 1; visibility: visible; transform: none; }
.menu-mobile-links { display: flex; flex-direction: column; gap: 1.2rem; }
.menu-mobile-links a { font-size: 1.8rem; font-weight: 600; }
.menu-mobile-links a.btn { font-size: 1.05rem; align-self: flex-start; margin-top: 0.5rem; }
.menu-mobile-foot { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.7; }

/* =============================================================
   8. Hero
   ============================================================= */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 8rem var(--gutter) 5rem; }
.hero-inner { max-width: var(--container); margin-inline: auto; width: 100%; display: grid; gap: clamp(2.5rem, 5vw, 4rem); align-items: center; }
.hero-copy { max-width: 620px; }
.hero-title { margin-block: 1.1rem 1.4rem; }
.hero-sub { font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--ink-soft); max-width: 30ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 1.2rem 2rem; margin-top: 2.6rem; }
.hero-trust li { font-size: 0.85rem; color: var(--ink-soft); max-width: 16ch; line-height: 1.4; }
.hero-trust strong { display: block; font-size: 1.05rem; color: var(--ink); }

.hero-visual { position: relative; justify-self: center; width: min(420px, 86vw); aspect-ratio: 4/5; }
.hero-photo { position: relative; width: 100%; height: 100%; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-lg); will-change: transform; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-chip {
  position: absolute; left: -8%; bottom: 9%;
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.8rem 1.1rem; border-radius: var(--r);
}
.hero-chip-num { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 2rem; color: var(--accent-deep); line-height: 1; }
.hero-chip-label { font-size: 0.72rem; color: var(--ink-soft); line-height: 1.25; }
.hero-glass-card {
  position: absolute; right: -14%; top: 8%;
  width: 220px; padding: 1.1rem 1.2rem; border-radius: var(--r);
  display: grid; gap: 0.25rem;
}
.hero-glass-eyebrow { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-deep); font-weight: 600; }
.hero-glass-title { font-weight: 700; font-size: 1.02rem; line-height: 1.2; }
.hero-glass-meta { font-size: 0.78rem; color: var(--ink-soft); line-height: 1.35; }

.hero-scroll { position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 0.6rem; font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-mute); }
.hero-scroll-line { width: 1px; height: 42px; background: linear-gradient(var(--accent), transparent); position: relative; overflow: hidden; }
.hero-scroll-line::after { content: ""; position: absolute; top: -50%; left: 0; width: 100%; height: 50%; background: var(--accent-deep); animation: scrollCue 2.2s var(--ease-in-out, ease) infinite; }
@keyframes scrollCue { 0% { transform: translateY(-100%); } 60%,100% { transform: translateY(300%); } }

/* =============================================================
   9. Marquee
   ============================================================= */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: 1.1rem; background: rgba(255,255,255,0.25); }
.marquee-track { display: inline-flex; align-items: center; gap: 1.4rem; white-space: nowrap; will-change: transform; animation: marquee 32s linear infinite; }
.marquee-track span { font-family: var(--serif); font-style: italic; font-size: clamp(1.1rem, 2vw, 1.6rem); color: var(--ink-soft); }
.marquee-track .marquee-sep { color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* =============================================================
   10. Filosofía
   ============================================================= */
.filosofia-grid { display: grid; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.filosofia-figure { position: relative; border-radius: var(--r-lg); overflow: visible; }
.filosofia-figure img { width: 100%; border-radius: var(--r-lg); box-shadow: var(--shadow); aspect-ratio: 4/5; object-fit: cover; transition: transform 0.6s var(--ease-out); }
.filosofia-figure figcaption { position: absolute; left: 1.2rem; bottom: 1.2rem; right: 1.2rem; padding: 0.8rem 1rem; border-radius: var(--r-sm); font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--ink); }
.filosofia-copy h2 { margin-block: 0.8rem 1.4rem; }
.filosofia-copy p { color: var(--ink-soft); margin-bottom: 1.1rem; max-width: 52ch; }
.filosofia-sign { font-family: var(--serif); font-style: italic; font-size: 1.4rem; color: var(--ink); margin-top: 1.8rem; }
.filosofia-sign small { display: block; font-family: var(--sans); font-style: normal; font-size: 0.78rem; letter-spacing: 0.05em; color: var(--ink-mute); margin-top: 0.3rem; }

/* =============================================================
   11. Método (timeline)
   ============================================================= */
.metodo-steps { list-style: none; position: relative; max-width: 720px; margin-inline: auto; padding-left: 3.2rem; display: grid; gap: clamp(1.4rem, 3vw, 2.4rem); }
.metodo-line { position: absolute; left: 12px; top: 8px; bottom: 8px; width: 2px; background: var(--line); border-radius: 2px; }
.metodo-line-fill { position: absolute; inset: 0; background: linear-gradient(var(--accent), var(--accent-deep)); transform: scaleY(0); transform-origin: top; }
.metodo-step { position: relative; padding: 1.4rem 1.6rem; border-radius: var(--r); background: var(--glass); border: 1px solid var(--glass-line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--shadow-sm); }
.metodo-step::before { content: ""; position: absolute; left: -2.66rem; top: 1.7rem; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 2px solid var(--accent); box-shadow: 0 0 0 4px rgba(180,136,78,0.15); }
.metodo-num { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 1.5rem; color: var(--accent-deep); }
.metodo-step h3 { margin-block: 0.3rem 0.5rem; }
.metodo-step p { color: var(--ink-soft); font-size: 0.97rem; }

/* =============================================================
   12. Tratamientos
   ============================================================= */
.filtros { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-bottom: 2.6rem; }
.filtro { padding: 0.6rem 1.2rem; border-radius: 100px; font-weight: 500; font-size: 0.92rem; color: var(--ink-soft); border: 1px solid var(--line); background: rgba(255,255,255,0.4); transition: all 0.3s var(--ease-out); }
.filtro:hover { color: var(--ink); border-color: var(--accent); }
.filtro.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.trat-grid { display: grid; grid-template-columns: 1fr; gap: 1.1rem; }
.trat-card { padding: 1.6rem 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out); will-change: transform; }
.trat-card.is-hidden { display: none; }
.trat-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(135deg, rgba(180,136,78,0.16), rgba(142,168,146,0.16)); color: var(--accent-deep); }
.trat-icon svg { width: 26px; height: 26px; }
.trat-card h3 { font-size: 1.2rem; }
.trat-card p { color: var(--ink-soft); font-size: 0.94rem; flex-grow: 1; }
.trat-price { font-size: 0.9rem; color: var(--ink-mute); margin-top: 0.4rem; }
.trat-price strong { font-size: 1.15rem; color: var(--ink); font-weight: 700; }
.trat-price--free strong { color: var(--accent-deep); }
.trat-card--feature { background: linear-gradient(150deg, rgba(180,136,78,0.16), rgba(255,255,255,0.55)); border-color: rgba(180,136,78,0.4); }
.trat-disclaimer { text-align: center; font-size: 0.82rem; color: var(--ink-mute); max-width: 620px; margin: 2.2rem auto 0; }

/* =============================================================
   13. Resultados · before/after + stats
   ============================================================= */
.resultados { overflow: hidden; }
.resultados-marble { position: absolute; inset: 0; z-index: -1; background-image: url("assets/img/marble.webp"); background-size: cover; background-position: center; opacity: 0.06; }
.ba { max-width: 880px; margin-inline: auto; }
.ba-slider { position: relative; aspect-ratio: 3/2; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); --pos: 50; touch-action: none; user-select: none; }
.ba-img { position: absolute; inset: 0; }
.ba-img img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba-img--after img { filter: saturate(1.16) brightness(1.06) contrast(1.02); }
.ba-img--before { clip-path: inset(0 calc(100% - var(--pos) * 1%) 0 0); }
.ba-img--before img { filter: saturate(0.8) brightness(0.95) contrast(0.95) sepia(0.06); }
.ba-tag { position: absolute; top: 1rem; padding: 0.35rem 0.85rem; border-radius: 100px; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--paper); background: rgba(43,38,32,0.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.ba-tag--before { left: 1rem; }
.ba-tag--after { right: 1rem; }
.ba-handle { position: absolute; top: 0; bottom: 0; left: calc(var(--pos) * 1%); width: 44px; transform: translateX(-50%); display: grid; place-items: center; }
.ba-handle::before { content: ""; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--paper); box-shadow: 0 0 14px rgba(0,0,0,0.3); }
.ba-handle-grip { position: relative; width: 44px; height: 44px; border-radius: 50%; background: var(--paper); box-shadow: var(--shadow-sm); display: grid; place-items: center; }
.ba-handle-grip::before, .ba-handle-grip::after { content: ""; width: 0; height: 0; border-block: 5px solid transparent; position: absolute; }
.ba-handle-grip::before { border-right: 7px solid var(--accent-deep); left: 9px; }
.ba-handle-grip::after { border-left: 7px solid var(--accent-deep); right: 9px; }
.ba-note { text-align: center; font-size: 0.78rem; color: var(--ink-mute); margin-top: 0.9rem; }

.legal { max-width: 820px; margin: 2.6rem auto 0; padding: 1.3rem 1.5rem; border-radius: var(--r-sm); border: 1px solid var(--line); background: rgba(255,255,255,0.35); }
.legal p { font-size: 0.82rem; color: var(--ink-soft); line-height: 1.6; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; max-width: 900px; margin: 3.5rem auto 0; text-align: center; }
.stat { display: flex; flex-direction: column; gap: 0.2rem; }
.stat-num, .stat-suffix { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: clamp(2.4rem, 5vw, 3.2rem); color: var(--accent-deep); line-height: 1; display: inline; }
.stat-suffix { font-size: clamp(1.4rem, 3vw, 2rem); }
.stat-label { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.5rem; }

/* =============================================================
   14. Equipo
   ============================================================= */
.equipo-grid { display: grid; grid-template-columns: 1fr; gap: 1.3rem; }
.medico { padding: 1.7rem; display: flex; gap: 1.3rem; align-items: flex-start; transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out); will-change: transform; }
.medico-avatar { flex-shrink: 0; width: 70px; height: 70px; border-radius: 20px; display: grid; place-items: center; font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 1.7rem; color: var(--paper); background: linear-gradient(135deg, var(--accent), var(--accent-deep)); box-shadow: var(--shadow-sm); }
.medico--lead .medico-avatar { width: 84px; height: 84px; font-size: 2rem; }
.medico-role { color: var(--accent-deep); font-weight: 600; font-size: 0.92rem; margin-bottom: 0.7rem; }
.medico-creds { display: grid; gap: 0.35rem; }
.medico-creds li { position: relative; padding-left: 1.1rem; font-size: 0.9rem; color: var(--ink-soft); }
.medico-creds li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.medico-quote { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--ink); margin-top: 1.1rem; line-height: 1.4; }

/* =============================================================
   15. Opiniones
   ============================================================= */
.op-grid { display: grid; grid-template-columns: 1fr; gap: 1.3rem; }
.op-card { position: relative; padding: 2rem 1.8rem 1.6rem; display: flex; flex-direction: column; transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out); will-change: transform; }
.op-quote { font-family: var(--serif); font-style: italic; font-size: 4rem; line-height: 0.5; color: var(--accent); opacity: 0.55; height: 2rem; }
.op-card blockquote { font-size: 1.08rem; color: var(--ink); line-height: 1.55; margin: 1rem 0 1.5rem; flex-grow: 1; }
.op-card figcaption { display: flex; align-items: center; gap: 0.8rem; }
.op-avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 0.95rem; color: var(--accent-deep); background: linear-gradient(135deg, rgba(180,136,78,0.2), rgba(142,168,146,0.2)); }
.op-name { font-weight: 700; font-size: 0.98rem; line-height: 1.2; }
.op-name small { display: block; font-weight: 500; font-size: 0.8rem; color: var(--ink-mute); margin-top: 2px; }

/* =============================================================
   16. FAQ
   ============================================================= */
.faq-list { max-width: 780px; margin-inline: auto; display: grid; gap: 0.9rem; }
.faq-item { padding: 0 1.4rem; overflow: hidden; }
.faq-item summary { list-style: none; cursor: pointer; padding: 1.2rem 0; font-weight: 600; font-size: 1.05rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--serif); font-size: 1.6rem; color: var(--accent-deep); transition: transform 0.35s var(--ease-out); line-height: 1; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-answer { padding-bottom: 1.3rem; }
.faq-answer p { color: var(--ink-soft); font-size: 0.97rem; }

/* =============================================================
   17. Reserva / formulario
   ============================================================= */
.reservar-inner { display: grid; gap: clamp(2rem, 4vw, 3.5rem); padding: clamp(1.8rem, 4vw, 3.2rem); border-radius: var(--r-lg); }
.reservar-copy h2 { margin-block: 0.7rem 1.1rem; }
.reservar-copy p { color: var(--ink-soft); max-width: 42ch; }
.reservar-points { display: grid; gap: 0.6rem; margin-top: 1.6rem; }
.reservar-points li { position: relative; padding-left: 1.7rem; color: var(--ink-soft); font-size: 0.95rem; }
.reservar-points li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-deep); font-weight: 700; }
.reservar-direct { margin-top: 1.8rem; font-size: 0.9rem; color: var(--ink-mute); }
.reservar-direct a { font-family: var(--serif); font-style: italic; font-size: 1.6rem; color: var(--ink); }
.reservar-direct a:hover { color: var(--accent-deep); }

.reservar-form { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.4rem; }
.field-row { display: grid; gap: 1rem; }
.field label { font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); }
.field-opt { font-weight: 400; color: var(--ink-mute); }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.85rem 1rem; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: rgba(255,255,255,0.7); color: var(--ink);
  font: inherit; font-size: 0.95rem; transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-mute); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(180,136,78,0.18); background: var(--paper); }
.field input.is-error, .field select.is-error { border-color: #c0492f; box-shadow: 0 0 0 3px rgba(192,73,47,0.14); }
.field-check { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.84rem; color: var(--ink-soft); line-height: 1.5; cursor: pointer; }
.field-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent-deep); flex-shrink: 0; }
.field-check a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; }
.field-check.is-error span { color: #c0492f; }

.btn-check { width: 22px; height: 22px; fill: none; stroke: var(--paper); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 26; stroke-dashoffset: 26; display: none; }
.btn.is-sending { pointer-events: none; opacity: 0.85; }
.btn.is-done { background: linear-gradient(135deg, var(--sage), #5f7a64); }
.btn.is-done .btn-check { display: block; animation: drawCheck 0.5s var(--ease-out) forwards; }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }
.form-success { color: var(--accent-deep); font-weight: 500; font-size: 0.95rem; text-align: center; padding-top: 0.4rem; }

/* =============================================================
   18. Footer
   ============================================================= */
.footer { padding: clamp(3rem, 6vw, 5rem) var(--gutter) 2rem; border-top: 1px solid var(--line); background: rgba(255,255,255,0.3); }
.footer-grid { max-width: var(--container); margin-inline: auto; display: grid; grid-template-columns: 1fr; gap: 2.4rem; }
.footer-brand p { color: var(--ink-soft); font-size: 0.92rem; max-width: 38ch; margin-top: 1rem; }
.footer-col h4 { font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 0.9rem; font-weight: 600; }
.footer-col address, .footer-col p { font-style: normal; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.9; }
.footer-col a:hover { color: var(--accent-deep); }
.footer-links { display: grid; gap: 0.5rem; }
.footer-bottom { max-width: var(--container); margin: 3rem auto 0; padding-top: 1.6rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 1rem; justify-content: space-between; font-size: 0.8rem; color: var(--ink-mute); }
.footer-bottom p { max-width: 60ch; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer-legal a:hover { color: var(--accent-deep); }

/* =============================================================
   19. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .trat-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: row; align-items: center; }
}
@media (min-width: 720px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .op-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1.3fr 1.1fr 1fr; }
  .filosofia-grid { grid-template-columns: 0.9fr 1.1fr; }
}
@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .hero-inner { grid-template-columns: 1.05fr 0.95fr; }
  .hero-visual { width: min(440px, 40vw); justify-self: end; }
  .trat-grid { grid-template-columns: repeat(3, 1fr); }
  .equipo-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .reservar-inner { grid-template-columns: 0.95fr 1.05fr; align-items: start; }
}
@media (min-width: 1280px) {
  .hero-title { font-size: clamp(3.2rem, 5vw, 5.2rem); }
}

/* =============================================================
   20. Credits page
   ============================================================= */
.page-credits { min-height: 100vh; padding: clamp(2rem, 6vw, 5rem) var(--gutter); }
.credits-head { max-width: 820px; margin: 4rem auto 2.5rem; }
.credits-back { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--accent-deep); font-weight: 600; margin-bottom: 1.5rem; }
.credits-back:hover { gap: 0.7rem; }
.credits-head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.credits-head p { color: var(--ink-soft); margin-top: 1rem; max-width: 56ch; }
.credits-list { max-width: 820px; margin-inline: auto; display: grid; gap: 0.9rem; }
.credits-list li { padding: 1.1rem 1.3rem; }
.credits-list strong { font-weight: 700; }
.credits-list a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; }
.credits-list .credit-meta { display: block; color: var(--ink-mute); font-size: 0.85rem; margin-top: 0.3rem; }

/* =============================================================
   21. Page transitions (View Transitions API — cross page)
   ============================================================= */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vtOut 0.4s var(--ease-in) both; }
::view-transition-new(root) { animation: vtIn 0.5s var(--ease-out) both; }
@keyframes vtOut { to { opacity: 0; transform: translateY(-10px); } }
@keyframes vtIn  { from { opacity: 0; transform: translateY(12px); } }

/* =============================================================
   22. Reduced-motion — ONLY intrusive effects (gotcha A.2)
   Keep: hover, tilt, fade, mesh drift, marquee, count-up, smooth scroll.
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-scroll-line::after { animation: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  /* mesh & marquee remain — they are gentle, not intrusive */
}
