/* ===== DESIGN TOKENS — Calm Clinical Care + Indiana Woodland ===== */

:root,
[data-theme='light'] {
  /* Surfaces — warm limestone / cream */
  --color-bg: #f6f4ef;
  --color-surface: #faf8f3;
  --color-surface-2: #fdfcf9;
  --color-surface-offset: #efece5;
  --color-surface-offset-2: #e8e4db;
  --color-surface-dynamic: #e0ddd6;
  --color-divider: #d8d4cc;
  --color-border: #cfc9bf;

  /* Text — warm charcoal */
  --color-text: #2a2823;
  --color-text-muted: #75726b;
  --color-text-faint: #b0ada6;
  --color-text-inverse: #faf8f3;

  /* Primary Accent — deep evergreen / sage */
  --color-primary: #3d5c3a;
  --color-primary-hover: #2e4729;
  --color-primary-active: #1f3119;
  --color-primary-highlight: #d3dccf;

  /* Warm clay highlight */
  --color-accent: #b87355;
  --color-accent-hover: #9a5e44;
  --color-accent-active: #7d4a35;
  --color-accent-highlight: #e8d6cc;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows — warm-tinted */
  --shadow-sm: 0 1px 2px oklch(0.2 0.01 80 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.2 0.01 80 / 0.08);
  --shadow-lg: 0 12px 32px oklch(0.2 0.01 80 / 0.12);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-full: 100%;

  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(3rem, 0.5rem + 7vw, 7rem);

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

  /* Fonts */
  --font-display: 'Zodiak', 'Georgia', serif;
  --font-body: 'Work Sans', 'Helvetica Neue', sans-serif;
}

[data-theme='dark'] {
  --color-bg: #161513;
  --color-surface: #1c1a17;
  --color-surface-2: #201e1b;
  --color-surface-offset: #1d1b18;
  --color-surface-offset-2: #252320;
  --color-surface-dynamic: #2e2b27;
  --color-divider: #252320;
  --color-border: #363330;

  --color-text: #cdc9c2;
  --color-text-muted: #78756f;
  --color-text-faint: #555350;
  --color-text-inverse: #2a2823;

  --color-primary: #7ba370;
  --color-primary-hover: #5c8a52;
  --color-primary-active: #426b39;
  --color-primary-highlight: #2d3528;

  --color-accent: #c89379;
  --color-accent-hover: #b87e5f;
  --color-accent-active: #9a6648;
  --color-accent-highlight: #3d2f26;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
  --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
  --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
}

/* System preference fallback */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #161513;
    --color-surface: #1c1a17;
    --color-surface-2: #201e1b;
    --color-surface-offset: #1d1b18;
    --color-surface-offset-2: #252320;
    --color-surface-dynamic: #2e2b27;
    --color-divider: #252320;
    --color-border: #363330;
    --color-text: #cdc9c2;
    --color-text-muted: #78756f;
    --color-text-faint: #555350;
    --color-text-inverse: #2a2823;
    --color-primary: #7ba370;
    --color-primary-hover: #5c8a52;
    --color-primary-active: #426b39;
    --color-primary-highlight: #2d3528;
    --color-accent: #c89379;
    --color-accent-hover: #b87e5f;
    --color-accent-active: #9a6648;
    --color-accent-highlight: #3d2f26;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.2);
    --shadow-md: 0 4px 12px oklch(0 0 0 / 0.3);
    --shadow-lg: 0 12px 32px oklch(0 0 0 / 0.4);
  }
}

/* ===== LAYOUT ===== */

.container {
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.container-wide {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.section {
  padding-block: clamp(var(--space-12), 8vw, var(--space-24));
}

/* ===== HEADER / NAV ===== */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.06);
  transition: box-shadow var(--transition-interactive);
}

.header--scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-3);
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.logo svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.nav {
  display: none;
  align-items: center;
  gap: var(--space-6);
}

.nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
}

.nav a:hover {
  color: var(--color-text);
}

.nav-cta {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--color-primary-hover);
  color: var(--color-text-inverse);
}

@media (min-width: 768px) {
  .nav { display: flex; }
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-offset);
}

.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  color: var(--color-text);
}

@media (min-width: 768px) {
  .mobile-menu-btn { display: none; }
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  border-top: 1px solid oklch(from var(--color-text) l c h / 0.06);
  background: var(--color-surface);
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius-md);
}

.mobile-nav a:hover {
  background: var(--color-surface-offset);
}

.mobile-nav-cta {
  background: var(--color-primary) !important;
  color: var(--color-text-inverse) !important;
  text-align: center;
}

@media (min-width: 768px) {
  .mobile-nav { display: none !important; }
}

/* ===== HERO ===== */

.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(in oklab,
    var(--color-bg) 0%,
    oklch(from var(--color-bg) l c h / 0.7) 50%,
    oklch(from var(--color-bg) l c h / 0.9) 100%
  );
}

[data-theme='dark'] .hero-bg::after,
:root:not([data-theme]) .hero-bg::after {
  background: linear-gradient(in oklab,
    var(--color-bg) 0%,
    oklch(from var(--color-bg) l c h / 0.8) 50%,
    oklch(from var(--color-bg) l c h / 0.95) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  padding-block: var(--space-20);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.hero-eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--color-primary);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-5);
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: var(--space-4);
  max-width: 36ch;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.hero-contact {
  font-size: var(--text-base);
  color: var(--color-text);
  margin-bottom: var(--space-5);
  font-weight: 500;
}

.hero-contact a {
  color: var(--color-primary);
  text-decoration: none;
}

.hero-contact a:hover {
  text-decoration: underline;
}

.hero-preferred {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  vertical-align: middle;
  margin-left: var(--space-2);
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  min-height: 44px;
  transition: all var(--transition-interactive);
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  color: var(--color-text-inverse);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border-color: oklch(from var(--color-text) l c h / 0.15);
}

.btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ===== SECTION HEADINGS ===== */

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.section-eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--color-primary);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin-bottom: var(--space-4);
  max-width: 20ch;
}

.section-lead {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 52ch;
  margin-bottom: var(--space-10);
}

/* ===== SERVICES ===== */

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

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}

.service-card:hover {
  border-color: oklch(from var(--color-primary) l c h / 0.25);
  box-shadow: var(--shadow-sm);
}

.service-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  margin-bottom: var(--space-5);
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  margin-bottom: var(--space-3);
}

.service-card p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.service-card ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.service-card li {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding-left: var(--space-5);
  position: relative;
}

.service-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
}

/* ===== WHAT TO EXPECT ===== */

.expect-section {
  background: var(--color-surface-offset);
}

.expect-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  counter-reset: step;
}

@media (min-width: 768px) {
  .expect-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
  }
}

.expect-step {
  counter-increment: step;
}

.expect-step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.expect-step h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  margin-bottom: var(--space-2);
}

.expect-step p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
}

/* ===== ABOUT ===== */

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: start;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-12);
  }
}

.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--color-surface-offset);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-text h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: var(--space-4);
}

.about-text p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.about-credentials {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-6);
}

.credential-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.08);
  color: var(--color-text-muted);
}

.credential-badge svg {
  width: 14px;
  height: 14px;
  color: var(--color-primary);
}

/* ===== CONTACT ===== */

.contact-section {
  background: var(--color-primary);
  color: var(--color-text-inverse);
}

[data-theme='dark'] .contact-section,
:root:not([data-theme]) .contact-section {
  background: var(--color-primary);
}

.contact-section .section-eyebrow {
  color: oklch(from var(--color-text-inverse) l c h / 0.7);
}

.contact-section .section-eyebrow::before {
  background: oklch(from var(--color-text-inverse) l c h / 0.5);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
  }
}

.contact-info h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  margin-bottom: var(--space-4);
  color: var(--color-text-inverse);
}

.contact-info p {
  font-size: var(--text-base);
  color: oklch(from var(--color-text-inverse) l c h / 0.8);
  margin-bottom: var(--space-6);
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
  color: oklch(from var(--color-text-inverse) l c h / 0.9);
}

.contact-detail svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: oklch(from var(--color-text-inverse) l c h / 0.6);
}

.contact-detail a {
  color: oklch(from var(--color-text-inverse) l c h / 0.9);
  text-decoration: none;
}

.contact-detail a:hover {
  color: var(--color-text-inverse);
  text-decoration: underline;
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  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: 600;
  color: oklch(from var(--color-text-inverse) l c h / 0.85);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid oklch(from var(--color-text-inverse) l c h / 0.2);
  background: oklch(from var(--color-text-inverse) l c h / 0.05);
  color: var(--color-text-inverse);
  font-size: var(--text-base);
  min-height: 44px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: oklch(from var(--color-text-inverse) l c h / 0.4);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: oklch(from var(--color-text-inverse) l c h / 0.5);
  background: oklch(from var(--color-text-inverse) l c h / 0.08);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1L6 6L11 1' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' opacity='0.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-group select option {
  background: var(--color-bg);
  color: var(--color-text);
}

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

@media (min-width: 480px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  background: var(--color-text-inverse);
  color: var(--color-primary);
  border: none;
  min-height: 44px;
  cursor: pointer;
  transition: all var(--transition-interactive);
  margin-top: var(--space-2);
}

.form-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px oklch(0 0 0 / 0.15);
}

/* ===== FOOTER ===== */

.footer {
  padding-block: var(--space-12) var(--space-8);
  border-top: 1px solid oklch(from var(--color-text) l c h / 0.06);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-4);
}

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

.footer-brand .logo {
  font-size: var(--text-lg);
}

.footer-brand p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 32ch;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
}

.footer-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-text);
}

.footer-bottom {
  padding-top: var(--space-6);
  border-top: 1px solid oklch(from var(--color-text) l c h / 0.06);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ===== SCROLL REVEAL ===== */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1), transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
