/* ===========================================================
   Mendwell Behavioral Health — Base Stylesheet
   Design tokens, reset, typography, layout primitives
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600;700&display=swap');

/* ---------- Design tokens ---------- */
:root {
  /* Palette */
  --ink:        #1F2A24;
  --ink-soft:   #3D4A43;
  --forest:     #2D4A3E;
  --forest-deep:#1E3329;
  --forest-tint:#3A5A4D;
  --sage:       #8AA396;
  --sage-soft:  #C5D2CB;
  --clay:       #C4866B;
  --clay-deep:  #A66B53;
  --clay-soft:  #E8D4C5;
  --ivory:      #F5F1EA;
  --cream:      #FAF7F2;
  --white:      #FFFFFF;
  --mist:       #E4E7E2;
  --mist-deep:  #C8CFC9;
  --gold:       #B89968;
  --sky:        #9CB4C0;
  --alert:      #7A2E2E;
  --alert-soft: #F4E6E0;

  /* Typography */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(31,42,36,0.04), 0 2px 6px rgba(31,42,36,0.04);
  --shadow-md: 0 1px 2px rgba(31,42,36,0.05), 0 8px 24px rgba(31,42,36,0.07);
  --shadow-lg: 0 4px 12px rgba(31,42,36,0.08), 0 24px 48px rgba(31,42,36,0.10);

  /* Container */
  --container: 1200px;
  --container-narrow: 880px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: 240ms var(--ease-out);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--forest); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--clay-deep); }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

/* ---------- Typography ---------- */
.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--forest);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.eyebrow::before {
  content: '';
  width: 1.5rem;
  height: 1px;
  background: var(--clay);
  display: inline-block;
}

h1, .h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.25rem, 4.5vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variation-settings: 'opsz' 96;
}
h2, .h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  font-variation-settings: 'opsz' 48;
}
h3, .h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
}
h4, .h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.35;
  color: var(--ink);
}
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
.lede {
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--ink-soft);
  font-weight: 400;
  max-width: 38rem;
}

ul, ol { padding-left: 1.25rem; margin-bottom: 1rem; }
li { margin-bottom: 0.35rem; line-height: 1.6; }
ul.clean { list-style: none; padding-left: 0; }
ul.checks { list-style: none; padding-left: 0; }
ul.checks li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.6rem;
}
ul.checks li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.55em;
  width: 1.1rem; height: 1.1rem;
  background: var(--sage-soft);
  border-radius: 50%;
}
ul.checks li::after {
  content: '';
  position: absolute;
  left: 0.3rem; top: 0.85em;
  width: 0.5rem; height: 0.28rem;
  border-left: 1.5px solid var(--forest-deep);
  border-bottom: 1.5px solid var(--forest-deep);
  transform: rotate(-45deg);
}

blockquote {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.4;
  color: var(--ink);
  font-style: italic;
  border-left: 3px solid var(--clay);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0;
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-5);
}
.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-5);
}
@media (min-width: 768px) {
  .container, .container-narrow { padding: 0 var(--space-6); }
}

/* ---------- Section spacing ---------- */
section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
section.tight { padding: clamp(2rem, 4vw, 3.5rem) 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  transition: all var(--transition);
  white-space: nowrap;
  text-align: center;
  line-height: 1;
  border: 1.5px solid transparent;
}
.btn-primary {
  background: var(--forest);
  color: var(--ivory);
}
.btn-primary:hover {
  background: var(--forest-deep);
  color: var(--ivory);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: transparent;
  color: var(--forest);
  border-color: var(--forest);
}
.btn-secondary:hover {
  background: var(--forest);
  color: var(--ivory);
}
.btn-clay {
  background: var(--clay);
  color: var(--ivory);
}
.btn-clay:hover {
  background: var(--clay-deep);
  color: var(--ivory);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--forest);
  padding: 0.5rem 0;
  border-radius: 0;
  border-bottom: 1.5px solid var(--forest);
}
.btn-ghost:hover {
  color: var(--clay-deep);
  border-bottom-color: var(--clay-deep);
}
.btn .arrow { transition: transform var(--transition); }
.btn:hover .arrow { transform: translateX(3px); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: 1rem;
  background: var(--forest);
  color: var(--ivory);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 100;
  font-weight: 600;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  overflow: hidden;
  white-space: nowrap;
  top: 0;
}
.skip-link:focus {
  clip: auto;
  clip-path: none;
  height: auto;
  width: auto;
  overflow: visible;
  top: 1rem;
  color: var(--ivory);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
