/* ===========================================================
   Centro Odontológico Cecilia Álvarez — estilos
   =========================================================== */

:root{
  --ink:#1f1d1a;
  --ink-soft:#44403a;
  --surface:#fbf9f5;
  --surface-alt:#f2efe9;
  --surface-card:#ffffff;
  --secondary:#6b665f;
  --on-surface-variant:#68635c;
  --outline:#ded8cd;
  --outline-soft:#ebe6dd;
  --on-primary:#fbf9f5;
  --accent:#7d6446;
  --star:#9c7200;

  --font-serif:"Playfair Display", serif;
  --font-sans:"Plus Jakarta Sans", sans-serif;

  --container:1380px;
  --gutter:clamp(1.25rem, 5vw, 5rem);
  --section-y:clamp(4rem, 9vw, 7.5rem);

  color-scheme: light;
}

*, *::before, *::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
html,body{ margin:0; padding:0; }

body{
  background:var(--surface);
  color:var(--ink);
  font-family:var(--font-sans);
  font-weight:400;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

img{ max-width:100%; display:block; }
html{ scrollbar-color:#cfc7ba transparent; accent-color:var(--accent); }
::selection{ background:rgba(138,111,78,.22); color:var(--ink); }
:focus-visible{ outline:2px solid var(--accent); outline-offset:3px; }
h1,h2,h3{ text-wrap:balance; }
p{ text-wrap:pretty; }
a{ color:inherit; text-decoration:none; }
button{ font:inherit; color:inherit; background:none; border:none; cursor:pointer; }
ul{ list-style:none; margin:0; padding:0; }
section{ position:relative; }

.material-symbols-outlined{
  font-variation-settings:'FILL' 0,'wght' 400,'GRAD' 0,'opsz' 24;
  font-size:1.25em;
  line-height:1;
  vertical-align:-0.2em;
}

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

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  font-size:.75rem;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--accent);
  font-weight:600;
  margin-bottom:1rem;
}
.eyebrow::before{
  content:"";
  width:1.5rem;
  height:1px;
  background:var(--accent);
  display:inline-block;
}

h1,h2,h3,h4{
  font-family:var(--font-serif);
  font-weight:400;
  line-height:1.15;
  margin:0;
  color:var(--ink);
}
h1{ font-size:clamp(2.25rem, 5vw, 3.1rem); letter-spacing:-.015em; }
.accent-word{ color:var(--accent); }
h2{ font-size:clamp(1.9rem, 4vw, 2.5rem); letter-spacing:-.01em; }
h3{ font-size:1.3rem; }

p{ margin:0; }
.lede{ color:var(--secondary); font-size:1.05rem; max-width:40ch; }

.section-head{
  max-width:640px;
  margin-bottom:clamp(2.5rem, 5vw, 4rem);
}
.section-head.center{ margin-inline:auto; text-align:center; }
.section-head.center .eyebrow::before{ display:none; }
.section-head.center .lede{ margin-inline:auto; }

.btn{
  display:inline-flex;
  align-items:center;
  gap:.6rem;
  padding:.95rem 1.8rem;
  font-size:.95rem;
  font-weight:600;
  letter-spacing:.01em;
  white-space:nowrap;
  transition:background-color .25s ease, color .25s ease, border-color .25s ease, transform .2s ease;
}
.btn-primary{
  background:var(--ink);
  color:var(--on-primary);
  border:1px solid var(--ink);
}
.btn-primary:hover{ background:var(--ink-soft); transform:translateY(-1px); }
.btn:active, .wa-btn:active, .sticky-wa:active, .carousel-controls button:active, .treatment-tabs button:active{ transform:scale(.97); transition-duration:.1s; }
.btn-ghost{
  border-bottom:1px solid var(--ink);
  padding:.3rem 0;
}
.btn-ghost .material-symbols-outlined{ font-size:1.1em; transition:transform .25s ease; }
.btn-ghost:hover .material-symbols-outlined{ transform:translate(2px,-2px); }

/* ---------- Header ---------- */
.logo-invert{ filter:invert(1); }

header.site-header{
  position:sticky;
  top:0;
  z-index:40;
  background:var(--surface);
  border-bottom:1px solid rgba(222,216,205,.4);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1.5rem;
  padding-block:1.25rem;
}
.brand{
  display:flex;
  align-items:center;
  gap:.75rem;
  flex-shrink:0;
}
.brand img{ width:36px; height:36px; object-fit:contain; flex-shrink:0; transition:transform .3s ease; }
.brand:hover img{ transform:scale(1.05); }
.brand-name{
  display:block;
  font-family:var(--font-serif);
  font-weight:400;
  font-size:1.125rem;
  letter-spacing:-.025em;
  line-height:1;
  color:var(--ink);
  white-space:nowrap;
}
.brand-sub{
  display:block;
  font-family:var(--font-sans);
  font-size:.6875rem;
  letter-spacing:.2em;
  text-transform:uppercase;
  color:var(--secondary);
  white-space:nowrap;
  line-height:1;
  margin-top:.3rem;
}

nav.main-nav{ display:flex; align-items:center; gap:clamp(1.1rem, 2.2vw, 2rem); }
nav.main-nav a{
  font-family:var(--font-sans);
  font-size:.75rem;
  letter-spacing:.18em;
  color:var(--on-surface-variant);
  position:relative;
  white-space:nowrap;
}
nav.main-nav a:hover{ color:var(--ink); }
nav.main-nav a.cta-link{ color:var(--ink); }

.header-actions{ display:flex; align-items:center; gap:1rem; }
.phone-link{
  display:flex; align-items:center; gap:.4rem;
  font-family:var(--font-sans);
  font-size:.8125rem;
  font-weight:400;
  color:var(--on-surface-variant);
  white-space:nowrap;
}
.phone-link .material-symbols-outlined{ font-size:1.125rem; }
.wa-btn{
  display:flex; align-items:center; gap:.4rem;
  background:var(--ink); color:#fff;
  padding:.5rem 1rem;
  border-radius:2px;
  font-family:var(--font-sans);
  font-size:.6875rem;
  font-weight:600;
  letter-spacing:.16em;
  box-shadow:0 1px 2px rgba(0,0,0,.05);
  transition:background-color .25s ease;
}
.wa-btn{ white-space:nowrap; }
.wa-btn .material-symbols-outlined{ font-size:1rem; }
.wa-btn:hover{ background:var(--ink-soft); }

.menu-toggle{
  display:none;
  width:36px; height:36px;
  align-items:center; justify-content:center;
  border:1px solid rgba(222,216,205,.6);
  border-radius:2px;
  color:var(--ink);
}

.topbar{
  border-top:1px solid rgba(222,216,205,.4);
  background:rgba(242,239,233,.7);
  text-align:center;
}
.topbar .container{ padding-block:.4rem; }
.topbar span{
  font-family:var(--font-sans);
  font-size:.6875rem;
  letter-spacing:.18em;
  color:var(--secondary);
}

.mobile-nav{
  display:none;
  flex-direction:column;
  gap:1.1rem;
  padding:1.25rem var(--gutter) 1.75rem;
  border-top:1px solid var(--outline);
  background:var(--surface);
}
.mobile-nav a{ font-family:var(--font-sans); font-size:1rem; font-weight:500; color:var(--ink); }
.mobile-nav.open{ display:flex; }

/* La cabecera completa necesita ~1290px: primero se oculta el teléfono y después el menú pasa a hamburguesa */
@media (max-width: 1340px){
  .header-actions .phone-link{ display:none; }
}
@media (max-width: 1180px){
  nav.main-nav{ display:none; }
  .menu-toggle{ display:inline-flex; }
}
@media (min-width: 1181px){
  .mobile-nav.open{ display:none; }
}
@media (max-width: 520px){
  .header-inner{ gap:.75rem; }
  .brand{ flex-shrink:1; min-width:0; }
  .brand-sub{ letter-spacing:.12em; }
  .wa-btn{ padding:.5rem .6rem; }
  .wa-btn__label{ display:none; }
  .topbar span{ letter-spacing:.06em; }
}
@media (max-width: 360px){
  .brand-sub{ letter-spacing:.05em; }
}

/* ---------- Hero ---------- */
.hero{
  padding-block: clamp(2.5rem,5vw,4rem) clamp(3.5rem,8vw,6rem);
  overflow:hidden;
}
.hero-grid{
  display:grid;
  grid-template-columns:1.05fr .95fr;
  gap:clamp(2rem,5vw,4rem);
  align-items:center;
}
.hero-copy .logo-mark{ width:32px; height:32px; margin-bottom:1.5rem; opacity:.8; }
.hero-copy h1{ margin-bottom:1.5rem; }
.hero-copy .lede{ max-width:50ch; margin-bottom:2.25rem; font-size:1.1rem; color:var(--ink-soft); }

/* Entrada del hero: el titular sube desde una máscara mientras el molar se ensambla
   y «O Grove» toma el color de acento al final, cuando el lugar «llega». */
@media (prefers-reduced-motion: no-preference){
  .js .hero-copy .logo-mark{ animation:hero-fade .6s ease-out backwards; }
  .js .hero-copy h1{ animation:hero-mask 1s cubic-bezier(.16,1,.3,1) .12s backwards; }
  .js .hero-copy .accent-word{ animation:hero-accent .7s ease .95s backwards; }
  .js .hero-copy .lede{ animation:hero-rise .8s cubic-bezier(.16,1,.3,1) .45s backwards; }
  .js .hero-cta{ animation:hero-rise .8s cubic-bezier(.16,1,.3,1) .6s backwards; }
}
@media (prefers-reduced-motion: reduce){
  .js .hero-copy h1, .js .hero-copy .lede, .js .hero-cta{ animation:hero-fade .5s ease-out backwards; }
}
@keyframes hero-mask{
  from{ clip-path:inset(0 0 100% 0); transform:translateY(.45em); }
  to{ clip-path:inset(0 0 0 0); transform:none; }
}
@keyframes hero-accent{ from{ color:var(--ink); } to{ color:var(--accent); } }
@keyframes hero-rise{ from{ opacity:0; transform:translateY(12px); } }
@keyframes hero-fade{ from{ opacity:0; } }
.hero-cta{ display:flex; flex-wrap:wrap; align-items:center; gap:1.75rem; }

.hero-visual{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* ---- Escena animada del molar (réplica del sitio de referencia) ---- */
.molar-scene{
  --px:0px; --py:0px; --sy:0px;
  position:relative;
  width:100%;
  max-width:420px;
  aspect-ratio:1324/1188;
  margin-inline:auto;
  translate:0 var(--sy);
}
.molar-scene__stage{
  position:relative;
  width:100%;
  height:100%;
  perspective:1400px;
}
.molar-scene__image-wrap{
  position:absolute;
  inset:6%;
  z-index:2;
  transition:opacity 1.3s cubic-bezier(.16,1,.3,1), transform 1.3s cubic-bezier(.16,1,.3,1), translate .3s ease-out;
  transform-origin:55% 60%;
  isolation:isolate;
  translate:var(--wrap-x,0) var(--wrap-y,0);
}
/* Oculto solo si hay JavaScript, para que sin él el diente se vea igual */
.js .molar-scene:not(.is-assembled) .molar-scene__image-wrap{ opacity:0; transform:scale(.94); }
.molar-scene__image{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  translate:var(--tooth-x,0) var(--tooth-y,0);
  rotate:var(--tooth-rot,0deg);
  transition:translate .4s ease-out, rotate .4s ease-out;
  filter:drop-shadow(0 25px 35px rgba(31,29,26,.12));
  mask-image:radial-gradient(44% 56% at 51% 53%, rgba(0,0,0,.85) 12%, transparent 100%);
  -webkit-mask-image:radial-gradient(44% 56% at 51% 53%, rgba(0,0,0,.85) 12%, transparent 100%);
}
.molar-scene.is-assembled .molar-scene__image{ animation:molar-float 8s ease-in-out 1.3s infinite; }

.molar-scene__orbit{ position:absolute; inset:0; opacity:0; transition:opacity 1.2s ease-out; }
.molar-scene__orbit--back{ z-index:1; transition-delay:.9s; translate:calc(var(--px) * 1.5) calc(var(--py) * 1.5); }
.molar-scene__orbit--front{ z-index:3; transition-delay:1.1s; translate:calc(var(--px) * 1.9) calc(var(--py) * 1.9); }
.molar-scene.is-assembled .molar-scene__orbit{ opacity:1; }
.molar-scene__orbit-svg{ width:100%; height:100%; overflow:visible; }
.molar-scene__orbit-svg ellipse{ fill:none; stroke:var(--ink); stroke-width:.35; }
.molar-scene__orbit--back .molar-scene__orbit-svg ellipse{ opacity:.16; }
.molar-scene__orbit--front .molar-scene__orbit-svg ellipse{ opacity:.22; }
.molar-scene.is-assembled .molar-scene__orbit--back{ animation:molar-orbit-spin 48s linear infinite; }
.molar-scene.is-assembled .molar-scene__orbit--front{ animation:molar-orbit-spin-rev 62s linear infinite; }

@keyframes molar-orbit-spin{ 0%{ transform:rotate(0deg); } 100%{ transform:rotate(360deg); } }
@keyframes molar-orbit-spin-rev{ 0%{ transform:rotate(0deg); } 100%{ transform:rotate(-360deg); } }
@keyframes molar-float{
  0%, 100%{ translate:0 0; rotate:0deg; }
  50%{ translate:0 5px; rotate:1.2deg; }
}

@media (prefers-reduced-motion: reduce){
  .molar-scene.is-assembled .molar-scene__image,
  .molar-scene.is-assembled .molar-scene__orbit--back,
  .molar-scene.is-assembled .molar-scene__orbit--front{ animation:none; }
}

@media (max-width:860px){
  .hero-grid{ grid-template-columns:1fr; }
  .hero-visual{ order:-1; }
  .molar-scene{ max-width:200px; }
}

/* ---------- Quick facts strip ---------- */
.facts{
  background:var(--surface-alt);
  border-block:1px solid var(--outline);
}
.facts-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:1px;
  background:var(--outline);
}
.fact{
  background:var(--surface-alt);
  padding:clamp(1.5rem,3vw,2.25rem) clamp(1.25rem,2vw,1.75rem);
  display:flex;
  flex-direction:column;
  gap:.5rem;
}
.fact .material-symbols-outlined{ font-size:1.6rem; color:var(--accent); }
.fact strong{ font-family:var(--font-serif); font-size:clamp(1.6rem, 2.6vw, 2.1rem); font-weight:500; line-height:1.1; letter-spacing:-.015em; font-variant-numeric:lining-nums tabular-nums; margin-top:.35rem; }
.fact span{ font-size:.85rem; color:var(--secondary); }

@media (max-width:860px){
  .facts-grid{ grid-template-columns:repeat(2,1fr); }
}

/* Iconos de los datos: el trazo pasa de fino a normal al entrar y se rellena al pasar el ratón */
.fact:nth-child(2){ --i:1; }
.fact:nth-child(3){ --i:2; }
.fact:nth-child(4){ --i:3; }
.fact .material-symbols-outlined{
  display:inline-block;
  transform-origin:50% 60%;
  transition:transform .6s cubic-bezier(.2,.7,.2,1), font-variation-settings .6s ease;
}
.js .facts-grid:not(.in) .fact .material-symbols-outlined{ opacity:0; }
.facts-grid.in .fact .material-symbols-outlined{
  animation:fact-icon-in 1.4s cubic-bezier(.2,.7,.2,1) backwards;
  animation-delay:calc(var(--i, 0) * 140ms + 150ms);
}
@keyframes fact-icon-in{
  from{ opacity:0; transform:translateY(8px); font-variation-settings:'FILL' 0,'wght' 100,'GRAD' 0,'opsz' 24; }
  45%{ opacity:1; }
  to{ opacity:1; transform:none; font-variation-settings:'FILL' 0,'wght' 400,'GRAD' 0,'opsz' 24; }
}
@media (hover:hover){
  .fact:hover .material-symbols-outlined{ font-variation-settings:'FILL' 1,'wght' 400,'GRAD' 0,'opsz' 24; }
  .fact:nth-child(1):hover .material-symbols-outlined{ transform:translateY(-2px) rotate(-8deg); }
  .fact:nth-child(2):hover .material-symbols-outlined{ transform:translateY(-3px); }
  .fact:nth-child(3):hover .material-symbols-outlined{ transform:translateY(-3px) rotate(6deg); }
  .fact:nth-child(4):hover .material-symbols-outlined{ transform:rotate(90deg); }
}
@media (prefers-reduced-motion: reduce){
  .facts-grid.in .fact .material-symbols-outlined{ animation:none; }
  .fact .material-symbols-outlined{ transition:none; }
  .fact:hover .material-symbols-outlined{ transform:none; }
}

/* ---------- Treatments ---------- */
.treatments{ padding-block:var(--section-y); }
.treatments-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  flex-wrap:wrap;
  gap:1.5rem;
  margin-bottom:2.5rem;
}
.treatments-counter{ font-size:.85rem; color:var(--secondary); letter-spacing:.05em; }
.treatment-carousel{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:clamp(2rem,4vw,3.5rem);
  align-items:center;
}
.treatment-media{
  position:relative;
  aspect-ratio:4/3;
  overflow:hidden;
  background:var(--outline-soft);
}
.treatment-media img{ position:relative; z-index:1; width:100%; height:100%; object-fit:cover; }
.treatment-media .treatment-media__prev{ position:absolute; inset:0; z-index:0; }
.treatment-badge{
  position:absolute; top:1rem; left:1rem; z-index:2;
  background:var(--surface); color:var(--ink);
  font-size:.75rem; padding:.35rem .7rem; letter-spacing:.04em;
}
.treatment-info .eyebrow{ margin-bottom:.75rem; }
.treatment-info h3{ font-size:clamp(1.6rem,3vw,2.1rem); margin-bottom:1rem; }
.treatment-info p{ color:var(--secondary); margin-bottom:1.75rem; max-width:48ch; }
.treatment-more{ cursor:pointer; }

.carousel-controls{ display:flex; align-items:center; gap:1rem; margin-bottom:1.5rem; }
.carousel-controls button{
  width:2.5rem; height:2.5rem;
  border:1px solid var(--outline);
  display:flex; align-items:center; justify-content:center;
  transition:border-color .2s ease, background .2s ease;
}
.carousel-controls button:hover{ border-color:var(--ink); background:var(--surface-alt); }

.treatment-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem 1.25rem;
  margin-top:2.5rem;
  padding-top:2rem;
  border-top:1px solid var(--outline);
}
.treatment-tabs button{
  font-size:.85rem;
  color:var(--secondary);
  padding:.3rem 0;
}
.treatment-tabs button.active{ color:var(--ink); font-weight:600; }

@media (max-width:860px){
  .treatment-carousel{ grid-template-columns:1fr; }
}

/* ---------- Primera visita ---------- */
.process{
  background:var(--ink);
  color:var(--surface);
  padding-block:var(--section-y);
}
.process .eyebrow{ color:var(--outline); }
.process .eyebrow::before{ background:var(--outline); }
.process h2{ color:var(--surface); }
.process .lede{ color:#cfc9c0; }

.process-steps{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  padding:0; list-style:none;
  gap:1px;
  background:rgba(251,249,245,.15);
  margin-top:3rem;
}
.step{
  background:var(--ink);
  padding:2rem 1.75rem;
  display:flex;
  flex-direction:column;
  gap:1rem;
}
.step-num{
  font-family:var(--font-serif);
  font-size:1.8rem;
  color:var(--outline);
  opacity:.6;
}
.step h3{ color:var(--surface); font-size:1.1rem; font-family:var(--font-sans); font-weight:600; }
.step p{ color:#cfc9c0; font-size:.92rem; }

.process-note{
  margin-top:3rem;
  padding-top:2.5rem;
  border-top:1px solid rgba(251,249,245,.2);
  display:flex;
  gap:1.25rem;
  align-items:flex-start;
  max-width:62ch;
}
.process-note .material-symbols-outlined{ font-size:1.75rem; color:var(--outline); flex-shrink:0; margin-top:.15rem; }
.process-note p{ color:#e7e2d8; font-size:1.02rem; }
.process-note strong{ color:var(--surface); }

@media (max-width:860px){
  .process-steps{ grid-template-columns:1fr 1fr; }
}
@media (max-width:540px){
  .process-steps{ grid-template-columns:1fr; }
}

/* ---------- Equipo ---------- */
.team{ padding-block:var(--section-y); }
.team-photo{ position:relative; margin-bottom:3rem; }
.team-photo img{ width:100%; aspect-ratio:21/9; object-fit:cover; }
.team-photo-caption{
  position:absolute; bottom:1rem; left:1rem;
  background:var(--surface); padding:.5rem 1rem;
  font-size:.8rem; letter-spacing:.03em; color:var(--secondary);
}
/* Fila de retratos en primer plano; al pulsar uno se despliega su ficha debajo */
.team-row{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:clamp(1rem,2vw,1.75rem);
  margin:0; padding:0; list-style:none;
}
.team-member{
  display:flex; flex-direction:column; align-items:flex-start;
  width:100%; padding:0; border:0; background:none;
  font:inherit; color:inherit; text-align:left; cursor:pointer;
}
.team-member__photo{
  display:block; width:100%; aspect-ratio:1;
  overflow:hidden; margin-bottom:.9rem;
  background:var(--outline-soft);
}
.team-member__photo img{
  width:100%; height:100%; object-fit:cover;
  transition:transform .5s cubic-bezier(.16,1,.3,1);
}
.team-member:hover .team-member__photo img{ transform:scale(1.04); }
.team-member__name{ font-family:var(--font-serif); font-size:1.05rem; line-height:1.25; margin-bottom:.25rem; }
.team-member__role{ display:block; color:var(--accent); font-size:.78rem; font-weight:600; letter-spacing:.02em; line-height:1.4; }
.team-member__more{
  display:inline-flex; align-items:center; gap:.15rem;
  margin-top:.65rem; font-size:.8rem; color:var(--secondary);
  border-bottom:1px solid var(--outline); padding-bottom:.1rem;
  transition:color .2s ease, border-color .2s ease;
}
.team-member__more-short{ display:none; }
.team-member__more .material-symbols-outlined{ font-size:1.1rem; transition:transform .3s cubic-bezier(.16,1,.3,1); }
.team-member:hover .team-member__more{ color:var(--ink); border-color:var(--ink); }
.team-member[aria-expanded="true"] .team-member__more{ color:var(--accent); border-color:var(--accent); }
.team-member[aria-expanded="true"] .team-member__more .material-symbols-outlined{ transform:rotate(180deg); }
.team-member:focus-visible{ outline:2px solid var(--accent); outline-offset:4px; }

/* Con JS, se ve de una en una; sin JS, todas las fichas quedan visibles */
.team-bios{ margin-top:2.5rem; }
.team-bio{
  display:grid; grid-template-columns:minmax(0,1fr) minmax(0,2fr);
  gap:clamp(1.5rem,4vw,4rem);
  padding-block:2rem; border-top:1px solid var(--outline);
}
.team-bio__head h3{ font-size:1.5rem; margin-bottom:.4rem; }
.team-bio__body p{ color:var(--secondary); max-width:62ch; margin-bottom:.9rem; }
.team-bio__skills{
  display:flex; flex-wrap:wrap; gap:.5rem;
  margin:1.25rem 0 0; padding:0; list-style:none;
}
.team-bio__skills li{
  font-size:.82rem; padding:.4rem .8rem;
  border:1px solid var(--outline); background:var(--surface-alt);
}
.js .team-bios{ margin-top:0; }
.js .team-bio{ display:none; }
.js .team-bio.is-open{ display:grid; margin-top:2.5rem; animation:reveal-rise .5s cubic-bezier(.16,1,.3,1) backwards; }

@media (max-width:1000px){ .team-row{ grid-template-columns:repeat(3,minmax(0,1fr)); row-gap:2rem; } }
@media (max-width:640px){
  .team-row{ column-gap:.75rem; row-gap:1.5rem; }
  .team-bio{ grid-template-columns:1fr; gap:1rem; }
  .team-member__photo{ margin-bottom:.6rem; }
  .team-member__name{ font-size:.9rem; }
  .team-member__role{ font-size:.68rem; }
  .team-member__more{ font-size:.72rem; margin-top:.45rem; }
  .team-member__more-long{ display:none; }
  .team-member__more-short{ display:inline; }
  .team-member__more .material-symbols-outlined{ font-size:.95rem; }
}
@media (prefers-reduced-motion: reduce){
  .team-member__photo img, .team-member__more .material-symbols-outlined{ transition:none; }
  .team-member:hover .team-member__photo img{ transform:none; }
}

/* ---------- Espacio ---------- */
.space{ padding-block:var(--section-y); background:var(--surface-alt); border-block:1px solid var(--outline); }
/* Galería asimétrica: la recepción manda, el CBCT vertical acompaña y el resto cierra en fila */
.space-gallery{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  grid-auto-rows:clamp(150px, 16vw, 240px);
  gap:1rem;
}
.space-gallery figure{
  position:relative;
  margin:0;
  overflow:hidden;
  cursor:zoom-in;
}
.space-gallery .space-gallery__main{ grid-column:span 2; grid-row:span 2; }
.space-gallery .space-gallery__tall{ grid-row:span 2; }
.space-gallery img{ width:100%; height:100%; object-fit:cover; transition:transform .6s cubic-bezier(.16,1,.3,1); }
.space-gallery figure:hover img{ transform:scale(1.04); }
.space-gallery figcaption{
  position:absolute; inset:auto 0 0 0;
  padding:2.5rem 1.1rem 1rem;
  background:linear-gradient(0deg, rgba(31,29,26,.82) 0%, rgba(31,29,26,.6) 55%, rgba(31,29,26,0));
  color:var(--surface);
}
.space-gallery figcaption .tag{ display:block; font-size:.7rem; letter-spacing:.08em; text-transform:uppercase; opacity:.8; margin-bottom:.2rem; }
.space-gallery figcaption .title{ font-family:var(--font-serif); font-size:1rem; }
.space-gallery__main figcaption{ padding:3.5rem 1.5rem 1.35rem; }
.space-gallery__main figcaption .title{ font-size:1.35rem; }

@media (max-width:620px){
  .space-gallery{ grid-template-columns:repeat(2,1fr); grid-auto-rows:150px; gap:.75rem; }
  .space-gallery .space-gallery__wide{ grid-column:span 2; }
  .space-gallery__main figcaption .title{ font-size:1.15rem; }
}

/* ---------- Testimonios ---------- */
.testimonials{ padding-block:var(--section-y); }

.star-filled{
  font-variation-settings:'FILL' 1,'wght' 400,'GRAD' 0,'opsz' 24;
  color:var(--star);
  font-size:1rem;
}

.google-rating{
  display:flex;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  gap:.6rem;
  max-width:fit-content;
  margin:0 auto 3rem;
  padding:.85rem 1.5rem;
  background:var(--surface-alt);
  border:1px solid var(--outline);
  transition:border-color .2s ease, background .2s ease;
}
.google-rating:hover{ border-color:var(--ink); background:var(--outline-soft); }
.google-g{ width:20px; height:20px; flex-shrink:0; }
.google-rating-score{ font-family:var(--font-serif); font-size:1.1rem; color:var(--ink); }
.google-rating-stars{ display:inline-flex; gap:1px; }
.google-rating-stars .star-filled{ font-size:.9rem; }
.google-rating-count{ font-size:.85rem; color:var(--secondary); }
.google-rating-link{
  font-size:.8rem;
  margin-left:.5rem;
  padding-left:1rem;
  border-left:1px solid var(--outline);
  border-bottom:none;
}

.review-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:1.5rem;
}
.review-card{
  display:flex;
  flex-direction:column;
  gap:1rem;
  padding:clamp(1.5rem,3vw,2rem);
  background:var(--surface-card);
  border:1px solid var(--outline);
  text-align:left;
  transition:transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.review-card:hover{
  transform:translateY(-3px);
  border-color:var(--ink);
  box-shadow:0 0 0 1px rgba(31,29,26,.04), 0 1px 2px rgba(31,29,26,.06);
}
.review-stars{ display:flex; gap:1px; }
.review-text{ color:var(--ink-soft); font-size:.95rem; line-height:1.6; flex-grow:1; }
.review-author{ display:flex; flex-direction:column; gap:.2rem; padding-top:.75rem; border-top:1px solid var(--outline); }
.review-name{ font-weight:600; font-size:.9rem; color:var(--ink); }
.review-meta{ font-size:.78rem; color:var(--secondary); }

@media (max-width:900px){
  .review-grid{ grid-template-columns:1fr; }
}

/* ---------- Contacto ---------- */
.contact{ padding-block:var(--section-y); background:var(--ink); color:var(--surface); }
.contact .eyebrow{ color:var(--outline); }
.contact .eyebrow::before{ background:var(--outline); }
.contact h2{ color:var(--surface); }
.contact .lede{ color:#cfc9c0; }

.contact-cards{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:1px;
  background:rgba(251,249,245,.15);
  margin-top:3rem;
}
.contact-card{
  position:relative;
  background:var(--ink);
  padding:clamp(1.75rem,3vw,2.5rem);
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:1.25rem;
  transition:background-color .25s ease;
}
.contact-card:hover{ background:var(--ink-soft); }
.contact-card > .material-symbols-outlined{ font-size:2rem; color:var(--outline); }
.contact-card strong{ display:block; font-size:1.15rem; margin-bottom:.3rem; }
.contact-card span{ font-size:.9rem; color:#b7b0a4; }
.contact-card-arrow{
  position:absolute;
  top:1.75rem; right:1.75rem;
  font-size:1.3rem !important;
  color:#b7b0a4 !important;
  transition:transform .25s ease;
}
.contact-card:hover .contact-card-arrow{ transform:translate(3px,-3px); color:var(--surface) !important; }

@media (max-width:860px){
  .contact-cards{ grid-template-columns:1fr; }
}

/* ---------- Ubicación ---------- */
.location{ padding-block:var(--section-y); }
.location-grid{ display:grid; grid-template-columns:1fr 1.3fr; gap:clamp(2rem,4vw,3.5rem); align-items:center; }
.location-copy .lede{ margin-block:1.5rem; max-width:40ch; }
.location-map{ position:relative; aspect-ratio:16/10; overflow:hidden; }
.location-map img{ width:100%; height:100%; object-fit:cover; }
.location-map a{
  position:absolute; inset:0;
  display:flex; align-items:flex-end; justify-content:flex-end;
  padding:1rem;
}
.location-map .pin{
  background:var(--ink); color:var(--surface);
  width:2.75rem; height:2.75rem; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
}
@media (max-width:860px){ .location-grid{ grid-template-columns:1fr; } }

/* ---------- Footer ---------- */
footer{ background:var(--surface-alt); border-top:1px solid var(--outline); padding-block:clamp(3rem,6vw,4.5rem) 2rem; }
.footer-grid{
  display:grid;
  grid-template-columns:1.3fr 1fr 1fr;
  gap:clamp(2rem,4vw,3rem);
  margin-bottom:3rem;
}
.footer-brand{ display:flex; align-items:center; gap:.75rem; margin-bottom:1rem; }
.footer-brand img{ width:40px; height:40px; }
.footer-about p{ color:var(--secondary); max-width:36ch; margin-top:1rem; font-size:.92rem; }
.footer-reg{ margin-top:1.25rem; font-size:.8rem; color:var(--secondary); }
.footer-reg strong{ color:var(--ink-soft); }

.footer-col h4{ font-family:var(--font-sans); font-weight:600; font-size:.85rem; letter-spacing:.05em; text-transform:uppercase; color:var(--secondary); margin-bottom:1.1rem; }
.footer-col ul{ display:flex; flex-direction:column; gap:.75rem; }
.footer-col a{ font-size:.95rem; display:flex; align-items:center; gap:.5rem; }
.footer-col a:hover{ color:var(--accent); }

.footer-bottom{
  display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:1rem;
  padding-top:2rem; border-top:1px solid var(--outline);
  font-size:.8rem; color:var(--secondary);
}
.footer-legal{ display:flex; gap:1.5rem; }
/* Deja hueco al botón fijo de WhatsApp para que no tape los enlaces legales */
.footer-legal{ margin-right:9.5rem; }
@media (max-width:760px){ .footer-legal{ margin-right:0; } footer{ padding-bottom:6rem; } }

@media (max-width:760px){ .footer-grid{ grid-template-columns:1fr 1fr; } .footer-about{ grid-column:1/-1; } }

/* ---------- Sticky WhatsApp ---------- */
.sticky-wa{
  position:fixed; right:1.25rem; bottom:1.25rem; z-index:50;
  display:flex; align-items:center; gap:.5rem;
  background:var(--ink); color:var(--surface);
  padding:.8rem 1.1rem;
  box-shadow:0 0 1px rgba(31,29,26,.35), 0 2px 6px rgba(31,29,26,.12);
}
.sticky-wa:hover{ background:var(--ink-soft); }

/* ---------- Lightbox ---------- */
.lightbox{
  position:fixed; inset:0; z-index:100;
  background:rgba(31,29,26,.92);
  display:none; align-items:center; justify-content:center;
  padding:2rem;
}
.lightbox.open{ display:flex; }
.lightbox img{ max-width:min(900px,90vw); max-height:85vh; object-fit:contain; }
.lightbox-close{
  position:absolute; top:1.5rem; right:1.5rem;
  color:var(--surface); width:2.75rem; height:2.75rem;
  border:1px solid rgba(251,249,245,.4);
  display:flex; align-items:center; justify-content:center;
}

/* ---------- Ventana de tratamiento ---------- */
html:has(.treatment-modal[open]){ overflow:hidden; }
.treatment-modal{
  padding:0; border:0;
  width:min(1040px, calc(100vw - 2rem));
  max-width:none;
  max-height:calc(100dvh - 2rem);
  background:var(--surface); color:var(--ink);
  box-shadow:0 0 1px rgba(31,29,26,.35), 0 16px 40px rgba(31,29,26,.12);
  overflow:hidden;
}
.treatment-modal[open]{ animation:treatment-modal-in .45s cubic-bezier(.2,.7,.2,1); }
.treatment-modal::backdrop{ background:rgba(31,29,26,.55); backdrop-filter:blur(4px); }
.treatment-modal[open]::backdrop{ animation:treatment-backdrop-in .45s ease; }
.treatment-modal.is-closing{ animation:treatment-modal-out .22s ease-in forwards; }
.treatment-modal.is-closing::backdrop{ animation:treatment-backdrop-out .22s ease-in forwards; }
@keyframes treatment-modal-out{ to{ opacity:0; transform:translateY(8px); } }
@keyframes treatment-backdrop-out{ to{ opacity:0; } }
@keyframes treatment-modal-in{ from{ opacity:0; transform:translateY(16px); } to{ opacity:1; transform:none; } }
@keyframes treatment-backdrop-in{ from{ opacity:0; } to{ opacity:1; } }
.treatment-modal__inner{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,5fr) minmax(0,7fr);
  max-height:calc(100dvh - 2rem);
}
.treatment-modal__media img{ width:100%; height:100%; object-fit:cover; display:block; }
.treatment-modal__body{ overflow-y:auto; padding:clamp(1.75rem,4vw,3.25rem); }
.treatment-modal__body .eyebrow{ margin-bottom:.9rem; }
.treatment-modal__body h2{ margin-bottom:1.25rem; padding-right:2.5rem; }
.treatment-detail__intro{ font-size:1.05rem; color:var(--ink-soft); margin-bottom:1.75rem; }
.treatment-modal__content h4{
  font-family:var(--font-sans); font-size:.75rem; font-weight:600;
  letter-spacing:.12em; text-transform:uppercase; color:var(--accent);
  margin:0 0 .75rem;
}
.treatment-modal__content ul{ margin-bottom:1.75rem; display:grid; gap:.5rem; }
.treatment-modal__content li{ position:relative; padding-left:1.4rem; color:var(--ink-soft); font-size:.95rem; }
.treatment-modal__content li::before{
  content:""; position:absolute; left:0; top:.75em;
  width:.7rem; height:1px; background:var(--accent);
}
.treatment-modal__content > div > p:last-child{ color:var(--ink-soft); font-size:.95rem; }
.treatment-modal__cta{ margin-top:2rem; padding-top:1.75rem; border-top:1px solid var(--outline); }
.treatment-modal__cta > p{ color:var(--secondary); font-size:.95rem; margin-bottom:1.25rem; }
.treatment-modal__actions{ display:flex; flex-wrap:wrap; align-items:center; gap:1rem 1.75rem; }
.treatment-modal__close{
  position:absolute; top:1rem; right:1rem; z-index:1;
  width:2.5rem; height:2.5rem; border-radius:50%;
  background:var(--surface); border:1px solid var(--outline);
  display:flex; align-items:center; justify-content:center;
  transition:border-color .25s ease, transform .25s ease;
}
.treatment-modal__close:hover{ border-color:var(--ink); transform:rotate(90deg); }

@media (max-width:760px){
  .treatment-modal{ width:calc(100vw - 1rem); max-height:calc(100dvh - 1rem); }
  .treatment-modal__inner{ grid-template-columns:1fr; max-height:calc(100dvh - 1rem); overflow-y:auto; }
  .treatment-modal__media{ height:200px; }
  .treatment-modal__body{ overflow:visible; }
}
@media (prefers-reduced-motion: reduce){
  .treatment-modal[open], .treatment-modal[open]::backdrop{ animation:none; }
  .treatment-modal.is-closing, .treatment-modal.is-closing::backdrop{ animation:treatment-backdrop-out .15s ease-in forwards; }
}

/* ---------- Reveal animation ---------- */
/* Por defecto todo es visible; solo con JS se oculta hasta entrar en pantalla.
   "stagger": los hijos entran escalonados (listas). "mask": la foto se revela como el titular del hero.
   "trigger": solo activa animaciones propias del bloque. */
.js [data-reveal=""]:not(.in), .js [data-reveal="stagger"]:not(.in) > *{ opacity:0; }
.js [data-reveal=""].in{ animation:reveal-rise .8s cubic-bezier(.16,1,.3,1) backwards; }
.js [data-reveal="stagger"].in > *{
  animation:reveal-rise .7s cubic-bezier(.16,1,.3,1) backwards;
  animation-delay:calc(min(var(--i, 0), 5) * 70ms);
}
.js [data-reveal="mask"]:not(.in) img{ clip-path:inset(100% 0 0 0); }
.js [data-reveal="mask"].in img{ animation:reveal-mask 1.1s cubic-bezier(.16,1,.3,1) backwards; }
.js [data-reveal="mask"]:not(.in) .team-photo-caption{ opacity:0; }
.js [data-reveal="mask"].in .team-photo-caption{ animation:hero-fade .6s ease-out .6s backwards; }
@keyframes reveal-rise{ from{ opacity:0; transform:translateY(12px); } }
@keyframes reveal-mask{
  from{ clip-path:inset(100% 0 0 0); transform:scale(1.04); }
  to{ clip-path:inset(0 0 0 0); transform:none; }
}
@media (prefers-reduced-motion: reduce){
  .js [data-reveal=""].in, .js [data-reveal="stagger"].in > *, .js [data-reveal="mask"].in img{ animation:hero-fade .4s ease-out backwards; }
}

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