/* ==========================================================================
   Clínica Dental Fuentes de Sonrisas — design tokens + base
   ========================================================================== */

@font-face {
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/Quicksand-Variable.woff2') format('woff2-variations'),
       url('../fonts/Quicksand-Variable.woff2') format('woff2');
}
@font-face {
  font-family: 'Pacifico';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Pacifico-Regular.woff2') format('woff2');
}

:root {
  /* light theme (default) */
  --bg: #FAFBFD;
  --surface: #FFFFFF;
  --surface-mint: #EAF2F8;
  --surface-green: #EAF7ED;
  --ink: #15202B;
  --ink-muted: #51616E;
  --border: #DEE6ED;

  --teal-900: #0E2748;
  --teal-800: #123A63;
  --teal-700: #1C5784;
  --teal-600: #2D77A6;
  --teal-ink: #2C6CA0;
  --green-600: #2E9E55;
  --green-500: #3CB464;
  --green-ink: #2E9E55;
  --mint-400: #8FC4E0;
  --mint-300: #B9DDF0;

  --icon-fill: #1D5286;
  --icon-ring: #4481BC;
  --icon-spark: #2B3570;

  --shadow-tint: 206, 55%, 20%;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  --max: 1200px;
  --ease: cubic-bezier(.16,1,.3,1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0D1517;
    --surface: #122023;
    --surface-mint: #11282A;
    --surface-green: #122522;
    --ink: #EDF4F3;
    --ink-muted: #9FB4B3;
    --border: #1E3337;

    --teal-900: #081626;
    --teal-800: #0D2440;
    --teal-700: #163F5E;
    --teal-600: #2D77A6;
    --teal-ink: #7EC4EC;
    --green-600: #0F7A48;
    --green-500: #16965A;
    --green-ink: #3FC57A;
    --mint-400: #6FB2D6;
    --mint-300: #4D86A8;

    --icon-fill: #4A8CC2;
    --icon-ring: #8FB8E0;
    --icon-spark: #6B86D6;

    --shadow-tint: 210, 65%, 2%;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Quicksand', system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; margin: 0; color: var(--ink); }
p { margin: 0; color: var(--ink-muted); }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
svg { max-width: 100%; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

#top-sentinel { position: absolute; top: 0; height: 1px; width: 1px; }

/* ==========================================================================
   Reveal-on-scroll (IntersectionObserver driven, no scroll listeners)
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: calc(var(--reveal-i, 0) * 90ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  border: none;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  padding: 13px 24px;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), filter .25s var(--ease);
}
.btn i { font-size: 1.1em; }
.btn:active { transform: scale(0.97); }

.btn--primary {
  color: #FFFFFF;
  background: linear-gradient(135deg, var(--teal-800), var(--teal-600));
  box-shadow: 0 10px 24px -8px hsla(var(--shadow-tint), 0.55);
}
.btn--primary:hover { filter: brightness(1.08); box-shadow: 0 14px 30px -8px hsla(var(--shadow-tint), 0.6); transform: translateY(-2px); }

.btn--ghost {
  color: var(--teal-ink);
  background: transparent;
  border: 1.5px solid var(--border);
}
.btn--ghost:hover { border-color: var(--teal-600); background: var(--surface-mint); }

.btn--on-dark {
  color: var(--teal-900);
  background: #FFFFFF;
}
.btn--on-dark:hover { filter: brightness(0.96); transform: translateY(-2px); }

.btn--lg { padding: 16px 30px; font-size: 16px; }
.btn--sm { padding: 10px 18px; font-size: 14px; }

/* ==========================================================================
   Nav
   ========================================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.nav.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 8px 24px -16px hsla(var(--shadow-tint), 0.4);
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 72px;
}

.nav__brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav__word { display: flex; flex-direction: column; line-height: 1; gap: 2px; }
.nav__word-main { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; color: var(--teal-ink); }
.nav__word-sub { font-family: 'Pacifico', cursive; font-weight: 400; font-size: 15px; line-height: 1.1; color: var(--green-ink); }

.nav__links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-muted);
}
.nav__links a { transition: color .2s var(--ease); white-space: nowrap; }
.nav__links a:hover { color: var(--teal-ink); }

.nav__cta { flex-shrink: 0; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.nav__toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 24px 20px;
  border-top: 1px solid var(--border);
}
.mobile-menu a { padding: 12px 4px; font-weight: 600; border-bottom: 1px solid var(--border); }
.mobile-menu .btn { margin-top: 12px; width: 100%; }

@media (max-width: 860px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: flex; }
  .mobile-menu.is-open { display: flex; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero { position: relative; overflow: hidden; padding: 56px 0 72px; }

.hero__mesh { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
}
.blob--teal { width: 420px; height: 420px; background: var(--teal-600); top: -140px; left: -120px; animation: float-a 14s ease-in-out infinite; }
.blob--green { width: 360px; height: 360px; background: var(--teal-600); bottom: -160px; right: -100px; opacity: .4; animation: float-b 16s ease-in-out infinite; }
.blob--mint { width: 300px; height: 300px; background: var(--mint-400); top: 120px; right: 80px; opacity: .35; animation: float-a 18s ease-in-out infinite reverse; }

@keyframes float-a {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(30px, 24px); }
}
@keyframes float-b {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-24px, -20px); }
}
@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  min-height: 56vh;
}

.hero__strip {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--teal-ink);
  margin-bottom: 14px;
}

.hero__title {
  font-size: clamp(2rem, 3.4vw, 2.85rem);
  line-height: 1.15;
  max-width: 21ch;
}
.hero__sub {
  margin-top: 20px;
  font-size: 18px;
  max-width: 46ch;
  line-height: 1.6;
}
.hero__actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }

.hero__visual { display: flex; justify-content: center; }
.hero__mark-wrap {
  width: min(360px, 80vw);
  animation: float-a 9s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .hero__mark-wrap { animation: none; }
}
.hero__mark { filter: drop-shadow(0 20px 40px hsla(var(--shadow-tint), 0.35)); }

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; min-height: auto; }
  .hero__sub { margin-inline: auto; }
  .hero__actions { justify-content: center; }
  .hero__visual { order: -1; }
  .hero__mark-wrap { width: min(260px, 70vw); }
}

/* ==========================================================================
   Trust strip
   ========================================================================== */

.trust { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); }
.trust__row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  padding: 28px 24px;
}
.trust__item { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 14px; color: var(--ink-muted); }
.trust__item i { font-size: 22px; color: var(--teal-ink); flex-shrink: 0; }

@media (max-width: 860px) {
  .trust__row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .trust__row { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Section heading helpers
   ========================================================================== */

.section-title { font-size: clamp(1.7rem, 3vw, 2.4rem); max-width: 18ch; }
.section-sub { margin-top: 14px; font-size: 17px; max-width: 54ch; }

/* ==========================================================================
   Services / Bento
   ========================================================================== */

.services { padding: 96px 0; }

.bento {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.bento__card {
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.bento__card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -24px hsla(var(--shadow-tint), 0.45); }

.bento__icon { font-size: 30px; margin-bottom: 16px; }

.bento__card h3 { font-size: 19px; margin-bottom: 16px; }
.bento__card ul { display: flex; flex-direction: column; gap: 10px; }
.bento__card li {
  font-size: 15px;
  padding-left: 18px;
  position: relative;
  color: var(--ink-muted);
}
.bento__card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.bento__card--a { background: var(--surface); }
.bento__card--a .bento__icon { color: var(--teal-ink); }

.bento__card--b { background: var(--surface-green); border-color: transparent; }
.bento__card--b .bento__icon { color: var(--teal-ink); }

.bento__card--c { background: linear-gradient(135deg, var(--teal-800), var(--teal-900)); border-color: transparent; }
.bento__card--c h3, .bento__card--c .bento__icon { color: #FFFFFF; }
.bento__card--c li { color: hsla(0,0%,100%,0.78); }
.bento__card--c li::before { background: var(--mint-400); }

.bento__card--d { background: var(--surface-mint); border-color: transparent; }
.bento__card--d .bento__icon { color: var(--teal-600); }

@media (max-width: 760px) {
  .bento { grid-template-columns: 1fr; }
}

.gallery { margin-top: 72px; }
.gallery__title { font-size: 20px; }

.gallery__track {
  margin-top: 24px;
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 24px 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.gallery__track::-webkit-scrollbar { height: 6px; }
.gallery__track::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--radius-pill); }

.gallery__item {
  flex: 0 0 auto;
  width: 220px;
  scroll-snap-align: start;
  margin: 0;
}
.gallery__item img {
  width: 100%;
  aspect-ratio: 3/4;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: 0 16px 32px -20px hsla(var(--shadow-tint), 0.4);
}
.gallery__item figcaption {
  margin-top: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-muted);
  text-align: center;
}

@media (min-width: 1240px) {
  .gallery__track { padding-left: calc((100% - 1200px) / 2 + 24px); padding-right: calc((100% - 1200px) / 2 + 24px); }
}

/* ==========================================================================
   About
   ========================================================================== */

.about { padding: 96px 0; background: var(--surface); }

.about__inner {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: center;
}

.about__media { position: relative; }
.about__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 5/6;
  object-fit: cover;
  object-position: 50% 18%;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -30px hsla(var(--shadow-tint), 0.5);
}

.about__copy p { margin-top: 18px; font-size: 17px; line-height: 1.7; max-width: 54ch; }

.pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  background: var(--surface-mint);
  color: var(--teal-ink);
  font-weight: 600;
  font-size: 14px;
}
.pill i { color: var(--teal-ink); }

@media (max-width: 860px) {
  .about__inner { grid-template-columns: 1fr; }
  .about__media { max-width: 420px; margin: 0 auto; }
}

/* ==========================================================================
   Equipo
   ========================================================================== */

.team { padding: 96px 0; background: var(--surface); }

.team__photo {
  margin-top: 44px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 60px -30px hsla(var(--shadow-tint), 0.5);
}
.team__photo img { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; object-position: 50% 30%; }

.team__grid {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.team__card {
  flex: 1 1 300px;
  max-width: 340px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  padding-bottom: 24px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.team__card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -24px hsla(var(--shadow-tint), 0.45); }

.team__card img {
  width: 100%;
  height: auto;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: 50% 20%;
}

.team__card h3 { margin: 18px 24px 0; font-size: 17px; }
.team__role { margin: 4px 24px 0; font-size: 13px; font-weight: 700; color: var(--teal-ink); }
.team__bio { margin: 10px 24px 0; font-size: 14.5px; line-height: 1.6; }

@media (max-width: 560px) {
  .team__card { flex-basis: 100%; max-width: 420px; }
}

/* ==========================================================================
   Horarios
   ========================================================================== */

.hours { padding: 96px 0; }

.hours__grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.hours__card {
  display: flex;
  align-items: center;
  gap: 20px;
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform .3s var(--ease);
}
.hours__card:hover { transform: translateY(-4px); }
.hours__card i { font-size: 30px; color: var(--teal-ink); flex-shrink: 0; }
.hours__card h3 { font-size: 18px; }
.hours__time { margin-top: 6px; font-size: 16px; font-weight: 600; color: var(--ink-muted); }

@media (max-width: 760px) {
  .hours__grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Location
   ========================================================================== */

.location { padding: 96px 0; background: var(--surface); }

.location__inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
}
.location__copy p { margin-top: 18px; font-size: 17px; max-width: 48ch; }
.location__copy .btn { margin-top: 28px; }

.location__map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 60px -30px hsla(var(--shadow-tint), 0.5);
  aspect-ratio: 4/3;
}
.location__map iframe { width: 100%; height: 100%; border: 0; }

@media (max-width: 860px) {
  .location__inner { grid-template-columns: 1fr; }
}

/* ==========================================================================
   CTA final
   ========================================================================== */

.cta-final {
  position: relative;
  overflow: hidden;
  padding: 100px 0;
  background: linear-gradient(135deg, var(--teal-800), var(--teal-900) 55%, var(--teal-600));
}
.cta-final__mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, hsla(0,0%,100%,0.14), transparent 40%),
    radial-gradient(circle at 85% 80%, hsla(0,0%,100%,0.1), transparent 45%);
  pointer-events: none;
}
.cta-final__inner { position: relative; text-align: center; max-width: 620px; }
.cta-final__inner h2 { color: #FFFFFF; font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.cta-final__inner p { color: hsla(0,0%,100%,0.82); margin-top: 16px; font-size: 17px; }
.cta-final__inner .btn { margin-top: 32px; }

/* ==========================================================================
   Footer
   ========================================================================== */

.footer { background: var(--teal-900); padding: 72px 0 0; }
.footer, .footer h4 { color: hsla(0,0%,100%,0.9); }
.footer p, .footer a { color: hsla(0,0%,100%,0.62); font-size: 14.5px; }
.footer a { display: flex; align-items: center; gap: 8px; padding: 6px 0; transition: color .2s var(--ease); }
.footer a:hover { color: #FFFFFF; }
.footer h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; font-weight: 700; }

.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 48px;
  border-bottom: 1px solid hsla(0,0%,100%,0.1);
}
.footer__brand { display: flex; gap: 12px; align-items: flex-start; }
.footer__title { color: #FFFFFF; font-weight: 600; font-size: 16px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.footer__script { font-family: 'Pacifico', cursive; font-weight: 400; font-size: 16px; color: #3FC57A; }
.footer__by { margin-top: 4px; }
.footer__col p { padding: 6px 0; }

.footer__bottom { padding: 22px 24px; text-align: center; }
.footer__bottom p { font-size: 13px; }

@media (max-width: 760px) {
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

/* ==========================================================================
   Floating WhatsApp button
   ========================================================================== */

.float-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-500), var(--green-600));
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 14px 28px -10px hsla(var(--shadow-tint), 0.6);
  z-index: 40;
  transition: transform .25s var(--ease);
}
.float-whatsapp:hover { transform: scale(1.08); }
@media (min-width: 861px) {
  .float-whatsapp { display: none; }
}
