/* ============================================================
   SmileCraft Dental Clinic — Design System
   Signature motif: the "smile arc" — a soft downward curve used
   as a recurring structural device (dividers, card accents, the
   logo mark, section transitions) echoing the shape of a smile.
   ============================================================ */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ---------- Design Tokens ---------- */
:root {
  /* Color */
  --color-primary: #0A6EBD;
  --color-primary-dark: #06537F;
  --color-primary-tint: #E8F3FB;
  --color-secondary: #FFFFFF;
  --color-accent: #4FD1C5;
  --color-accent-dark: #2FA89C;
  --color-accent-tint: #E6FBF9;
  --color-bg: #F8FAFC;
  --color-bg-alt: #F1F6FA;
  --color-text: #2D3748;
  --color-text-light: #5A6779;
  --color-text-faint: #8896A6;
  --color-border: #E3EAF1;
  --color-gold: #C9A15A; /* used sparingly for premium micro-accents */

  /* Type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --max-width: 1240px;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 2px 10px rgba(10, 40, 70, 0.06);
  --shadow-md: 0 12px 32px rgba(10, 40, 70, 0.10);
  --shadow-lg: 0 24px 60px rgba(10, 40, 70, 0.14);
  --nav-height: 84px;

  /* Motion */
  --ease: cubic-bezier(.4,0,.2,1);
}

/* ---------- Reset ---------- */
* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * , *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 1rem; color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #17324A;
}
h1 { font-size: clamp(2.4rem, 4.2vw, 4rem); font-weight: 600; }
h2 { font-size: clamp(2rem, 3vw, 2.85rem); }
h3 { font-size: clamp(1.3rem, 1.8vw, 1.6rem); }
p { color: var(--color-text-light); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
:focus-visible {
  outline: 2.5px solid var(--color-accent-dark);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}
.section { padding-block: clamp(4rem, 8vw, 7rem); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--alt { background: var(--color-bg-alt); }
.section--dark {
  background: linear-gradient(160deg, #0A3B5C 0%, #0A6EBD 60%, #0B5C9E 100%);
  color: #EAF4FC;
}
.section--dark h2, .section--dark h3, .section--dark p { color: #EAF4FC; }
.section--dark .eyebrow { color: var(--color-accent); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.9rem;
}
.eyebrow::before {
  content: '';
  width: 22px; height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
}

.section-head { max-width: 680px; margin-bottom: 3rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { margin-top: 1rem; font-size: 1.08rem; }

/* Smile-arc divider: signature graphic used under headings */
.smile-arc {
  width: 84px; height: 20px;
  margin-top: 0.9rem;
  display: block;
}
.section-head.center .smile-arc { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.95rem 1.9rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--color-primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-accent {
  background: var(--color-accent);
  color: #05403B;
}
.btn-accent:hover { background: var(--color-accent-dark); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary); color: #fff; transform: translateY(-2px); }
.btn-outline-light {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.55);
}
.btn-outline-light:hover { background: rgba(255,255,255,0.14); border-color: #fff; }
.btn-lg { padding: 1.15rem 2.4rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: rgba(248, 250, 252, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(255,255,255,0.92);
  border-bottom-color: var(--color-border);
  box-shadow: 0 6px 24px rgba(10,40,70,0.06);
}
.nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: 0.65rem; }
.brand-mark { width: 38px; height: 38px; flex-shrink: 0; }
.brand-word {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 700;
  color: #123049;
  letter-spacing: -0.01em;
}
.brand-word span { color: var(--color-primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.1rem;
}
.nav-links ul {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2.1rem;
  list-style: none;
}
.nav-links a {
  position: relative;
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--color-text-light);
  padding: 0.4rem 0.05rem;
  transition: color 0.2s var(--ease);
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%; height: 2px;
  background: var(--color-accent-dark);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease);
}
.nav-links a:hover { color: var(--color-primary); }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav-links a[aria-current="page"] { color: var(--color-primary); }

.nav-cta { display: flex; align-items: center; gap: 1rem; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 26px;
  z-index: 1200;
}
.nav-toggle span {
  height: 2px; width: 100%;
  background: var(--color-primary-dark);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-links {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(78vw, 340px);
    background: #fff;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 2rem 2.5rem;
    gap: 1.6rem;
    box-shadow: -18px 0 50px rgba(10,40,70,0.12);
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
  }
  .nav-links.is-open { transform: translateX(0); }
  .nav-links ul {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 1.6rem;
  }
  .nav-links a { font-size: 1.15rem; }
  .nav-cta .btn-primary { display: none; }
  .nav-toggle { display: flex; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: #0B2E47;
  color: #C9D9E6;
  padding-block: 4.5rem 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.09);
}
.footer-brand .brand-word { color: #fff; }
.footer-brand p { color: #A9BFD1; margin-top: 1rem; max-width: 30ch; }
.footer-col h4 { color: #fff; font-family: var(--font-body); font-size: 0.92rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 1.1rem; }
.footer-col ul { display: flex; flex-direction: column; gap: 0.7rem; }
.footer-col a, .footer-col li { color: #A9BFD1; font-size: 0.95rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--color-accent); }
.social-row { display: flex; gap: 0.7rem; margin-top: 1.3rem; }
.social-row a {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.social-row a:hover { background: var(--color-accent); border-color: var(--color-accent); transform: translateY(-3px); }
.social-row svg { width: 16px; height: 16px; }
.newsletter-form { display: flex; margin-top: 1rem; gap: 0.5rem; }
.newsletter-form input {
  flex: 1;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  padding: 0.7rem 1.1rem;
  color: #fff;
  font-size: 0.9rem;
}
.newsletter-form input::placeholder { color: #90A9BE; }
.newsletter-form button {
  background: var(--color-accent);
  color: #05403B;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.6rem 0;
  font-size: 0.85rem;
  color: #85A0B6;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.footer-bottom a:hover { color: #fff; }
.footer-legal { display: flex; gap: 1.4rem; }

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

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 1.6rem; bottom: 1.6rem;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), background 0.2s;
  z-index: 900;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--color-primary-dark); }

/* ---------- Floating mobile booking button ---------- */
.floating-book {
  display: none;
  position: fixed;
  left: 1rem; right: 1rem; bottom: 1rem;
  z-index: 950;
}
@media (max-width: 720px) {
  .floating-book { display: block; }
  .floating-book .btn { width: 100%; box-shadow: var(--shadow-lg); }
}

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

/* ---------- Grids ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.grid-2 > * { min-width: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6rem; }
@media (max-width: 960px) {
  .grid-2 { grid-template-columns: 1fr; gap: 2.2rem; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- Stats / counters ---------- */
.stat-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.stat-item { text-align: center; }
.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 700;
  color: var(--color-primary);
}
.stat-item .stat-label {
  font-size: 0.86rem;
  color: var(--color-text-light);
  margin-top: 0.3rem;
  font-weight: 600;
}
@media (max-width: 760px) {
  .stat-bar { grid-template-columns: repeat(2, 1fr); row-gap: 2rem; }
}

/* ---------- Breadcrumb / page hero (inner pages) ---------- */
.page-hero {
  padding-top: calc(var(--nav-height) + 4.5rem);
  padding-bottom: 3.5rem;
  background: linear-gradient(180deg, var(--color-primary-tint) 0%, var(--color-bg) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero .eyebrow { justify-content: center; }
.page-hero p.lead { max-width: 620px; margin: 1rem auto 0; font-size: 1.1rem; }
.breadcrumb {
  display: flex; justify-content: center; gap: 0.5rem;
  font-size: 0.85rem; color: var(--color-text-faint);
  margin-top: 1.4rem;
}
.breadcrumb a:hover { color: var(--color-primary); }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-lg { margin-top: 3rem; }
.tag-pill {
  display: inline-block;
  background: var(--color-accent-tint);
  color: var(--color-accent-dark);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
}
