/* MindHealth Psychiatry — design system */
:root {
  /*EDITMODE-BEGIN*/
  --tweak-placeholder: 0;
  /*EDITMODE-END*/

  --ink: oklch(0.22 0.025 245);
  --ink-2: oklch(0.38 0.03 245);
  --muted: oklch(0.55 0.02 245);
  --line: oklch(0.88 0.015 240);
  --line-2: oklch(0.93 0.01 240);
  --bg: oklch(0.985 0.006 95);
  --bg-2: oklch(0.965 0.012 95);
  --bg-3: oklch(0.945 0.02 220);
  --paper: #ffffff;

  --brand: oklch(0.52 0.12 245);
  --brand-ink: oklch(0.32 0.09 245);
  --brand-soft: oklch(0.94 0.03 240);
  --brand-hairline: oklch(0.82 0.06 245);

  --sage: oklch(0.62 0.06 160);
  --sage-soft: oklch(0.94 0.025 160);

  --accent: oklch(0.72 0.08 75);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 18px;

  --shadow-sm: 0 1px 2px oklch(0.2 0.03 245 / 0.06);
  --shadow: 0 1px 2px oklch(0.2 0.03 245 / 0.06), 0 12px 32px -12px oklch(0.2 0.03 245 / 0.14);

  --max: 1240px;
  --gutter: 32px;

  --f-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --f-serif: 'Instrument Serif', 'Times New Roman', Georgia, serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-sans);
  font-feature-settings: "ss01", "cv11";
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  font-size: 16px;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

/* ——— Typography */
.serif { font-family: var(--f-serif); font-weight: 400; letter-spacing: -0.01em; }
.mono { font-family: var(--f-mono); font-feature-settings: "zero"; }

h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.02em; line-height: 1.05; color: var(--ink); }
h1 { font-size: clamp(44px, 6vw, 84px); }
h2 { font-size: clamp(32px, 3.6vw, 52px); }
h3 { font-size: clamp(22px, 2vw, 28px); letter-spacing: -0.015em; line-height: 1.15; }
h4 { font-size: 18px; letter-spacing: -0.005em; }

p { margin: 0; color: var(--ink-2); line-height: 1.6; text-wrap: pretty; }

.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 500;
}

.lede { font-size: 19px; line-height: 1.55; color: var(--ink-2); max-width: 62ch; text-wrap: pretty; }

/* ——— Layout */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 96px 0; border-top: 1px solid var(--line); }
.section-sm { padding: 56px 0; }
.section-flush { padding: 0; }

.grid { display: grid; gap: 24px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .g-2, .g-3, .g-4 { grid-template-columns: 1fr; }
}

/* ——— Nav */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in oklch, var(--bg), white 70%);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.nav.scrolled {
  background: color-mix(in oklch, var(--bg), white 86%);
  border-bottom-color: var(--line-2);
  box-shadow: 0 1px 0 oklch(0.2 0.025 245 / 0.02), 0 8px 24px -16px oklch(0.2 0.025 245 / 0.18);
}
.nav-inner {
  display: flex; align-items: center; gap: 40px;
  height: 72px;
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-mark {
  width: 38px; height: 38px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text b { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; }
.logo-text span { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.18em; color: var(--muted); text-transform: uppercase; margin-top: 3px; }

.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a {
  text-decoration: none;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav-links a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.nav-links a.active { color: var(--ink); }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
}

/* ——— Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.005em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s, border-color .15s, color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--ink); color: var(--bg);
  border-color: var(--ink);
}
.btn-primary:hover { background: oklch(0.15 0.02 245); }
.btn-ghost {
  background: transparent; color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-brand {
  background: var(--brand); color: white;
  border-color: var(--brand);
}
.btn-brand:hover { background: var(--brand-ink); border-color: var(--brand-ink); }

.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(2px); }

/* ——— Tag / chip */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}
.chip.dot::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--sage);
}

/* ——— Card */
.card {
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--brand-hairline); }

/* ——— Photo placeholder */
.photo {
  position: relative;
  background-color: var(--bg-3);
  background-image:
    repeating-linear-gradient(135deg,
      oklch(0.88 0.02 240) 0 1px,
      transparent 1px 9px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 18px;
}
.photo::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, oklch(0.22 0.025 245 / 0.08));
  pointer-events: none;
}
.photo .cap {
  position: relative;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: oklch(0.35 0.04 245);
  background: color-mix(in oklch, white 75%, transparent);
  padding: 5px 9px;
  border-radius: 4px;
  text-transform: uppercase;
}
.photo.sage { background-color: var(--sage-soft); }
.photo.brand { background-color: var(--brand-soft); }

/* ——— Footer */
.foot {
  background: var(--ink);
  color: oklch(0.82 0.015 245);
  padding: 80px 0 32px;
}
.foot a { color: oklch(0.82 0.015 245); text-decoration: none; }
.foot a:hover { color: white; }
.foot h5 {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: oklch(0.65 0.02 245);
  font-weight: 500;
  margin: 0 0 14px;
}
.foot-top { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 48px; padding-bottom: 48px; border-bottom: 1px solid oklch(0.32 0.02 245); }
.foot-links { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.foot-bot {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px;
  font-family: var(--f-mono);
  font-size: 11px; letter-spacing: 0.06em;
  color: oklch(0.55 0.015 245);
}
@media (max-width: 900px) {
  .foot-top { grid-template-columns: 1fr 1fr; }
  .foot-bot { flex-direction: column; gap: 12px; align-items: flex-start; }
}

.foot .logo-mark { background: transparent; }
.foot .logo-text b { color: white; }

/* ——— Utility */
.hairline { border-top: 1px solid var(--line); }
.center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mt-12 { margin-top: 48px; } .mt-16 { margin-top: 64px; }
.mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }

.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* ——— Data list */
.dl { display: grid; grid-template-columns: 160px 1fr; gap: 14px 32px; font-size: 14px; }
.dl dt { color: var(--muted); font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; padding-top: 3px; }
.dl dd { margin: 0; color: var(--ink); }

/* ——— Number display */
.num {
  font-family: var(--f-serif);
  font-size: clamp(48px, 6vw, 88px);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--ink);
}

/* ——— Pull quote */
blockquote {
  margin: 0;
  font-family: var(--f-serif);
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}

/* ——— Author byline (E-E-A-T) */
.author-byline {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  margin: 24px 0;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  max-width: 640px;
}
.author-byline-photo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--line-2);
  flex-shrink: 0;
}
.author-byline-body { display: flex; flex-direction: column; gap: 2px; line-height: 1.3; min-width: 0; }
.author-byline-label {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.author-byline-name {
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
}
.author-byline-name:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.author-byline-meta { font-size: 12.5px; color: var(--muted); }
@media (max-width: 540px) {
  .author-byline { padding: 12px 14px; gap: 12px; }
  .author-byline-photo { width: 36px; height: 36px; }
  .author-byline-meta { font-size: 12px; }
}

/* ——— Tweaks panel */
.tweaks {
  position: fixed; bottom: 20px; right: 20px; z-index: 100;
  width: 280px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
  font-size: 13px;
  display: none;
}
.tweaks.on { display: block; }
.tweaks h6 { margin: 0 0 14px; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 500; display: flex; align-items: center; justify-content: space-between; }
.tweaks .row-t { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.tweaks label { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.tweaks .swatches { display: flex; gap: 6px; }
.tweaks .sw { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); cursor: pointer; position: relative; }
.tweaks .sw.active::after { content: ""; position: absolute; inset: -3px; border-radius: 10px; border: 2px solid var(--ink); }
.tweaks select, .tweaks input[type="text"] {
  width: 100%; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px;
  font-family: var(--f-sans); font-size: 13px;
  background: var(--paper);
}

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