/* ==========================================================================
   Self & Together Family Therapy — Stylesheet
   Design tokens derived from the practice logo (sage green / dusty rose /
   warm ivory) and the supplied photography (warm, natural, soft light).
   ========================================================================== */

:root {
  /* Color */
  --color-cream:        #F7F2E9;   /* page background */
  --color-cream-deep:   #EEE3D2;   /* alternate section background */
  --color-white:        #FFFDF9;   /* card / form background */
  --color-ink:          #2B2620;   /* primary text */
  --color-ink-soft:     #5B5346;   /* secondary text */
  --color-sage:         #5F6B4E;   /* primary brand color */
  --color-sage-deep:    #454E37;   /* hover / pressed */
  --color-sage-pale:    #DDE2D2;   /* subtle fills */
  --color-rose:         #BE8468;   /* accent — links, dividers, highlights */
  --color-rose-deep:    #A16C52;
  --color-border:       #DED2BC;   /* hairline rules */
  --color-focus:        #8A5A3F;

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Scale */
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.4vw, 1.375rem);
  --step-2: clamp(1.5rem, 1.35rem + 0.6vw, 1.85rem);
  --step-3: clamp(1.9rem, 1.6rem + 1.2vw, 2.6rem);
  --step-4: clamp(2.4rem, 2rem + 2vw, 3.6rem);

  /* Layout */
  --content-max: 1180px;
  --measure: 62ch;
  --radius: 6px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.75rem;
  --space-4: 2.75rem;
  --space-5: 4.5rem;
  --space-6: 7rem;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
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 {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--color-ink);
  background: var(--color-cream);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  color: var(--color-ink);
  text-wrap: balance;
}
h1 { font-size: var(--step-4); font-weight: 480; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); font-family: var(--font-body); font-weight: 600; }

p { max-width: var(--measure); }
p + p { margin-top: 1.1em; }

a {
  color: var(--color-rose-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--color-sage-deep); }

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

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

.skip-link {
  position: fixed;
  left: 1rem;
  top: 0;
  transform: translateY(-150%);
  background: var(--color-ink);
  color: var(--color-white);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  z-index: 200;
  transition: transform 0.15s ease;
}
.skip-link:focus { transform: translateY(1rem); }

/* ---------- Layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.section { padding-block: var(--space-6); }
.section--tight { padding-block: var(--space-5); }
.section--cream-deep { background: var(--color-cream-deep); }
.section--sage {
  background: var(--color-sage);
  color: var(--color-white);
}
.section--sage h2, .section--sage h3 { color: var(--color-white); }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--color-rose-deep);
}

.rule {
  width: 56px;
  height: 2px;
  background: var(--color-rose);
  border: none;
  margin: 1.25rem 0;
}
.section--sage .rule { background: var(--color-cream); opacity: 0.6; }

.lede {
  font-size: var(--step-1);
  color: var(--color-ink-soft);
  max-width: var(--measure);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  line-height: 1.2;
}
.btn-primary {
  background: var(--color-sage);
  color: var(--color-white);
}
.btn-primary:hover { background: var(--color-sage-deep); color: var(--color-white); }
.btn-outline {
  background: transparent;
  border-color: currentColor;
  color: var(--color-ink);
}
.btn-outline:hover { background: var(--color-ink); color: var(--color-white); }
.section--sage .btn-outline { color: var(--color-white); }
.section--sage .btn-outline:hover { background: var(--color-white); color: var(--color-sage-deep); }

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 242, 233, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.85rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-right: 2rem;
  text-decoration: none;
  color: var(--color-ink);
}
.brand img { height: 44px; width: auto; }
.brand-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.15;
  color: var(--color-ink);
  white-space: nowrap;
}
.brand-name em { font-style: normal; color: var(--color-sage-deep); }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.7rem, 1.1vw, 1.3rem);
  list-style: none;
  padding: 0;
}
.nav-links a {
  color: var(--color-ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  white-space: nowrap;
  padding-block: 0.35rem;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--color-ink); }
.nav-links a[aria-current="page"] {
  color: var(--color-ink);
  border-bottom-color: var(--color-rose);
}
.nav-cta { margin-left: 0.25rem; }
.nav-cta .btn { white-space: nowrap; padding: 0.7rem 1.35rem; font-size: 0.9rem; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-ink);
}
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 1180px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    left: 30%;
    height: 100vh;
    height: 100dvh;
    z-index: 105;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 1.4rem;
    background: var(--color-cream);
    padding: 6rem 2rem 2rem;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    border-left: 1px solid var(--color-border);
    overflow-y: auto;
  }
  .nav-links[data-open="true"] { transform: translateX(0); }
  .nav-links a { font-size: 1.15rem; }
  .nav-toggle { display: inline-flex; z-index: 110; }
  .nav-cta { margin-left: 0; margin-top: 0.5rem; }
  body[data-nav-open="true"] { overflow: hidden; }
  .nav-scrim {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(43, 38, 32, 0.35);
    z-index: 104;
  }
  body[data-nav-open="true"] .nav-scrim { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(2.5rem, 6vw, 5rem);
}
.hero-copy .eyebrow { display: block; margin-bottom: 0.9rem; }
.hero-copy h1 { margin-bottom: 1.1rem; }
.hero-copy .lede { margin-bottom: 1.8rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
}
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-media { order: -1; aspect-ratio: 16 / 11; }
}

/* Page hero for interior pages: shorter, same split pattern */
.page-hero { padding-block: clamp(2rem, 5vw, 3.5rem); }
.page-hero .hero-media { aspect-ratio: 4 / 4.6; }

/* ---------- Media/text alternating rows ---------- */
.split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split-row.reverse .split-media { order: 2; }
.split-media img {
  width: 100%;
  border-radius: var(--radius);
  aspect-ratio: 5 / 4;
  object-fit: cover;
}
.split-row h2, .split-row h3 { margin-bottom: 1rem; }
.split-row + .split-row { margin-top: var(--space-6); }

@media (max-width: 860px) {
  .split-row, .split-row.reverse { grid-template-columns: 1fr; }
  .split-row.reverse .split-media { order: -1; }
  .split-row + .split-row { margin-top: var(--space-5); }
}

/* ---------- Three-step / process rows (Understand · Connect · Grow) ---------- */
.trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-4);
}
.trio-item { border-top: 2px solid var(--color-rose); padding-top: 1.1rem; }
.trio-item h3 { font-size: var(--step-1); margin-bottom: 0.5rem; }
.trio-item p { color: var(--color-ink-soft); }
@media (max-width: 760px) {
  .trio { grid-template-columns: 1fr; gap: var(--space-3); }
}

/* ---------- Simple text list blocks ---------- */
.text-block { max-width: var(--measure); }
.text-block h2, .text-block h3 { margin-bottom: 1rem; }
.text-block > * + * { margin-top: 1.1em; }

.pull-line {
  font-family: var(--font-display);
  font-size: var(--step-2);
  color: var(--color-sage-deep);
  line-height: 1.3;
  max-width: 40ch;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0;
  list-style: none;
  margin-top: 1.5rem;
}
.chip-list li {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-size: 0.92rem;
  color: var(--color-ink-soft);
}

/* ---------- CTA band ---------- */
.cta-band {
  text-align: left;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.cta-band h2 { margin-bottom: 0.4rem; }
.cta-band p { color: inherit; opacity: 0.92; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-ink);
  color: var(--color-cream);
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-4);
  padding-block: var(--space-5);
}
.footer-brand { display: flex; gap: 0.75rem; align-items: flex-start; margin-bottom: 1rem; }
.footer-brand img { height: 40px; width: auto; filter: brightness(1.4); }
.footer-brand-text { font-family: var(--font-display); font-size: 1.15rem; }
.site-footer p { color: #D8D2C4; max-width: 32ch; }
.site-footer h4 { color: var(--color-cream); margin-bottom: 0.9rem; }
.footer-links { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.footer-links a { color: #D8D2C4; text-decoration: none; }
.footer-links a:hover { color: var(--color-white); }
.footer-bottom {
  border-top: 1px solid rgba(216, 210, 196, 0.25);
  padding-block: 1.25rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: #B9B2A2;
}
.footer-bottom a { color: #B9B2A2; }
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-3); }
}

/* ---------- Forms (Contact page) ---------- */
.form-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.75rem);
}
.field { margin-bottom: 1.4rem; }
.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}
.field .hint { display: block; font-weight: 400; color: var(--color-ink-soft); font-size: 0.85rem; margin-top: 0.3rem; }
.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-cream);
  color: var(--color-ink);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 3px solid var(--color-focus);
  outline-offset: 1px;
  border-color: var(--color-focus);
}
.field textarea { resize: vertical; min-height: 130px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }

.form-notice {
  background: var(--color-sage-pale);
  border-left: 4px solid var(--color-sage);
  padding: 1rem 1.25rem;
  border-radius: 4px;
  font-size: 0.94rem;
  color: var(--color-ink);
  margin-bottom: 1.75rem;
}
.form-notice strong { color: var(--color-sage-deep); }

.form-status {
  margin-top: 1.1rem;
  padding: 0.9rem 1.1rem;
  border-radius: 4px;
  font-size: 0.95rem;
  display: none;
}
.form-status[data-state="success"] {
  display: block;
  background: #E5EBDD;
  color: var(--color-sage-deep);
  border: 1px solid var(--color-sage);
}
.form-status[data-state="error"] {
  display: block;
  background: #F5E2DA;
  color: #8A3B22;
  border: 1px solid var(--color-rose-deep);
}
.field-error {
  display: none;
  color: #8A3B22;
  font-size: 0.85rem;
  margin-top: 0.35rem;
}
.field.invalid input,
.field.invalid select,
.field.invalid textarea { border-color: #8A3B22; }
.field.invalid .field-error { display: block; }

.contact-info-list { list-style: none; padding: 0; margin-top: 1.5rem; }
.contact-info-list li { padding: 0.6rem 0; border-bottom: 1px solid var(--color-border); }
.contact-info-list li:last-child { border-bottom: none; }
.contact-info-list a { text-decoration: none; }

/* ---------- 404 ---------- */
.error-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: var(--space-6);
}
.error-page .eyebrow { display: block; }
.error-page h1 { margin-block: 0.75rem 1rem; }
.error-actions { display: flex; gap: 1rem; justify-content: center; margin-top: 1.75rem; flex-wrap: wrap; }

/* ---------- About page specific ---------- */
.credentials-list { list-style: none; padding: 0; margin-top: 1.25rem; }
.credentials-list li {
  padding-left: 1.4rem;
  position: relative;
  margin-bottom: 0.7rem;
  color: var(--color-ink-soft);
}
.credentials-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 6px; height: 6px;
  background: var(--color-rose);
  border-radius: 50%;
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.max-measure { max-width: var(--measure); }
.center-col { max-width: 46rem; margin-inline: auto; text-align: center; }
