/* ============================================================
   Mella Therapy — design tokens
   Palette: a dusk-to-dawn horizon. Deep "dusk" indigo for where
   things feel heavy, warm "honey/dawn" gold for where they're
   headed. The gradient between the two is the site's signature.
   ============================================================ */
:root {
  --paper:  #FBF6EE; /* warm ivory page background */
  --sand:   #F2E4C9; /* alternating section background */
  --ink:    #2B2420; /* warm near-black text */
  --ink-60: rgba(43, 36, 32, 0.62);
  --dusk:   #3E4C6D; /* deep indigo — trust, the hard part */
  --dusk-2: #2E3A54; /* darker dusk, for the footer band */
  --honey:  #C68A3D; /* primary accent — warmth, hope */
  --dawn:   #E8B98A; /* soft peach-gold, gradient midpoint */
  --line:   rgba(43, 36, 32, 0.12);
  --shadow: 0 12px 32px rgba(46, 58, 84, 0.12);

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
  --font-body: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 18px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max-width: 1120px;
}

/* ============================================================
   Reset & base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@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;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration-color: var(--honey);
  text-underline-offset: 3px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 500; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1.1em; }
.lede { font-size: 1.2rem; color: var(--ink-60); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--honey);
  margin-bottom: 0.9em;
}

:focus-visible {
  outline: 2px solid var(--honey);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ============================================================
   Signature element: the horizon line
   A gradient hairline used to divide sections everywhere,
   as if the page is one continuous skyline from dusk to dawn.
   ============================================================ */
.horizon {
  position: relative;
  height: 2px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, var(--dusk), var(--honey), var(--dawn));
  background-size: 200% 100%;
  transform-origin: left;
  transform: scaleX(0);
  opacity: 0.9;
}
.horizon.is-visible {
  animation: horizon-draw 1.1s cubic-bezier(.2,.7,.2,1) forwards;
}
@keyframes horizon-draw {
  to { transform: scaleX(1); }
}
.horizon--sun {
  height: 3px;
}
.horizon--sun::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 10px; height: 10px;
  background: var(--honey);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 6px rgba(198, 138, 61, 0.18);
}
@media (prefers-reduced-motion: reduce) {
  .horizon { transform: scaleX(1); }
}

/* ============================================================
   Header / nav
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 246, 238, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--gutter);
  max-width: var(--max-width);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--dusk), var(--honey) 60%, var(--dawn));
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  border-color: var(--honey);
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--dusk);
  color: var(--paper) !important;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-size: 0.9rem !important;
  border-bottom: none !important;
  transition: background 0.2s ease;
}
.nav-cta:hover { background: var(--dusk-2); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 20px; height: 2px;
  background: var(--ink);
  position: relative;
  transition: transform 0.2s ease;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    background: var(--paper);
    border-bottom: 0 solid var(--line);
    padding: 0 var(--gutter);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, padding 0.25s ease;
  }
  .nav-links.is-open {
    max-height: 420px;
    padding: 0.5rem var(--gutter) 1.25rem;
    border-bottom-width: 1px;
  }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 0.65rem 0; width: 100%; }
  .nav-cta { margin-top: 0.4rem; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--dusk) 0%, var(--dusk) 42%, var(--honey) 100%);
  color: var(--paper);
  overflow: hidden;
}
.hero .container {
  padding-top: clamp(3.5rem, 9vw, 6rem);
  padding-bottom: clamp(3.5rem, 9vw, 6rem);
  position: relative;
  z-index: 2;
}
.hero .eyebrow { color: var(--dawn); }
.hero h1 { color: var(--paper); max-width: 16ch; }
.hero .lede { color: rgba(251, 246, 238, 0.86); max-width: 46ch; font-size: 1.2rem; }
.hero .horizon { margin: 2rem 0 2.25rem; max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--paper); color: var(--dusk-2); }
.btn-primary:hover { background: #fff; }
.btn-ghost { border-color: rgba(251, 246, 238, 0.55); color: var(--paper); }
.btn-ghost:hover { border-color: var(--paper); }
.btn-dark { background: var(--dusk); color: var(--paper); }
.btn-dark:hover { background: var(--dusk-2); }

/* ============================================================
   Sections
   ============================================================ */
section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-sand { background: var(--sand); }
.section-head { max-width: 640px; margin-bottom: 2.75rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.divider-wrap { padding: 0 var(--gutter); max-width: var(--max-width); margin: 0 auto; }

/* Card grids */
.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) {
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 1.9rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--dusk), var(--honey), var(--dawn));
}
.card h3 { margin-bottom: 0.5em; }
.card p { color: var(--ink-60); margin-bottom: 0; }
.section-sand .card { background: var(--paper); }

.program-card {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 2.25rem;
  box-shadow: var(--shadow);
}
.program-card h3 { font-size: 1.5rem; }
.program-card ul { padding-left: 1.15rem; color: var(--ink-60); margin: 1.1em 0; }
.program-card li { margin-bottom: 0.4em; }

/* Staff */
.staff-card { text-align: center; }
.avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  margin: 0 auto 1.1rem;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--dusk), var(--honey) 65%, var(--dawn));
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 1.5rem;
}
.staff-card .role { color: var(--honey); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 0.6em; }

/* Quote */
.quote {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.quote blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 1rem;
}
.quote cite { color: var(--ink-60); font-style: normal; font-size: 0.95rem; }

/* CTA band */
.cta-band {
  background: var(--dusk);
  color: var(--paper);
  text-align: center;
}
.cta-band h2 { color: var(--paper); }
.cta-band p { color: rgba(251, 246, 238, 0.8); }

/* FAQ accordion */
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-body);
  font-size: 1.4rem;
  color: var(--honey);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding-bottom: 1.4rem; color: var(--ink-60); max-width: 62ch; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; }
}
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.info-list .label { display: block; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--honey); margin-bottom: 0.3em; }

.form-field { margin-bottom: 1.25rem; }
.form-field label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 0.4em; }
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: 2px solid var(--honey);
  outline-offset: 1px;
  border-color: var(--honey);
}
.form-note { font-size: 0.85rem; color: var(--ink-60); }

.crisis-note {
  background: var(--sand);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  font-size: 0.95rem;
}
.crisis-note strong { color: var(--dusk); }

/* Page hero (interior pages) */
.page-hero {
  background: var(--sand);
}
.page-hero h1 { max-width: 20ch; }
.page-hero .lede { max-width: 60ch; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--dusk-2);
  color: rgba(251, 246, 238, 0.82);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding: 3.5rem 0 2.5rem;
}
@media (max-width: 760px) {
  .footer-top { grid-template-columns: 1fr; }
}
.footer-top h4 {
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1em;
}
.footer-top .brand { color: var(--paper); margin-bottom: 0.8rem; }
.footer-top ul { list-style: none; padding: 0; margin: 0; }
.footer-top li { margin-bottom: 0.6em; }
.footer-top a { text-decoration: none; }
.footer-top a:hover { text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid rgba(251, 246, 238, 0.14);
  padding: 1.5rem 0;
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
}
