/* Esmalte, clínica dental — demo DevEps (ver DISENO.md) */

:root {
  --esmalte: #F3F6F4;
  --blanco: #FFFFFF;
  --tinta: #10282B;
  --tinta-2: #4B6064;
  --menta: #CDEBDF;
  --menta-2: #E4F3ED;
  --hueco: #0E7C57;
  --linea: rgba(16, 40, 43, .13);
  --linea-2: rgba(16, 40, 43, .07);
  --wrap: 1200px;
  --font: 'Schibsted Grotesk', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--esmalte); color: var(--tinta); font: 400 1.0625rem/1.6 var(--font); }
h1, h2, h3, h4 { margin: 0; line-height: 1.08; letter-spacing: -.015em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5.6vw, 4.5rem); font-weight: 700; letter-spacing: -.03em; line-height: 1; }
h2 { font-size: clamp(1.875rem, 3.4vw, 2.75rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2.5px solid var(--hueco); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.lead { font-size: clamp(1.0625rem, 1.5vw, 1.25rem); color: var(--tinta-2); max-width: 52ch; }
.muted { color: var(--tinta-2); }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--tinta); color: #fff; border-radius: 8px; }
.skip:focus { top: 12px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 12px; border: 1.5px solid transparent;
  background: transparent; font-weight: 600; text-decoration: none; cursor: pointer;
  transition-property: transform, background-color, border-color, color; transition-duration: 150ms; transition-timing-function: ease-out;
}
.btn:active { transform: scale(.97); }
.btn-ink { background: var(--tinta); color: #fff; }
.btn-ink:hover { background: #1C3F44; }
.btn-hueco { background: var(--hueco); color: #fff; }
.btn-hueco:hover { background: #0B6848; }
.btn-line { border-color: var(--linea); }
.btn-line:hover { border-color: var(--tinta); }
.btn-sm { min-height: 42px; padding: 0 16px; font-size: .9375rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

/* Cinta y cabecera */
.ribbon { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 14px; padding: 8px 20px; background: var(--tinta); color: #fff; font-size: .875rem; }
.ribbon a { font-weight: 600; text-underline-offset: 3px; }
.header {
  position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--esmalte) 90%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--linea);
}
.header .wrap { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.25rem; text-decoration: none; letter-spacing: -.02em; }
.brand svg { width: 26px; height: 26px; }
.nav { display: flex; gap: 24px; margin-left: 12px; }
.nav a { text-decoration: none; color: var(--tinta-2); font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--tinta); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; text-decoration-color: var(--hueco); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.phone { font-weight: 600; text-decoration: none; }
.menu-btn { display: none; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--linea); background: var(--blanco); cursor: pointer; }

/* Secciones */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section + .section { padding-top: 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: end; margin-bottom: 40px; }
.page-head { padding: clamp(56px, 8vw, 96px) 0 clamp(40px, 6vw, 64px); }
.page-head .lead { margin-top: 18px; }

/* ── Portada: agenda ── */
.hero { padding: clamp(36px, 6vw, 72px) 0 clamp(64px, 9vw, 112px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); grid-template-areas: 'text agenda' 'proof agenda'; grid-template-rows: auto 1fr; column-gap: clamp(32px, 5vw, 72px); align-items: start; }
.hero-text { grid-area: text; }
.hero .agenda { grid-area: agenda; }
.hero .proof { grid-area: proof; }
.hero h1 { max-width: 19ch; }
.hero h1 .when { color: var(--hueco); }
.hero .lead { margin-top: 22px; }
.proof { display: grid; gap: 10px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--linea); }
.proof li { display: flex; gap: 10px; align-items: baseline; }
.proof li::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--hueco); translate: 0 -2px; }

.agenda { background: var(--blanco); border: 1px solid var(--linea); border-radius: 20px; padding: clamp(18px, 2.4vw, 28px); }
.agenda h2 { font-size: 1.375rem; }
.agenda fieldset { border: 0; margin: 0; padding: 0; }
.agenda legend { font-weight: 600; font-size: .9375rem; margin-bottom: 10px; padding: 0; }
.agenda-step + .agenda-step { margin-top: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; flex-direction: column; min-height: 44px; justify-content: center;
  padding: 7px 14px; border-radius: 10px; border: 1.5px solid var(--linea); font-weight: 500;
  transition-property: border-color, background-color; transition-duration: 150ms;
}
.chip small { font-weight: 400; font-size: .8125rem; color: var(--tinta-2); }
.chip:hover span { border-color: var(--tinta-2); }
.chip input:checked + span { background: var(--menta-2); border-color: var(--hueco); }
.chip input:focus-visible + span { outline: 2.5px solid var(--hueco); outline-offset: 2px; }

.days { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.day {
  display: grid; justify-items: center; gap: 2px; min-height: 64px; padding: 8px 4px;
  border-radius: 12px; border: 1.5px solid var(--linea); background: none; cursor: pointer;
  transition-property: border-color, background-color; transition-duration: 150ms;
}
.day b { font-size: 1.25rem; line-height: 1.1; }
.day span { font-size: .8125rem; color: var(--tinta-2); }
.day small { font-size: .75rem; color: var(--hueco); font-weight: 600; }
.day[aria-pressed="true"] { border-color: var(--tinta); background: var(--tinta); color: #fff; }
.day[aria-pressed="true"] span, .day[aria-pressed="true"] small { color: rgba(255,255,255,.8); }
.day:disabled { opacity: .4; cursor: default; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; min-height: 96px; align-content: start; }
.slot {
  min-height: 44px; border-radius: 10px; border: 1.5px solid var(--linea); background: none; cursor: pointer;
  font-weight: 600; font-size: 1rem;
  transition-property: border-color, background-color, color; transition-duration: 150ms;
}
.slot:hover { border-color: var(--hueco); }
.slot[aria-pressed="true"] { background: var(--hueco); border-color: var(--hueco); color: #fff; }
.slots-empty { grid-column: 1 / -1; color: var(--tinta-2); font-size: .9375rem; padding: 10px 0; }
.agenda-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--linea-2); }
.summary { font-size: .9375rem; color: var(--tinta-2); min-height: 1.6em; }
.summary b { color: var(--tinta); }

/* Diálogo de reserva */
dialog { width: min(100% - 32px, 440px); border: 0; border-radius: 20px; padding: 28px; color: var(--tinta); background: var(--blanco); }
dialog::backdrop { background: rgba(16, 40, 43, .45); }
dialog h2 { font-size: 1.5rem; }
dialog .summary { margin: 8px 0 18px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: .9375rem; }
.field input, .field select, .field textarea {
  min-height: 48px; padding: 10px 14px; border-radius: 10px; border: 1.5px solid var(--linea); background: var(--blanco);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--hueco); box-shadow: 0 0 0 3px rgba(14, 124, 87, .18); }
.field .error { color: #B4372B; font-size: .875rem; min-height: 1.2em; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }
.done-msg { display: grid; gap: 10px; }
.done-msg svg { width: 44px; height: 44px; color: var(--hueco); }

/* Tratamientos en filas */
.index { border-top: 2px solid var(--tinta); }
.index li { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) 110px 130px; gap: 24px; align-items: baseline; padding: 20px 0; border-bottom: 1px solid var(--linea); }
.index h3 { font-size: 1.25rem; }
.index .what { color: var(--tinta-2); }

.index .from { text-align: right; font-weight: 600; }
.index .from small { display: block; font-weight: 400; font-size: .8125rem; color: var(--tinta-2); }
.index-more { margin-top: 24px; }

/* Primera visita: pasos reales */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; counter-reset: paso; border-top: 1px solid var(--linea); }
.steps li { padding: 28px 28px 0 0; counter-increment: paso; }
.steps li + li { padding-left: 28px; border-left: 1px solid var(--linea); }
.steps li::before { content: counter(paso); display: block; font-size: 3rem; font-weight: 700; color: var(--hueco); line-height: 1; margin-bottom: 14px; }
.steps p { color: var(--tinta-2); margin-top: 8px; }

/* La clínica */
.clinic { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: clamp(28px, 4vw, 56px); align-items: end; }
.clinic figure { margin: 0; }
.clinic img { border-radius: 20px; aspect-ratio: 16 / 10; object-fit: cover; width: 100%; outline: 1px solid rgba(0,0,0,.08); outline-offset: -1px; }
.facts { display: grid; gap: 18px; }
.facts div { padding-bottom: 18px; border-bottom: 1px solid var(--linea); }
.facts dt { font-weight: 700; }
.facts dd { color: var(--tinta-2); }

/* Financiación */
.finance { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; background: var(--menta-2); border-radius: 24px; padding: clamp(24px, 4vw, 56px); }
.finance .lead { margin-top: 14px; }
.calc { background: var(--blanco); border-radius: 18px; padding: 24px; border: 1px solid var(--linea-2); }
.calc label { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 8px; }

.calc input[type="range"] { width: 100%; accent-color: var(--hueco); min-height: 32px; }
.calc .row + .row { margin-top: 18px; }
.calc-result { display: flex; align-items: baseline; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--linea-2); }
.calc-result strong { font-size: 2.5rem; font-weight: 700; line-height: 1; }
.calc-note { font-size: .8125rem; color: var(--tinta-2); margin-top: 10px; }

/* Preguntas */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--linea); }
.faq summary { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 20px 0; font-weight: 600; font-size: 1.125rem; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; flex: none; width: 12px; height: 12px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: 45deg; translate: 0 -3px; transition: rotate 200ms ease-out; }
.faq details[open] summary::after { rotate: 225deg; translate: 0 3px; }
.faq details p { padding: 0 0 22px; color: var(--tinta-2); max-width: 64ch; }

/* Equipo */
.team { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.person { display: grid; gap: 14px; align-content: start; }
.avatar { width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; font-size: 1.75rem; font-weight: 700; background: var(--menta); color: var(--tinta); }
.person .role { color: var(--hueco); font-weight: 600; font-size: .9375rem; }
.person .col { font-size: .875rem; color: var(--tinta-2); }
.person p { color: var(--tinta-2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: .8125rem; padding: 4px 10px; border-radius: 999px; background: var(--blanco); border: 1px solid var(--linea-2); }

/* Blog */
.posts li { display: grid; grid-template-columns: 160px minmax(0, 1fr) 200px; gap: 28px; padding: 28px 0; border-bottom: 1px solid var(--linea); align-items: start; }
.posts li:first-child { border-top: 2px solid var(--tinta); }
.posts time { color: var(--tinta-2); font-size: .9375rem; }
.posts h2 { font-size: clamp(1.375rem, 2.2vw, 1.75rem); }
.posts p { color: var(--tinta-2); margin-top: 10px; max-width: 62ch; }
.posts .by { font-size: .9375rem; }
.posts .by span { display: block; color: var(--tinta-2); font-size: .875rem; }
.note { margin-top: 32px; font-size: .9375rem; color: var(--tinta-2); max-width: 70ch; }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); }
.contact-card { background: var(--blanco); border: 1px solid var(--linea); border-radius: 20px; padding: clamp(20px, 3vw, 32px); }
.info dl { display: grid; gap: 18px; }
.info dt { font-weight: 700; }
.info dd { color: var(--tinta-2); }
.info a { font-weight: 600; color: var(--tinta); }
.hours li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--linea-2); }
.hours li[aria-current="date"] { font-weight: 700; color: var(--hueco); }
.open-now { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; margin-top: 10px; }
.open-now::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--tinta-2); }
.open-now[data-open="true"]::before { background: var(--hueco); box-shadow: 0 0 0 4px rgba(14, 124, 87, .18); }
.form-ok { padding: 16px; border-radius: 12px; background: var(--menta-2); color: var(--tinta); font-weight: 600; }

/* Llamada final y pie */
.cta-band { background: var(--tinta); color: #fff; border-radius: 24px; padding: clamp(28px, 5vw, 64px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-band p { color: rgba(255,255,255,.75); margin-top: 10px; }
.cta-band .btn-line { border-color: rgba(255,255,255,.35); color: #fff; }
.cta-band .btn-line:hover { border-color: #fff; }
.cta-band .btn-hueco { background: #fff; color: var(--tinta); }
.cta-band .btn-hueco:hover { background: var(--menta); }
.footer { padding: 56px 0 40px; margin-top: 0; border-top: 1px solid var(--linea); font-size: .9375rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.footer h3 { font-size: 1rem; margin-bottom: 10px; }
.footer li + li { margin-top: 6px; }
.footer a { color: var(--tinta-2); text-decoration: none; }
.footer a:hover { color: var(--tinta); text-decoration: underline; }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--linea-2); color: var(--tinta-2); font-size: .875rem; }

/* Móvil */
@media (max-width: 960px) {
  .nav, .phone { display: none; }
  .menu-btn { display: grid; place-items: center; }
  .header .btn-sm { padding: 0 14px; }
  .nav.open { display: grid; position: absolute; left: 0; right: 0; top: 100%; gap: 0; margin: 0; padding: 8px 20px 16px; background: var(--esmalte); border-bottom: 1px solid var(--linea); }
  .nav.open a { padding: 12px 0; border-bottom: 1px solid var(--linea-2); }
  .hero-grid, .section-head, .clinic, .finance, .contact-grid { grid-template-columns: 1fr; }
  .hero-grid { grid-template-areas: 'text' 'agenda' 'proof'; grid-template-rows: auto; row-gap: 28px; }
  .hero .proof { margin-top: 0; }
  .team { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--linea); }
  .index li { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; }
  .index .what { grid-column: 1 / -1; grid-row: 2; }
  .index .dur { grid-column: 1; grid-row: 3; font-size: .9375rem; color: var(--tinta-2); }
  .index .from { grid-column: 2; grid-row: 1; }
  .posts li { grid-template-columns: 1fr; gap: 8px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .days { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 420px) { .header .btn-sm { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 1ms !important; } }

/* ── Más color (oct. 2026): portada en verde mar, bandas de color y comparador de blanqueamiento ── */
:root { --mar: #0E4744; --mar-2: #13605B; --menta-viva: #8FE3C2; --sol: #FFC857; --cielo: #E3F1FA; --coral: #FF8F7A; }
.hero { background: var(--mar); color: #fff; }
.hero h1 { color: #fff; }
.hero .lead { color: rgba(255, 255, 255, .78); }
.hero .proof { border-top-color: rgba(255, 255, 255, .18); color: rgba(255, 255, 255, .9); }
.hero .proof li::before { background: var(--menta-viva); }
.hero .proof .star { color: var(--sol); margin-right: 2px; }
.hero .agenda { border: 0; box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .55); color: var(--tinta); }
.section.tinted { background: var(--cielo); padding: clamp(64px, 9vw, 112px) 0; }
.section.tinted + .section { padding-top: clamp(64px, 9vw, 112px); }
.section.minty { background: var(--menta-2); padding: clamp(64px, 9vw, 112px) 0; }
.section.minty + .section { padding-top: clamp(72px, 10vw, 128px); }
.steps li::before { color: var(--mar-2); }
.finance { background: var(--mar); color: #fff; }
.finance .lead { color: rgba(255, 255, 255, .78); }
.finance .calc { color: var(--tinta); }
.index h3::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 10px; translate: 0 -2px; background: var(--hueco); }
.index li:nth-child(6n+2) h3::before { background: var(--coral); }
.index li:nth-child(6n+3) h3::before { background: var(--sol); }
.index li:nth-child(6n+4) h3::before { background: #6FA8DC; }
.index li:nth-child(6n+5) h3::before { background: var(--menta-viva); }
.index li:nth-child(6n) h3::before { background: #B79CED; }
.avatar { background: var(--menta-viva); }
.team .person:nth-child(2) .avatar { background: var(--sol); }
.team .person:nth-child(3) .avatar { background: #BFD9F2; }
.page-head { background: var(--mar); color: #fff; margin-bottom: clamp(40px, 6vw, 64px); }
.page-head .lead { color: rgba(255, 255, 255, .78); }
.page-head .lead a { color: #fff; }
.cta-band { background: var(--mar-2); }

/* Comparador antes y después del blanqueamiento */
.whiten { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.ba { position: relative; aspect-ratio: 5 / 4; border-radius: 22px; overflow: hidden; user-select: none; touch-action: pan-y; cursor: ew-resize; --pos: 50%; --t: 4; box-shadow: 0 30px 60px -30px rgba(16, 40, 43, .45); }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba .before { filter: sepia(.42) saturate(1.06) brightness(.94) contrast(.98); }
.ba .after { clip-path: inset(0 0 0 var(--pos)); filter: brightness(calc(1 + var(--t) * .016)) saturate(calc(1.02 - var(--t) * .02)) contrast(1.03); }
.ba .tag { position: absolute; top: 14px; padding: 5px 12px; border-radius: 99px; font-size: .8125rem; font-weight: 600; color: #fff; background: rgba(16, 40, 43, .72); }
.ba .tag.l { left: 14px; }
.ba .tag.r { right: 14px; background: var(--hueco); }
.ba .handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; background: #fff; translate: -50% 0; box-shadow: 0 0 14px rgba(0, 0, 0, .35); }
.ba .knob { position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; margin: -23px; border-radius: 50%; background: #fff; color: var(--mar); display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
.ba:focus-visible { outline: 3px solid var(--hueco); outline-offset: 4px; }
.ba-note { font-size: .875rem; color: var(--tinta-2); margin-top: 12px; }
.tone-readout { display: flex; align-items: baseline; gap: 12px; margin: 20px 0 8px; }
.tone-readout strong { font-size: 4rem; font-weight: 700; line-height: 1; color: var(--mar-2); }
.tone-range { width: 100%; accent-color: var(--hueco); min-height: 36px; cursor: pointer; }
.tone-scale { display: flex; justify-content: space-between; font-size: .8125rem; color: var(--tinta-2); }
.tone-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0 24px; }
.tone-facts div { background: var(--blanco); border-radius: 14px; padding: 12px; text-align: center; font-size: .875rem; color: var(--tinta-2); }
.tone-facts b { display: block; color: var(--tinta); font-size: 1.0625rem; }
@media (max-width: 960px) { .whiten { grid-template-columns: 1fr; } }
