/* Pi Dentist — Base Styles
   Reset, typography, container, utility classes
   Ported from index.html → WordPress child theme
   All values use CSS custom properties from tokens.css */

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--pi-font-body);
  color: var(--pi-text);
  background: var(--pi-white);
  line-height: 1.7;
  overflow-x: hidden;
  /* Sticky footer: body fills viewport, main expands */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Main content grows to push footer to bottom */
main,
#main-content,
.site-main {
  flex-grow: 1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--pi-transition);
}

ul,
ol {
  list-style: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
}

/* ---------- Typography — Headings ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--pi-font-heading);
  font-weight: 600;
  color: var(--pi-navy);
  line-height: 1.2;
}

h1 {
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.15;
}

h2 {
  font-size: 42px;
  line-height: 1.25;
}

h3 {
  font-size: 22px;
}

h4 {
  font-size: 18px;
}

h5 {
  font-size: 16px;
}

h6 {
  font-size: 14px;
}

/* ---------- Typography — Body ---------- */
p {
  font-size: 16px;
  line-height: 1.7;
}

/* ---------- Container ---------- */
.container {
  max-width: var(--pi-container);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ---------- Section Labels & Headings ---------- */
.section-label {
  font-family: var(--pi-font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--pi-gold-a11y);
  margin-bottom: 16px;
  display: block;
}

.section-heading {
  font-family: var(--pi-font-heading);
  font-size: 42px;
  font-weight: 600;
  color: var(--pi-navy);
  line-height: 1.25;
  margin-bottom: 16px;
}

.section-sub {
  font-size: 17px;
  color: var(--pi-text-soft);
  max-width: 600px;
  line-height: 1.7;
}

/* ---------- Gold Separator ---------- */
.gold-line {
  width: 60px;
  height: 2px;
  background: var(--pi-gold);
  margin: 24px auto 0;
}

/* ---------- Text Link ---------- */
.text-link {
  font-weight: 600;
  font-size: 15px;
  color: var(--pi-gold-a11y);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--pi-transition);
  text-decoration: none;
}

.text-link:hover {
  gap: 10px;
  color: var(--pi-gold-hover);
}

.text-link-navy {
  color: var(--pi-navy);
}

.text-link-navy:hover {
  color: var(--pi-gold);
}

/* ---------- Prose — Content Area ---------- */
.prose {
  max-width: 720px;
  line-height: 1.8;
  font-size: 16px;
  color: var(--pi-text);
}

.prose p {
  margin-bottom: 1.5em;
}

.prose h2 {
  margin-top: 2em;
  margin-bottom: 0.75em;
}

.prose h3 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.prose a {
  color: var(--pi-gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a:hover {
  color: var(--pi-gold-hover);
}

.prose ul,
.prose ol {
  padding-left: 1.5em;
  margin-bottom: 1.5em;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li {
  margin-bottom: 0.5em;
}

/* ---------- Skip to Content (A11y) ---------- */
.skip-to-content,
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 9999;
}

.skip-to-content:focus,
.skip-link:focus {
  position: fixed;
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 12px 24px;
  background: var(--pi-navy);
  color: var(--pi-white);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--pi-radius-btn);
  z-index: 99999;
  outline: 2px solid var(--pi-gold);
  outline-offset: 2px;
  clip: auto;
  white-space: nowrap;
}

/* ---------- Focus Visible ---------- */
:focus-visible {
  outline: 2px solid var(--pi-gold);
  outline-offset: 2px;
}

/* ---------- Screen Reader Only ---------- */
.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;
}

/* ===========================================
   RESPONSIVE — Tablet (max-width: 1199px)
   =========================================== */
@media (max-width: 1199px) {
  .section-heading {
    font-size: 36px;
  }

  h2 {
    font-size: 36px;
  }
}

/* ===========================================
   RESPONSIVE — Mobile (max-width: 767px)
   =========================================== */
@media (max-width: 767px) {
  .container {
    padding: 0 20px;
  }

  .section-heading {
    font-size: 28px;
  }

  .section-sub {
    font-size: 15px;
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 28px;
  }

  h3 {
    font-size: 18px;
  }

  p {
    font-size: 15px;
  }
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
