/* ============================================================
   Understory Therapy — shared stylesheet
   Palette: Pacific Northwest forest understory.
   Conifer shadow, moss, fern, lichen, fog light, wet bark.
   ============================================================ */

/* ---- Self-hosted webfonts -------------------------------------------------
   Font files are NOT included. Until you add them (see README), the site
   falls back to Georgia + system sans, which is a deliberate, decent
   fallback rather than an accident. No third-party font requests are made
   from this stylesheet, which is what lets the privacy statement say the
   site loads no third-party resources.
--------------------------------------------------------------------------- */

@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-variable.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* Newsreader carries an optical-size axis; let the browser use it. */
h1, h2, h3, h4, .wordmark, .price, .qa summary {
  font-optical-sizing: auto;
}
@font-face {
  font-family: "Karla";
  src: url("fonts/karla-variable.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Forest strata, dark to light */
  --ink:      #16211b;
  --ink-2:    #22322a;
  --moss:     #46614c;
  --fern:     #7d9a80;
  --lichen:   #c3cfbe;
  --fog-2:    #e0e3d9;
  --fog:      #eceee7;
  --paper:    #fafaf6;
  --bark:     #7a5d45;
  --bark-light: #a9856a;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans:  "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;

  --measure: 36rem;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --rule: 1px solid rgba(22, 33, 27, 0.15);
  --rule-dark: 1px solid rgba(236, 238, 231, 0.2);

  --step--1: clamp(0.83rem, 0.8rem + 0.14vw, 0.92rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --step-1:  clamp(1.18rem, 1.1rem + 0.4vw, 1.42rem);
  --step-2:  clamp(1.45rem, 1.3rem + 0.75vw, 1.95rem);
  --step-3:  clamp(1.85rem, 1.55rem + 1.5vw, 2.85rem);
  --step-4:  clamp(2.3rem, 1.7rem + 3vw, 4.4rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--fog);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -0.015em;
  margin: 0;
}

p { margin: 0 0 1.1em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: inherit; }
a:hover { text-decoration-thickness: 2px; }

strong { font-weight: 700; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--fog);
  padding: 0.75rem 1rem;
  z-index: 200;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--bark-light); outline-offset: 3px; }

/* ============================================================
   Layout primitives
   ============================================================ */

.wrap {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band { padding-block: clamp(3.25rem, 8vw, 6rem); }
.band--tight { padding-block: clamp(2.25rem, 5vw, 3.5rem); }
.band--paper { background: var(--paper); }
.band--fog2  { background: var(--fog-2); }
.band--ink   { background: var(--ink); color: var(--fog); }
.band--ink .eyebrow { color: var(--fern); }

.eyebrow {
  font-family: var(--sans);
  font-size: var(--step--1);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--moss);
  margin: 0 0 1.1rem;
  font-weight: 700;
  max-width: none;
}

.section-title {
  font-size: var(--step-3);
  max-width: 22ch;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); }
.band--ink .lede,
.hero .lede { color: rgba(236, 238, 231, 0.88); }

/* ============================================================
   Masthead
   ============================================================ */

.masthead { background: var(--ink); color: var(--fog); position: relative; z-index: 50; }

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}

.wordmark {
  font-family: var(--serif);
  font-size: var(--step-1);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark em { font-style: normal; color: var(--fern); }

.nav-toggle {
  font: inherit;
  font-size: var(--step--1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: none;
  color: inherit;
  border: 1px solid rgba(236, 238, 231, 0.4);
  border-radius: 2px;
  padding: 0.5rem 0.85rem;
  cursor: pointer;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.9rem, 2vw, 1.6rem);
  font-size: var(--step--1);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.nav a {
  text-decoration: none;
  padding-block: 0.3rem;
  border-bottom: 1px solid transparent;
  color: rgba(236, 238, 231, 0.8);
  white-space: nowrap;
}
.nav a:hover { color: var(--fog); border-bottom-color: var(--fern); }
.nav a[aria-current="page"] { color: var(--fog); border-bottom-color: var(--fern); }

@media (max-width: 63rem) {
  .nav {
    display: none;
    flex-direction: column;
    gap: 0;
    width: 100%;
    order: 3;
    border-top: var(--rule-dark);
    margin-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
  .nav.is-open { display: flex; }
  .nav a { padding-block: 0.75rem; border-bottom: var(--rule-dark); }
  .masthead__inner { flex-wrap: wrap; }
}

@media (min-width: 63.01rem) {
  .nav-toggle { display: none; }
}

/* ============================================================
   Hero — signature element: canopy light
   Overlapping pools of filtered light, the way sun reaches
   the forest floor. Disabled under reduced-motion.
   ============================================================ */

.hero {
  position: relative;
  background: var(--ink);
  color: var(--fog);
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -25% -12%;
  z-index: -1;
  background:
    radial-gradient(38% 30% at 16% 10%, rgba(178, 200, 160, 0.20), transparent 70%),
    radial-gradient(26% 24% at 70% 2%,  rgba(214, 224, 178, 0.15), transparent 70%),
    radial-gradient(46% 42% at 90% 60%, rgba(120, 154, 124, 0.22), transparent 72%),
    radial-gradient(30% 34% at 38% 92%, rgba(90, 120, 96, 0.22), transparent 74%);
  animation: drift 52s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-3%, 2.5%, 0) scale(1.07); }
}

.hero__inner { padding-block: clamp(3.5rem, 11vw, 8rem); position: relative; }

.hero .kicker {
  font-size: var(--step--1);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fern);
  font-weight: 700;
  margin-bottom: 1.4rem;
}

.hero h1 { font-size: var(--step-4); max-width: 17ch; margin-bottom: 1.4rem; }
.hero h1 em { font-style: normal; color: var(--lichen); }
.hero .lede { max-width: 44ch; }

.hero--sub .hero__inner { padding-block: clamp(2.75rem, 6vw, 4.5rem); }
.hero--sub h1 { font-size: var(--step-3); max-width: 20ch; }

/* ============================================================
   Buttons
   ============================================================ */

.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }

.btn {
  display: inline-block;
  font: inherit;
  font-size: var(--step--1);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 700;
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  border: 1px solid currentColor;
  border-radius: 2px;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.btn--solid {
  background: var(--fern);
  border-color: var(--fern);
  color: var(--ink);
}
.btn--solid:hover { background: var(--lichen); border-color: var(--lichen); color: var(--ink); }

.btn--ghost { font-weight: 400; }
.hero .btn--ghost:hover, .band--ink .btn--ghost:hover { background: rgba(236, 238, 231, 0.13); }
.band .btn--ghost:hover { background: rgba(22, 33, 27, 0.07); }
.band--ink .btn--ghost:hover { background: rgba(236, 238, 231, 0.13); }

/* ============================================================
   Crisis strip
   ============================================================ */

.crisis { background: var(--bark); color: var(--paper); font-size: var(--step--1); }
.crisis__inner {
  padding-block: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.9rem;
  align-items: baseline;
}
.crisis p { margin: 0; max-width: none; }
.crisis strong { letter-spacing: 0.07em; text-transform: uppercase; }
.crisis a { color: var(--paper); }

/* ============================================================
   Grids and cards
   ============================================================ */

.grid { display: grid; gap: clamp(1.6rem, 3.5vw, 2.75rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(14.5rem, 1fr)); }

.split { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 56rem) {
  .split { grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); }
}

.card h3 { font-size: var(--step-2); margin-bottom: 0.55rem; }
.card p { max-width: 34rem; }

/* Strata rule: the three forest layers, dark to light */
.card--layered { border-top: 3px solid var(--moss); padding-top: 1.15rem; }
.card--layered:nth-child(3n+2) { border-top-color: var(--fern); }
.card--layered:nth-child(3n+3) { border-top-color: var(--lichen); }

/* ============================================================
   People
   ============================================================ */

.person { border-top: var(--rule); padding-top: 1.4rem; }
.person h3 { font-size: var(--step-2); }
.person .role {
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--moss);
  font-weight: 700;
  margin: 0.4rem 0 0.9rem;
}


/* ---- Clinician headshots ---- */
.person__photo {
  display: block;
  width: 100%;
  max-width: 14rem;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center top;
  border-radius: 2px;
  margin-bottom: 1.2rem;
  background: var(--fog-2);
}

/* ---- Square tile grid (DBT skill modules, 2 x 2) ---- */
.grid--tiles {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.5rem);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 44rem) {
  .grid--tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.card--tile {
  background: var(--paper);
  border: 1px solid var(--lichen);
  border-top: 3px solid var(--moss);
  padding: clamp(1.25rem, 3vw, 1.9rem);
  display: flex;
  flex-direction: column;
}
.card--tile h3 { font-size: var(--step-2); margin-bottom: 0.6rem; }
.card--tile p { max-width: none; }
.grid--tiles .card--tile:nth-child(2) { border-top-color: var(--fern); }
.grid--tiles .card--tile:nth-child(3) { border-top-color: var(--fern); }
.grid--tiles .card--tile:nth-child(4) { border-top-color: var(--lichen); }

/* ============================================================
   Lists
   ============================================================ */

.plainlist { list-style: none; margin: 0 0 1.1em; padding: 0; max-width: var(--measure); }
.plainlist li { padding: 0.7rem 0 0.7rem 1.5rem; border-bottom: var(--rule); position: relative; }
.plainlist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.35rem;
  width: 0.7rem;
  height: 1px;
  background: var(--fern);
}
.band--ink .plainlist li { border-bottom: var(--rule-dark); }

.facts { margin: 0; }
.facts > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.25rem;
  padding: 0.85rem 0;
  border-bottom: var(--rule);
}
.facts dt {
  flex: 0 0 10rem;
  font-size: var(--step--1);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--moss);
  font-weight: 700;
  line-height: 1.9;
}
.facts dd { margin: 0; flex: 1 1 16rem; }

.panels { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0; }
.panels li {
  border: 1px solid var(--lichen);
  background: var(--paper);
  border-radius: 2px;
  padding: 0.4rem 0.8rem;
  font-size: var(--step--1);
  letter-spacing: 0.03em;
}

.price {
  font-family: var(--serif);
  font-size: var(--step-3);
  line-height: 1;
  display: block;
}
.price + span { font-size: var(--step--1); color: var(--moss); letter-spacing: 0.06em; text-transform: uppercase; }

/* ============================================================
   Q&A accordion
   ============================================================ */

.qa { border-top: var(--rule); max-width: 48rem; }
.qa details { border-bottom: var(--rule); }
.qa summary {
  cursor: pointer;
  padding: 1.05rem 2rem 1.05rem 0;
  font-family: var(--serif);
  font-size: var(--step-1);
  line-height: 1.3;
  position: relative;
  list-style: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 1rem;
  font-size: var(--step-2);
  line-height: 1;
  color: var(--fern);
  transition: transform 160ms ease;
}
.qa details[open] summary::after { content: "\2212"; }
.qa summary:hover { color: var(--moss); }
.qa .answer { padding: 0 0 1.3rem; }
.qa .answer p { max-width: 42rem; }

/* ============================================================
   Prose pages (privacy, policies)
   ============================================================ */

.prose { max-width: 44rem; }
.prose h2 { font-size: var(--step-2); margin: 2.5rem 0 0.7rem; }
.prose h3 { font-size: var(--step-1); margin: 1.75rem 0 0.5rem; }
.prose p, .prose li { max-width: 42rem; }
.prose ul { padding-left: 1.15rem; }
.prose li { margin-bottom: 0.5rem; }
.prose .updated {
  font-size: var(--step--1);
  color: var(--moss);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
}

.callout {
  background: var(--paper);
  border-left: 3px solid var(--bark);
  padding: 1.2rem 1.4rem;
  margin: 2rem 0;
}
.callout p { max-width: none; }

/* ============================================================
   Footer
   ============================================================ */

.foot { background: var(--ink); color: rgba(236, 238, 231, 0.78); font-size: var(--step--1); }
.foot__inner { padding-block: clamp(2.5rem, 6vw, 4rem); }
.foot h2,
.foot .foot-heading {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -0.015em;
  font-size: var(--step-1);
  color: var(--fog);
  max-width: none;
  margin: 0 0 0.7rem;
}
.foot a { color: var(--fog); }
.foot p { max-width: 26rem; }
.foot__legal {
  margin-top: 2.5rem;
  padding-top: 1.4rem;
  border-top: var(--rule-dark);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  align-items: baseline;
}
.foot__legal span { color: rgba(236, 238, 231, 0.55); }

/* ============================================================
   Editing placeholder — visible highlight, delete when filled
   ============================================================ */

.placeholder {
  background: rgba(122, 93, 69, 0.18);
  border-bottom: 1px dashed var(--bark);
  padding: 0 0.15em;
}

/* ============================================================
   Motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
