/* Bright Minds Neurodevelopmental Center — local styles only, no third-party assets */

:root {
  --bg: #f4efe6;
  --bg-alt: #e4eee9;
  --surface: #fbf8f3;
  --ink: #1c2b28;
  --ink-muted: #3a4a46;
  --accent: #1e4f48;
  --accent-hover: #163b36;
  --warm: #8a4f35;
  --line: #cfc8bb;
  --placeholder-bg: #f3e6c8;
  --placeholder-ink: #5a3d12;
  --crisis-bg: #f7efe8;
  --crisis-line: #c9b09a;
  --focus: #1e4f48;
  --header-h: 4.25rem;
  --wrap: 68rem;
  --measure: 42rem;
  --radius: 0.75rem;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

html:focus-within {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html,
  html:focus-within {
    scroll-behavior: auto;
  }

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

#about, #services, #approach, #clinician, #start, #contact, #top {
  scroll-margin-top: calc(var(--header-h) + 0.75rem);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3.15rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  margin: 0 0 1rem;
}

h3 {
  font-size: 1.2rem;
  margin: 0 0 0.4rem;
}

p {
  margin: 0 0 1rem;
}

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

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--accent-hover);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -100%;
  z-index: 1000;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  border-radius: 0 0 0.35rem 0.35rem;
}

.skip-link:focus {
  top: 0;
  color: #fff;
}

.wrap {
  width: min(100% - 2rem, var(--wrap));
  margin-inline: auto;
}

.measure {
  max-width: var(--measure);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 239, 230, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--accent);
  text-decoration: none;
  min-width: 0;
}

.brand:hover {
  color: var(--accent-hover);
}

.brand-mark {
  flex: 0 0 auto;
  display: block;
  color: var(--accent);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
}

.brand-sub {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.nav-toggle-bars {
  display: block;
  width: 1.1rem;
  height: 0.7rem;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 50% / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars {
  background:
    linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat;
  box-shadow: none;
  position: relative;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before,
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: currentColor;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before {
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after {
  transform: rotate(-45deg);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding: 0.35rem 0;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Hero */

.hero {
  padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(3.5rem, 8vw, 7rem);
  background:
    radial-gradient(ellipse at 80% 10%, rgba(228, 238, 233, 0.9), transparent 55%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  max-width: 44rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warm);
}

.tagline {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  line-height: 1.45;
  color: var(--ink-muted);
  margin-bottom: 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
}

.button {
  display: inline-block;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.2;
}

.button-primary {
  background: var(--accent);
  color: #f7faf8;
  border: 2px solid var(--accent);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.button-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: var(--bg-alt);
  color: var(--accent-hover);
}

/* Sections */

.section {
  padding: clamp(2.75rem, 6vw, 4.75rem) 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-intro {
  margin-bottom: 1.75rem;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-grid li,
.approach-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem 1.3rem;
}

.approach-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Placeholders — visually distinct so facts can be filled later */

.placeholder {
  display: inline-block;
  margin: 0.15rem 0;
  padding: 0.15rem 0.4rem;
  background: var(--placeholder-bg);
  color: var(--placeholder-ink);
  border-radius: 0.25rem;
  font-style: normal;
  font-weight: 600;
  font-size: 0.95em;
}

p.placeholder {
  display: block;
  padding: 0.65rem 0.8rem;
  margin: 0 0 0.85rem;
}

/* Steps */

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 0 0 1.5rem 3rem;
  border-left: 1px solid var(--line);
  margin-left: 0.85rem;
}

.steps li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: -0.85rem;
  top: 0;
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #f7faf8;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Contact */

.contact-card {
  display: grid;
  gap: 0.85rem;
  margin: 1.25rem 0 1.5rem;
  padding: 1.25rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.contact-card address {
  font-style: normal;
  margin: 0;
}

.contact-card dl {
  display: grid;
  gap: 0.85rem;
  margin: 0;
}

.contact-card address + dl {
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.contact-card div {
  display: grid;
  gap: 0.15rem;
}

.contact-card dt {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.contact-card dd {
  margin: 0;
}

.privacy-note {
  margin-bottom: 1.25rem;
}

.crisis-note {
  padding: 1rem 1.15rem;
  background: var(--crisis-bg);
  border-left: 4px solid var(--warm);
  border-radius: 0 0.5rem 0.5rem 0;
}

/* Footer */

.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
  background: #ebe4d8;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.footer-inner {
  max-width: var(--measure);
}

.footer-privacy {
  margin-bottom: 0.75rem;
}

.copyright {
  margin: 0;
}

/* Mobile navigation.
   Without JS, the menu stays visible so the page remains usable.
   With JS, it becomes a toggleable overlay. */

@media (max-width: 52rem) {
  .header-inner {
    flex-wrap: wrap;
  }

  .js .nav-toggle {
    display: inline-flex;
  }

  .js .header-inner {
    flex-wrap: nowrap;
  }

  .site-nav {
    flex: 1 1 100%;
  }

  .js .site-nav {
    display: none;
    flex: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1rem 1rem;
    box-shadow: 0 0.5rem 1rem rgba(28, 43, 40, 0.08);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
  }

  .js .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .site-nav a {
    display: block;
    padding: 0.7rem 0.25rem;
    border-bottom: 1px solid var(--line);
  }
}

@media (min-width: 52.01rem) {
  .site-nav {
    display: block !important;
    position: static !important;
    max-height: none !important;
    overflow: visible !important;
    box-shadow: none !important;
    padding: 0 !important;
    border: 0 !important;
    flex: 0 1 auto !important;
  }

  .site-nav ul {
    flex-direction: row;
  }
}
