/* ============================================================
   InPsych Health — design tokens
   Direction: editorial luxury (Singer Reimagined reference).
   Palette: monochrome — white, soft greys, near-black ink.
   Type: Fraunces (serif, italic accents) + Inter Tight
   (spaced-uppercase micro labels). Signature motif: stippled
   ring, drawn from the practice logo.
   ============================================================ */

:root {
  --white: #ffffff;
  --off: #fafafa;        /* soft section background */
  --grey-100: #f0f0f0;   /* hero band */
  --grey-200: #e3e3e3;   /* hairlines */
  --grey-600: #5c5c5c;   /* secondary text, eyebrows on light */
  --ink: #111111;
  --ink-deep: #0c0c0c;   /* footer */
  --on-dark: #d6d6d6;    /* body text on dark */
  --on-dark-soft: #a3a3a3;
  --line-on-dark: #2b2b2b;

  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Inter Tight", "Segoe UI", Arial, sans-serif;

  --shell: 1200px;
  --size: 375;
}

@media (min-width: 768px)  { :root { --size: 768; } }
@media (min-width: 1024px) { :root { --size: 1024; } }
@media (min-width: 1280px) { :root { --size: 1440; } }

/* Fluid root size, after the reference site's technique:
   30% of the size scales with the viewport, 70% stays fixed. */
html {
  --vw-ratio: 0.3;
  font-size: calc(100vw / var(--size) * 16 * var(--vw-ratio) + 1rem * (1 - var(--vw-ratio)));
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; height: auto; }

.shell {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 em, h2 em, blockquote em {
  font-style: italic;
  font-weight: 300;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--ink); }

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

/* ---------- micro labels & buttons ---------- */

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey-600);
  margin-bottom: 1.1rem;
}

.eyebrow-on-dark { color: var(--on-dark-soft); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.8rem 1.8rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.btn-dark {
  background: var(--ink);
  color: var(--white);
}
.btn-dark:hover { background: #2e2e2e; }

.btn-outline {
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
}
.btn-outline:hover {
  background: var(--ink);
  color: var(--white);
}

.btn-accent {
  background: var(--white);
  color: var(--ink);
}
.btn-accent:hover { background: var(--grey-200); }

.link-quiet {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
}
.link-quiet:hover { color: var(--grey-600); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--white);
  border-bottom: 1px solid var(--grey-200);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: 4.5rem;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.wordmark span { font-style: italic; font-weight: 300; }

.site-nav {
  display: flex;
  gap: 2.25rem;
  margin-inline: auto;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.5rem 0;
}
.site-nav a:hover { color: var(--grey-600); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-book {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
  white-space: nowrap;
}
.header-book:hover { color: var(--grey-600); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 1px solid var(--grey-200);
  border-radius: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 160ms ease;
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- hero ---------- */

.hero {
  background: var(--grey-100);
  padding: 6rem 0 5.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.6rem, 5.2vw, 4.25rem);
  max-width: 14ch;
  margin-bottom: 0.45em;
}

.lede {
  font-size: 1.0625rem;
  color: var(--grey-600);
  max-width: 46ch;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.hero-mark {
  position: relative;
  margin: 0;
  color: var(--ink);
  display: grid;
  place-items: center;
}

.stipple-ring { width: min(100%, 460px); display: block; }

.ring-quote {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
}

.ring-quote p {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  color: var(--ink);
}
.ring-quote span { font-style: italic; font-weight: 300; }

/* ---------- statement sections ---------- */

.statement {
  background: var(--white);
  padding: 7rem 0;
}

.statement-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.glyph {
  width: 40px;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.statement-text {
  font-size: clamp(1.7rem, 3.2vw, 2.7rem);
  font-weight: 300;
  line-height: 1.25;
  max-width: 26ch;
  margin-bottom: 0;
}

.statement .btn { margin-top: 2.5rem; }

/* ---------- section scaffolding ---------- */

.section { padding: 6rem 0; }

.section-sand {
  background: var(--off);
  border-block: 1px solid var(--grey-200);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 3rem;
}

.section-label h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }

.about-photo {
  margin: 2rem 0 0;
}

.about-photo img {
  display: block;
  width: 100%;
  max-width: 360px;
  border-radius: 0.75rem;
}

.label-sub {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey-600);
}

.section-body .body-lg {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  font-weight: 300;
  line-height: 1.4;
  margin-bottom: 1.25em;
}
.section-body .body-lg em { font-style: italic; }

.section-body > p { color: var(--grey-600); max-width: 58ch; }

.aside {
  border-left: 2px solid var(--ink);
  padding-left: 1.2rem;
  color: var(--grey-600);
  font-size: 0.9375rem;
  max-width: 52ch;
}

/* index-style section headings — italic serif word + spaced caps */

.index-head-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--grey-200);
  padding-bottom: 1.1rem;
  margin-bottom: 3rem;
}

.index-head {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  margin: 0;
}

.index-head em {
  font-style: italic;
  font-weight: 300;
}

.index-head span {
  font-family: var(--font-body);
  font-size: 0.62em;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.index-note {
  font-size: 0.8125rem;
  color: var(--grey-600);
}

/* ---------- approach cards ---------- */

.approach-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (min-width: 1280px) {
  .approach-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.approach-card {
  background: var(--off);
  border: 1px solid var(--grey-200);
  border-radius: 0.75rem;
  padding: 2.25rem 2rem;
}

.card-tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--grey-600);
  margin-bottom: 1.4rem;
}

.approach-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.6em;
}

.approach-card p:last-child {
  color: var(--grey-600);
  font-size: 0.9375rem;
}

/* ---------- dark philosophy band ---------- */

.dark-band {
  background: var(--ink);
  color: var(--white);
  padding: 7rem 0;
}

.dark-inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 4rem;
  align-items: center;
}

.dark-mark {
  position: relative;
  margin: 0;
  color: var(--white);
  display: grid;
  place-items: center;
}

.dark-mark .ring-quote p { color: var(--white); }

.dark-band blockquote { margin: 0; }

.dark-band blockquote p {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 300;
  line-height: 1.3;
  margin-bottom: 0.9em;
}

.dark-sub {
  color: var(--on-dark);
  max-width: 48ch;
  font-size: 0.9875rem;
}

/* ---------- steps ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
}

.step-num {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--grey-600);
  border-top: 1px solid var(--grey-200);
  padding-top: 1.1rem;
  margin-bottom: 1.2rem;
}

.steps h3 { font-size: 1.35rem; margin-bottom: 0.4em; }

.steps li > p:last-child {
  color: var(--grey-600);
  font-size: 0.9375rem;
}

/* ---------- checklist ---------- */

.checklist {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.checklist li {
  position: relative;
  padding: 0.4rem 0 0.4rem 2.1rem;
  color: var(--grey-600);
}

.checklist li strong { color: var(--ink); }

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px dotted var(--ink);
}

.checklist li::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 1.29rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink-deep);
  color: var(--white);
}

.site-footer a { color: var(--white); }

.site-footer .btn-accent { color: var(--ink); }

.footer-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding-block: 5rem 3.5rem;
  border-bottom: 1px solid var(--line-on-dark);
}

.footer-cta h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 300;
  margin-bottom: 0.3em;
}

.footer-cta p {
  color: var(--on-dark);
  max-width: 44ch;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr);
  gap: 2.5rem;
  padding-block: 3rem;
}

.wordmark-footer {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
  color: var(--white);
}
.wordmark-footer span { font-style: italic; font-weight: 300; }

.footer-tag {
  color: var(--on-dark);
  font-size: 0.875rem;
  max-width: 34ch;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer-nav a {
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  width: fit-content;
}
.footer-nav a:hover { color: var(--on-dark-soft); }

.crisis-note {
  font-size: 0.8438rem;
  color: var(--on-dark);
  border: 1px solid var(--line-on-dark);
  border-radius: 0.75rem;
  padding: 1rem 1.2rem;
  height: fit-content;
}
.crisis-note a { color: var(--white); font-weight: 600; }

.footer-base {
  border-top: 1px solid var(--line-on-dark);
  padding-block: 1.4rem;
}

.footer-base p {
  font-size: 0.78rem;
  color: var(--on-dark-soft);
}

/* ---------- motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .hero { padding: 3.5rem 0 4.5rem; }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-mark {
    order: -1;
    justify-self: center;
  }

  .stipple-ring { width: min(66vw, 340px); }

  .statement { padding: 5rem 0; }

  .section, .dark-band { padding: 4.5rem 0; }

  .section-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .dark-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .dark-mark { max-width: 300px; margin-inline: auto; }

  .steps { grid-template-columns: 1fr; gap: 2rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 760px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 4.5rem;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--grey-200);
    padding: 0.5rem clamp(20px, 4vw, 48px) 1rem;
    margin-inline: 0;
  }

  .site-nav.open { display: flex; }

  .site-nav a {
    padding: 1rem 0;
    border-bottom: 1px solid var(--grey-200);
  }
  .site-nav a:last-child { border-bottom: none; }

  .nav-toggle { display: flex; }

  .header-actions { margin-left: auto; }

  .approach-grid { grid-template-columns: 1fr; }

  .footer-cta { flex-direction: column; align-items: flex-start; }
}
