/* Lumina Dental — estilos del sitio (demo de portfolio) */
html, body { background: #FAF6F0; }

:root {
  --petroleo: #0F3D3E;
  --turquesa: #2FA4A0;
  --crema: #FAF6F0;
  --blanco: #FFFFFF;
  --coral: #FF7A59;
  --tinta: #1E2A2B;
  --muted: #3E4C4D;          /* 9.6:1 sobre crema */
  --crema-2: #F1EBE1;        /* escalón de tono para superficies */
  --petroleo-2: #164B4C;

  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-text: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* cinco tamaños */
  --s-xl: clamp(46px, 8.2vw, 132px);
  --s-l: clamp(36px, 5vw, 72px);
  --s-m: clamp(22px, 2vw, 28px);
  --s-b: 18px;
  --s-s: 15px;

  --m: clamp(20px, 3.2vw, 48px);         /* margen de página */
  --radius: 999px;                        /* botones: pastilla, en todo el sitio */
  --ease: cubic-bezier(.2,.8,.2,1);
  --bar-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  font-family: var(--f-text);
  font-size: var(--s-b);
  line-height: 1.55;
  color: var(--tinta);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--f-display); font-weight: 500; color: var(--petroleo); letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--turquesa); color: var(--tinta); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--m); top: -60px; z-index: 100; background: var(--coral); color: var(--tinta); padding: 10px 18px; border-radius: var(--radius); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--m); }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 12px 26px; border: 0; border-radius: var(--radius);
  font-family: var(--f-text); font-weight: 700; font-size: 16px; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--coral { background: var(--coral); color: var(--tinta); }           /* 5.7:1 */
.btn--coral:hover { background: #FF8D70; }
.btn--teal { background: var(--turquesa); color: var(--tinta); }         /* 4.8:1 */
.btn--teal:hover { background: #3BB4AF; }
.btn--wa { background: #25D366; color: var(--tinta); }
.btn--ghost { background: var(--crema-2); color: var(--petroleo); }
.btn--lg { min-height: 56px; padding: 16px 32px; font-size: 18px; }
.btn--block { width: 100%; }

.tag-demo {
  display: inline-block; vertical-align: middle;
  font-family: var(--f-text); font-size: var(--s-s); font-weight: 600; letter-spacing: 0;
  background: var(--crema-2); color: var(--petroleo); padding: 2px 12px; border-radius: var(--radius);
}

/* ---------- barra superior ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--bar-h);
  display: flex; align-items: center; gap: 24px;
  padding-inline: var(--m);
  background: var(--crema); color: var(--petroleo);
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.bar.is-over-hero { background: transparent; color: var(--crema); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-display); font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin-right: auto; }
.wordmark__mark { width: 30px; height: 30px; color: var(--turquesa); }
.bar.is-over-hero .wordmark__mark { color: var(--crema); }
.bar__nav { display: none; gap: 6px; }
.bar__nav a { text-decoration: none; font-weight: 500; padding: 10px 14px; border-radius: var(--radius); position: relative; transition: background-color .2s; }
.bar__nav a:hover { background: rgba(47,164,160,.16); }
.bar__nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 3px; border-radius: 3px;
  background: var(--turquesa); transform-origin: left; animation: beam .5s var(--ease) both;
}
.bar.is-over-hero .bar__nav a[aria-current="page"]::after { background: var(--crema); }
.bar__cta { display: none; }

@keyframes beam { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- pestañas ---------- */

.page { padding-top: calc(var(--bar-h) + clamp(40px, 7vw, 96px)); padding-bottom: clamp(64px, 9vw, 140px); min-height: 100svh; }
.page--dark { background: var(--petroleo); color: var(--crema); }
.page--dark h2, .page--dark .lead { color: var(--crema); }
.page__head { display: grid; gap: 18px; margin-bottom: clamp(32px, 5vw, 72px); }
.h1like { font-size: var(--s-xl); line-height: .95; letter-spacing: -0.04em; }
.h2 { font-size: var(--s-l); line-height: 1; letter-spacing: -0.03em; }
.lead { font-size: var(--s-m); line-height: 1.35; color: var(--muted); max-width: 36ch; }

/* ---------- héroe ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; color: var(--crema); overflow: hidden; background: var(--petroleo); }
.hero__media { position: absolute; inset: 0; clip-path: inset(0); }
.hero__video { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; transform: scale(1.04); }
.hero__overlay { position: absolute; inset: 0; background: rgba(15, 61, 62, .66); }
.hero__beam { position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: #EAFBF8; opacity: 0; pointer-events: none; }
.hero__content { position: relative; z-index: 2; width: 100%; max-width: 1440px; margin-inline: auto; padding: calc(var(--bar-h) + 40px) var(--m) clamp(96px, 12vh, 132px); }
.hero__title { color: var(--crema); font-size: var(--s-xl); font-weight: 400; line-height: .92; letter-spacing: -0.045em; max-width: 11ch; }
.hero__title .reveal { display: inline-block; }
.hero__sub { margin-top: 28px; max-width: 34ch; font-size: var(--s-m); line-height: 1.35; color: var(--crema); }
.hero__actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.link-light { color: var(--crema); font-weight: 600; text-underline-offset: 6px; text-decoration-thickness: 2px; padding: 12px 0; }
.link-light:hover { text-decoration-color: var(--turquesa); }
.hero__pause {
  position: absolute; z-index: 3; right: var(--m); top: calc(var(--bar-h) + 16px);
  background: rgba(15,61,62,.7); color: var(--crema); border: 0; border-radius: var(--radius);
  padding: 8px 16px; min-height: 40px; font-size: var(--s-s); font-weight: 600; cursor: pointer;
}
.hero__pause:hover { background: var(--petroleo); }

/* entrada del héroe: la luz que se enciende */
.js .hero.is-intro .hero__media { animation: lampOn 1.5s cubic-bezier(.5,0,.2,1) both; }
.js .hero.is-intro .hero__beam { animation: beamLine 1.5s ease both; }
.js .hero.is-intro .hero__video { animation: settle 2.6s var(--ease) both; }
.js .hero.is-intro .reveal { animation: rise .9s var(--ease) both; }
.js .hero.is-intro .hero__sub, .js .hero.is-intro .hero__actions { animation-name: slide; } /* sin opacidad: el texto se pinta enseguida (mejor LCP) */
.js .hero.is-intro .hero__title .reveal:nth-child(1) { animation-delay: .3s; }
.js .hero.is-intro .hero__title .reveal:nth-child(2) { animation-delay: .4s; }
.js .hero.is-intro .hero__sub { animation-delay: .55s; }
.js .hero.is-intro .hero__actions { animation-delay: .65s; }
@keyframes lampOn { 0% { clip-path: inset(50% 0 50% 0); } 18% { clip-path: inset(49.6% 0 49.6% 0); } 100% { clip-path: inset(0 0 0 0); } }
@keyframes beamLine { 0% { opacity: 0; transform: scaleX(0); } 15% { opacity: 1; transform: scaleX(1); } 40% { opacity: .9; } 70% { opacity: 0; } 100% { opacity: 0; } }
@keyframes settle { from { transform: scale(1.14); } to { transform: scale(1.04); } }
@keyframes slide { from { transform: translateY(20px); } to { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

/* entrada de secciones al cambiar de pestaña */
.js .tab.is-entering .rise { animation: rise .7s var(--ease) both; }
.js .tab.is-entering .rise:nth-of-type(2) { animation-delay: .07s; }
.js .tab.is-entering .rise:nth-of-type(3) { animation-delay: .14s; }
.js .tab.is-entering .rise:nth-of-type(4) { animation-delay: .21s; }
.has-io .why .rise:not(.in-view), .has-io .voices .rise:not(.in-view) { opacity: 0; }
.js .rise.in-view { animation: rise .7s var(--ease) both; }

/* ---------- inicio: tres diferencias ---------- */
.why { display: grid; gap: 40px; padding-block: clamp(72px, 10vw, 168px) clamp(48px, 6vw, 96px); }
.why__pic { margin: 0; }
.why__pic img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.why__text { display: grid; gap: 32px; align-content: center; }
.why__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.why__list li { font-size: var(--s-b); max-width: 44ch; padding-left: 22px; position: relative; }
.why__list li::before { content: ""; position: absolute; left: 0; top: .5em; width: 10px; height: 10px; border-radius: 50%; background: var(--turquesa); }
.why__list strong { display: block; font-family: var(--f-display); font-weight: 500; font-size: var(--s-m); color: var(--petroleo); line-height: 1.2; margin-bottom: 6px; letter-spacing: -0.01em; }

/* ---------- inicio: testimonios ---------- */
.voices { display: grid; gap: 32px; padding-block: clamp(48px, 6vw, 96px) clamp(80px, 10vw, 160px); }
.voices__title { display: grid; gap: 14px; }
.voices__title h2 { max-width: 16ch; }
.voices__portrait { margin: 0; }
.voices__portrait img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.voices blockquote { margin: 0; }
.voices__main p { font-family: var(--f-display); font-size: clamp(24px, 2.5vw, 36px); line-height: 1.25; color: var(--petroleo); letter-spacing: -0.015em; max-width: 30ch; }
.voices blockquote footer { margin-top: 14px; font-size: var(--s-s); font-weight: 600; color: var(--muted); }
.voices__more { display: grid; gap: 28px; }
.voices__more blockquote { background: var(--crema-2); padding: 24px 26px; }
.voices__more p { font-size: var(--s-b); }

/* ---------- tratamientos ---------- */
.treat { display: grid; gap: 28px; }
.treat__list { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--m) * -1); padding: 4px var(--m) 8px; scroll-snap-type: x mandatory; }
.treat__list::-webkit-scrollbar { display: none; }
.treat__list [role="tab"] {
  flex: none; scroll-snap-align: start;
  border: 0; cursor: pointer; text-align: left;
  font-family: var(--f-display); font-size: 20px; font-weight: 500; color: var(--petroleo);
  background: var(--crema-2); padding: 10px 20px; border-radius: var(--radius); min-height: 48px;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.treat__list [role="tab"]:hover { background: #E6DED1; }
.treat__list [role="tab"][aria-selected="true"] { background: var(--petroleo); color: var(--crema); }
.treat__panel { display: grid; gap: 24px; background: var(--blanco); }
.treat__panel:not([hidden]) { animation: rise .5s var(--ease) both; }
.treat__panel img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.treat__body { display: grid; gap: 18px; padding: 0 22px 26px; align-content: start; }
.treat__body h3 { font-size: var(--s-l); line-height: 1; letter-spacing: -0.03em; }
.treat__body p { max-width: 46ch; }
.treat__body dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.treat__body dt { font-size: var(--s-s); color: var(--muted); }
.treat__body dd { margin: 2px 0 0; font-weight: 600; color: var(--petroleo); }
.treat__body .btn { justify-self: start; }

/* ---------- equipo ---------- */
.team { display: grid; gap: 40px; }
.team__lead { margin: 0; display: grid; gap: 24px; }
.team__lead img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%; }
.team__lead h3 { font-size: var(--s-l); line-height: 1; letter-spacing: -0.03em; }
.team__lead figcaption { display: grid; gap: 10px; align-content: end; }
.team__lead figcaption p:last-child { max-width: 40ch; }
.team__role { color: var(--petroleo); font-weight: 600; }
.team__rest { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; }
.team__rest li { display: grid; grid-template-columns: 112px 1fr; gap: 18px; align-items: center; background: var(--crema-2); }
.team__rest img { width: 112px; height: 140px; object-fit: cover; object-position: center 20%; }
.team__rest h3 { font-size: var(--s-m); line-height: 1.1; }
.team__rest li div { padding: 12px 16px 12px 0; display: grid; gap: 4px; }
.team__rest li p:last-child { font-size: var(--s-s); color: var(--muted); }

/* ---------- reservar ---------- */
.book { display: grid; gap: 40px; }
.book__intro { display: grid; gap: 18px; align-content: start; }
.book__pic { margin: 12px 0 0; display: none; }
.book__pic img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.page--dark .lead { color: #E3EFEC; }
.book__card { background: var(--crema); color: var(--tinta); padding: clamp(22px, 3vw, 44px); }
.form { display: grid; gap: 20px; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font-weight: 600; color: var(--petroleo); padding: 0; margin-bottom: 2px; }
.field input, .field select {
  width: 100%; min-height: 52px; padding: 12px 16px; font-size: 17px;
  background: var(--blanco); border: 2px solid #8FA3A2; border-radius: 10px; color: var(--tinta);
}
.field input:focus, .field select:focus { border-color: var(--petroleo); outline: 3px solid var(--turquesa); outline-offset: 1px; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: #B3261E; }
.field__hint { font-size: var(--s-s); color: var(--muted); }
.field__error { font-size: var(--s-s); color: #B3261E; font-weight: 600; min-height: 0; }
.field__error:empty { display: none; }
.slots__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.slots__empty { color: var(--muted); font-size: var(--s-s); grid-column: 1 / -1; }
.slot { position: relative; }
.slot input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.slot span {
  display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: var(--radius);
  background: var(--blanco); border: 2px solid #8FA3A2; font-weight: 600; font-variant-numeric: tabular-nums;
  transition: background-color .15s, transform .15s var(--ease);
}
.slot input:hover + span { border-color: var(--petroleo); }
.slot input:checked + span { background: var(--petroleo); color: var(--crema); border-color: var(--petroleo); transform: scale(1.04); }
.slot input:focus-visible + span { outline: 3px solid var(--coral); outline-offset: 2px; }
.slot input:disabled + span { background: var(--crema-2); border-color: var(--crema-2); color: #5E6B6C; text-decoration: line-through; cursor: not-allowed; }
.slot input:disabled { cursor: not-allowed; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* taste-skill-ignore: campo trampa oculto */
.form__note { font-size: var(--s-s); color: var(--muted); }
.done { display: grid; gap: 18px; }
.done h3 { font-size: var(--s-l); line-height: 1; }
.done h3:focus { outline: none; }
.done p { font-size: var(--s-m); line-height: 1.35; }
.done__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- contacto ---------- */
.visit { display: grid; gap: 28px; }
.visit__map { background: var(--crema-2); min-height: 320px; }
.visit__map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; }
.visit__card { background: var(--blanco); padding: clamp(22px, 3vw, 44px); display: grid; gap: 10px; align-content: start; }
.visit__card h3 { font-size: var(--s-m); margin-top: 14px; }
.visit__card h3:first-child { margin-top: 0; }
.hours { border-collapse: collapse; width: 100%; }
.hours th, .hours td { text-align: left; padding: 8px 0; vertical-align: top; }
.hours th { font-weight: 500; padding-right: 16px; }
.hours td { font-weight: 600; color: var(--petroleo); }
.hours tr + tr th, .hours tr + tr td { border-top: 1px solid #DDD5C8; }
.small { font-size: var(--s-s); color: var(--muted); }

/* ---------- pie ---------- */
.foot { overflow: hidden; background: var(--petroleo); color: var(--crema); padding: 56px 0 calc(96px + env(safe-area-inset-bottom)); }
.foot__name { font-family: var(--f-display); font-size: clamp(48px, 17.6vw, 300px); line-height: .9; letter-spacing: -0.05em; color: var(--crema); white-space: nowrap; }
.foot__row { margin-top: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; font-size: var(--s-s); }
.foot a { color: var(--crema); text-underline-offset: 4px; }

/* ---------- WhatsApp flotante y barra de pestañas móvil ---------- */
.wa-float {
  position: fixed; z-index: 40; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom));
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: #25D366; color: var(--tinta); transition: transform .2s var(--ease);
}
.wa-float:hover { transform: scale(1.08); }
.is-tab-reservar .wa-float { display: none; }
.wa-float svg { width: 30px; height: 30px; }

.tabbar {
  position: fixed; z-index: 45; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--crema-2); padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
}
.tabbar a { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; text-decoration: none; color: var(--muted); font-size: 13px; font-weight: 600; border-radius: 12px; min-height: 56px; align-content: center; }
.tabbar svg { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--petroleo); background: rgba(47,164,160,.16); }
.tabbar .tabbar__cta { background: var(--coral); color: var(--tinta); }
.tabbar .tabbar__cta[aria-current="page"] { background: var(--coral); color: var(--tinta); outline: 2px solid var(--tinta); outline-offset: -2px; }

/* ---------- tablet y compu ---------- */
@media (min-width: 720px) {
  .why { grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
  .voices { grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 40px; }
  .voices__title { grid-column: 1 / -1; }
  .voices__portrait { grid-column: 1 / 6; grid-row: 2 / 4; }
  .voices__portrait img { aspect-ratio: 3 / 4; }
  .voices__main { grid-column: 7 / 13; grid-row: 2; padding-top: clamp(24px, 6vw, 120px); }
  .voices__more { grid-column: 7 / 13; grid-row: 3; grid-template-columns: 1fr 1fr; align-self: end; }
  .team__rest li { grid-template-columns: 140px 1fr; }
  .team__rest img { width: 140px; height: 175px; }
  .visit { grid-template-columns: 1.4fr 1fr; }
  .visit__map, .visit__map iframe { min-height: 520px; }
}

@media (min-width: 1000px) {
  .bar__nav { display: flex; }
  .bar__cta { display: inline-flex; }
  .tabbar { display: none; }
  .wa-float { bottom: 24px; right: 24px; }
  .foot { padding-bottom: 56px; }

  .treat { grid-template-columns: minmax(240px, 3fr) 9fr; gap: clamp(32px, 4vw, 64px); align-items: start; }
  .treat__list { flex-direction: column; overflow: visible; margin: 0; padding: 0; gap: 6px; }
  .treat__list [role="tab"] { font-size: clamp(22px, 2vw, 28px); background: transparent; padding: 12px 20px; }
  .treat__list [role="tab"]:hover { background: var(--crema-2); }
  .treat__panel { grid-template-columns: 1.15fr 1fr; gap: 0; }
  .treat__panel img { height: 100%; aspect-ratio: auto; min-height: 460px; }
  .treat__body { padding: clamp(28px, 3vw, 48px); align-content: center; }

  .team { grid-template-columns: 5fr 7fr; gap: clamp(32px, 4vw, 72px); align-items: start; }
  .team__lead { grid-template-columns: 1fr; }
  .team__lead img { aspect-ratio: 1 / 1; }
  .team__rest { gap: 18px; }

  .book { grid-template-columns: 5fr 7fr; gap: clamp(40px, 5vw, 96px); align-items: start; }
  .book__pic { display: block; max-width: 420px; }
}

@media (max-width: 999px) {
  main { padding-bottom: 76px; }
  .foot { margin-bottom: 0; }
  .bar { height: 64px; }
  :root { --bar-h: 64px; }
}

/* ---------- movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .hero__video { transform: none; }
}
