/* ==========================================================================
   Dr.N's Dentistry: shared stylesheet
   Theme: Sakura Dawn (21st.dev) + Fraunces display
   ========================================================================== */

:root {
  /* Sakura Dawn tokens */
  --card: #FFFFFF;
  --ring: #FF7EA5;
  --input: #EBE0DA;
  --muted: #FAF3F0;
  --accent: #FFDBE4;
  --border: #EBE0DA;
  --radius: 0.5rem;
  --popover: #FFFFFF;
  --primary: #FF7EA5;
  --primary-hover: #F96A96;
  --secondary: #F3EBE6;
  --background: #FFF9F6;
  --foreground: #5C4B43;
  --destructive: #E5484D;
  --card-foreground: #5C4B43;
  --muted-foreground: #A18E84;
  --accent-foreground: #B33E5D;
  --primary-foreground: #FFFFFF;
  --secondary-foreground: #5C4B43;
  --whatsapp: #25D366;

  /* Type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(92, 75, 67, .05);
  --shadow-sm: 0 2px 8px rgba(92, 75, 67, .06);
  --shadow-md: 0 6px 24px rgba(92, 75, 67, .08);
  --shadow-lg: 0 16px 48px rgba(92, 75, 67, .10);

  /* Rhythm */
  --gutter: 24px;
  --max: 1180px;
  --section-y: 96px;
}

@media (max-width: 768px) {
  :root { --section-y: 64px; --gutter: 20px; }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Type scale ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.12;
  font-variation-settings: 'SOFT' 20, 'WONK' 0;
}

.h-display { font-size: clamp(2.4rem, 5.4vw, 4rem); }
.h-section { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
.h-card    { font-size: 1.2rem; letter-spacing: -0.02em; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
  display: block;
}

.lede {
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  color: var(--muted-foreground);
  max-width: 58ch;
}

.mono { font-family: var(--font-mono); letter-spacing: 0; }

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section--muted { background: var(--muted); }
.section--accent { background: linear-gradient(170deg, #FFF3F6 0%, var(--background) 100%); }

.section-head { max-width: 62ch; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { margin-top: 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 14px 26px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .15s ease, box-shadow .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 4px 14px rgba(255, 126, 165, .32);
}
.btn--primary:hover { background: var(--primary-hover); box-shadow: 0 6px 20px rgba(255, 126, 165, .42); }

.btn--outline {
  background: var(--card);
  border-color: var(--border);
  color: var(--foreground);
}
.btn--outline:hover { border-color: var(--primary); color: var(--accent-foreground); }

.btn--ghost { background: transparent; color: var(--accent-foreground); padding-inline: 4px; }
.btn--ghost:hover { color: var(--primary); }

.btn--sm { padding: 10px 18px; font-size: 14px; border-radius: 9px; }
.btn--block { width: 100%; }

.btn svg { width: 17px; height: 17px; flex-shrink: 0; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 249, 246, .82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.header.is-stuck { border-bottom-color: var(--border); box-shadow: var(--shadow-xs); }

.header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 72px;
}

.logo { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.logo__mark {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--primary);
  display: grid; place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-size: 18px; font-weight: 600;
  box-shadow: 0 3px 10px rgba(255, 126, 165, .3);
}
.logo__text { line-height: 1.15; }
.logo__name { font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -0.025em; }
.logo__sub { font-size: 10.5px; color: var(--muted-foreground); font-family: var(--font-mono); letter-spacing: .04em; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground);
  white-space: nowrap;
  transition: background .18s ease, color .18s ease;
}
@media (max-width: 1240px) {
  .nav a { padding: 8px 9px; font-size: 13.5px; }
  .logo__sub { display: none; }
}
.nav a:hover { background: var(--muted); }
.nav a.is-active { color: var(--accent-foreground); background: var(--accent); }

.header__cta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}
.icon-btn:hover { border-color: var(--primary); color: var(--accent-foreground); }
.icon-btn svg { width: 18px; height: 18px; }

.burger { display: none; }

@media (max-width: 1000px) {
  .nav { display: none; }
  .burger { display: grid; }
  .header__cta .btn { display: none; }
}

/* Mobile drawer */
.drawer {
  position: fixed; inset: 0;
  z-index: 90;
  background: var(--background);
  padding: 24px var(--gutter);
  display: none;
  flex-direction: column;
}
.drawer.is-open { display: flex; }
.drawer__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
.drawer nav { display: flex; flex-direction: column; gap: 2px; }
.drawer nav a {
  font-family: var(--font-display);
  font-size: 26px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.drawer__foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-bottom: 20px; }

/* ---------- Footer ---------- */
.footer { background: var(--muted); border-top: 1px solid var(--border); padding-block: 64px 0; }
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
}
.footer h4 {
  font-family: var(--font-sans);
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted-foreground);
  margin-bottom: 16px;
}
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer li a { font-size: 14.5px; color: var(--foreground); transition: color .18s ease; }
.footer li a:hover { color: var(--accent-foreground); }
.footer__about p { font-size: 14.5px; color: var(--muted-foreground); margin-top: 14px; max-width: 34ch; }
.footer__bar {
  border-top: 1px solid var(--border);
  padding-block: 22px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted-foreground);
}
.footer__bar a { color: var(--muted-foreground); }
.footer__bar a:hover { color: var(--accent-foreground); }
.footer__legal { display: flex; gap: 18px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 520px) {
  .footer__grid { grid-template-columns: 1fr; }
}

/* ---------- Floating actions ---------- */
.fab {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 70;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--whatsapp);
  color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 6px 22px rgba(37, 211, 102, .38);
  transition: transform .2s ease, box-shadow .2s ease;
}
.fab:hover { transform: scale(1.06); box-shadow: 0 8px 28px rgba(37, 211, 102, .5); }
.fab svg { width: 27px; height: 27px; }

.mobile-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 65;
  display: none;
  background: rgba(255, 249, 246, .95);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
  gap: 8px;
}
.mobile-bar a {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 4px;
  border-radius: 9px;
  font-size: 11px; font-weight: 600;
  color: var(--muted-foreground);
}
.mobile-bar a svg { width: 19px; height: 19px; }
.mobile-bar a.pri { background: var(--primary); color: #fff; }

@media (max-width: 768px) {
  .mobile-bar { display: flex; }
  .fab { bottom: 86px; }
  body { padding-bottom: 68px; }
}

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow .25s ease, border-color .25s ease, transform .25s ease;
}
.card:hover { box-shadow: var(--shadow-md); border-color: #E2D3CB; }

.grid { display: grid; gap: 18px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* ---------- Pills / badges ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px;
  border-radius: 40px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 13px; font-weight: 500;
}
.pill--accent { background: var(--accent); border-color: #FFC9D8; color: var(--accent-foreground); }
.pill svg { width: 14px; height: 14px; }

.stars { display: inline-flex; gap: 2px; color: #F5A623; }
.stars svg { width: 15px; height: 15px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13.5px; font-weight: 600; }
.field input, .field select, .field textarea {
  padding: 13px 15px;
  border-radius: 10px;
  border: 1px solid var(--input);
  background: var(--card);
  font-size: 15px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 126, 165, .16);
}
.field .hint { font-size: 12.5px; color: var(--muted-foreground); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(20px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .55s cubic-bezier(.22,.61,.36,1), transform .55s cubic-bezier(.22,.61,.36,1);
}
.reveal[data-delay="1"].is-in { transition-delay: .09s; }
.reveal[data-delay="2"].is-in { transition-delay: .18s; }
.reveal[data-delay="3"].is-in { transition-delay: .27s; }
.reveal[data-delay="4"].is-in { transition-delay: .36s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

/* ---------- Utility ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.center { text-align: center; }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }

/* Placeholder photo slots. Replace with real clinic photography */
.photo {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background:
    linear-gradient(135deg, #F6E7EC 0%, #EFE2DC 100%);
  display: grid; place-items: center;
  border: 1px solid var(--border);
}
.photo::after {
  content: attr(data-label);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #C9B3AA;
  padding: 0 20px;
  text-align: center;
}
.photo img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }

/* Stacked CTAs match width on narrow screens */
@media (max-width: 560px) {
  .hero__actions, .band__actions, .ty__actions, .nf__actions { width: 100%; }
  .hero__actions .btn, .band__actions .btn, .ty__actions .btn, .nf__actions .btn { flex: 1 1 100%; }
}

/* ==========================================================================
   Loading screen
   ========================================================================== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--background);
  display: grid;
  place-items: center;
  transition: opacity .5s ease, visibility .5s ease;
}
.loader.is-done { opacity: 0; visibility: hidden; }

.loader__inner { display: grid; justify-items: center; gap: 22px; }

.loader__mark {
  width: 66px; height: 66px;
  border-radius: 20px;
  background: var(--primary);
  color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 30px; font-weight: 600;
  box-shadow: 0 8px 26px rgba(255, 126, 165, .34);
  animation: loaderPulse 1.6s ease-in-out infinite;
}
@keyframes loaderPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 8px 26px rgba(255,126,165,.34); }
  50%      { transform: scale(1.06); box-shadow: 0 12px 34px rgba(255,126,165,.46); }
}

.loader__name {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--foreground);
}

.loader__bar {
  width: 150px; height: 3px;
  border-radius: 3px;
  background: var(--border);
  overflow: hidden;
}
.loader__bar span {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: 3px;
  background: var(--primary);
  animation: loaderSlide 1.15s ease-in-out infinite;
}
@keyframes loaderSlide {
  0%   { transform: translateX(-110%); }
  100% { transform: translateX(310%); }
}

/* Nothing paints under the loader until it lifts */
body.is-loading { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .loader__mark, .loader__bar span { animation: none; }
  .loader { transition: none; }
}
