/* ═══════════════════════════════════════════
   BRIGHTSIDE DENTAL — style.css
   ═══════════════════════════════════════════ */

/* ── Tokens ──────────────────────────────── */
:root {
  --white:      #fafaf8;
  --cream:      #f4f0eb;
  --sage:       #e8f4f1;
  --sage-dark:  #d0e7e1;
  --navy:       #1a2535;
  --navy-soft:  #2a3545;
  --teal:       #2d9b87;
  --teal-dark:  #227f6d;
  --text-dark:  #3a3a38;
  --text-muted: #6a6a66;
  --text-light: #8a8a86;
  --border:     rgba(0,0,0,.08);

  --heading: 'Plus Jakarta Sans', system-ui, sans-serif;
  --sans:    'Inter', system-ui, sans-serif;

  --max-w: 1240px;
  --nav-h: 72px;
  --gap:   clamp(1.5rem, 4vw, 3rem);
}

/* ── Reset ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--sans);
  background: var(--white);
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
}
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ── Typography ──────────────────────────── */
h1, h2, h3 {
  font-family: var(--heading);
  font-weight: 700;
  line-height: 1.1;
  color: var(--navy);
}
h1 { font-size: clamp(2.8rem, 6vw, 5.2rem); }
h2 { font-size: clamp(2rem, 4vw, 3.4rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.7rem); font-weight: 600; }

.label {
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: .75rem;
}
.label--muted { color: var(--text-muted); }

/* ── Buttons ─────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .85rem 1.6rem;
  border: none;
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .15s;
}
.btn--gold {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 2px 0 rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.2);
}
.btn--gold:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(45,155,135,.3), 0 2px 0 rgba(0,0,0,.12);
}
.btn--gold:active { transform: translateY(0); }
.btn--lg { padding: 1rem 2rem; font-size: .78rem; }
.btn__arrow { font-style: normal; }

.link-arrow {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  transition: color .2s;
}
.link-arrow:hover { color: var(--teal); }

/* ═══════════════════════════════════════════
   NAV
   ═══════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.5rem, 5vw, 3.5rem);
  background: rgba(250,250,248,.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background .3s, box-shadow .3s;
}
.nav.scrolled {
  background: rgba(250,250,248,.98);
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.08);
}

.nav__logo { display: flex; flex-direction: column; }
.nav__logo-name {
  font-family: var(--heading);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--navy);
}
.nav__logo-sub {
  font-size: .58rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--teal);
}
.nav__logo-sub {
  font-size: .58rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nav__links {
  display: flex;
  gap: 2.5rem;
}
.nav__links a {
  font-size: .78rem;
  font-weight: 400;
  letter-spacing: .06em;
  color: var(--text-dark);
  transition: color .2s;
}
.nav__links a:hover, .nav__links a.active { color: var(--teal); }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
}
.nav__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  transition: transform .3s, opacity .3s;
}

/* Mobile nav */
.nav__drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(80vw, 320px);
  height: 100dvh;
  background: var(--cream);
  z-index: 200;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.8rem;
  gap: 1.4rem;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.nav__drawer.open { transform: translateX(0); }
.nav__drawer-close {
  align-self: flex-end;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  margin-bottom: .5rem;
}
.nav__drawer-link {
  font-size: 1rem;
  letter-spacing: .06em;
  color: var(--text-dark);
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  transition: color .2s;
}
.nav__drawer-link:hover { color: var(--teal); }
.nav__drawer-cta { margin-top: auto; align-self: flex-start; }

.nav__overlay {
  position: fixed;
  inset: 0;
  background: rgba(26,37,53,.4);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s;
}
.nav__overlay.show { opacity: 1; pointer-events: all; }

/* ═══════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════ */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100dvh;
  padding-top: var(--nav-h);
  background: var(--white);
  position: relative;
  overflow: hidden;
}

.hero__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 7vw, 6rem) clamp(1.5rem, 5vw, 5rem);
  padding-right: 2rem;
  background:
    linear-gradient(105deg,
      rgba(250,250,248,1) 0%,
      rgba(250,250,248,.85) 55%,
      rgba(250,250,248,0) 100%);
  z-index: 2;
}

.hero__headline {
  margin-top: .5rem;
}
.hero__headline em {
  color: var(--teal);
  font-style: normal;
  font-weight: 700;
}

.hero__sub {
  margin-top: 1.5rem;
  font-size: .9rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 36ch;
}

.hero__actions {
  margin-top: 2.5rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.hero__image {
  position: relative;
  overflow: hidden;
}
.hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  will-change: transform;
}
.hero__image::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(250,250,248,.4) 0%, transparent 30%),
    linear-gradient(to top,   rgba(26,37,53,.15) 0%, transparent 50%);
  pointer-events: none;
}

/* ═══════════════════════════════════════════
   SERVICES
   ═══════════════════════════════════════════ */
.services {
  background: var(--sage);
  padding: clamp(4rem, 8vw, 7rem) clamp(1.5rem, 5vw, 5rem);
}

.services__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}
.services__sub {
  margin-top: .75rem;
  font-size: .88rem;
  color: var(--text-muted);
  max-width: 50ch;
}
.services__demo { align-self: flex-start; margin-top: auto; }

.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: #fff;
  padding: 2rem 1.8rem 2rem;
  display: flex;
  flex-direction: column;
  gap: .8rem;
  border-radius: 2px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: transform .25s, box-shadow .25s;
}
.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.service-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.service-card__num {
  font-size: .68rem;
  letter-spacing: .12em;
  color: var(--text-muted);
  font-family: var(--sans);
}
.service-card__link {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: .85rem;
  color: var(--text-muted);
  transition: border-color .2s, color .2s, background .2s;
  flex-shrink: 0;
}
.service-card__link:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: rgba(45,155,135,.05);
}

.service-card p {
  font-size: .85rem;
  line-height: 1.65;
  color: var(--text-muted);
  flex: 1;
}

.service-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 1rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}
.service-card__time {
  font-size: .65rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.service-card__price {
  font-family: var(--heading);
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--navy);
}

.services__disclaimer {
  margin-top: 2rem;
  font-size: .68rem;
  color: var(--text-muted);
  letter-spacing: .04em;
}

/* ═══════════════════════════════════════════
   WHY US
   ═══════════════════════════════════════════ */
.why-us {
  background: var(--white);
  padding: clamp(4rem, 8vw, 7rem) clamp(1.5rem, 5vw, 5rem);
}

.why-us__header {
  margin-bottom: 3rem;
}

.why-us__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.why-us__card {
  display: flex;
  flex-direction: column;
  gap: .8rem;
}

.why-us__icon {
  width: 3.5rem;
  height: 3.5rem;
  font-size: 1.8rem;
  display: grid;
  place-items: center;
  background: var(--sage);
  border-radius: 2px;
}

.why-us__card h3 {
  margin-top: .5rem;
}

.why-us__card p {
  font-size: .88rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════
   GALLERY
   ═══════════════════════════════════════════ */
.gallery {
  background: var(--cream);
  padding: clamp(4rem, 8vw, 7rem) clamp(1.5rem, 5vw, 5rem);
}

.gallery__header {
  margin-bottom: 3rem;
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.gallery__item {
  overflow: hidden;
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 2px;
  box-shadow: 0 4px 16px rgba(0,0,0,.08);
}
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.4,0,.2,1);
}
.gallery__item:hover img { transform: scale(1.04); }

.gallery__caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .8rem 0;
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.gallery__num {
  font-size: .62rem;
  letter-spacing: .1em;
  color: var(--text-light);
}

/* ═══════════════════════════════════════════
   VISIT
   ═══════════════════════════════════════════ */
.visit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--white);
  min-height: 70vh;
}

.visit__content {
  padding: clamp(3rem, 7vw, 6rem) clamp(2rem, 5vw, 5rem);
  display: flex;
  flex-direction: column;
}

.visit__info {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.visit__block p, .visit__block a {
  font-size: .88rem;
  line-height: 1.8;
  color: var(--text-dark);
}
.visit__block-label {
  font-size: .62rem !important;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--text-muted) !important;
  margin-bottom: .4rem;
}
.visit__tel {
  display: block;
  transition: color .2s;
}
.visit__tel:hover { color: var(--teal); }
.visit__note {
  font-size: .68rem !important;
  color: var(--text-muted) !important;
  margin-top: .3rem;
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.hours-table td {
  padding: .4rem 0;
  color: var(--text-dark);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.hours-table td:last-child { text-align: right; }
.hours-table .closed { color: var(--text-muted); }

.visit__map {
  background: var(--sage-dark);
  position: relative;
  overflow: hidden;
}

.map-wrapper {
  width: 100%;
  height: 100%;
  min-height: 420px;
  position: relative;
  display: flex;
  flex-direction: column;
}
.map-wrapper iframe {
  width: 100%;
  flex: 1;
  min-height: 380px;
  border: none;
  display: block;
  filter: sepia(.08) saturate(.92);
}
.map-open {
  position: absolute;
  bottom: 2.4rem;
  right: 1rem;
  font-size: .62rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #333;
  background: #fff;
  padding: .4rem .7rem;
  transition: background .15s;
  z-index: 2;
}
.map-open:hover { background: #f0f0f0; }

.map-note {
  position: absolute;
  bottom: .6rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: .58rem;
  color: rgba(0,0,0,.45);
  white-space: nowrap;
  letter-spacing: .06em;
  background: rgba(255,255,255,.8);
  padding: .15rem .5rem;
  z-index: 2;
}

/* ═══════════════════════════════════════════
   CTA BANNER
   ═══════════════════════════════════════════ */
.cta-banner {
  background: var(--navy);
  padding: clamp(4rem, 7vw, 6rem) clamp(1.5rem, 5vw, 5rem) 2rem;
}
.cta-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.cta-banner__inner h2 { color: #fff; }
.cta-banner__inner .label { color: rgba(255,255,255,.5); }
.cta-banner__sub {
  margin-top: .8rem;
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
}
.cta-banner__disclaimer {
  margin-top: 1.5rem;
  font-size: .68rem;
  color: rgba(255,255,255,.3);
  letter-spacing: .04em;
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.footer {
  background: var(--navy-soft);
  border-top: 1px solid rgba(255,255,255,.08);
}
.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 3rem;
  padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 5vw, 5rem);
}

.footer__logo-name {
  display: block;
  font-family: var(--heading);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: .1em;
  color: #fff;
}
.footer__logo-sub {
  display: block;
  margin-top: .3rem;
  font-size: .78rem;
  color: rgba(255,255,255,.5);
}
.footer__logo-note {
  display: block;
  margin-top: .2rem;
  font-size: .65rem;
  color: rgba(255,255,255,.25);
}

.footer__heading {
  font-size: .62rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  margin-bottom: 1rem;
}
.footer__nav, .footer__contact {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.footer__nav a {
  font-size: .82rem;
  color: rgba(255,255,255,.65);
  transition: color .2s;
}
.footer__nav a:hover { color: var(--teal); }
.footer__contact p {
  font-size: .82rem;
  color: rgba(255,255,255,.65);
  line-height: 1.6;
}

.footer__bar {
  padding: 1.2rem clamp(1.5rem, 5vw, 5rem);
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .65rem;
  letter-spacing: .06em;
  color: rgba(255,255,255,.3);
}

/* ═══════════════════════════════════════════
   SCROLL ANIMATIONS
   ═══════════════════════════════════════════ */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.service-card:nth-child(2).fade-up { transition-delay: .1s; }
.service-card:nth-child(3).fade-up { transition-delay: .2s; }
.service-card:nth-child(4).fade-up { transition-delay: .3s; }

.why-us__card:nth-child(2).fade-up { transition-delay: .1s; }
.why-us__card:nth-child(3).fade-up { transition-delay: .2s; }

.gallery__item:nth-child(2).fade-up { transition-delay: .08s; }
.gallery__item:nth-child(3).fade-up { transition-delay: .16s; }
.gallery__item:nth-child(4).fade-up { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1; transform: none; transition: none; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — TABLET  (≤ 900px)
   ═══════════════════════════════════════════ */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__cta   { display: none; }
  .nav__burger { display: flex; }

  .hero {
    grid-template-columns: 1fr;
    min-height: 100dvh;
    position: relative;
  }
  .hero__image {
    position: absolute;
    inset: 0;
    z-index: 0;
    height: 100%;
  }
  .hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    transform: none !important;
  }
  .hero__image::after {
    background: none;
  }
  .hero__content {
    position: relative;
    z-index: 2;
    background: var(--white);
    padding: 2.5rem 1.8rem 3rem;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  /* remove the frosted ribbon */
  .hero__content::before { display: none; }
  .hero {
    grid-template-columns: 1fr;
    min-height: 100dvh;
    position: relative;
    display: flex;
    flex-direction: column;
  }
  .hero__image {
    position: relative;
    inset: auto;
    z-index: 0;
    height: 52vw;
    min-height: 220px;
    max-height: 340px;
    flex-shrink: 0;
  }
  .hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
    transform: none !important;
  }
  .services__grid { grid-template-columns: 1fr; }

  .why-us__grid { grid-template-columns: 1fr; gap: 2rem; }

  .gallery__grid { grid-template-columns: repeat(2, 1fr); }

  .visit { grid-template-columns: 1fr; }
  .visit__map { min-height: 320px; }

  .cta-banner__inner { flex-direction: column; align-items: flex-start; }

  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — MOBILE  (≤ 560px)
   ═══════════════════════════════════════════ */
@media (max-width: 560px) {
  h1 { font-size: 2.4rem; }
  h2 { font-size: 1.9rem; }

  .hero__actions { flex-direction: column; align-items: flex-start; gap: 1rem; }

  .services__header { flex-direction: column; align-items: flex-start; }

  .gallery__grid { grid-template-columns: 1fr 1fr; gap: .6rem; }

  .footer__inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer__brand { grid-column: auto; }
}
