/* =========================================================
   Maika Keller, LCSW — Psychotherapy
   Design tokens + layout system
   ========================================================= */

:root {
  /* Palette — derived from the practice's values:
     depth (psychodynamic), the body (somatic warmth), steadiness (low
     saturation), integration (harmonious, analogous earth tones).
     Variable names retained from the prior theme so references cascade. */
  --cream:      #ece5d6;   /* OAT — calm, unhurried ground */
  --sand:       #e4dcca;   /* secondary section ground */
  --sand-deep:  #dad1bd;   /* callout panels */
  --olive:      #5c6042;   /* MOSS — the single action/interactive color */
  --olive-dark: #4a4d33;   /* moss hover */
  --clay:       #9e6a4c;   /* CLAY — somatic warmth, decorative accent only */
  --clay-dark:  #7f5136;   /* clay for text-sized use */
  --bark:       #2e2a23;   /* BARK — the deep grounding "container" */
  --ink:        #2d2820;   /* headings / dark text, warm near-black */
  --brown:      #574c40;   /* body text, warm brown */
  --muted:      #6f6556;   /* eyebrows, captions, meta (AA on oat) */
  --line:       rgba(45, 40, 32, 0.14);
  --line-soft:  rgba(45, 40, 32, 0.08);

  /* Type */
  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --body:    "Mulish", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Rhythm */
  --maxw: 1200px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --section-y: clamp(4rem, 9vw, 8rem);
  --radius: 2px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--brown);
  font-family: var(--body);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---------- Typography ---------- */
h1, h2, h3 {
  font-family: var(--display);
  color: var(--ink);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.005em;
  margin: 0;
}
h1 { font-size: clamp(2.6rem, 1.8rem + 4vw, 4.4rem); }
h2 { font-size: clamp(2.1rem, 1.5rem + 2.8vw, 3.3rem); }
h3 { font-size: clamp(1.4rem, 1.2rem + 0.7vw, 1.7rem); font-weight: 600; }
p  { margin: 0 0 1.15rem; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.4rem;
  display: block;
}

/* short rule that sits under headings — a recurring signature */
.rule {
  width: 42px;
  height: 1px;
  background: var(--clay);
  border: 0;
  margin: 1.6rem 0 0;
}

/* ---------- Layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); }
.section--sand { background: var(--sand); }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1.05rem 2rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn--primary { background: var(--olive); color: #f4f0e6; }
.btn--primary:hover { background: var(--olive-dark); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(236, 229, 214, 0.96);
  border-bottom: 1px solid var(--line-soft);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 78px;
}
.brand { text-decoration: none; line-height: 1.2; }
.brand__name {
  display: block;
  font-family: var(--body);
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-transform: uppercase;
}
.brand__tag {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.nav { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2.25rem); }
.nav a {
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 0.4rem 0;
  position: relative;
}
.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--olive);
  transition: width 0.25s var(--ease);
}
.nav a:not(.btn):hover::after,
.nav a[aria-current="page"]::after { width: 100%; }
.nav a:not(.btn)[aria-current="page"] { color: var(--olive); }

/* mobile toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  min-height: min(88vh, 760px);
}
.hero__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 6vw, 6rem) var(--gutter);
  padding-left: max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter)));
}
.hero__text .lede { max-width: 34ch; margin-top: 2.2rem; }
.hero__cta { margin-top: 2.4rem; }
.hero__media {
  position: relative;
  background: var(--sand-deep);
  overflow: hidden;
}
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

/* ---------- Generic intro block ---------- */
.page-intro { padding-top: clamp(3rem, 7vw, 6rem); }
.measure { max-width: 62ch; }

/* ---------- Three-column editorial grid ---------- */
.cols3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.cols3 .col > .eyebrow { margin-bottom: 1rem; }

/* focus list with check marks */
.focus-list { list-style: none; margin: 0; padding: 0; }
.focus-list li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.9rem;
  color: var(--brown);
}
.focus-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.5em;
  width: 15px; height: 15px;
  border: 1px solid var(--clay);
  border-radius: 50%;
  background:
    linear-gradient(45deg, transparent 44%, var(--clay) 44%, var(--clay) 56%, transparent 56%),
    linear-gradient(-45deg, transparent 44%, var(--clay) 44%, var(--clay) 56%, transparent 56%);
  background-size: 8px 8px;
  background-position: center;
  background-repeat: no-repeat;
  transform: translateY(-1px);
}

/* bullet list variant (working together) */
.dot-list { list-style: none; margin: 0; padding: 0; }
.dot-list li { position: relative; padding-left: 1.4rem; margin-bottom: 1.1rem; }
.dot-list li::before {
  content: "";
  position: absolute; left: 0; top: 0.7em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--clay);
}

/* ---------- Callout panel ---------- */
.panel {
  background: var(--sand);
  padding: clamp(2rem, 5vw, 3.5rem);
  border-radius: var(--radius);
}
.panel--center { text-align: center; }
.panel--center .measure { margin-inline: auto; }
.panel .eyebrow { text-align: center; }

/* ---------- Q&A ---------- */
.qa-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 5vw, 4rem) clamp(2.5rem, 6vw, 5rem);
}
.qa-item { border-bottom: 1px solid var(--line-soft); padding-bottom: 1.75rem; }
.qa-item h3 { font-family: var(--display); font-weight: 500; font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.6rem); margin-bottom: 0.9rem; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}
.field { margin-bottom: 1.4rem; }
.field label {
  display: block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.section--sand .field input,
.section--sand .field select,
.section--sand .field textarea { background: #f3ecdd; }
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--olive);
  box-shadow: 0 0 0 3px rgba(92, 96, 66, 0.20);
}
.field--error input,
.field--error select,
.field--error textarea { border-color: #a23c2f; }
.field-msg { font-size: 0.8rem; color: #a23c2f; margin-top: 0.4rem; min-height: 1rem; }
.form-note { font-size: 0.85rem; color: var(--muted); margin-top: 1rem; }
.form-status {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  background: var(--sand-deep);
  color: var(--ink);
  font-size: 0.95rem;
}
.form-status[hidden] { display: none; }

.info-list { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.info-list li { margin-bottom: 1.1rem; }
.info-list .k {
  display: block;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 0.25rem;
}
.info-list a { color: var(--olive); text-decoration: none; }
.info-list a:hover { text-decoration: underline; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--bark);
  color: #ece4d2;
}
.cta-band h2 { color: #f6f2e8; font-weight: 500; }
.cta-band p { color: rgba(236, 228, 210, 0.88); max-width: 52ch; }
.cta-band .btn--primary { background: #efe8d9; color: var(--bark); }
.cta-band .btn--primary:hover { background: #fff; }
.cta-band__inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 1.75rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--cream);
  border-top: 1px solid var(--line-soft);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}
.site-footer__inner {
  display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 1.5rem;
  align-items: center;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.site-footer a { text-decoration: none; font-size: 0.82rem; color: var(--brown); }
.site-footer a:hover { color: var(--olive); }
.site-footer .muted { font-size: 0.8rem; color: var(--muted); }
.disclaimer { font-size: 0.78rem; color: var(--muted); max-width: 70ch; margin-top: 1.5rem; }

/* subtle reveal on scroll — only hides when JS is present AND motion allowed,
   so content is always visible if JS fails or is disabled */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: unset; }
  .hero__media { order: -1; aspect-ratio: 4 / 3; }
  .hero__text { padding-inline: var(--gutter); }
  .cols3 { grid-template-columns: 1fr; gap: 2.5rem; }
  .qa-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; z-index: 120; }
  .nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(80vw, 320px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.75rem;
    background: var(--cream);
    padding: 2rem var(--gutter);
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
    box-shadow: -10px 0 40px rgba(0,0,0,0.08);
  }
  .nav a { font-size: 0.95rem; }
  body.nav-open .nav { transform: translateX(0); }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-backdrop {
    position: fixed; inset: 0;
    background: rgba(42,41,37,0.35);
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s var(--ease);
    z-index: 110;
  }
  body.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }
  .cta-band__inner { flex-direction: column; align-items: flex-start; }
}

/* visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 2px;
}
