/* ==========================================================================
   DENTAL PRACTICE — Global CSS
   Affordable Dentist Marketing
   Stack: Kadence Theme Child | DM Sans + DM Serif Display
   ========================================================================== */

/* ─── 1. DESIGN TOKENS ─────────────────────────────────────────────────── */
:root {
  /* Brand Colors — update per client */
  --clr-primary:       #1A6B5C;   /* deep teal — main brand */
  --clr-primary-light: #2A8A77;
  --clr-primary-dark:  #124D42;
  --clr-accent:        #E8F4F1;   /* soft teal tint */
  --clr-gold:          #C8A96E;   /* trust/luxury accent */

  /* Neutrals */
  --clr-white:         #FFFFFF;
  --clr-off-white:     #F8FAF9;
  --clr-light:         #F0F4F2;
  --clr-border:        #E2EAE7;
  --clr-text:          #1C2B27;
  --clr-text-muted:    #6B8078;
  --clr-text-light:    #9BB0AB;

  /* Semantic */
  --clr-success:       #2E7D6B;
  --clr-error:         #C0392B;
  --clr-warning:       #E67E22;

  /* Typography */
  --font-display:     'DM Serif Display', Georgia, serif;
  --font-body:        'DM Sans', system-ui, sans-serif;

  --text-xs:    0.75rem;    /* 12px */
  --text-sm:    0.875rem;   /* 14px */
  --text-base:  1rem;       /* 16px */
  --text-md:    1.125rem;   /* 18px */
  --text-lg:    1.25rem;    /* 20px */
  --text-xl:    1.5rem;     /* 24px */
  --text-2xl:   1.875rem;   /* 30px */
  --text-3xl:   2.25rem;    /* 36px */
  --text-4xl:   3rem;       /* 48px */
  --text-5xl:   3.75rem;    /* 60px */
  --text-hero:  clamp(2.5rem, 5vw, 4.5rem);

  /* Spacing */
  --sp-1:   0.25rem;
  --sp-2:   0.5rem;
  --sp-3:   0.75rem;
  --sp-4:   1rem;
  --sp-5:   1.25rem;
  --sp-6:   1.5rem;
  --sp-8:   2rem;
  --sp-10:  2.5rem;
  --sp-12:  3rem;
  --sp-16:  4rem;
  --sp-20:  5rem;
  --sp-24:  6rem;
  --sp-32:  8rem;

  /* Section vertical padding */
  --section-py:   clamp(3rem, 6vw, 5rem);
  --section-px:   clamp(1.25rem, 5vw, 2rem);

  /* Container */
  --container-xs:  480px;
  --container-sm:  640px;
  --container-md:  768px;
  --container-lg:  1024px;
  --container-xl:  1200px;
  --container-2xl: 1400px;

  /* Radius */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(26,107,92,.08), 0 1px 2px rgba(26,107,92,.04);
  --shadow-md:  0 4px 16px rgba(26,107,92,.10), 0 2px 6px rgba(26,107,92,.06);
  --shadow-lg:  0 10px 40px rgba(26,107,92,.14), 0 4px 12px rgba(26,107,92,.08);
  --shadow-xl:  0 20px 60px rgba(26,107,92,.16);

  /* Transitions */
  --ease:      cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast:  150ms;
  --dur-base:  250ms;
  --dur-slow:  400ms;

  /* Z-index layers */
  --z-below:    -1;
  --z-base:     0;
  --z-raised:   10;
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-modal:    300;
  --z-toast:    400;
}

/* ─── 2. RESET & BASE ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.7;
  color: var(--clr-text);
  background: var(--clr-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--clr-primary);
  text-decoration: none;
  transition: color var(--dur-base) var(--ease);
}
a:hover { color: var(--clr-primary-dark); }

ul, ol { list-style: none; }

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ─── 3. TYPOGRAPHY ─────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  color: var(--clr-text);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--text-hero); }
h2 { font-size: clamp(var(--text-2xl), 3.5vw, var(--text-4xl)); }
h3 { font-size: clamp(var(--text-xl), 2.5vw, var(--text-2xl)); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-md); font-family: var(--font-body); font-weight: 600; }
h6 { font-size: var(--text-base); font-family: var(--font-body); font-weight: 600; }

p { margin-bottom: var(--sp-4); }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: var(--text-md);
  color: var(--clr-text-muted);
  line-height: 1.8;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-primary);
  margin-bottom: var(--sp-3);
}

/* ─── 4. LAYOUT UTILITIES ───────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--section-px);
}

.container--sm  { max-width: var(--container-sm); }
.container--md  { max-width: var(--container-md); }
.container--lg  { max-width: var(--container-lg); }
.container--2xl { max-width: var(--container-2xl); }

.section {
  padding-block: var(--section-py);
}

.section--sm { padding-block: clamp(2rem, 4vw, 3rem); }
.section--lg { padding-block: clamp(4rem, 8vw, 7rem); }

.section--light { background: var(--clr-off-white); }
.section--teal  { background: var(--clr-accent); }
.section--dark  { background: var(--clr-text); color: var(--clr-white); }
.section--primary { background: var(--clr-primary); color: var(--clr-white); }

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

.flex { display: flex; }
.flex--center { align-items: center; justify-content: center; }
.flex--between { align-items: center; justify-content: space-between; }
.flex--col { flex-direction: column; }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }
.gap-8 { gap: var(--sp-8); }

.text-center { text-align: center; }
.text-left   { text-align: left; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* ─── 5. SECTION HEADINGS ────────────────────────────────────────────────── */
.section-heading {
  max-width: 640px;
  margin-bottom: var(--sp-12);
}
.section-heading--center {
  text-align: center;
  margin-inline: auto;
}
.section-heading h2 { margin-bottom: var(--sp-4); }
.section-heading p  { color: var(--clr-text-muted); font-size: var(--text-md); }

/* Decorative rule under headings */
.section-heading h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 2px;
  background: var(--clr-gold);
  margin-top: var(--sp-4);
}
.section-heading--center h2::after {
  margin-inline: auto;
}

/* ─── 6. SCROLL ANIMATIONS ──────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal--left  { transform: translateX(-24px); }
.reveal--right { transform: translateX(24px); }
.reveal--left.is-visible,
.reveal--right.is-visible { transform: translateX(0); }

/* Stagger children */
.stagger-children > *:nth-child(1) { transition-delay: 0ms; }
.stagger-children > *:nth-child(2) { transition-delay: 80ms; }
.stagger-children > *:nth-child(3) { transition-delay: 160ms; }
.stagger-children > *:nth-child(4) { transition-delay: 240ms; }
.stagger-children > *:nth-child(5) { transition-delay: 320ms; }
.stagger-children > *:nth-child(6) { transition-delay: 400ms; }

/* ─── 7. RESPONSIVE ─────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: 1fr; }

  .section-heading { margin-bottom: var(--sp-8); }
}
