/* =========================================================
Clínica Dental Nácar — demo
Paleta: azul petróleo suave (confianza y calma) sobre blanco
cálido, con un acento arena usado solo en detalles.
========================================================= */
:root {
--bg: #FAF8F4; /* blanco cálido (fondo) */
--soft: #F2EEE7; /* arena clara (secciones alternas) */
--surface: #FFFFFF;
--ink: #1E2B33; /* texto principal */
--ink-2: #4A5862; /* texto secundario */
--muted: #5E6B73;
--line: #E6E1D8;
--primary: #2C6577; /* azul petróleo */
--primary-700: #22505F;
--primary-50: #E7EFF1;
--accent: #C98B5A; /* arena/dorado: solo decorativo */

--radius: 20px;
--radius-sm: 12px;
--shadow: 0 1px 2px rgba(30, 43, 51, .04), 0 12px 32px -18px rgba(30, 43, 51, .18);
--font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
--header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.65; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
svg { display: block; width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.15; letter-spacing: -.02em; font-weight: 600; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 40%, transparent); outline-offset: 3px; border-radius: 8px; }

.container { width: min(1120px, 100% - 48px); margin-inline: auto; }
.container--narrow { width: min(760px, 100% - 48px); }

/* ---------- Botones y enlaces ---------- */
.btn {
display: inline-flex; align-items: center; justify-content: center; gap: .5em;
padding: .85em 1.5em; border: 0; border-radius: 999px; cursor: pointer;
font-weight: 600; font-size: 1rem; white-space: nowrap;
transition: background .2s ease, transform .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-700); }
.btn--sm { padding: .6em 1.15em; font-size: .92rem; }
.btn--lg { padding: 1em 1.8em; font-size: 1.02rem; }
.btn--block { width: 100%; }

.link { display: inline-flex; align-items: center; gap: .35em; color: var(--primary); font-weight: 600; font-size: .95rem; }
.link svg { transition: transform .2s; }
.link:hover svg { transform: translateX(3px); }

.stars { display: inline-flex; gap: 2px; color: var(--accent); font-size: 15px; }
.stars svg { fill: currentColor; stroke: none; }

/* ---------- Barra demo ---------- */
.demo-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: .3em 1em; padding: .5em 20px; background: var(--soft); color: var(--muted); font-size: .8rem; text-align: center; border-bottom: 1px solid var(--line); }
.demo-bar__cta { display: inline-flex; align-items: center; gap: .3em; color: var(--primary); font-weight: 600; }
.demo-bar__cta[hidden] { display: none; }

/* ---------- Encabezado ---------- */
.header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: box-shadow .2s; }
.header.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.header__inner { height: 100%; display: flex; align-items: center; gap: 32px; }

.brand { display: inline-flex; align-items: center; gap: .65em; }
.brand__mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--primary); color: #fff; font-size: 20px; }
.brand__mark svg { fill: #fff; stroke: none; }
.brand__name { font-weight: 700; font-size: 1.2rem; letter-spacing: -.02em; line-height: 1; }
.brand__name small { display: block; margin-top: 3px; font-size: .7rem; font-weight: 500; letter-spacing: .04em; color: var(--muted); }

.nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav a:not(.btn) { padding: .5em .9em; border-radius: 999px; font-size: .95rem; font-weight: 500; color: var(--ink-2); transition: color .2s; }
.nav a:not(.btn):hover, .nav a.is-active { color: var(--primary); }
.nav__cta { display: none; }
.header__actions { display: flex; align-items: center; gap: 12px; }
.burger { display: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; place-items: center; font-size: 24px; }
.burger__close { display: none; }

/* ---------- Inicio ---------- */
.hero { padding: 64px 0 112px; }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 72px; align-items: center; }

.status { display: inline-flex; align-items: center; gap: .55em; margin-bottom: 28px; font-size: .9rem; font-weight: 500; color: var(--muted); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status.is-open i { background: #2E9E6A; }
.status.is-closed i { background: var(--accent); }

.hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.6rem); font-weight: 600; letter-spacing: -.035em; max-width: 13em; margin-bottom: .5em; }
.hero__lead { font-size: 1.15rem; color: var(--ink-2); max-width: 32em; margin-bottom: 36px; }
.hero__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-bottom: 40px; }
.hero__call { display: inline-flex; align-items: center; gap: .5em; font-weight: 500; color: var(--ink-2); }
.hero__call svg { color: var(--primary); }
.hero__call:hover { color: var(--primary); }
.hero__trust { display: flex; flex-wrap: wrap; align-items: center; gap: .5em; margin: 0; font-size: .92rem; color: var(--muted); }
.hero__trust strong { color: var(--ink); }

.hero__art { position: relative; justify-self: center; width: 100%; max-width: 400px; }
.arch { aspect-ratio: 4 / 5; border-radius: 999px 999px var(--radius) var(--radius); background: linear-gradient(180deg, var(--primary-50), #F4F1EB); display: grid; place-items: center; color: var(--primary); }
.arch__tooth { width: 46%; height: auto; }
.hero__note { position: absolute; left: -28px; bottom: 36px; display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); }
.hero__note-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--primary-50); color: var(--primary); font-size: 19px; }
.hero__note strong { display: block; font-size: .95rem; font-weight: 600; }
.hero__note small { display: block; font-size: .8rem; color: var(--muted); }

/* ---------- Secciones ---------- */
.section { padding: 112px 0; }
.section--soft { background: var(--soft); }
.section__head { max-width: 560px; margin-bottom: 48px; }
.section__head h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.section__head p { color: var(--ink-2); margin: 0; }

/* Tratamientos */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.service { display: flex; flex-direction: column; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s, transform .2s; }
.service:hover { border-color: var(--primary); transform: translateY(-2px); }
.service h3 { font-size: 1.15rem; margin-bottom: .3em; }
.service p { color: var(--ink-2); font-size: .95rem; margin-bottom: 24px; }
.price { margin-top: auto; font-size: .9rem; color: var(--muted); }
.price strong { font-size: 1.25rem; font-weight: 600; color: var(--primary); }
.services__foot { margin: 28px 0 0; color: var(--ink-2); font-size: .95rem; }
.services__foot strong { color: var(--ink); font-weight: 600; }

/* Valores */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.value__icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 20px; border-radius: 14px; background: var(--surface); color: var(--primary); font-size: 22px; }
.value h3 { font-size: 1.15rem; margin-bottom: .35em; }
.value p { margin: 0; color: var(--ink-2); }

/* Equipo */
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.doctor { display: flex; align-items: center; gap: 18px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.doctor__avatar { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--primary-50); color: var(--primary); font-weight: 600; flex-shrink: 0; }
.doctor h3 { font-size: 1.02rem; margin-bottom: .1em; }
.doctor p { margin: 0; font-size: .92rem; color: var(--ink-2); }
.doctor small { font-size: .78rem; color: var(--muted); }

.quote { margin: 72px auto 0; max-width: 720px; text-align: center; }
.quote .stars { justify-content: center; margin-bottom: 18px; }
.quote blockquote { margin: 0 0 16px; font-size: clamp(1.25rem, 2.2vw, 1.55rem); line-height: 1.45; letter-spacing: -.01em; }
.quote figcaption { color: var(--muted); font-size: .95rem; }
.quote__note { font-size: .82rem; font-style: italic; }

/* Preguntas */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 4px; cursor: pointer; font-weight: 600; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { font-size: 20px; color: var(--primary); transition: transform .25s; }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 4px 24px; color: var(--ink-2); max-width: 62ch; }

/* Contacto */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.contact h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 32px; }
.info { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.info > li { display: flex; gap: 16px; }
.info > li > svg { font-size: 22px; color: var(--primary); margin-top: 3px; }
.info div { display: flex; flex-direction: column; gap: 4px; }
.info small { color: var(--muted); font-size: .85rem; }
.info__phone { font-size: 1.2rem; font-weight: 600; color: var(--ink); }
.hours { flex: 1; border-collapse: collapse; font-size: .95rem; }
.hours td { padding: 3px 0; color: var(--ink-2); }
.hours td:last-child { text-align: right; }
.hours tr.is-today td { color: var(--ink); font-weight: 600; }
.hours tr.is-today td:first-child::after { content: "· hoy"; margin-left: 6px; color: var(--primary); font-weight: 500; }

.booking { display: grid; gap: 18px; padding: 40px; background: var(--surface); border-radius: 24px; box-shadow: var(--shadow); scroll-margin-top: calc(var(--header-h) + 16px); }
.booking h2 { margin: 0; font-size: 1.6rem; }
.booking__sub { margin: -10px 0 6px; color: var(--muted); font-size: .95rem; }
.booking label { display: grid; gap: 7px; font-size: .92rem; font-weight: 500; }
.booking label small { color: var(--muted); font-weight: 400; }
.booking input, .booking select, .booking textarea {
width: 100%; padding: .85em 1em; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
font-size: 1rem; transition: border-color .2s, box-shadow .2s, background .2s;
}
.booking textarea { resize: vertical; min-height: 88px; }
.booking input:focus, .booking select:focus, .booking textarea:focus { outline: none; background: #fff; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-50); }
.booking .is-invalid { border-color: #C2453F !important; background: #FCF1F0 !important; }
.booking .btn { margin-top: 6px; }

/* Pie */
.footer { padding: 40px 0; border-top: 1px solid var(--line); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; color: var(--muted); }
.brand--small .brand__mark { width: 32px; height: 32px; font-size: 17px; border-radius: 10px; }
.brand--small .brand__name { font-size: 1.05rem; color: var(--ink); }

.mbar { display: none; }

/* Ventana demo */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(30, 43, 51, .45); backdrop-filter: blur(4px); animation: fade .2s; }
.modal__box { position: relative; width: min(420px, 100%); padding: 36px 28px 24px; background: var(--surface); border-radius: 24px; text-align: center; box-shadow: 0 30px 80px -24px rgba(0, 0, 0, .35); animation: pop .25s ease-out; }
.modal__close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--soft); cursor: pointer; display: grid; place-items: center; font-size: 18px; }
.modal__icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%; background: var(--primary-50); color: var(--primary); font-size: 26px; }
.modal__icon svg { stroke-width: 2.4; }
.modal h3 { font-size: 1.25rem; }
.modal p { color: var(--ink-2); font-size: .95rem; }
.modal__msg { text-align: left; white-space: pre-wrap; font-family: inherit; font-size: .9rem; margin: 0 0 20px; padding: 14px 16px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }

/* Aparición suave */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { animation: none !important; transition: none !important; }
html { scroll-behavior: auto; }
.reveal { opacity: 1; transform: none; }
}

/* =========================================================
Responsive
========================================================= */
@media (max-width: 960px) {
:root { --header-h: 64px; }
.burger { display: grid; }
.header__actions { margin-left: auto; }
.nav {
position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 2px;
padding: 12px 20px 24px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -24px rgba(30, 43, 51, .25);
opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all .2s ease;
}
.nav.is-open { opacity: 1; visibility: visible; transform: none; }
.nav a:not(.btn) { padding: .9em .4em; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
.nav__cta { display: inline-flex; margin-top: 16px; }
.header.menu-open .burger__open { display: none; }
.header.menu-open .burger__close { display: block; }

.hero { padding: 40px 0 80px; }
.hero__grid { grid-template-columns: 1fr; gap: 48px; }
.hero__art { max-width: 340px; }
.hero__note { left: -12px; }
.section { padding: 80px 0; }
.services, .team { grid-template-columns: repeat(2, 1fr); }
.values { grid-template-columns: 1fr; gap: 32px; }
.value { display: grid; grid-template-columns: auto 1fr; column-gap: 18px; }
.value__icon { grid-row: span 2; margin: 0; }
.contact { grid-template-columns: 1fr; gap: 56px; }
}

@media (max-width: 640px) {
body { font-size: 16px; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.container, .container--narrow { width: calc(100% - 40px); }
.header__cta { display: none; }
.hero { padding: 32px 0 72px; }
.hero h1 { font-size: 2.15rem; }
.hero__lead { font-size: 1.05rem; margin-bottom: 28px; }
.hero__ctas { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 28px; }
.hero__call { justify-content: center; }
.hero__trust { justify-content: center; text-align: center; }
.hero__art { max-width: 280px; }
.section { padding: 72px 0; }
.section__head { margin-bottom: 32px; }
.services, .team { grid-template-columns: 1fr; gap: 12px; }
.service { padding: 22px; }
.service p { margin-bottom: 14px; }
.quote { margin-top: 56px; }
.booking { padding: 28px 20px; }
.footer { padding-bottom: 32px; }
.footer__inner { flex-direction: column; text-align: center; }
.mbar {
position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: auto 1fr; gap: 10px;
padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 94%, transparent);
backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line);
}
.mbar__call { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--primary); font-size: 22px; }
.mbar__main { height: 52px; }
}

/* =========================================================
Fondo del inicio: dentista con niña, en transparencia
========================================================= */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero::before {
content: "";
position: absolute;
inset: 0;
z-index: -1;
background: url("https://images.pexels.com/photos/12917374/pexels-photo-12917374.jpeg?auto=compress&cs=tinysrgb&w=1920") left 25% / auto 125% no-repeat;
opacity: .2;
-webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%), linear-gradient(to right, #000 60%, transparent 85%);
-webkit-mask-composite: source-in;
mask-image: linear-gradient(to bottom, #000 55%, transparent 100%), linear-gradient(to right, #000 60%, transparent 85%);
mask-composite: intersect;
pointer-events: none;
}
@media (max-width: 860px) {
.hero::before {
background-size: cover;
background-position: 60% 20%;
opacity: .14;
-webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent 100%);
mask-image: linear-gradient(to bottom, #000 50%, transparent 100%);
}
}

/* =========================================================
Ajuste de orden y tipografía
========================================================= */
body { font-size: 18px; line-height: 1.6; }
.container { width: min(1200px, 100% - 48px); }
.container--narrow { width: min(860px, 100% - 48px); }

/* Menos aire entre bloques */
.hero { padding: 40px 0 72px; }
.hero__grid { gap: 48px; }
.section, .section--soft { padding: 72px 0; }
.section__head { margin-bottom: 32px; }
.section__head h2 { font-size: clamp(2rem, 3.4vw, 2.75rem); margin-bottom: .3em; }
.section .section__head p { font-size: 1.12rem; color: var(--ink-2); max-width: 46em; }

/* Inicio */
.hero h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
.hero__lead { font-size: 1.25rem; margin-bottom: 28px; }
.hero__ctas { margin-bottom: 28px; }
.hero__call { font-size: 1.1rem; }
.hero__trust { font-size: 1rem; }

/* Tratamientos */
.services { gap: 20px; }
.service { padding: 26px 28px; box-shadow: var(--shadow); }
.service h3 { font-size: 1.35rem; }
.service p { font-size: 1.05rem; margin-bottom: 16px; }
.price { font-size: 1rem; }
.services__foot { font-size: 1.05rem; margin-top: 24px; }

/* Ventajas: tarjetas agrupadas */
.values { gap: 20px; }
.value { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.value__icon { background: var(--primary-50); margin-bottom: 16px; }
.value h3 { font-size: 1.3rem; }
.value p { font-size: 1.05rem; }

/* Equipo y testimonio */
.team { gap: 20px; }
.doctor { padding: 24px; box-shadow: var(--shadow); background: var(--surface); }
.doctor h3 { font-size: 1.2rem; }
.doctor p { font-size: 1.02rem; }
.doctor small { font-size: .9rem; }
.quote { margin-top: 48px; }
.quote blockquote { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.quote figcaption { font-size: 1.02rem; }
.quote__note { font-size: .9rem; }

/* Preguntas */
.faq summary { font-size: 1.12rem; padding: 20px 4px; }
.faq details p { font-size: 1.05rem; }

/* Contacto y cita */
.contact { gap: 48px; }
.contact h2 { margin-bottom: 24px; }
.info { gap: 22px; }
.info small { font-size: .95rem; }
.info__phone { font-size: 1.35rem; }
.hours { font-size: 1.02rem; }
.booking__sub { font-size: 1.02rem; }
.booking label { font-size: 1rem; }
.booking input, .booking select, .booking textarea { font-size: 1rem; }

@media (max-width: 860px) {
body { font-size: 17px; }
.section, .section--soft { padding: 56px 0; }
.hero { padding: 24px 0 56px; }
}
@media (max-width: 640px) {
.hero h1 { font-size: 2.3rem; }
.hero__lead { font-size: 1.1rem; }
.service { padding: 22px; }
}
