/* =========================================================
   CDEDIA · Estilos
   Paleta "Dark Academia" · mobile-first
   ========================================================= */

:root {
  /* Paleta */
  --antique-ivory: #EDE6DC;
  --burnt-umber: #8A4B2A;
  --deep-chestnut: #8B2C1F;
  --forest-moss: #3B3F2F;
  --oxford-brown: #4B3B2A;
  --charcoal-slate: #2C2E30;
  --vintage-maroon: #6B2E2F;
  --muted-olive: #6B6B3F;
  --faded-gold: #BFA76F;
  --dusty-taupe: #8B7B6B;

  /* Derivados */
  --parchment: #E5DCCD;
  --ivory-soft: rgba(237, 230, 220, .86);
  --line-dark: rgba(75, 59, 42, .22);
  --line-light: rgba(237, 230, 220, .26);
  --text-muted: #5E5145;            /* 6.4:1 sobre ivory */

  /* Tipografía */
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Movimiento */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.65, 0, .35, 1);

  /* Medidas */
  --container: 1200px;
  --gutter: 16px;
  --radius: 14px;
  --topbar-h: 40px;
  --shadow-soft: 0 18px 50px -24px rgba(44, 46, 48, .45);
}

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

html {
  overflow-x: hidden;
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  overflow-x: clip;
  background: var(--antique-ivory);
  color: var(--charcoal-slate);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  animation: page-in .8s var(--ease-out) both;
}

@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }

img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (min-width: 768px) { :root { --gutter: 32px; } }

.ico { width: 1.15em; height: 1.15em; flex: none; fill: currentColor; }

.sr-only {
  position: absolute !important; 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: 8px; left: 8px; z-index: 200;
  background: var(--faded-gold); color: var(--charcoal-slate);
  padding: .7rem 1.1rem; border-radius: 8px; font-weight: 600; text-decoration: none;
  transform: translateY(-160%); transition: transform .3s var(--ease-out);
}
.skip-link:focus { transform: none; }

:focus-visible {
  outline: 3px solid var(--faded-gold);
  outline-offset: 3px;
  border-radius: 4px;
}
main:focus { outline: none; }

/* Fondo ambiental: un solo entorno detrás de todo */
.ambient {
  position: fixed; inset: -20%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 35% at 20% 30%, rgba(191, 167, 111, .20), transparent 70%),
    radial-gradient(35% 30% at 80% 70%, rgba(138, 75, 42, .12), transparent 70%);
  animation: ambient-drift 90s var(--ease-soft) infinite alternate;
  animation-delay: -30s;
}
.ambient::after {
  content: ""; position: absolute; inset: 0; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes ambient-drift {
  from { transform: translate3d(-4%, -2%, 0) scale(1); }
  to   { transform: translate3d(4%, 3%, 0) scale(1.08); }
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 48px; padding: .8rem 1.5rem;
  border: 1px solid transparent; border-radius: 4px;
  font-family: var(--font-body); font-weight: 600; font-size: .86rem;
  letter-spacing: .06em; text-transform: uppercase; text-decoration: none; line-height: 1.2;
  transition: transform .35s var(--ease-out), background-color .35s var(--ease-out),
              color .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .35s var(--ease-out);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -14px rgba(44, 46, 48, .6); }
.btn:active { transform: translateY(0); }
.btn--block { width: 100%; }

.btn--white { background: #fff; color: var(--oxford-brown); }
.btn--white:hover { background: var(--antique-ivory); color: var(--vintage-maroon); }
.btn--white.btn--outlined { border-color: var(--line-dark); }

.btn--gold { background: var(--faded-gold); color: var(--charcoal-slate); }
.btn--gold:hover { background: #CDB781; }

.btn--chestnut { background: var(--deep-chestnut); color: var(--antique-ivory); }
.btn--chestnut:hover { background: var(--vintage-maroon); }

.btn--outline-dark { border-color: var(--oxford-brown); color: var(--oxford-brown); background: transparent; }
.btn--outline-dark:hover { background: var(--oxford-brown); color: var(--antique-ivory); }

.btn--ghost-light { border-color: rgba(237, 230, 220, .55); color: var(--antique-ivory); background: transparent; }
.btn--ghost-light:hover { background: rgba(237, 230, 220, .12); border-color: var(--faded-gold); }

.btn--ig {
  color: #fff;
  background: linear-gradient(45deg, #F58529 0%, #DD2A7B 45%, #8134AF 75%, #515BD4 100%);
}
.btn--ig:hover { filter: saturate(1.15); }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.btn-row--center { justify-content: center; }

.eyebrow {
  font-family: var(--font-body); font-size: .8rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--burnt-umber);
  margin-bottom: .9rem;
}
.eyebrow--light { color: var(--faded-gold); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: calc(var(--topbar-h) * -1); z-index: 100;
}

.topbar {
  height: var(--topbar-h);
  background: var(--charcoal-slate);
  color: var(--ivory-soft);
  font-size: .78rem;
}
.topbar__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.topbar__item { display: inline-flex; align-items: center; gap: .45rem; margin: 0; text-decoration: none; white-space: nowrap; }
.topbar__item .ico { color: var(--faded-gold); }
.topbar__address { display: none; overflow: hidden; text-overflow: ellipsis; }
.topbar__address span { overflow: hidden; text-overflow: ellipsis; }
.topbar__right { display: flex; align-items: center; gap: .9rem; margin-left: auto; }
.topbar__icon { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; transition: background-color .3s var(--ease-out), color .3s var(--ease-out); }
.topbar__icon:hover, .topbar__item:hover { color: var(--faded-gold); }
.topbar__icon:hover { background: rgba(191, 167, 111, .15); }
@media (min-width: 768px) { .topbar__address { display: inline-flex; } }

/* Aviso "Abierto ahora / Cerrado" */
.status-pill {
  display: inline-flex; align-items: center; gap: 0;
  padding: .2rem .7rem; border-radius: 999px;
  font-size: .74rem; font-weight: 600; letter-spacing: .02em; line-height: 1.4;
  white-space: nowrap; color: var(--antique-ivory);
  background: rgba(237, 230, 220, .1); border: 1px solid rgba(237, 230, 220, .22);
}
.status-pill[hidden] { display: none; }
.status-pill::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none; margin-right: .45rem;
  background: #E08B76;
}
.status-pill.is-open::before {
  background: #6FCF8E;
  box-shadow: 0 0 0 0 rgba(111, 207, 142, .6);
  animation: open-pulse 3s ease-out infinite; animation-delay: -1s;
}
@keyframes open-pulse { 0% { box-shadow: 0 0 0 0 rgba(111, 207, 142, .55); } 60%, 100% { box-shadow: 0 0 0 7px rgba(111, 207, 142, 0); } }
.topbar__inner { min-width: 0; }
.topbar__status { flex: none; }
.branch__status { margin-top: .55rem; font-size: .8rem; }
.topbar__address { flex: 1 1 auto; min-width: 0; }
/* En celulares el teléfono queda solo con su ícono para que quepa el aviso */
@media (max-width: 560px) {
  .topbar__phone span { display: none; }
  .topbar__phone .ico { width: 1.3em; height: 1.3em; }
  .topbar__status { font-size: .7rem; padding: .15rem .6rem; }
}
@media (max-width: 420px) { .topbar__status .status-pill__detail { display: none; } }
.status-pill > span { white-space: pre; }

.navbar {
  background: var(--oxford-brown);
  color: var(--antique-ivory);
  transition: box-shadow .4s var(--ease-out);
}
.site-header.is-stuck .navbar { box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .7); }
.navbar__inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 1rem; }

.logo { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--antique-ivory); }
.logo__mark { width: 40px; height: 40px; color: var(--faded-gold); transition: transform .6s var(--ease-out); }
.logo:hover .logo__mark { transform: rotate(-8deg) scale(1.05); }
.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo__name { font-family: var(--font-display); font-weight: 700; font-size: 1.85rem; letter-spacing: .14em; }
.logo__tag { font-size: .62rem; letter-spacing: .32em; text-transform: uppercase; color: var(--faded-gold); margin-top: .3rem; }

/* Menú hamburguesa */
.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 48px; height: 48px; padding: 12px; background: transparent; border: 1px solid var(--line-light); border-radius: 8px;
}
.nav-toggle__bar { display: block; height: 2px; width: 100%; background: var(--antique-ivory); border-radius: 2px; transition: transform .4s var(--ease-out), opacity .3s; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Navegación móvil (panel) */
.main-nav {
  position: fixed; left: 0; right: 0; top: var(--nav-top, 72px); bottom: 0;
  background: var(--oxford-brown);
  padding: 1rem var(--gutter) 2rem;
  overflow-y: auto;
  opacity: 0; visibility: hidden; transform: translateY(-12px);
  transition: opacity .35s var(--ease-out), transform .45s var(--ease-out), visibility 0s linear .45s;
}
.main-nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
html.nav-open { overflow: hidden; }

.menu__item { border-bottom: 1px solid var(--line-light); }
.menu__link {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 1rem .25rem; background: none; border: 0; text-align: left;
  font-family: var(--font-body); font-weight: 500; font-size: 1rem; letter-spacing: .02em;
  color: var(--antique-ivory); text-decoration: none;
}
.menu__link:hover { color: var(--faded-gold); }
.ico--chev { transition: transform .35s var(--ease-out); }
.menu__toggle[aria-expanded="true"] .ico--chev { transform: rotate(180deg); }

.submenu { max-height: 0; overflow: hidden; visibility: hidden; transition: max-height .45s var(--ease-out), visibility 0s linear .45s; }
.has-sub.is-open .submenu { max-height: 320px; visibility: visible; transition-delay: 0s; }
.submenu a { display: block; padding: .7rem 1rem; color: var(--ivory-soft); text-decoration: none; font-size: .95rem; }
.submenu a:hover { color: var(--faded-gold); }
.has-sub.is-open .submenu { padding-bottom: .5rem; }

.menu__cta { color: var(--faded-gold); font-weight: 600; }

.main-nav__contact { display: grid; gap: .75rem; margin-top: 1.5rem; }

/* Navegación de escritorio */
@media (min-width: 1100px) {
  .nav-toggle { display: none; }
  .main-nav {
    position: static; opacity: 1; visibility: visible; transform: none;
    padding: 0; background: none; overflow: visible; transition: none;
  }
  .main-nav__contact { display: none; }
  .menu { display: flex; align-items: center; gap: .35rem; }
  .menu__item { border: 0; position: relative; }
  .menu__link { padding: .6rem .85rem; font-size: .95rem; position: relative; width: auto; gap: .3rem; }
  .menu__link:not(.menu__cta)::after {
    content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .3rem; height: 1px;
    background: var(--faded-gold); transform: scaleX(0); transform-origin: left;
    transition: transform .4s var(--ease-out);
  }
  .menu__link:hover::after, .menu__link:focus-visible::after { transform: scaleX(1); }
  .menu__cta {
    margin-left: .4rem; padding: .65rem 1.1rem; border-radius: 4px;
    background: var(--faded-gold); color: var(--charcoal-slate);
    transition: background-color .3s var(--ease-out), transform .3s var(--ease-out);
  }
  .menu__cta:hover { background: #CDB781; color: var(--charcoal-slate); transform: translateY(-1px); }

  .submenu {
    position: absolute; top: calc(100% + 10px); left: 0; min-width: 240px;
    display: block; padding: .5rem 0; max-height: none; overflow: visible;
    background: var(--antique-ivory); border-top: 2px solid var(--faded-gold);
    border-radius: 0 0 10px 10px; box-shadow: var(--shadow-soft);
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity .3s var(--ease-out), transform .35s var(--ease-out), visibility 0s linear .35s;
  }
  .submenu::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
  .has-sub:hover .submenu, .has-sub.is-open .submenu, .has-sub:focus-within .submenu {
    opacity: 1; visibility: visible; transform: none; transition-delay: 0s;
  }
  .has-sub:hover .ico--chev { transform: rotate(180deg); }
  .submenu a { color: var(--charcoal-slate); padding: .7rem 1.2rem; transition: background-color .25s, color .25s, padding-left .3s var(--ease-out); }
  .submenu a:hover { background: var(--parchment); color: var(--vintage-maroon); padding-left: 1.45rem; }
  .has-sub.is-open .submenu { padding-bottom: .5rem; }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  background: linear-gradient(180deg, #E2D9CB 0%, var(--antique-ivory) 100%);
  font-size: .85rem; color: var(--text-muted);
}
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: .75rem 0; list-style: none; }
.breadcrumb li + li::before { content: "»"; margin-right: .4rem; color: var(--burnt-umber); }
.breadcrumb a { color: var(--oxford-brown); font-weight: 600; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb [aria-current] { color: var(--charcoal-slate); }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: clamp(560px, 86vh, 820px);
  display: flex; align-items: center;
  color: var(--antique-ivory);
  background: var(--forest-moss);
}
.hero__media { position: absolute; inset: 0; z-index: -1; }
.hero__canvas, .hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__video { opacity: 0; transition: opacity 1.2s var(--ease-out); transform: translateZ(0); }
.hero.has-video .hero__video { opacity: 1; }
.hero__overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(75, 59, 42, .84) 0%, rgba(75, 59, 42, .58) 48%, rgba(59, 63, 47, .4) 100%),
    radial-gradient(ellipse 120% 90% at 50% 45%, transparent 40%, rgba(30, 24, 18, .45) 100%);
}

.hero__inner {
  display: grid; gap: 2.5rem; align-items: center;
  padding-block: 4.5rem 5.5rem;
  position: relative;
}
.hero__copy { text-shadow: 0 1px 2px rgba(20, 15, 10, .7), 0 6px 26px rgba(20, 15, 10, .45); }
.hero__kicker {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem); color: var(--antique-ivory); margin-bottom: .35rem;
}
.hero__title {
  font-weight: 700; text-transform: uppercase; letter-spacing: .01em;
  font-size: clamp(2.3rem, 6.4vw, 4.6rem); line-height: .98;
  max-width: 14ch; margin-bottom: 1.4rem;
}
.hero__title .w {
  display: inline-block; padding-bottom: .08em; margin-bottom: -.08em;
}
.js .hero__title .w {
  opacity: 0; transform: translateY(.45em);
  animation: word-rise 1s var(--ease-out) forwards;
  animation-delay: calc(.25s + var(--i) * .11s);
}
@keyframes word-rise { to { opacity: 1; transform: none; } }

.hero__rule {
  display: block; width: 120px; height: 4px; background: var(--faded-gold);
  transform-origin: left;
}
.js .hero__rule { transform: scaleX(0); animation: rule-grow 1s var(--ease-out) .9s forwards; }
@keyframes rule-grow { to { transform: scaleX(1); } }

.hero__items { display: flex; flex-wrap: wrap; gap: .9rem 1.6rem; margin-top: 2rem; font-size: 1rem; font-weight: 500; }
.hero__items li { display: inline-flex; align-items: center; gap: .55rem; }
.hero__items .ico { color: var(--faded-gold); width: 1.3em; height: 1.3em; }
.js .hero__items li { opacity: 0; transform: translateY(10px); animation: word-rise .9s var(--ease-out) forwards; }
.js .hero__items li:nth-child(1) { animation-delay: 1.1s; }
.js .hero__items li:nth-child(2) { animation-delay: 1.22s; }
.js .hero__items li:nth-child(3) { animation-delay: 1.34s; }

.hero__toggle {
  position: absolute; right: var(--gutter); top: 1.25rem;
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(44, 46, 48, .55); color: var(--antique-ivory);
  border: 1px solid rgba(237, 230, 220, .3);
  backdrop-filter: blur(6px);
  transition: background-color .3s var(--ease-out), transform .3s var(--ease-out);
}
.hero__toggle:hover { background: rgba(44, 46, 48, .8); transform: scale(1.06); }
.hero__toggle .ico { width: 24px; height: 24px; }
.hero__toggle .ico--play { display: none; }
.hero__toggle[aria-pressed="true"] .ico--play { display: block; }
.hero__toggle[aria-pressed="true"] .ico--pause { display: none; }

.hero__panel {
  justify-self: stretch;
  padding: 1.75rem;
  background: rgba(237, 230, 220, .1);
  border: 1px solid rgba(191, 167, 111, .35);
  backdrop-filter: blur(8px);
  border-radius: 6px;
  position: relative;
}
.hero__panel::before, .hero__panel::after {
  content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid var(--faded-gold);
}
.hero__panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.hero__panel::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.hero__panel .btn { width: 100%; padding-block: 1.1rem; font-size: .92rem; }
.js .hero__panel { opacity: 0; animation: panel-in 1.1s var(--ease-out) 1.2s forwards; }
@keyframes panel-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

@media (min-width: 960px) {
  .hero__inner { grid-template-columns: minmax(0, 1.35fr) auto minmax(0, 1fr); gap: 2rem; padding-block: 6rem; }
  .hero__toggle { position: static; width: 72px; height: 72px; }
  .hero__toggle .ico { width: 30px; height: 30px; }
  .hero__panel { padding: 2.75rem 2.5rem; }
}

/* ---------- Secciones ---------- */
.section { padding-block: clamp(4rem, 9vw, 7rem); position: relative; }

/* Línea que se dibuja sola */
.draw-line { position: absolute; left: 0; width: 100%; height: 60px; pointer-events: none; }
.draw-line path { fill: none; stroke: var(--faded-gold); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 1; vector-effect: non-scaling-stroke; transition: stroke-dashoffset 2.4s var(--ease-soft); }
.draw-line.in path { stroke-dashoffset: 0; }
.draw-line--why { top: 8px; opacity: .8; }

/* Por qué elegirnos */
.why__intro { max-width: 760px; }
.why__intro p:not(.eyebrow) { font-size: 1.05rem; color: var(--charcoal-slate); max-width: 68ch; }
.why__title {
  color: var(--vintage-maroon); font-weight: 700;
  font-size: clamp(2.3rem, 5vw, 3.8rem); letter-spacing: -.005em;
  margin-bottom: 1.4rem; max-width: 18ch;
}
.why__list-wrap { margin-top: 2.5rem; }
.why__list-title { font-weight: 600; font-size: 1.05rem; margin-bottom: 1.2rem; color: var(--oxford-brown); }
.checklist { display: grid; gap: .55rem 2.5rem; }
.checklist li {
  display: flex; align-items: baseline; gap: .7rem;
  padding: .35rem 0; border-bottom: 1px dashed rgba(139, 123, 107, .35);
}
.checklist .ico { color: var(--burnt-umber); width: 1.2em; height: 1.2em; transform: translateY(.22em); }
@media (min-width: 720px) { .checklist { grid-template-columns: 1fr 1fr; } }

.reveal.in .checklist li { animation: check-in .7s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 35ms); }
@keyframes check-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }

/* Áreas */
.areas { background: var(--forest-moss); color: var(--antique-ivory); overflow: hidden; }
.areas::before {
  content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%;
  border: 1px solid rgba(191, 167, 111, .25); pointer-events: none;
  animation: slow-turn 60s linear infinite; animation-delay: -12s;
}
@keyframes slow-turn { to { transform: rotate(360deg) scale(1.04); } }
.areas__head { max-width: 640px; margin-bottom: 3rem; }
.areas__head h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); font-weight: 600; }
.areas__grid { display: grid; gap: 1.25rem; }
@media (min-width: 860px) { .areas__grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }

.card {
  position: relative; padding: 2.25rem 1.75rem 2rem;
  background: rgba(237, 230, 220, .05);
  border: 1px solid rgba(191, 167, 111, .28); border-radius: var(--radius);
  scroll-margin-top: 100px;
  transition: transform .5s var(--ease-out), background-color .5s var(--ease-out), border-color .5s var(--ease-out);
}
.card:hover { transform: translateY(-6px); background: rgba(237, 230, 220, .09); border-color: rgba(191, 167, 111, .6); }
.card__num { position: absolute; top: 1.25rem; right: 1.5rem; font-family: var(--font-display); font-size: 2.6rem; font-weight: 600; color: rgba(191, 167, 111, .35); line-height: 1; }
.card__icon { width: 44px; height: 44px; color: var(--faded-gold); margin-bottom: 1.25rem; }
.card h3 { font-size: 1.75rem; font-weight: 600; }
.card p { color: var(--ivory-soft); font-size: .97rem; }
.card__link { display: inline-flex; align-items: center; gap: .4rem; color: var(--faded-gold); font-weight: 600; font-size: .88rem; text-decoration: none; letter-spacing: .04em; }
.card__link .ico { transition: transform .35s var(--ease-out); }
.card__link:hover .ico { transform: translateX(4px); }

.areas__grid .card.reveal { transition-delay: 0s; }
.areas__grid .card.reveal:nth-child(2) { transition-delay: .12s; }
.areas__grid .card.reveal:nth-child(3) { transition-delay: .24s; }
.areas__grid .card.reveal.settled:nth-child(n) { transition-delay: 0s; }

/* Capas de la piel */
.layers { background: var(--parchment); }
.layers__grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .layers__grid { grid-template-columns: 1fr 1.1fr; gap: 4rem; } }
.layers__figure { max-width: 460px; margin-inline: auto; width: 100%; }
.layers h2 { color: var(--vintage-maroon); font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; }
.layers__lead { color: var(--text-muted); }

.skin { width: 100%; height: auto; filter: drop-shadow(0 24px 40px rgba(75, 59, 42, .25)); }
.skin__bg { fill: #F3EDE4; }
.skin__layer { cursor: pointer; transition: opacity .5s var(--ease-out), filter .5s var(--ease-out); }
.skin__layer--epi { fill: #D9C29A; }
.skin__layer--dermis { fill: #B98262; }
.skin__layer--hipo { fill: #8E654A; }
.skin.has-active .skin__layer { opacity: .38; }
.skin.has-active .skin__layer.is-active { opacity: 1; filter: drop-shadow(0 0 10px rgba(191, 167, 111, .9)); }
.skin__layer:hover { opacity: 1 !important; }
.skin__detail { fill: none; stroke: rgba(237, 230, 220, .75); stroke-width: 2; pointer-events: none; }
.skin__detail ellipse { fill: rgba(237, 230, 220, .14); }
.skin__frame { fill: none; stroke: var(--faded-gold); stroke-width: 2; }

.layer-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0 1.25rem; }
.layer-tab {
  min-height: 44px; padding: .55rem 1.2rem; border-radius: 999px;
  background: transparent; border: 1px solid var(--oxford-brown); color: var(--oxford-brown);
  font-weight: 600; font-size: .9rem;
  transition: background-color .3s var(--ease-out), color .3s var(--ease-out);
}
.layer-tab:hover { background: rgba(75, 59, 42, .08); }
.layer-tab[aria-selected="true"] { background: var(--vintage-maroon); border-color: var(--vintage-maroon); color: var(--antique-ivory); }
.layer-panel { padding: 1.5rem 1.6rem; background: var(--antique-ivory); border-left: 3px solid var(--faded-gold); border-radius: 0 var(--radius) var(--radius) 0; }
.layer-panel:not([hidden]) { animation: panel-fade .5s var(--ease-out); }
@keyframes panel-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.layer-panel h3 { font-size: 1.6rem; color: var(--oxford-brown); font-weight: 600; }
.layer-panel__how { margin: 0; font-weight: 600; color: var(--burnt-umber); }

/* Doctora */
.doctor__grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 900px) { .doctor__grid { grid-template-columns: .9fr 1.1fr; gap: 5rem; } }
.doctor__photo { margin: 0; position: relative; max-width: 420px; width: 100%; justify-self: center; }
.arch {
  position: relative; aspect-ratio: 4 / 5;
  border-radius: 999px 999px 18px 18px;
  padding: 10px; border: 1px solid var(--faded-gold);
  background: var(--antique-ivory);
  box-shadow: var(--shadow-soft);
}
.arch::before {
  content: ""; position: absolute; inset: -14px; border-radius: inherit;
  border: 1px solid rgba(191, 167, 111, .45); pointer-events: none;
  animation: breathe 6s var(--ease-soft) infinite alternate; animation-delay: -2s;
}
@keyframes breathe { from { opacity: .35; transform: scale(.995); } to { opacity: 1; transform: scale(1.01); } }
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; border-radius: 999px 999px 10px 10px; }
.arch__initials, .avatar__initials {
  display: none; place-items: center; width: 100%; height: 100%;
  background: var(--antique-ivory); color: var(--vintage-maroon);
  font-family: var(--font-display); font-weight: 700;
}
.arch__initials { position: absolute; inset: 10px; width: auto; height: auto; font-size: 5rem; border-radius: 999px 999px 10px 10px; border: 1px dashed var(--dusty-taupe); }
.is-missing > img { display: none; }
.is-missing > .arch__initials, .is-missing > .avatar__initials { display: grid; }
.doctor__flourish { width: 180px; margin: 1.5rem auto 0; }
.doctor__flourish path { fill: none; stroke: var(--faded-gold); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2s var(--ease-soft) .4s; }
.reveal.in .doctor__flourish path { stroke-dashoffset: 0; }

.doctor__info h2 { font-size: clamp(2.4rem, 5vw, 3.8rem); color: var(--vintage-maroon); font-weight: 700; margin-bottom: .2rem; }
.doctor__role { font-family: var(--font-display); font-style: italic; font-size: 1.5rem; color: var(--burnt-umber); margin-bottom: 1.25rem; }
.doctor__info > p:not(.eyebrow):not(.doctor__role) { max-width: 60ch; }
.doctor__facts { display: grid; gap: .5rem; margin-top: 1rem; }
.doctor__facts li { padding-left: 1.1rem; position: relative; }
.doctor__facts li::before { content: ""; position: absolute; left: 0; top: .72em; width: 6px; height: 6px; background: var(--faded-gold); transform: rotate(45deg); }

/* Sucursal */
.branch { background: var(--charcoal-slate); color: var(--antique-ivory); }
.branch__grid { display: grid; gap: 2.5rem; align-items: stretch; }
@media (min-width: 900px) { .branch__grid { grid-template-columns: 1fr 1.3fr; gap: 3.5rem; } }
.branch h2 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 600; }
.branch__list { margin: 1.5rem 0 0; display: grid; gap: 1.1rem; }
.branch__list div { padding-bottom: 1.1rem; border-bottom: 1px solid var(--line-light); }
.branch__list dt { display: flex; align-items: center; gap: .5rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .16em; color: var(--faded-gold); font-weight: 600; }
.branch__list dd { margin: .35rem 0 0; font-size: 1.1rem; }
.branch__list a { text-decoration: none; }
.branch__list a:hover { color: var(--faded-gold); }
.branch__map {
  min-height: 360px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid rgba(191, 167, 111, .35); background: #3A3C3E;
}
.branch__map iframe { display: block; width: 100%; height: 100%; min-height: 360px; border: 0; filter: sepia(.25) saturate(.85); }
.map-placeholder { height: 100%; min-height: 360px; display: grid; place-content: center; justify-items: center; gap: .75rem; padding: 2rem; text-align: center; color: var(--ivory-soft); }
.map-placeholder .ico { width: 42px; height: 42px; color: var(--faded-gold); }
.map-placeholder p { max-width: 32ch; margin: 0; }

/* Contacto */
.contact {
  background: var(--vintage-maroon); color: var(--antique-ivory); text-align: center; overflow: hidden;
}
.contact::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 80% at 50% 0%, rgba(191, 167, 111, .22), transparent 70%);
}
.contact__inner { position: relative; max-width: 820px; }
.contact__mark { width: 56px; height: 56px; margin: 0 auto 1.25rem; color: var(--faded-gold); animation: sway 7s var(--ease-soft) infinite alternate; animation-delay: -3s; }
@keyframes sway { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
.contact h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 600; }
.contact p { color: var(--ivory-soft); font-size: 1.1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--oxford-brown); color: var(--ivory-soft); font-size: .95rem; }
.footer__grid { display: grid; gap: 2.5rem; padding-block: 4rem 3rem; }
@media (min-width: 720px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer__grid { grid-template-columns: 1.5fr .8fr .8fr 1.3fr; gap: 3rem; } }
.footer__brand p { margin-top: 1.1rem; max-width: 38ch; }
.footer__ig { display: inline-flex; align-items: center; gap: .5rem; color: var(--faded-gold); font-weight: 600; text-decoration: none; }
.footer__ig:hover { color: var(--antique-ivory); }
.footer__title { font-family: var(--font-display); font-size: 1.45rem; font-weight: 600; color: var(--antique-ivory); margin-bottom: 1rem; }
.footer__col ul { display: grid; gap: .55rem; }
.footer__col a { text-decoration: none; transition: color .25s; }
.footer__col a:hover { color: var(--faded-gold); }
.footer__contact li { display: flex; align-items: baseline; gap: .6rem; }
.footer__contact .ico { color: var(--faded-gold); transform: translateY(.18em); }
.footer__pay-title { margin: 1.5rem 0 .6rem; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faded-gold); font-weight: 600; }
.footer__col .pay-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.pay-list li { padding: .3rem .75rem; border: 1px solid var(--line-light); border-radius: 4px; font-size: .82rem; font-weight: 600; letter-spacing: .04em; }
.footer__bottom { border-top: 1px solid var(--line-light); padding-block: 1.4rem 6.5rem; font-size: .85rem; }
.footer__bottom p { margin: 0 0 .3rem; }
.footer__note { color: rgba(237, 230, 220, .75); }
@media (min-width: 1100px) { .footer__bottom .container { text-align: center; } .footer__bottom { padding-bottom: 5.5rem; } }

/* ---------- Botones flotantes ---------- */
.fab-stack {
  position: fixed; right: 16px; bottom: 16px; z-index: 90;
  display: flex; flex-direction: column; gap: 12px;
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
}
.fab {
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center; text-decoration: none;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .55);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.fab .ico { width: 28px; height: 28px; }
.fab:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .6); }
.fab--wa { background: #25D366; color: #fff; position: relative; }
.fab--wa::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, .5);
  animation: wa-pulse 4s var(--ease-out) infinite; animation-delay: -1.5s;
}
@keyframes wa-pulse { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .45); } 40%, 100% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); } }
.fab--ig { color: #fff; background: radial-gradient(circle at 30% 107%, #FDF497 0%, #FDF497 5%, #FD5949 45%, #D6249F 60%, #285AEB 90%); }
.fab--call { background: var(--faded-gold); color: var(--charcoal-slate); }
@media (min-width: 1100px) { .fab--call { display: none; } }
body.chat-open .fab-stack { opacity: 0; pointer-events: none; transform: translateY(10px); }

/* ---------- Chatbot ---------- */
.avatar { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; border: 2px solid var(--faded-gold); background: var(--antique-ivory); }
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.avatar__initials { font-size: 1rem; }
.avatar--sm { width: 42px; height: 42px; }

.chat-launcher {
  position: fixed; left: 16px; bottom: 16px; z-index: 90;
  display: inline-flex; align-items: center; gap: .6rem;
  padding: 6px; border-radius: 999px;
  background: var(--oxford-brown); color: var(--antique-ivory);
  border: 1px solid rgba(191, 167, 111, .5);
  box-shadow: 0 12px 28px -12px rgba(0, 0, 0, .6);
  transition: transform .35s var(--ease-out), opacity .3s var(--ease-out);
}
.chat-launcher:hover { transform: translateY(-3px); }
.chat-launcher__label { display: none; padding-right: .9rem; font-weight: 600; font-size: .88rem; }
@media (min-width: 600px) { .chat-launcher__label { display: inline; } }
.chat-launcher[aria-expanded="true"] { opacity: 0; pointer-events: none; }

.chat {
  position: fixed; z-index: 120;
  left: 8px; right: 8px; bottom: 8px;
  height: min(86dvh, 640px);
  display: flex; flex-direction: column;
  background: var(--antique-ivory); color: var(--charcoal-slate);
  border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(191, 167, 111, .55);
  box-shadow: 0 30px 70px -20px rgba(20, 15, 10, .6);
  transform-origin: bottom left;
  animation: chat-in .45s var(--ease-out);
}
.chat[hidden] { display: none; }
@keyframes chat-in { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
@media (min-width: 600px) {
  .chat { left: 16px; right: auto; bottom: 16px; width: 390px; height: min(640px, calc(100dvh - 32px)); }
}

.chat__head { display: flex; align-items: center; gap: .75rem; padding: .9rem 1rem; background: var(--oxford-brown); color: var(--antique-ivory); }
.chat__who { flex: 1; min-width: 0; }
.chat__who h2 { font-size: 1.35rem; margin: 0; font-weight: 700; letter-spacing: .02em; }
.chat__who p { margin: 0; font-size: .78rem; color: var(--faded-gold); }
.chat__close { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: transparent; border: 0; color: var(--antique-ivory); }
.chat__close:hover { background: rgba(237, 230, 220, .12); }

.chat__log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .7rem; scroll-behavior: smooth; overscroll-behavior: contain; }
.msg { max-width: 86%; padding: .7rem .95rem; border-radius: 14px; font-size: .93rem; line-height: 1.55; animation: msg-in .35s var(--ease-out); overflow-wrap: anywhere; }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg p { margin: 0 0 .5em; }
.msg p:last-child { margin: 0; }
.msg ul { list-style: disc; padding-left: 1.1rem; margin: .3em 0 .5em; }
.msg--bot { align-self: flex-start; background: #fff; border: 1px solid var(--line-dark); border-bottom-left-radius: 4px; }
.msg--user { align-self: flex-end; background: var(--vintage-maroon); color: var(--antique-ivory); border-bottom-right-radius: 4px; }
.msg--alert { align-self: stretch; max-width: none; background: #F6E3DF; border: 1px solid var(--deep-chestnut); color: #5A1C14; }
.msg a { color: var(--deep-chestnut); font-weight: 600; }
.msg__actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .6rem; }
.msg__actions .btn { min-height: 38px; padding: .5rem .85rem; font-size: .74rem; }
.msg__next { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .65rem; }
.msg__next button {
  min-height: 32px; padding: .3rem .7rem; border-radius: 999px;
  border: 1px solid rgba(138, 75, 42, .55); background: var(--antique-ivory); color: var(--burnt-umber);
  font-size: .76rem; font-weight: 600; transition: background-color .25s, color .25s;
}
.msg__next button:hover { background: var(--burnt-umber); color: var(--antique-ivory); }
@media (pointer: coarse) { .msg__next button { min-height: 40px; } }
.msg--typing { display: inline-flex; gap: 5px; align-items: center; }
.msg--typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--dusty-taupe); animation: dot 1.2s infinite ease-in-out; }
.msg--typing span:nth-child(2) { animation-delay: .15s; }
.msg--typing span:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }

.chat__quick { display: flex; gap: .4rem; padding: .5rem 1rem; overflow-x: auto; border-top: 1px solid var(--line-dark); scrollbar-width: thin; }
.chat__quick button {
  flex: none; min-height: 36px; padding: .4rem .85rem; border-radius: 999px;
  border: 1px solid var(--burnt-umber); background: transparent; color: var(--burnt-umber);
  font-size: .8rem; font-weight: 600; transition: background-color .25s, color .25s;
}
.chat__quick button:hover { background: var(--burnt-umber); color: var(--antique-ivory); }

.chat__form { display: flex; gap: .5rem; padding: .6rem 1rem; }
.chat__form input {
  flex: 1; min-width: 0; min-height: 46px; padding: .6rem .9rem;
  border: 1px solid var(--dusty-taupe); border-radius: 10px; background: #fff;
  font: inherit; font-size: 1rem; color: var(--charcoal-slate);
}
.chat__form input:focus { outline: 2px solid var(--faded-gold); outline-offset: 1px; border-color: var(--faded-gold); }
.chat__form button { width: 46px; height: 46px; display: grid; place-items: center; border: 0; border-radius: 10px; background: var(--vintage-maroon); color: var(--antique-ivory); transition: background-color .25s; }
.chat__form button:hover { background: var(--deep-chestnut); }
.chat__form button:disabled { opacity: .5; cursor: progress; }
.chat__disclaimer { margin: 0; padding: .55rem 1rem .8rem; font-size: .74rem; line-height: 1.4; color: var(--text-muted); background: var(--parchment); text-align: center; }

/* ---------- Revelado al hacer scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.js .reveal.in { opacity: 1; transform: none; }

/* Pausa global (pestaña oculta) */
body.paused *, body.paused *::before, body.paused *::after { animation-play-state: paused !important; }

/* Objetivos táctiles de 44px */
@media (pointer: coarse) {
  .btn { min-height: 48px; }
  .topbar__icon { width: 44px; height: 44px; }
  .chat__quick button { min-height: 44px; }
}

/* Pantallas bajas: menos ruido decorativo */
@media (max-height: 560px) {
  .areas::before { display: none; }
  .hero { min-height: 520px; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }
  .js .reveal, .js .hero__title .w, .js .hero__items li, .js .hero__panel { opacity: 1; transform: none; }
  .js .hero__rule { transform: none; }
  .draw-line path, .doctor__flourish path { stroke-dashoffset: 0; }
  .ambient, .areas::before, .arch::before, .contact__mark, .fab--wa::after { animation: none !important; }
}
