/* =============================================
   DR. WHITEHEAD — STYLESHEET
   Design tokens: slate-blue + warm white
   Typography: Lora (display) + Inter (body)
   ============================================= */

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

:root {
  /* Palette */
  --navy:       #1B2D45;   /* deep trust blue — headings, nav */
  --slate:      #3A5A7C;   /* mid blue — links, accents */
  --sky:        #5B8DB8;   /* lighter blue — borders, subtle */
  --fog:        #EEF2F7;   /* near-white blue — alt sections */
  --white:      #FFFFFF;
  --ink:        #2C3A47;   /* near-black body text */
  --muted:      #637282;   /* secondary text */
  --sage:       #7EA88B;   /* accent green — trust, calm */
  --sage-light: #EBF3EE;   /* green tint bg */
  --amber:      #C87941;   /* warm CTA highlight */
  --amber-dark: #A8622E;

  /* Type scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  2.875rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Radii */
  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(27,45,69,0.08);
  --shadow:    0 4px 16px rgba(27,45,69,0.10);
  --shadow-lg: 0 8px 32px rgba(27,45,69,0.14);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3 {
  font-family: 'Lora', Georgia, serif;
  line-height: 1.25;
  color: var(--navy);
}
h1 { font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl)); font-weight: 600; }
h2 { font-size: clamp(var(--text-2xl), 3.5vw, var(--text-3xl)); font-weight: 600; }
h3 { font-size: var(--text-xl); font-weight: 600; }

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

a { color: var(--slate); text-decoration: none; }
a:hover { color: var(--navy); }

strong { font-weight: 600; }
em { font-style: italic; }

.section-label {
  font-family: 'Inter', sans-serif;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: var(--space-3);
  display: block;
}

.section-intro {
  font-size: var(--text-lg);
  color: var(--muted);
  margin-bottom: var(--space-8);
  line-height: 1.7;
}

/* --- LAYOUT --- */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section { padding: var(--space-20) 0; }
.section-alt { background: var(--fog); }

/* --- BUTTONS --- */
.btn {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.12s, box-shadow 0.18s;
  text-align: center;
  line-height: 1.2;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--amber);
  color: var(--white);
  border-color: var(--amber);
}
.btn-primary:hover {
  background: var(--amber-dark);
  border-color: var(--amber-dark);
  color: var(--white);
  box-shadow: var(--shadow);
}

.btn-outline {
  background: transparent;
  color: var(--slate);
  border-color: var(--sky);
}
.btn-outline:hover {
  background: var(--fog);
  color: var(--navy);
  border-color: var(--slate);
}

.btn-white {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}
.btn-white:hover {
  background: var(--fog);
  color: var(--navy);
  border-color: var(--fog);
}

.btn-large { padding: 1rem 2rem; font-size: var(--text-base); }
.btn-full  { width: 100%; }

/* --- HEADER / NAV --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid rgba(27,45,69,0.08);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  height: 72px;
}

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  flex-shrink: 0;
  text-decoration: none;
}
.logo-name {
  font-family: 'Lora', serif;
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--navy);
}
.logo-credential {
  font-size: var(--text-xs);
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.main-nav { flex: 1; }
.main-nav ul {
  display: flex;
  list-style: none;
  gap: var(--space-6);
  justify-content: center;
}
.main-nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--navy);
  border-bottom-color: var(--amber);
}

.nav-cta { flex-shrink: 0; }

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  margin-left: auto;
}
.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* --- HERO --- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--slate) 100%);
  color: var(--white);
  padding: var(--space-20) 0;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-16);
  align-items: center;
}

.hero-eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: var(--space-4);
}

.hero h1 {
  color: var(--white);
  margin-bottom: var(--space-6);
}

.hero-sub {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.82);
  max-width: 560px;
  margin-bottom: var(--space-8);
  line-height: 1.7;
}

.hero-note {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.55);
  margin-top: var(--space-3);
  margin-bottom: 0;
}

.hero-photo-wrap {
  display: flex;
  justify-content: center;
}

.hero-photo {
  width: 100%;
  max-width: 340px;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 48px rgba(0,0,0,0.35);
  display: block;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.12);
}

/* --- VALUE BADGES --- */
.value-badges {
  background: var(--navy);
  padding: var(--space-8) 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.badge-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  list-style: none;
}

.badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-4);
  gap: var(--space-2);
}

.badge-icon { font-size: 1.75rem; line-height: 1; }

.badge strong {
  font-family: 'Lora', serif;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--white);
}

.badge span {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
}

/* --- ABOUT SECTION --- */
.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: start;
}

.about-text h2 { margin-bottom: var(--space-6); }
.about-text p  { color: var(--muted); }
.about-text .btn { margin-top: var(--space-6); }

.about-credentials {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.credential-card {
  background: var(--fog);
  border: 1px solid rgba(27,45,69,0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.credential-card h3 {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sage);
  margin-bottom: var(--space-4);
}

.credential-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.credential-card li {
  font-size: var(--text-sm);
  color: var(--ink);
  padding-left: var(--space-4);
  position: relative;
}
.credential-card li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--sky);
}

/* --- TELEHEALTH / EVIDENCE --- */
.telehealth-inner { text-align: center; }
.telehealth-inner h2 { margin-bottom: var(--space-4); }
.telehealth-inner .section-intro { margin: 0 auto var(--space-10); }

.evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-8);
  text-align: left;
}

.evidence-card {
  background: var(--white);
  border: 1px solid rgba(27,45,69,0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.evidence-source {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: var(--space-3);
}

.evidence-card p:not(.evidence-source) {
  font-size: var(--text-sm);
  color: var(--muted);
  font-style: italic;
  line-height: 1.7;
  margin-bottom: var(--space-4);
}

.evidence-link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--slate);
}
.evidence-link:hover { color: var(--navy); }

/* --- CTA STRIP --- */
.cta-strip {
  background: linear-gradient(135deg, var(--slate) 0%, var(--navy) 100%);
  padding: var(--space-16) 0;
}

.cta-strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
}

.cta-strip h2 {
  color: var(--white);
  margin-bottom: var(--space-3);
}
.cta-strip p { color: rgba(255,255,255,0.75); margin-bottom: 0; }

.cta-strip-actions { flex-shrink: 0; text-align: center; }
.cta-contact-line {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.6);
  margin-top: var(--space-3);
}
.cta-contact-line a { color: rgba(255,255,255,0.85); font-weight: 600; }
.cta-contact-line a:hover { color: var(--white); }

/* --- PAGE HERO (inner pages) --- */
.page-hero {
  background: var(--fog);
  padding: var(--space-16) 0;
  border-bottom: 1px solid rgba(27,45,69,0.08);
}
.page-hero h1 { margin-bottom: var(--space-4); }
.page-hero-sub {
  font-size: var(--text-lg);
  color: var(--muted);
  max-width: 600px;
}

/* --- SERVICES --- */
.service-block {
  padding: var(--space-8) 0;
  border-bottom: 1px solid rgba(27,45,69,0.08);
  max-width: 720px;
}
.service-block:last-child { border-bottom: none; }
.service-block h2 { margin-bottom: var(--space-3); }
.service-block p  { color: var(--muted); }

/* --- PRICING --- */
.pricing-inner { text-align: center; }
.pricing-inner h2 { margin-bottom: var(--space-10); }

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  max-width: 720px;
  margin: 0 auto var(--space-8);
  text-align: left;
}

.pricing-card {
  background: var(--white);
  border: 1px solid rgba(27,45,69,0.10);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
}

.pricing-card.featured {
  border-color: var(--amber);
  box-shadow: 0 0 0 1px var(--amber), var(--shadow);
}

.pricing-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: var(--space-2);
}

.pricing-amount {
  font-family: 'Lora', serif;
  font-size: var(--text-5xl);
  font-weight: 600;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 0;
}

.pricing-unit {
  font-size: var(--text-sm);
  color: var(--muted);
  margin-bottom: var(--space-6);
}

.pricing-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.pricing-card li {
  font-size: var(--text-sm);
  color: var(--ink);
  padding-left: var(--space-4);
  position: relative;
}
.pricing-card li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--sage);
  font-weight: 600;
}

.pricing-note {
  font-size: var(--text-sm);
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* --- TESTIMONIALS --- */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.testimonial {
  background: var(--fog);
  border-left: 3px solid var(--sage);
  border-radius: var(--radius);
  padding: var(--space-6);
}
.testimonial p {
  font-size: var(--text-base);
  color: var(--ink);
  font-style: italic;
  line-height: 1.7;
}

/* --- RESEARCH --- */
.research-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  margin-top: var(--space-8);
  max-width: 760px;
}

.research-item {
  background: var(--white);
  border: 1px solid rgba(27,45,69,0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
}
.research-item h3 { font-size: var(--text-xl); margin-bottom: var(--space-3); }
.research-item p:not(.research-source) {
  color: var(--muted);
  font-style: italic;
  margin-bottom: var(--space-4);
}
.research-source {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: var(--space-2);
}

/* --- CONTACT --- */
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: var(--space-12);
  align-items: start;
}

.contact-form-wrap h2 { margin-bottom: var(--space-2); }
.form-note {
  font-size: var(--text-sm);
  color: var(--muted);
  margin-bottom: var(--space-6);
}

.contact-form { display: flex; flex-direction: column; gap: var(--space-5); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-group label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink);
}
.form-group .optional {
  font-weight: 400;
  color: var(--muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid rgba(27,45,69,0.18);
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: var(--text-base);
  color: var(--ink);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--slate);
  box-shadow: 0 0 0 3px rgba(58,90,124,0.12);
}

.form-group textarea { resize: vertical; min-height: 100px; }

.form-privacy {
  font-size: var(--text-xs);
  color: var(--muted);
  text-align: center;
  margin-top: var(--space-2);
}

/* Success state */
.form-success {
  text-align: center;
  padding: var(--space-12) var(--space-8);
  background: var(--sage-light);
  border: 1px solid var(--sage);
  border-radius: var(--radius-lg);
}
.success-icon {
  width: 56px; height: 56px;
  background: var(--sage);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-2xl);
  margin: 0 auto var(--space-4);
}
.form-success h3 { margin-bottom: var(--space-3); }
.form-success p  { color: var(--muted); }

/* Contact info sidebar */
.contact-info { display: flex; flex-direction: column; gap: var(--space-4); }

.contact-info-card {
  background: var(--fog);
  border: 1px solid rgba(27,45,69,0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}
.contact-info-card h3 {
  font-size: var(--text-base);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid rgba(27,45,69,0.08);
}
.contact-method {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
}
.contact-method:last-child { margin-bottom: 0; }
.contact-method strong { font-size: var(--text-sm); color: var(--muted); }
.contact-method a,
.contact-method span { font-size: var(--text-base); color: var(--ink); }

.steps {
  list-style: none;
  counter-reset: steps;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.steps li {
  counter-increment: steps;
  font-size: var(--text-sm);
  color: var(--muted);
  padding-left: var(--space-8);
  position: relative;
  line-height: 1.6;
}
.steps li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 0;
  width: 22px; height: 22px;
  background: var(--sage);
  color: white;
  border-radius: 50%;
  font-size: var(--text-xs);
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.steps li strong { color: var(--ink); }

.contact-info-card > p {
  font-size: var(--text-sm);
  color: var(--muted);
  line-height: 1.7;
}

/* --- FOOTER --- */
.site-footer {
  background: var(--navy);
  padding: var(--space-12) 0 0;
  color: rgba(255,255,255,0.7);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--space-12);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand strong {
  display: block;
  color: var(--white);
  font-size: var(--text-base);
  margin-bottom: var(--space-2);
  font-family: 'Lora', serif;
}
.footer-brand p {
  font-size: var(--text-sm);
  margin-bottom: var(--space-1);
}

.footer-links nav,
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.footer-links a,
.footer-contact a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.65);
  transition: color 0.15s;
}
.footer-links a:hover,
.footer-contact a:hover { color: var(--white); }

.footer-bottom {
  padding: var(--space-4) 0;
}
.footer-bottom p {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.35);
  text-align: center;
  margin: 0;
}

/* --- MOBILE --- */
@media (max-width: 900px) {
  .hero-inner       { grid-template-columns: 1fr; }
  .hero-photo-wrap  { display: none; }
  .badge-list       { grid-template-columns: repeat(2, 1fr); }
  .about-inner      { grid-template-columns: 1fr; }
  .evidence-grid    { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .pricing-grid     { grid-template-columns: 1fr; }
  .contact-inner    { grid-template-columns: 1fr; }
  .cta-strip-inner  { flex-direction: column; text-align: center; }
  .footer-inner     { grid-template-columns: 1fr; gap: var(--space-6); }
}

@media (max-width: 680px) {
  .main-nav, .nav-cta { display: none; }
  .mobile-menu-toggle { display: flex; }
  .badge-list   { grid-template-columns: 1fr 1fr; gap: var(--space-4); }
  .form-row     { grid-template-columns: 1fr; }
  .section      { padding: var(--space-12) 0; }
  .hero         { padding: var(--space-12) 0; }
  .page-hero    { padding: var(--space-10) 0; }
}

/* Mobile nav open state */
.mobile-nav-open .main-nav {
  display: block;
  position: fixed;
  inset: 72px 0 0 0;
  background: var(--white);
  padding: var(--space-8) var(--space-6);
  z-index: 99;
  border-top: 1px solid rgba(27,45,69,0.08);
}
.mobile-nav-open .main-nav ul {
  flex-direction: column;
  gap: var(--space-4);
}
.mobile-nav-open .main-nav a { font-size: var(--text-xl); }
.mobile-nav-open .nav-cta {
  display: block;
  margin-top: var(--space-6);
  text-align: center;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* --- FORMSPREE ERROR STYLES --- */
.field-error {
  font-size: var(--text-xs);
  color: #c0392b;
  margin-top: var(--space-1);
  display: block;
  min-height: 1em;
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192,57,43,0.10);
}

.form-error-banner {
  background: #fdf2f2;
  border: 1px solid #e8b4b4;
  border-radius: var(--radius);
  color: #c0392b;
  font-size: var(--text-sm);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  display: none;
}
.form-error-banner:not(:empty) { display: block; }
