/* =========================================================
   Dental Tech Landing — shared styles
   Tailwind CDN handles utilities; this file holds tokens,
   animations, and custom component bits (footer, forms, etc.)
   ========================================================= */

:root {
  --porcelain: #f7f5f1;
  --bone:      #ece7dd;
  --ivory:     #fdfcf9;
  --enamel:    #ffffff;
  --teal:      #2d6a6a;
  --teal-dim:  #4a8a8a;
  --ink:       #1a1f26;
  --slate:     #3d4550;
  --mist:      #4d5560;   /* darkened from #7a8290 for contrast — most visitors are elderly */
  --line:      #d9d3c7;
  --topbar-h:  38px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  -webkit-font-smoothing: antialiased;
  background: var(--porcelain);
  color: var(--slate);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
}
::selection { background: rgba(45,106,106,0.18); color: var(--ink); }

/* ── Top utility bar (phone + address, always visible — most visitors are elderly) ── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: var(--topbar-h);
  background: var(--teal); color: #fff;
  display: flex; align-items: center; justify-content: center;
  gap: 8px 22px; flex-wrap: nowrap; overflow: hidden;
  font-size: 14px; line-height: 1; padding: 0 12px;
}
.topbar a, .topbar span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.topbar a { color: #fff; text-decoration: none; font-weight: 600; }
.topbar a:hover { text-decoration: underline; }
.topbar svg { width: 15px; height: 15px; flex-shrink: 0; }
.topbar .topbar-addr { color: rgba(255,255,255,.92); font-weight: 400; }
@media (max-width: 560px) {
  .topbar { font-size: 13.5px; gap: 0; }
  .topbar .topbar-addr { display: none; }
  .topbar a { font-weight: 700; }
}

/* Grain */
body::after {
  content:''; position: fixed; inset: 0; pointer-events: none; z-index: 9999;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ── Reveal ── */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .8s cubic-bezier(.16,1,.3,1), transform .8s cubic-bezier(.16,1,.3,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: .1s; }
.reveal-d2 { transition-delay: .2s; }
.reveal-d3 { transition-delay: .3s; }

.hero-enter { opacity: 0; transform: translateY(20px); animation: heroIn 1s cubic-bezier(.16,1,.3,1) forwards; }
.hero-enter:nth-child(1) { animation-delay: .15s; }
.hero-enter:nth-child(2) { animation-delay: .3s; }
.hero-enter:nth-child(3) { animation-delay: .45s; }
.hero-enter:nth-child(4) { animation-delay: .6s; }
@keyframes heroIn { to { opacity: 1; transform: translateY(0); } }

.tooth-glow { filter: drop-shadow(0 8px 24px rgba(45,106,106,0.15)); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .hero-enter { opacity: 1; transform: none; animation: none; transition: none; }
}

/* ── Mobile menu ── */
.mobile-menu { display: none; }
.mobile-menu.open { display: flex; }
@media (max-width: 767px) {
  .nav-links { display: none; }
}

/* ── Footer ── */
.site-footer {
  background: var(--ivory);
  border-top: 1px solid var(--line);
  padding: 64px 0 0;
  margin-top: 40px;
}
.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.2fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 900px) { .site-footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 560px) { .site-footer .footer-grid { grid-template-columns: 1fr; } }

.site-footer h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 18px;
  font-weight: 500;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 11px; font-size: 15px; line-height: 1.5; }
.site-footer a { color: var(--slate); text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: var(--teal); text-decoration: underline; }
.site-footer .footer-desc { font-size: 15px; color: var(--slate); margin-bottom: 20px; max-width: 340px; }

.footer-anpc-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 22px;
}
.footer-anpc-badge {
  display: inline-block;
  transition: opacity .2s;
  max-width: 100%;
}
.footer-anpc-badge:hover { opacity: 0.75; }
.footer-anpc-badge img { display: block; height: 44px; width: auto; max-width: 100%; }

.footer-legal {
  background: var(--porcelain);
  border-top: 1px solid var(--line);
  padding: 20px 0;
  margin-top: 48px;
}
.footer-legal-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--mist);
}
.footer-legal a { color: var(--mist); }
.footer-legal a:hover { color: var(--teal); }
@media (max-width: 560px) { .footer-legal-inner { justify-content: center; text-align: center; } }

/* ── Floating WhatsApp button + popup tip ── */
.wa-fab-wrap {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  display: flex; align-items: flex-end; gap: 10px;
}
.wa-fab {
  flex-shrink: 0;
  width: 56px; height: 56px; border-radius: 999px;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(37,211,102,0.45);
  transition: transform .2s;
}
.wa-fab:hover { transform: scale(1.05); }
.wa-fab svg { width: 28px; height: 28px; }

.wa-tip {
  position: relative;
  max-width: 248px;
  background: var(--enamel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 30px 12px 14px;
  box-shadow: 0 14px 36px -12px rgba(26,31,38,0.30);
  font-size: 14px; line-height: 1.45; color: var(--slate);
  margin-bottom: 6px;
  transform-origin: bottom right;
  animation: waTipIn .5s cubic-bezier(.16,1,.3,1) 1.6s both;
}
/* arrow points RIGHT, toward the WhatsApp bubble sitting beside it */
.wa-tip::after {
  content: ''; position: absolute; right: -7px; bottom: 20px;
  width: 13px; height: 13px; background: var(--enamel);
  border-top: 1px solid var(--line); border-right: 1px solid var(--line);
  transform: rotate(45deg);
}
.wa-tip p { font-weight: 600; color: var(--ink); font-size: 14.5px; margin: 0 0 3px; }
.wa-tip span { display: block; color: var(--slate); font-size: 12.5px; line-height: 1.4; }
.wa-tip-close {
  position: absolute; top: 4px; right: 6px;
  background: none; border: 0; cursor: pointer;
  font-size: 18px; line-height: 1; color: var(--mist);
  padding: 2px 6px; border-radius: 6px;
}
.wa-tip-close:hover { color: var(--ink); background: var(--bone); }
.wa-tip.hidden { display: none; }
@keyframes waTipIn { from { opacity: 0; transform: scale(.85) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@media (max-width: 480px) { .wa-tip { max-width: 200px; } }
@media (prefers-reduced-motion: reduce) { .wa-tip { animation: none; } }

/* ── Utility fallback brand-ish badges if tailwind CDN is slow ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--teal); color: var(--ivory);
  padding: 14px 32px; border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  text-decoration: none; transition: all .3s;
}
.btn-primary:hover { background: var(--ink); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(45,106,106,0.25); }
