/* ===== Dr. Terán · Consultorio Dental ===== */
:root {
  --brand: #895129;       /* marrón de la identidad */
  --brand-deep: #683b20;
  --accent: #e5bf98;
  --brand-soft: #f4e9dd;
  --ink: #392317;
  --ink-2: #5b3623;
  --cream: #faf6f0;
  --text: #49382d;
  --muted: #756252;
  --brand-gradient: linear-gradient(125deg, #9f653a 0%, #895129 48%, #683b20 100%);
  --surface-gradient: linear-gradient(125deg, #392317 0%, #643c25 60%, #895129 100%);
  --white: #fff;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --header-h: 96px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: var(--sans); color: var(--text); background: var(--white); font-weight: 300; line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
strong { font-weight: 500; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.2; }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }

.container { width: min(1200px, 100% - 64px); margin-inline: auto; }

/* ---------- Botones ---------- */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; padding: 16px 34px; font-family: var(--sans); font-size: .78rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; border: 1px solid transparent; border-radius: 3px; transition: all .3s ease; cursor: pointer; }
.btn--dark { background: var(--brand-gradient); color: var(--white); min-width: 260px; padding-block: 20px; }
.btn--dark:hover { background: var(--brand); }
.btn--light { background: var(--white); color: var(--ink); }
.btn--light:hover { background: var(--brand-deep); color: var(--white); }
.btn--outline { border-color: rgba(255,255,255,.8); color: var(--white); padding: 11px 24px; font-size: .68rem; }
.btn--outline:hover { background: var(--white); color: var(--ink); }
.btn--brand { background: var(--brand-gradient); color: var(--white); }
.btn--brand:hover { background: var(--brand-deep); }

.eyebrow { display: block; position: relative; padding: 22px 0 0 0; margin-bottom: 26px; font-family: var(--serif); font-size: .72rem; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: ""; position: absolute; top: 0; left: 0; width: 34px; height: 1px; background: var(--accent); }

.rule { display: block; width: 52px; height: 1px; background: currentColor; opacity: .5; margin: 26px auto 0; }
.rule--left { margin: 14px 0 18px; width: 36px; }
.hl { background: var(--brand-soft); color: var(--brand); padding: 0 3px; }

/* ---------- Header ---------- */
.header { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .35s, box-shadow .35s, height .35s; }
.nav { height: var(--header-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding: 0 48px; transition: height .35s; }
.nav__links { display: flex; gap: 30px; }
.nav__links a { color: rgba(255,255,255,.9); font-size: .95rem; transition: color .25s; }
.nav__links a:hover { color: var(--accent); }
.nav__logo { position: relative; height: 70px; display: block; transition: height .35s; }
.nav__logo img { height: 100%; width: auto; transition: opacity .35s; }
.nav__logo .logo-color { position: absolute; inset: 0; opacity: 0; }
.nav__right { display: flex; align-items: center; justify-content: flex-end; gap: 22px; }
.nav__phone { display: flex; align-items: center; gap: 12px; color: var(--white); font-size: 1.15rem; letter-spacing: .04em; transition: color .3s; }
.nav__phone svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.2; }
.nav__phone small { display: block; font-size: .7rem; opacity: .8; letter-spacing: 0; line-height: 1.2; }
.nav__cta { padding: 12px 18px; font-size: .72rem; }
.nav__burger { display: none; background: none; border: 0; width: 34px; height: 24px; position: relative; cursor: pointer; }
.nav__burger span { position: absolute; left: 0; right: 0; height: 1.5px; background: var(--white); transition: transform .3s, top .3s, background .3s; }
.nav__burger span:first-child { top: 7px; }
.nav__burger span:last-child { top: 16px; }

.header.is-scrolled { background: rgba(255,255,255,.97); box-shadow: 0 2px 20px rgba(57,35,23,.08); }
.header.is-scrolled .nav { height: 76px; }
.header.is-scrolled .nav__logo { height: 54px; }
.header.is-scrolled .logo-white { opacity: 0; }
.header.is-scrolled .logo-color { opacity: 1; }
.header.is-scrolled .nav__links a, .header.is-scrolled .nav__phone { color: var(--ink); }
.header.is-scrolled .nav__phone svg { stroke: var(--brand); }
.header.is-scrolled .nav__cta { background: var(--brand); color: var(--white); }
.header.is-scrolled .nav__burger span { background: var(--ink); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; overflow: hidden; color: var(--white); }
.hero__bg { position: absolute; inset: 0; background: var(--ink) url("assets/img/hero-poster.jpg") center/cover no-repeat; transform: scale(1.06); animation: heroZoom 14s ease-out forwards; will-change: transform; }
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s ease; }
.hero__video.is-active { opacity: 1; z-index: 1; }
.hero__bg::after { z-index: 2; content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(38,22,13,.88) 0%, rgba(105,58,30,.70) 55%, rgba(137,81,41,.48) 100%); }
@keyframes heroZoom { to { transform: scale(1); } }
.hero__content { position: relative; z-index: 3; width: min(1000px, 100% - 64px); margin-left: 11%; padding-top: var(--header-h); }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 14px; margin-bottom: 28px; font-size: .74rem; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: rgba(255,255,255,.9); }
.hero__eyebrow::before { content: ""; width: 44px; height: 1px; background: var(--accent); }
.hero h1 { font-size: clamp(2.6rem, 6.2vw, 5.4rem); letter-spacing: .01em; line-height: 1.08; margin-bottom: 32px; max-width: 900px; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero p { max-width: 620px; font-size: clamp(1rem, 1.35vw, 1.18rem); font-weight: 400; margin-bottom: 48px; opacity: .92; }
.hero__actions { display: flex; align-items: center; gap: 36px; flex-wrap: wrap; }
.hero__link { font-size: .8rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid rgba(255,255,255,.5); padding-bottom: 6px; transition: color .3s, border-color .3s; }
.hero__link span { display: inline-block; transition: transform .3s; }
.hero__link:hover { color: var(--accent); border-color: var(--accent); }
.hero__link:hover span { transform: translateX(5px); }
.hero__progress { position: absolute; right: 120px; bottom: 7%; z-index: 3; display: flex; gap: 8px; }
.hero__progress button { position: relative; width: 44px; height: 3px; padding: 0; border: 0; background: rgba(255,255,255,.3); cursor: pointer; overflow: hidden; }
.hero__progress button::before { content: ""; position: absolute; inset: -10px 0; }
.hero__progress i { position: absolute; inset: 0; background: var(--white); transform: scaleX(0); transform-origin: left; }
.hero__mouse { z-index: 3; position: absolute; left: 50%; bottom: 7%; width: 28px; height: 46px; border: 2px solid rgba(255,255,255,.85); border-radius: 16px; transform: translateX(-50%); }
.hero__mouse span { position: absolute; top: 9px; left: 50%; width: 3px; height: 8px; margin-left: -1.5px; background: var(--white); border-radius: 2px; animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(14px); } }
.hero__more { z-index: 3; position: absolute; left: 34px; bottom: 0; writing-mode: vertical-rl; transform: rotate(180deg); font-size: .66rem; letter-spacing: .4em; text-transform: uppercase; padding-top: 90px; opacity: .85; }
.hero__more::before { content: ""; position: absolute; top: 0; left: 50%; width: 1px; height: 70px; background: var(--accent); }

/* ---------- Intro ---------- */
.intro { background: var(--cream); padding: 120px 0; }
.intro__grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.intro__lead { font-size: 1.15rem; color: var(--muted); padding: 0 48px; text-align: center; }
.intro__lead strong { color: var(--ink); }
.intro__text { border-left: 2px solid #dbcbbb; padding: 10px 0 10px 32px; font-size: .9rem; color: var(--muted); }
.intro__text p + p { margin-top: 8px; }
.intro__text strong { color: var(--ink); }

/* ---------- Offset (imagen sobre bloque oscuro) ---------- */
.offset, .why { position: relative; padding: 140px 0; background: var(--white); }
.offset__block, .why__block { position: absolute; left: 0; top: 70px; bottom: 70px; width: 25%; background: var(--surface-gradient); }
.offset__grid { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 90px; align-items: center; }
.offset__img img { width: 100%; aspect-ratio: 4/3.6; object-fit: cover; }
.offset__text h2 { color: var(--ink); margin-bottom: 30px; }
.offset__text p { margin-bottom: 18px; font-size: .95rem; }
.offset__cop { color: var(--brand); font-size: .85rem !important; letter-spacing: .05em; }

/* ---------- Secciones oscuras ---------- */
.dark { background: var(--surface-gradient); color: rgba(255,255,255,.88); padding: 110px 0; }
.dark h2, .dark h3 { color: var(--white); }
.section-head { text-align: center; max-width: 780px; margin: 0 auto 70px; }
.section-head h2 { margin-bottom: 26px; }
.section-head p { font-size: .95rem; }
.faq .section-head, .faq h2 { color: var(--ink); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.card__img { overflow: hidden; margin-bottom: 26px; }
.card__img img { width: 100%; aspect-ratio: 16/10; object-fit: cover; transition: transform .6s ease; }
.card:hover .card__img img { transform: scale(1.05); }
.card h3 { font-family: var(--sans); font-size: 1.05rem; font-weight: 400; }
.card p { font-size: .9rem; margin-bottom: 24px; }

.all-treatments { margin-top: 90px; padding-top: 60px; border-top: 1px solid rgba(255,255,255,.12); text-align: center; }
.all-treatments h3 { font-size: 1.6rem; margin-bottom: 36px; }
.all-treatments ul { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 40px; text-align: left; max-width: 920px; margin: 0 auto 50px; }
.all-treatments li { position: relative; padding-left: 30px; font-size: .95rem; }
.all-treatments li::before { content: "+"; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--brand); color: var(--white); font-size: .8rem; font-weight: 600; line-height: 18px; text-align: center; }

/* ---------- Proceso: tarjetas apiladas (sticky stack) ---------- */
.process { padding: 120px 0 140px; background: var(--white); }
.process__head { max-width: 640px; margin-bottom: 60px; }
.process__head h2 { color: var(--ink); font-family: var(--sans); font-weight: 600; letter-spacing: -.02em; margin: 18px 0 14px; }
.process__head p { color: var(--muted); }
.tag { display: inline-block; padding: 4px 12px; border: 1px solid #e2c9b2; background: var(--brand-soft); color: var(--brand); border-radius: 99px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .74rem; }

.stack { display: flex; flex-direction: column; gap: 40px; }
.stack__card {
  --i: 0;
  position: sticky;
  top: calc(100px + var(--i) * 26px);
  display: grid; grid-template-columns: 1fr 1fr;
  min-height: 460px;
  background: var(--surface-gradient);
  border: 1px solid rgba(229,191,152,.25);
  border-radius: 14px;
  overflow: hidden;
  transform-origin: center top;
  box-shadow: 0 -10px 40px rgba(57,35,23,.18);
  will-change: transform;
}
.stack__card:nth-child(1) { --i: 0; }
.stack__card:nth-child(2) { --i: 1; }
.stack__card:nth-child(3) { --i: 2; }
.stack__card:nth-child(4) { --i: 3; }
.stack__text { padding: 64px; color: rgba(255,255,255,.75); display: flex; flex-direction: column; justify-content: center; }
.stack__num { display: inline-flex; align-self: flex-start; padding: 8px 14px; border-radius: 99px; background: rgba(229,191,152,.14); color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; margin-bottom: 22px; }
.stack__text h3 { font-family: var(--sans); font-weight: 600; font-size: clamp(1.5rem, 2.4vw, 2.2rem); letter-spacing: -.02em; color: var(--white); margin-bottom: 22px; }
.stack__text p { font-size: 1.05rem; line-height: 1.75; max-width: 460px; }
.stack__img img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Por qué elegirnos ---------- */
.why { background: var(--cream); }
.why__grid { position: relative; display: grid; grid-template-columns: 1fr 1.2fr; gap: 90px; align-items: center; }
.why__stats { display: grid; gap: 22px; padding-left: 8%; }
.stat { background: var(--white); padding: 34px 36px; box-shadow: 0 20px 50px rgba(57,35,23,.1); border-top: 3px solid var(--accent); }
.stat__num, .stat__plus { font-family: var(--serif); font-size: 3.4rem; color: var(--brand); line-height: 1; }
.stat p { margin-top: 8px; color: var(--muted); font-size: .9rem; text-transform: uppercase; letter-spacing: .12em; }
.why__text h2 { color: var(--ink); margin-bottom: 30px; }
.list { margin-bottom: 36px; }
.list li { position: relative; padding-left: 22px; margin-bottom: 12px; font-size: .92rem; }
.list li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; border: 1px solid var(--brand); border-radius: 50%; }
.list strong { color: var(--ink); }
.list--light li::before { border-color: var(--accent); }

/* ---------- Doctor ---------- */
.doctor__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.doctor h2 { margin-bottom: 40px; }
.doctor__card { display: flex; align-items: center; gap: 26px; }
.doctor__photo { width: 170px; aspect-ratio: 1; background: var(--brand-gradient); display: grid; place-items: center; padding: 20px; flex-shrink: 0; overflow: hidden; }
.doctor__photo img { width: 100%; height: 100%; object-fit: contain; }
.doctor__name { color: var(--white); font-size: 1.15rem; font-weight: 400; }
.doctor__cop { font-size: .8rem; opacity: .7; }
.doctor__text { font-size: .92rem; }
.doctor__text > p { margin-bottom: 16px; }
.dropcap::first-letter { float: left; font-family: var(--serif); font-size: 3.6rem; line-height: .9; color: var(--accent); margin: 4px 10px 0 0; }
.doctor__addr { margin-top: 10px; }

/* ---------- FAQ ---------- */
.faq { padding: 110px 0; }
.faq__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 60px; align-items: start; }
.faq__item { border-top: 1px solid #e9ded2; }
.faq__item summary { list-style: none; position: relative; padding: 20px 40px 20px 0; font-size: .92rem; font-weight: 400; color: var(--ink); cursor: pointer; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; font-weight: 300; color: var(--brand); }
.faq__item[open] summary::after { content: "−"; }
.faq__item p { padding: 0 0 24px; font-size: .9rem; color: var(--muted); }
.faq__item p strong { color: var(--ink); }

.payments { margin-top: 90px; display: grid; grid-template-columns: 1fr 1.6fr; gap: 50px; align-items: center; padding: 50px 56px; background: var(--cream); border-radius: 18px; border: 1px solid #e9ded2; }
.payments__text h3 { font-size: 1.7rem; color: var(--ink); margin-bottom: 10px; }
.payments__text p { color: var(--muted); font-size: .92rem; }
.payments__text .eyebrow { margin-bottom: 18px; }
.payments__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pay { color: var(--brand); min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 22px 10px 16px; background: var(--white); border-radius: 14px; box-shadow: 0 6px 20px rgba(57,35,23,.07); transition: transform .3s, box-shadow .3s; }
.pay:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(57,35,23,.12); }
.pay svg { height: 34px; width: auto; max-width: 100%; }
.pay .pay__visa { height: 44px; margin: -5px 0; }
.pay span { max-width: 100%; font-size: .72rem; color: var(--muted); letter-spacing: .06em; text-align: center; overflow-wrap: anywhere; }

/* ---------- Ubicación ---------- */
.location__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 60px; align-items: center; }
.location__map iframe { width: 100%; height: 400px; border: 0; filter: grayscale(.3) contrast(1.05); border-radius: 4px; }
.location__info h3 { font-family: var(--sans); text-transform: uppercase; letter-spacing: .06em; font-size: 1rem; font-weight: 400; }
.location__info p { margin-bottom: 14px; font-size: .95rem; }
.location__info a:not(.btn) { color: var(--accent); }
.location__info .btn { margin-top: 14px; }

/* ---------- CTA ---------- */
.cta { background: var(--surface-gradient); color: var(--white); padding: 60px 0; border-top: 1px solid rgba(255,255,255,.08); }
.cta__inner { display: flex; justify-content: space-between; align-items: center; gap: 30px; padding-left: 35%; }
.cta h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: .03em; }
.cta__sub { font-family: var(--serif); font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; opacity: .75; }

/* ---------- Footer ---------- */
.footer { padding: 70px 0 30px; background: var(--white); }
.footer__grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 40px; }
.footer__logo { width: 190px; }
.footer h4 { position: relative; font-size: .8rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); padding-bottom: 12px; margin-bottom: 18px; }
.footer h4::after { content: ""; position: absolute; left: 0; bottom: 0; width: 28px; height: 1px; background: var(--accent); }
.footer li { font-size: .85rem; color: var(--muted); margin-bottom: 8px; }
.footer li strong { color: var(--ink); }
.footer a:hover { color: var(--brand); }
.footer__copy { text-align: center; font-size: .78rem; color: var(--muted); margin-top: 50px; padding-top: 24px; border-top: 1px solid #eee3d9; }

/* ---------- WhatsApp flotante ---------- */
.wa-float { position: fixed; right: 24px; bottom: 24px; z-index: 60; width: 60px; height: 60px; border-radius: 50%; background: var(--brand-gradient); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: transform .3s; animation: pulse 2.6s infinite; }
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 32px; height: 32px; fill: var(--white); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(137,81,41,.5); } 70% { box-shadow: 0 0 0 16px rgba(137,81,41,0); } 100% { box-shadow: 0 0 0 0 rgba(137,81,41,0); } }

/* ---------- Animación de aparición ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .9s ease, transform .9s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .nav__phone { display: none; }
  .nav__links { gap: 20px; }
  .nav { padding: 0 28px; }
}
@media (max-width: 960px) {
  :root { --header-h: 78px; }
  .nav { grid-template-columns: auto 1fr; }
  .nav__logo { height: 54px; order: -1; }
  .nav__cta { display: none; }
  .nav__burger { display: block; }
  .nav__links { position: fixed; inset: 0; z-index: -1; flex-direction: column; justify-content: center; align-items: center; gap: 28px; background: var(--ink); opacity: 0; pointer-events: none; transition: opacity .35s; }
  .nav__links a { font-family: var(--serif); font-size: 1.7rem; color: var(--white) !important; }
  .header.menu-open .nav__links { opacity: 1; pointer-events: auto; }
  .header.menu-open .nav__burger span { background: var(--white) !important; }
  .header.menu-open .nav__burger span:first-child { top: 11px; transform: rotate(45deg); }
  .header.menu-open .nav__burger span:last-child { top: 11px; transform: rotate(-45deg); }

  .hero__content { margin: 0 auto; }
  .hero__more { display: none; }
  .hero__progress { right: 50%; transform: translateX(50%); bottom: 3%; }
  .hero__mouse { display: none; }
  .payments { grid-template-columns: 1fr; padding: 36px 24px; gap: 28px; }
  .payments__list { display: flex; flex-wrap: wrap; justify-content: center; }
  .payments__list .pay { flex: 0 0 calc((100% - 28px) / 3); }
  .hero__progress button { width: 30px; }
  .intro { padding: 80px 0; }
  .intro__grid, .offset__grid, .why__grid, .doctor__grid, .location__grid, .faq__grid { grid-template-columns: 1fr; gap: 50px; }
  .intro__lead { padding: 0; text-align: left; }
  .offset, .why { padding: 90px 0; }
  .offset__block, .why__block { width: 45%; top: 40px; bottom: auto; height: 340px; }
  .why__stats { padding-left: 0; }
  .cards { grid-template-columns: 1fr; gap: 56px; }
  .all-treatments ul { grid-template-columns: 1fr 1fr; }
  .stack__card { grid-template-columns: 1fr; min-height: 0; top: calc(90px + var(--i) * 18px); }
  .stack__img { order: -1; height: 200px; }
  .stack__text { padding: 34px 28px 40px; }
  .stack__text p { font-size: .95rem; }
  .cta__inner { padding-left: 0; flex-direction: column; text-align: center; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .container { width: calc(100% - 32px); }
  .nav { padding: 0 16px; }
  .hero__content { width: calc(100% - 32px); }
  .btn--dark { min-width: 0; width: 100%; }
  .all-treatments ul { grid-template-columns: 1fr; }
  .payments__list .pay { flex-basis: calc((100% - 14px) / 2); }
  .stat { padding: 26px; }
  .footer__grid { grid-template-columns: 1fr; }
  .wa-float { right: 16px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .stack__card { transform: none !important; }
}
