/* ============================================================
   styles.css — Dr. Gaznick site
   Plain CSS, no preprocessor. Edit the variables in :root below
   to change colors, spacing, and typography across the whole site.
   ============================================================ */


/* ---------- 1. Design tokens (edit these to retheme) ---------- */
:root {
  /* Colors */
  --color-bg:         #fbfaf7;   /* page background (warm off-white) */
  --color-surface:    #f3f0ea;   /* alternating section background */
  --color-text:       #1f2730;   /* primary text */
  --color-muted:      #5b6470;   /* secondary text */
  --color-accent:     #009193;   /* brand accent (Common Teal) */
  --color-accent-2:   #006d6e;   /* accent hover/darker */
  --color-border:     #e3ddd1;   /* subtle dividers */

  /* Typography */
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Sizing */
  --container-width:        1040px;
  --container-width-narrow:  760px;
  --radius:    4px;
  --radius-lg: 8px;
}


/* ---------- 2. Base reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--color-accent-2); }

address {
  font-style: normal;
  color: var(--color-muted);
}


/* ---------- 3. Typography ---------- */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.1rem); margin-bottom: 0.6em; }
h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: 0; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0 0 0.9em;
}


/* ---------- 4. Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.container.narrow { max-width: var(--container-width-narrow); }


/* ---------- 5. Skip-to-content link (keyboard accessibility) ---------- */
.skip-link {
  position: absolute;
  top: -40px;
  left: 1rem;
  background: var(--color-text);
  color: #fff;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius);
  text-decoration: none;
  z-index: 100;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 0.75rem;
  color: #fff;
}


/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-accent-2);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-lg {
  padding: 0.95rem 1.8rem;
  font-size: 1rem;
}


/* ---------- 7. Header / navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 1rem;
}

.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--color-text);
  line-height: 1.15;
}
.brand-name {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 0.85rem + 0.6vw, 1.25rem);
  font-weight: 500;
}
.brand-tag {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-top: 2px;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.primary-nav a {
  font-size: 0.95rem;
  color: var(--color-text);
  text-decoration: none;
}
.primary-nav a:hover { color: var(--color-accent); }

.primary-nav .nav-cta {
  margin-left: 0.5rem;
  color: #fff;
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
}

/* Hamburger button — hidden on desktop, shown on mobile */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: var(--color-text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}


/* ---------- 8. Hero ---------- */
.hero {
  padding: clamp(4rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--color-border);
}
.hero-inner { max-width: 760px; }
.hero-title {
  font-size: clamp(2.2rem, 1.5rem + 2.6vw, 3.3rem);
  margin-bottom: 1rem;
}
.hero-sub {
  font-size: 1.1rem;
  color: var(--color-muted);
  margin-bottom: 2rem;
  max-width: 56ch;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}


/* ---------- 9. Generic section ---------- */
.section {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
}
.section-alt {
  background: var(--color-surface);
}

.section-heading {
  margin-bottom: 2.5rem;
  max-width: 640px;
}
.section-heading.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.section-lede {
  color: var(--color-muted);
  font-size: 1.05rem;
  margin-top: 0.5rem;
}


/* ---------- 10. About (two-column: headshot + bio) ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}
@media (min-width: 820px) {
  .about-grid {
    grid-template-columns: 0.85fr 1.4fr;
    gap: 4rem;
  }
}
.about-image img {
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  box-shadow: 0 12px 30px -16px rgba(0, 0, 0, 0.25);
}
.about-body p { font-size: 1.05rem; }


/* ---------- 11. Services grid ---------- */
.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .service-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 980px) {
  .service-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.service-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.service-card h3 {
  margin-bottom: 0.5rem;
  color: var(--color-accent);
}
.service-card p {
  color: var(--color-muted);
  font-size: 0.97rem;
}


/* ---------- 12. Approach principles ---------- */
.principle-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}
@media (min-width: 720px) {
  .principle-list { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}
.principle-list li {
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
}
.principle-list h3 {
  margin-bottom: 0.4rem;
  color: var(--color-text);
}
.principle-list p {
  color: var(--color-muted);
}


/* ---------- 13. FAQ (uses native <details>) ---------- */
.faq details {
  border-top: 1px solid var(--color-border);
  padding: 1.1rem 0;
}
.faq details:last-of-type {
  border-bottom: 1px solid var(--color-border);
}
.faq summary {
  list-style: none;            /* hide default marker */
  cursor: pointer;
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--color-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--font-sans);
  font-size: 1.4rem;
  line-height: 1;
  color: var(--color-accent);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after {
  content: "\2013";            /* en-dash when expanded */
}
.faq details p {
  margin-top: 0.8rem;
  color: var(--color-muted);
}


/* ---------- 14. Contact ---------- */
.contact-cta {
  text-align: center;
  margin-bottom: 2.5rem;
}
.contact-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0 0 1rem;
}
.contact-meta {
  margin: 1.25rem 0 0;
  color: var(--color-muted);
}
.contact-meta a { color: var(--color-text); }
.contact-meta .sep { margin: 0 0.5rem; color: var(--color-border); }

.portal-block {
  text-align: center;
  max-width: 540px;
  margin: 0 auto 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--color-border);
}
.portal-block h3 { margin-bottom: 0.5rem; }
.portal-block > p {
  color: var(--color-muted);
  margin-bottom: 1.25rem;
}

.locations {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  max-width: 820px;
  margin: 0 auto;
}
@media (min-width: 720px) {
  .locations { grid-template-columns: 1fr 1fr; }
}
.location-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.location-card h3 { margin-bottom: 0.5rem; }
.location-card address { margin-bottom: 1rem; }
.map-link {
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}
.map-link:hover { text-decoration: underline; }


/* ---------- 15. Footer ---------- */
.site-footer {
  background: var(--color-text);
  color: #d6d9dd;
  padding: 2.5rem 0;
  font-size: 0.9rem;
}
.footer-inner { text-align: center; }
.footer-emergency {
  max-width: 640px;
  margin: 0 auto 1rem;
  color: #e9ebef;
}
.footer-emergency strong { color: #fff; }
.footer-meta { color: #9ca3af; margin: 0 0 0.5rem; }
.footer-disclaimer { color: #9ca3af; margin: 0; font-size: 0.82rem; }
.site-footer a { color: #e9ebef; }


/* ---------- 16. Mobile navigation ---------- */
@media (max-width: 820px) {
  .nav-toggle { display: block; }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 0.5rem 1.5rem 1.25rem;
    /* Hidden by default on mobile; toggled by JS */
    display: none;
  }
  .primary-nav.is-open { display: flex; }

  .primary-nav a {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--color-border);
  }
  .primary-nav a:last-child { border-bottom: 0; }

  .primary-nav .nav-cta {
    margin: 0.75rem 0 0;
    text-align: center;
  }

  /* Animate hamburger into an X when menu is open */
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}


/* ---------- 17. Accessibility & motion ---------- */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius);
}

/* Hide content visually but keep it available to screen readers.
   Used on "(opens in a new tab)" hints next to external portal links. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
