/* ============================================
   DENTOSMILE - Clínica Dental
   Estética: oscuro + azul cielo (inspirada en
   Arbor Dental NYC, nominada Awwwards)
   ============================================ */
:root {
  --negro: #0a0f14;
  --gris: #121a23;
  --gris-2: #1a2430;
  --blanco: #f2f6fa;
  --texto: #0d141c;
  --azul: #38bdf8;
  --azul-claro: #7dd3fc;
  --azul-osc: #0284c7;
  --ease: cubic-bezier(0.190, 1.000, 0.220, 1.000);
  --radio: 18px;
  --sombra: 0 20px 50px rgba(0, 0, 0, 0.35);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", sans-serif;
  background: var(--negro);
  color: var(--blanco);
  font-weight: 300;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.overflow-hidden { overflow: hidden; }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--negro);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .8s var(--ease), visibility .8s;
}
.preloader.done { opacity: 0; visibility: hidden; }
.preloader-inner { text-align: center; }
.preloader-logo { height: 110px; width: auto; margin: 0 auto 26px; display: block; }
.preloader-ring {
  width: 74px; height: 74px; margin: 0 auto 22px;
  border: 1px solid rgba(56,189,248,.25); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  animation: spin 1.6s linear infinite;
}
.preloader-mark { font-size: 1.5rem; color: var(--azul); }
@keyframes spin { to { transform: rotate(360deg); } }
.preloader-text {
  font-family: "Inter", sans-serif;
  font-size: 1.3rem; letter-spacing: .12em; color: var(--blanco);
}
.preloader-text em { font-style: normal; color: var(--azul); }
.preloader-bar {
  width: 200px; height: 1px; margin: 0 auto 0;
  background: rgba(255,255,255,.12);
}
.preloader-bar span {
  display: block; height: 100%; width: 0;
  background: var(--azul); transition: width .3s;
}

/* ---------- Header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  padding: 22px 0;
  transition: background .4s var(--ease), padding .4s var(--ease);
}
.header.scrolled {
  background: rgba(10,15,20,.92);
  backdrop-filter: blur(14px);
  padding: 12px 0;
  border-bottom: 1px solid rgba(56,189,248,.18);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo {
  display: inline-flex; align-items: center;
  font-family: "Inter", sans-serif;
  font-size: 1.6rem; font-weight: 600; color: var(--blanco);
  letter-spacing: .02em;
}
.logo img { height: 52px; width: auto; display: block; }
.logo span { color: var(--azul); }
.nav { display: flex; gap: 30px; }
.nav-link {
  color: rgba(242,246,250,.85); font-size: .92rem; font-weight: 400;
  letter-spacing: .05em; position: relative; padding: 4px 0;
  transition: color .25s;
}
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: var(--azul);
  transition: width .3s var(--ease);
}
.nav-link:hover { color: var(--blanco); }
.nav-link:hover::after { width: 100%; }
.btn-reservar {
  background: linear-gradient(135deg, var(--azul-claro), var(--azul) 50%, var(--azul-osc));
  color: #06283d; font-weight: 600; font-size: .88rem;
  padding: 11px 22px; border-radius: 10px;
  letter-spacing: .08em; text-transform: uppercase;
  box-shadow: 0 6px 20px rgba(56,189,248,.35);
  transition: transform .3s var(--ease), box-shadow .3s;
}
.btn-reservar:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(56,189,248,.5); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 6px; }
.nav-toggle span { width: 26px; height: 1.5px; background: var(--blanco); transition: .3s; }

/* ---------- Hero: video que avanza/retrocede con el scroll ---------- */
.hero {
  position: relative;
  height: 300vh; /* tramo de scroll: 200vh extra para recorrer el video */
  background: var(--negro);
}
.hero-scrub {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100vh;
  overflow: hidden;
  display: flex; align-items: center;
  will-change: transform;
}
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  background: #000;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(10,15,20,.92) 15%, rgba(10,15,20,.55) 55%, rgba(10,15,20,.35));
}
.hero-content {
  position: relative; z-index: 2;
  width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px;
  will-change: opacity, transform;
}
/* Texto del hero visible solo en la parte inicial del recorrido del video */
.hero-tag {
  font-size: .82rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--azul-claro); margin-bottom: 22px;
}
.hero-title {
  font-family: "Inter", sans-serif;
  font-weight: 700; line-height: 1.05;
  font-size: clamp(2.6rem, 7.5vw, 5.6rem);
  letter-spacing: -.01em;
}
.hero-line { display: block; }
.hero-title em { font-style: normal; color: var(--azul); }
.hero-sub {
  max-width: 520px; margin-top: 26px;
  color: rgba(242,246,250,.8); font-size: 1.05rem; font-weight: 300;
  line-height: 1.6;
}
.hero-cta { margin-top: 38px; display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-block; font-weight: 600; font-size: .9rem;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 15px 30px; border-radius: 10px;
  transition: transform .3s var(--ease), box-shadow .3s, background .3s, color .3s;
}
.btn-azul {
  background: linear-gradient(135deg, var(--azul-claro), var(--azul) 50%, var(--azul-osc));
  color: #06283d;
  box-shadow: 0 10px 30px rgba(56,189,248,.4);
}
.btn-azul:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(56,189,248,.55); }
.btn-ghost { border: 1px solid rgba(242,246,250,.45); color: var(--blanco); }
.btn-ghost:hover { background: rgba(242,246,250,.08); transform: translateY(-3px); }
.h-scrollhint {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 2; color: rgba(242,246,250,.6);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: .68rem; letter-spacing: .35em; text-transform: uppercase;
  animation: hintFloat 2.4s ease-in-out infinite;
}
@keyframes hintFloat { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------- Secciones ---------- */
.section { padding: 120px 0; position: relative; }
.section-head { text-align: center; margin-bottom: 60px; }
.section-tag {
  display: inline-block;
  color: var(--azul); font-weight: 500; letter-spacing: .28em;
  text-transform: uppercase; font-size: .76rem;
  margin-bottom: 14px;
}
.section-title {
  font-family: "Inter", sans-serif;
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 600; color: var(--blanco);
  line-height: 1.12;
}
.section-title em { font-style: italic; color: var(--azul); }

/* Palabras gigantes flotantes (parallax horizontal, bien posicionadas) */
.sectionLayer {
  position: absolute; inset: 0;
  pointer-events: none; overflow: hidden;
  will-change: transform;
}
.tl {
  position: absolute; display: block;
  font-family: "Inter", sans-serif;
  font-weight: 600; white-space: nowrap;
  will-change: transform; z-index: 0;
  text-transform: lowercase; line-height: 1;
  color: rgba(56,189,248,.14);
}
.nosotros .tl-1 { font-size: 9vw; top: 6%; left: 0; right: 0; width: 100%; text-align: center; }
.servicios .tl-1 { font-size: 10vw; top: 4%; left: 0; right: 0; width: 100%; text-align: center; color: rgba(56,189,248,.12); }
.contacto .tl-1 { font-size: 9vw; top: 5%; left: 0; right: 0; width: 100%; text-align: center; }
.sectionLayer + .container { position: relative; z-index: 1; }

/* ---------- Nosotros ---------- */
.nosotros { background: var(--negro); }
.nosotros-grid {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px;
  align-items: center;
}
.nosotros-texto { padding-top: 80px; }
.nosotros-texto .section-title { margin-bottom: 22px; }
.nosotros-texto p { color: rgba(242,246,250,.75); line-height: 1.7; margin-bottom: 18px; font-weight: 300; }
.nosotros-texto .btn { margin-top: 12px; }
.nosotros-foto {
  border-radius: var(--radio); overflow: hidden;
  box-shadow: var(--sombra);
}
.nosotros-foto img { width: 100%; height: 480px; object-fit: cover; }
.nosotros-foto, .nosotros-texto { will-change: transform, opacity; }

/* ---------- Valores (tarjetas con imagen que se voltean) ---------- */
.valores { background: var(--gris); }
.valores-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.valor-card {
  height: 340px;
  perspective: 1200px;
}
.valor-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .85s var(--ease);
}
.valor-card:hover .valor-inner,
.valor-card:focus-within .valor-inner { transform: rotateY(180deg); }
.valor-front, .valor-back {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radio);
  overflow: hidden;
}
.valor-front {
  background-size: cover; background-position: center;
  display: flex; align-items: flex-end;
}
.valor-front h3 {
  font-family: "Inter", sans-serif;
  font-size: 1.45rem; font-weight: 600; width: 100%;
  padding: 26px 22px;
  background: linear-gradient(to top, rgba(10,15,20,.88), transparent 70%);
}
.valor-back {
  background: var(--gris-2);
  border: 1px solid rgba(56,189,248,.4);
  transform: rotateY(180deg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 20px;
  padding: 32px 26px; text-align: center;
}
.valor-back .valor-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px;
  border: 1px solid rgba(56,189,248,.4); border-radius: 50%;
  font-size: 1.5rem; background: rgba(56,189,248,.1);
}
.valor-back p {
  color: rgba(242,246,250,.85);
  font-size: .98rem; line-height: 1.7;
}

/* ---------- Servicios ---------- */
.servicios { background: var(--negro); }
.serv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.serv-card {
  position: relative; height: 330px;
  background-size: cover; background-position: center;
  border-radius: var(--radio); overflow: hidden; cursor: pointer;
}
.serv-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,15,20,.9), rgba(10,15,20,.15) 60%);
  opacity: .8; transition: opacity .4s;
}
.serv-content {
  position: absolute; left: 28px; bottom: 26px; z-index: 2;
}
.serv-content h3 {
  font-family: "Inter", sans-serif;
  font-size: 1.6rem; font-weight: 600; margin-bottom: 8px;
}
.serv-content p { color: rgba(242,246,250,.8); font-size: .92rem; max-width: 320px; }
.serv-card:hover .serv-overlay { opacity: .92; }
.serv-card:hover .serv-content h3 { color: var(--azul-claro); }

/* ---------- Testimonios ---------- */
.testimonios { background: var(--gris); }
.test-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.test-card {
  background: var(--gris-2);
  border: 1px solid rgba(56,189,248,.14);
  border-radius: var(--radio);
  padding: 34px 28px;
  transition: transform .4s var(--ease), border-color .4s;
}
.test-card:hover { transform: translateY(-8px); border-color: rgba(56,189,248,.45); }
.test-card p {
  font-family: "Inter", sans-serif;
  font-weight: 400; font-size: 1.02rem; line-height: 1.6;
  color: var(--blanco); margin-bottom: 18px;
}
.test-card footer { color: var(--azul-claro); font-size: .9rem; letter-spacing: .06em; }

/* ---------- Contacto ---------- */
.contacto { background: var(--negro); }
.contacto-grid2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
  align-items: start;
}
.contacto-info .section-title { margin-bottom: 20px; }
.contacto-desc { color: rgba(242,246,250,.7); line-height: 1.7; margin-bottom: 28px; }
.contacto-lista p { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; color: rgba(242,246,250,.85); font-size: .98rem; }
.c-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex-shrink: 0;
  border: 1px solid rgba(56,189,248,.4); border-radius: 50%;
  font-size: .9rem;
}
.cita-form {
  background: var(--gris-2);
  border: 1px solid rgba(56,189,248,.22);
  border-radius: 22px;
  padding: 36px 32px;
  box-shadow: var(--sombra);
}
.cita-form h3 {
  font-family: "Inter", sans-serif;
  font-size: 1.5rem; font-weight: 600; margin-bottom: 24px;
}
.form-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.form-field label {
  font-size: .74rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--azul-claro); font-weight: 500;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: rgba(10,15,20,.7);
  border: 1px solid rgba(56,189,248,.28);
  border-radius: 10px;
  color: var(--blanco);
  font-family: "Inter", sans-serif; font-size: .96rem; font-weight: 300;
  padding: 13px 16px;
  transition: border-color .3s, box-shadow .3s;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: rgba(242,246,250,.35); }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--azul);
  box-shadow: 0 0 0 3px rgba(56,189,248,.15);
}
.form-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--azul) 50%),
    linear-gradient(135deg, var(--azul) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.form-field select option { background: var(--gris-2); color: var(--blanco); }
.form-submit { width: 100%; display: block; text-align: center; margin-top: 6px; padding: 16px 30px; }

/* ---------- Footer ---------- */
.footer {
  background: #070b0f;
  border-top: 1px solid rgba(56,189,248,.16);
  padding: 60px 0 56px; position: relative;
}
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 46px; align-items: start; }
.footer-logo { display: inline-block; margin-bottom: 14px; font-size: 1.7rem; }
.footer-logo img { height: 64px; width: auto; }
.footer-frase {
  font-family: "Inter", sans-serif; font-weight: 300;
  font-size: 1rem; color: rgba(242,246,250,.6);
}
.footer-titulo {
  font-family: "Inter", sans-serif;
  font-size: 1.05rem; font-weight: 600; color: var(--azul-claro);
  margin-bottom: 16px;
}
.footer-lista { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-lista li { font-size: .92rem; color: rgba(242,246,250,.7); }
.footer-bottom {
  max-width: 1240px; margin: 44px auto 0; padding: 22px 0 0;
  border-top: 1px solid rgba(242,246,250,.08);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  font-size: .8rem; color: rgba(242,246,250,.45);
}
/* Credito de diseno: Estilo Grafico (mismo patron que Barber House) */
.footer-diseno { margin: 0; font-size: .8rem; color: rgba(242,246,250,.72); opacity: 1; }
.footer-diseno a {
  color: var(--azul-claro); font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px;
  transition: color .25s ease;
}
.footer-diseno a:hover { color: #fff; }
.back-top {
  position: absolute; right: 30px; top: -22px;
  width: 46px; height: 46px;
  background: linear-gradient(135deg, var(--azul-claro), var(--azul));
  color: #06283d; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 10px 26px rgba(56,189,248,.45);
  transition: transform .3s var(--ease);
}
.back-top:hover { transform: translateY(-4px); }

/* ---------- Transiciones (sistema Casa Angelina) ---------- */
.has_transition_1000 {
  transition: transform 1000ms cubic-bezier(0.190,1.000,0.220,1.000), opacity 1000ms cubic-bezier(0.190,1.000,0.220,1.000);
}
.has_transition_1500 {
  transition: transform 1500ms cubic-bezier(0.190,1.000,0.220,1.000), opacity 1500ms cubic-bezier(0.190,1.000,0.220,1.000);
}
.top_hidden { transform: translateY(101%); }
.bottom_hidden { transform: translateY(40px); opacity: 0; }
.no_opacity { opacity: 0 !important; }
.no_opacity.show { opacity: 1 !important; }
.top_hidden.show, .bottom_hidden.show { transform: none; opacity: 1; }
.d100 { transition-delay: 100ms; }
.d150 { transition-delay: 150ms; }
.d200 { transition-delay: 200ms; }
.d250 { transition-delay: 250ms; }
.d300 { transition-delay: 300ms; }
.d350 { transition-delay: 350ms; }
.d400 { transition-delay: 400ms; }
.d450 { transition-delay: 450ms; }
.d500 { transition-delay: 500ms; }
.d600 { transition-delay: 600ms; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nosotros-grid, .contacto-grid2 { grid-template-columns: 1fr; gap: 40px; }
  .valores-grid, .test-grid { grid-template-columns: 1fr; }
  .serv-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .nav {
    position: fixed; top: 0; right: -100%; height: 100vh; width: 78%; max-width: 330px;
    background: var(--gris-2); flex-direction: column; justify-content: center;
    padding: 40px; gap: 26px; transition: right .45s var(--ease); z-index: 950;
  }
  .nav.open { right: 0; }
  .nav-link { font-size: 1.1rem; }
  .nav-toggle { display: flex; z-index: 960; }
  .header-inner .btn-reservar { display: none; }
  /* Hero: tramo de scroll más corto en pantallas chicas */
  .hero { height: 220vh; }
  .hero-content { padding: 0 22px; }
}
