/* ===================================================================
   Solís · Atelier Dental — azul medianoche editorial
   =================================================================== */
:root {
  --navy: #07142e;        /* fondo principal oscuro */
  --navy-2: #0c1f44;      /* superficies */
  --navy-3: #122a59;      /* bordes/realces */
  --porcelain: #eef2f8;   /* texto claro / fondos light */
  --ivory: #f6f8fc;
  --azure: #5b8def;       /* acento */
  --azure-bright: #7ea6ff;
  --ice: #b9cdf0;
  --muted: #8ea3c6;       /* texto secundario sobre oscuro */
  --muted-d: #5a6b8c;     /* texto secundario sobre claro */
  --ink: #0a1730;         /* texto sobre claro */
  --line-d: rgba(255,255,255,.12);
  --line-l: rgba(10,23,48,.12);
  --ease: cubic-bezier(.19,1,.22,1);
  --maxw: 1320px;
  --pad: clamp(22px, 5.5vw, 90px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Hanken Grotesk", sans-serif;
  background: var(--navy);
  color: var(--porcelain);
  font-weight: 300;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; }
::selection { background: var(--azure); color: var(--navy); }

/* grain overlay */
.grain {
  position: fixed; inset: 0; z-index: 9997; pointer-events: none; opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* cursor */
.cursor {
  position: fixed; top: 0; left: 0; width: 10px; height: 10px;
  border-radius: 50%; background: var(--azure); pointer-events: none;
  transform: translate(-50%,-50%); z-index: 9999;
  transition: width .35s var(--ease), height .35s var(--ease), background .35s, opacity .3s;
  mix-blend-mode: screen;
}
.cursor.is-hover { width: 46px; height: 46px; background: rgba(91,141,239,.25); }
@media (hover: none) { .cursor { display: none; } }

.scroll-progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: var(--azure); z-index: 9998; }

/* floating preview image */
.float-preview {
  position: fixed; top: 0; left: 0; z-index: 8000; width: 300px; height: 220px;
  border-radius: 8px; overflow: hidden; pointer-events: none;
  transform: translate(-50%,-50%) scale(.85); opacity: 0;
  transition: opacity .4s var(--ease), transform .4s var(--ease);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.6);
}
.float-preview.show { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.float-preview img { transition: transform .6s var(--ease); }
@media (hover: none) { .float-preview { display: none; } }

/* side rails */
.rail { position: fixed; top: 0; bottom: 0; width: var(--pad); z-index: 7000; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.rail--left { left: 0; } .rail--right { right: 0; }
.rail__rot { writing-mode: vertical-rl; font-size: .68rem; letter-spacing: .35em; text-transform: uppercase; color: var(--muted); transform: rotate(180deg); }
.rail--right .rail__rot { transform: none; }
@media (max-width: 1100px) { .rail { display: none; } }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  background: var(--azure); color: var(--navy);
  padding: .95rem 1.7rem; border-radius: 2px; font-weight: 500; font-size: .9rem;
  letter-spacing: .02em; text-decoration: none; border: none; cursor: pointer;
  position: relative; overflow: hidden;
  transition: color .4s var(--ease);
}
.btn span { transition: transform .4s var(--ease); position: relative; z-index: 2; }
.btn::before { content: ""; position: absolute; inset: 0; background: var(--porcelain); transform: translateX(-101%); transition: transform .5s var(--ease); z-index: 1; }
.btn:hover::before { transform: translateX(0); }
.btn:hover span { transform: translateX(5px); }
.btn > :not(span)::selection { background: transparent; }
.btn.btn--full { width: 100%; justify-content: center; padding: 1.1rem; }
.btn--ghost {
  background: transparent; color: var(--porcelain);
  border: 1px solid var(--line-d); padding: .7rem 1.3rem;
}
.btn--ghost::before { background: var(--azure); }
.btn--ghost:hover { color: var(--navy); }

/* ===== Nav ===== */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 9000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.3rem var(--pad);
  transition: padding .5s var(--ease), background .5s var(--ease), border-color .5s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(7,20,46,.72); backdrop-filter: blur(16px) saturate(140%);
  padding-top: .8rem; padding-bottom: .8rem; border-color: var(--line-d);
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand__sym { color: var(--azure); font-size: .9rem; }
.brand__txt {
  font-family: "Bodoni Moda", serif; font-size: 1.15rem; letter-spacing: .12em;
  display: flex; flex-direction: column; line-height: 1;
}
.brand__txt em { font-style: italic; font-size: .52rem; letter-spacing: .3em; color: var(--muted); text-transform: uppercase; margin-top: 3px; }
.nav__links { display: flex; gap: 2.2rem; }
.nav__links a { text-decoration: none; color: var(--ice); font-size: .88rem; letter-spacing: .02em; display: inline-flex; gap: .4em; align-items: baseline; transition: color .3s; }
.nav__links a i { font-style: normal; font-size: .62rem; color: var(--azure); opacity: .7; }
.nav__links a:hover { color: #fff; }
.burger { display: none; flex-direction: column; gap: 6px; background: none; border: none; cursor: pointer; }
.burger span { width: 26px; height: 1.5px; background: var(--porcelain); transition: .3s; }

/* ===== Hero ===== */
.hero { padding: clamp(120px,17vh,180px) var(--pad) clamp(2rem,5vh,4rem); position: relative; max-width: var(--maxw); margin: 0 auto; }
.hero::after {
  content: ""; position: absolute; right: var(--pad); top: 30%; width: 340px; height: 340px;
  border: 1px solid var(--line-d); border-radius: 50%; z-index: -1;
  box-shadow: 0 0 120px 20px rgba(91,141,239,.08) inset;
}
.hero__index { font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: var(--azure); margin-bottom: 1.5rem; }
.hero__title {
  font-family: "Bodoni Moda", serif; font-weight: 400;
  font-size: clamp(3.2rem, 12vw, 10.5rem); line-height: .92; letter-spacing: -.02em;
}
.hero__title .line { display: block; overflow: hidden; }
.hero__title em { font-style: italic; color: var(--azure); }
.reveal-up { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease) var(--d,0s); }
.reveal-up.in { transform: none; }

.hero__bottom { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem,5vw,4rem); align-items: end; margin-top: clamp(2rem,5vw,3.5rem); }
.hero__photo { aspect-ratio: 16/10; border-radius: 6px; overflow: hidden; background: var(--navy-2); }
.hero__photo img { transition: transform 1.4s var(--ease); }
.hero__photo:hover img { transform: scale(1.06); }
.hero__aside p { color: var(--ice); font-size: 1.05rem; max-width: 40ch; margin-bottom: 1.8rem; }
.hero__rate { display: flex; align-items: center; gap: .7rem; margin-top: 2rem; padding-top: 1.6rem; border-top: 1px solid var(--line-d); flex-wrap: wrap; }
.hero__rate strong { font-family: "Bodoni Moda", serif; font-size: 1.9rem; }
.hero__rate .stars { color: var(--azure); letter-spacing: .1em; }
.hero__rate-txt { color: var(--muted); font-size: .82rem; }

/* ===== Stats ===== */
.stats {
  display: flex; align-items: center; justify-content: center; gap: clamp(1rem,4vw,3.5rem);
  padding: clamp(2.5rem,6vw,4rem) var(--pad); flex-wrap: wrap;
  border-block: 1px solid var(--line-d); background: var(--navy-2);
}
.stats__item { text-align: center; }
.stats__item strong { font-family: "Bodoni Moda", serif; font-weight: 400; font-size: clamp(2.4rem,5vw,3.6rem); display: block; line-height: 1; }
.stats__item span { color: var(--muted); font-size: .8rem; letter-spacing: .04em; }
.stats__rule { width: 1px; height: 46px; background: var(--line-d); }
@media (max-width: 760px) { .stats__rule { display: none; } .stats { gap: 2rem 3rem; } }

/* ===== Section heads ===== */
.sec-head { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); position: relative; }
.sec-head--center { text-align: center; }
.sec-num { font-family: "Bodoni Moda", serif; font-size: .9rem; color: var(--azure); letter-spacing: .2em; display: block; margin-bottom: 1rem; }
.sec-title { font-family: "Bodoni Moda", serif; font-weight: 400; font-size: clamp(2.4rem,6vw,4.6rem); line-height: 1; letter-spacing: -.02em; }
.sec-sub { color: var(--muted); margin-top: 1rem; font-size: 1.05rem; }

/* ===== Servicios (editorial list) ===== */
.services { padding: clamp(5rem,12vh,9rem) 0; }
.svc-list { list-style: none; max-width: var(--maxw); margin: 3.5rem auto 0; padding: 0 var(--pad); }
.svc {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 1.5rem;
  padding: 1.9rem 0; border-top: 1px solid var(--line-d); cursor: pointer; position: relative;
  transition: padding .5s var(--ease), color .4s;
}
.svc:last-child { border-bottom: 1px solid var(--line-d); }
.svc__n { font-family: "Bodoni Moda", serif; font-size: .85rem; color: var(--muted); transition: color .4s; }
.svc__name { font-family: "Bodoni Moda", serif; font-size: clamp(1.5rem,3.5vw,2.6rem); font-weight: 400; letter-spacing: -.01em; transition: transform .5s var(--ease), color .4s; }
.svc__desc { color: var(--muted); font-size: .9rem; text-align: right; transition: color .4s; }
.svc__arr { color: var(--azure); font-size: 1.4rem; opacity: 0; transform: translateX(-12px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.svc:hover { padding-left: 1.5rem; }
.svc:hover .svc__name { transform: translateX(6px); color: var(--azure-bright); }
.svc:hover .svc__n { color: var(--azure); }
.svc:hover .svc__arr { opacity: 1; transform: translateX(0); }
@media (max-width: 720px) {
  .svc { grid-template-columns: auto 1fr auto; }
  .svc__desc { display: none; }
}

/* ===== Doctor ===== */
.doctor {
  max-width: var(--maxw); margin: 0 auto; padding: clamp(4rem,10vh,8rem) var(--pad);
  display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem,5vw,5rem); align-items: center;
}
.doctor__media { aspect-ratio: 3/4; border-radius: 6px; overflow: hidden; position: relative; background: var(--navy-2); }
.doctor__media::after { content: ""; position: absolute; inset: 0; border: 1px solid var(--line-d); border-radius: 6px; pointer-events: none; }
.doctor__media img { transition: transform 1.4s var(--ease); }
.doctor__media:hover img { transform: scale(1.04); }
.doctor__role { color: var(--azure); font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; margin: 1rem 0 1.5rem; }
.doctor__body p { color: var(--ice); max-width: 52ch; }
.doctor__creds { list-style: none; margin: 2.2rem 0; display: grid; gap: 1rem; }
.doctor__creds li { padding-bottom: 1rem; border-bottom: 1px solid var(--line-d); font-size: .95rem; color: var(--ice); display: flex; gap: 1rem; }
.doctor__creds b { color: var(--muted); font-weight: 400; min-width: 110px; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; padding-top: 3px; }
.doctor__sign-row { display: flex; align-items: baseline; gap: 1rem; }
.doctor__sign { font-family: "Bodoni Moda", serif; font-style: italic; font-size: 2.2rem; color: var(--porcelain); }
.doctor__sign-sub { color: var(--muted); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }

/* ===== Método ===== */
.method { background: var(--ivory); color: var(--ink); padding: clamp(4.5rem,11vh,8rem) 0; }
.method .sec-title { color: var(--ink); }
.method .sec-num { color: var(--azure); }
.method__grid { max-width: var(--maxw); margin: 3.5rem auto 0; padding: 0 var(--pad); display: grid; grid-template-columns: repeat(4,1fr); gap: 2rem; }
.mstep { border-top: 2px solid var(--ink); padding-top: 1.4rem; }
.mstep b { font-family: "Bodoni Moda", serif; font-weight: 400; font-size: 2.6rem; color: var(--azure); display: block; line-height: 1; }
.mstep h3 { font-family: "Bodoni Moda", serif; font-weight: 400; font-size: 1.4rem; margin: .8rem 0 .5rem; }
.mstep p { color: var(--muted-d); font-size: .92rem; }
@media (max-width: 820px) { .method__grid { grid-template-columns: repeat(2,1fr); gap: 2rem 1.5rem; } }

/* ===== Galería ===== */
.gallery { padding: clamp(5rem,12vh,9rem) 0; }
.gallery__mosaic {
  max-width: var(--maxw); margin: 3.5rem auto 0; padding: 0 var(--pad);
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 230px; gap: 1rem;
}
.g { border-radius: 6px; overflow: hidden; background: var(--navy-2); }
.g img { transition: transform 1.2s var(--ease); }
.g:hover img { transform: scale(1.07); }
.g--tall { grid-row: span 2; }
.g--wide { grid-column: span 2; }
@media (max-width: 820px) {
  .gallery__mosaic { grid-template-columns: repeat(2,1fr); grid-auto-rows: 200px; }
  .g--wide { grid-column: span 2; }
  .g--tall { grid-row: span 1; }
}

/* ===== Reviews ===== */
.reviews { padding: clamp(4.5rem,11vh,8rem) 0; background: var(--navy-2); border-block: 1px solid var(--line-d); }
.reviews__grid { max-width: var(--maxw); margin: 3.5rem auto 0; padding: 0 var(--pad); display: grid; grid-template-columns: repeat(3,1fr); gap: 1.4rem; }
.quote { border: 1px solid var(--line-d); border-radius: 6px; padding: 2.2rem; transition: border-color .4s, transform .4s var(--ease), background .4s; position: relative; }
.quote:hover { border-color: var(--azure); transform: translateY(-6px); background: rgba(91,141,239,.05); }
.quote__mark { font-family: "Bodoni Moda", serif; font-size: 4rem; line-height: .4; color: var(--azure); height: 1.2rem; }
.quote blockquote { font-family: "Bodoni Moda", serif; font-size: 1.18rem; line-height: 1.5; color: var(--porcelain); margin: 1.5rem 0; }
.quote figcaption { display: flex; flex-direction: column; }
.quote figcaption b { font-weight: 500; }
.quote figcaption span { color: var(--muted); font-size: .85rem; }
@media (max-width: 820px) { .reviews__grid { grid-template-columns: 1fr; } }

/* ===== Contacto ===== */
.contact { max-width: var(--maxw); margin: 0 auto; padding: clamp(5rem,12vh,9rem) var(--pad); }
.contact__title { font-family: "Bodoni Moda", serif; font-weight: 400; font-size: clamp(2.6rem,7vw,5.5rem); line-height: .95; letter-spacing: -.02em; margin-top: 1rem; }
.contact__title em { font-style: italic; color: var(--azure); }
.contact__cols { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem,5vw,5rem); margin-top: 3.5rem; }
.contact__info { display: grid; gap: 1.4rem; align-content: start; }
.ci { border-bottom: 1px solid var(--line-d); padding-bottom: 1.4rem; }
.ci__label { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--azure); display: block; margin-bottom: .5rem; }
.ci p { color: var(--ice); font-size: 1.02rem; }
.ci a { text-decoration: none; transition: color .3s; }
.ci a:hover { color: var(--azure-bright); }
.contact__form { display: grid; gap: 1.1rem; }
.contact__form label { display: grid; gap: .45rem; font-size: .8rem; letter-spacing: .04em; color: var(--muted); }
.contact__form input, .contact__form select {
  font-family: inherit; font-size: .98rem; color: var(--porcelain);
  padding: .95rem 1rem; border: 1px solid var(--line-d); border-radius: 4px;
  background: var(--navy-2); transition: border-color .3s, background .3s;
}
.contact__form input::placeholder { color: var(--muted-d); }
.contact__form input:focus, .contact__form select:focus { outline: none; border-color: var(--azure); }
.contact__form select option { background: var(--navy); }
.form-note { color: var(--azure-bright); font-size: .88rem; min-height: 1em; }
@media (max-width: 820px) { .contact__cols { grid-template-columns: 1fr; } }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--line-d); padding: clamp(3rem,7vw,5rem) var(--pad) 2.5rem; max-width: var(--maxw); margin: 0 auto; text-align: center; }
.brand--lg { justify-content: center; }
.brand--lg .brand__txt { font-size: 2rem; align-items: center; }
.footer__claim { font-family: "Bodoni Moda", serif; font-style: italic; font-size: clamp(1.3rem,3vw,2rem); color: var(--ice); margin: 1.8rem auto; max-width: 24ch; }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; padding-top: 2.5rem; border-top: 1px solid var(--line-d); margin-top: 2.5rem; font-size: .82rem; color: var(--muted); }
.footer__bottom nav { display: flex; gap: 1.5rem; }
.footer__bottom a { text-decoration: none; transition: color .3s; }
.footer__bottom a:hover { color: var(--azure); }

/* ===== Image fallback ===== */
.img-fail { background:
  repeating-linear-gradient(45deg, var(--navy-2), var(--navy-2) 14px, var(--navy-3) 14px, var(--navy-3) 28px); }
.img-fail img { display: none; }

/* ===== Reveal ===== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .9s var(--ease) var(--d,0s), transform .9s var(--ease) var(--d,0s); }
.reveal.in { opacity: 1; transform: none; }
.reveal-img { clip-path: inset(0 0 100% 0); transition: clip-path 1.1s var(--ease) var(--d,0s); }
.reveal-img.in { clip-path: inset(0 0 0 0); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal, .reveal-img, .reveal-up { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}

/* ===== Mobile nav ===== */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav .btn--ghost { display: none; }
  .burger { display: flex; }
  .nav__links.is-open {
    display: flex; flex-direction: column; position: absolute; inset: 100% 0 auto 0;
    background: var(--navy); padding: 1.8rem var(--pad); gap: 1.4rem; border-bottom: 1px solid var(--line-d);
  }
  .hero__bottom { grid-template-columns: 1fr; }
  .doctor { grid-template-columns: 1fr; }
  .doctor__media { max-width: 420px; }
}
