/* Rostam Psychiatry — single stylesheet. Fonts are self-hosted; nothing loads from elsewhere. */

@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-latin-wght-italic.woff2") format("woff2");
  font-weight: 200 800; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}

:root {
  --ink: #14302b;
  --muted: #4c605b;
  --paper: #f5f8f7;
  --surface: #ffffff;
  --line: #dbe5e1;
  --teal: #0d6b55;
  --teal-deep: #0a4f40;
  --on-teal: #ffffff;
  --tint: #e4f0ec;
  --tint-line: #b7d6cb;
  --brass: #a9843f;
  --no-bg: #fbf1ef;
  --no-line: #e9c4be;
  --no-ink: #7a3a33;
  --alert-bg: #fdf3f1;
  --alert-line: #b4443a;
  --alert-ink: #5e2f2a;
  --footer-bg: #0c2824;
  --footer-ink: #eaf2ef;
  --footer-muted: #a9bdb7;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --gutter: 1.5rem;
  --max: 1160px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e8f0ed;
    --muted: #a9bbb5;
    --paper: #0f1a18;
    --surface: #15221f;
    --line: #28403a;
    --teal: #5fd0aa;
    --teal-deep: #8fe0c4;
    --on-teal: #06231b;
    --tint: #17302a;
    --tint-line: #2a5446;
    --brass: #c9a45c;
    --no-bg: #2a1c1a;
    --no-line: #5c3733;
    --no-ink: #f0cdc8;
    --alert-bg: #2b1a18;
    --alert-line: #e07a6e;
    --alert-ink: #f1cfca;
    --footer-bg: #091a17;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --ink: #e8f0ed;
    --muted: #a9bbb5;
    --paper: #0f1a18;
    --surface: #15221f;
    --line: #28403a;
    --teal: #5fd0aa;
    --teal-deep: #8fe0c4;
    --on-teal: #06231b;
    --tint: #17302a;
    --tint-line: #2a5446;
    --brass: #c9a45c;
    --no-bg: #2a1c1a;
    --no-line: #5c3733;
    --no-ink: #f0cdc8;
    --alert-bg: #2b1a18;
    --alert-line: #e07a6e;
    --alert-ink: #f1cfca;
    --footer-bg: #091a17;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--teal); text-underline-offset: .2em; }
a:hover { color: var(--teal-deep); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--tint-line); color: var(--ink); }

.skip-link { position: absolute; left: -999px; top: 0; z-index: 200; background: var(--teal); color: var(--on-teal); padding: .75rem 1rem; }
.skip-link:focus { left: 0; }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 450; color: var(--ink); line-height: 1.12; letter-spacing: -.012em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.3rem); }
h1 em, h2 em { font-style: italic; color: var(--teal); font-weight: 400; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.35rem; line-height: 1.25; }
p + p { margin-top: 1rem; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 36rem; line-height: 1.6; }
.small { font-size: .92rem; color: var(--muted); }
.center { text-align: center; }
.eyebrow {
  display: flex; align-items: center; gap: .75rem;
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--teal);
  margin-bottom: 1.1rem;
}
.eyebrow::before { content: ""; width: 2rem; height: 2px; background: var(--brass); }

/* ---------- Utilities (the CSP blocks inline styles) ---------- */
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.justify-center { justify-content: center; }

/* ---------- Layout ---------- */
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 46rem; }
.section { padding: 6rem 0; }
.section--surface { background: var(--surface); border-block: 1px solid var(--line); }
section[id] { scroll-margin-top: 4.5rem; }
.section-head { max-width: 44rem; margin-bottom: 3rem; }
.section-head p { color: var(--muted); font-size: 1.12rem; margin-top: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { max-width: var(--max); margin: 0 auto; padding: .9rem var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { text-decoration: none; color: var(--ink); font-family: var(--serif); font-size: 1.55rem; font-weight: 500; line-height: 1.05; letter-spacing: -.01em; }
.brand { display: inline-flex; align-items: center; gap: .65rem; }
.brand-mark { height: 3rem; width: auto; flex: none; }
.bm-barbs { fill: none; stroke: var(--teal); stroke-width: 6.5; stroke-linecap: round; }
.bm-quill { fill: none; stroke: var(--brass); stroke-width: 9; stroke-linecap: round; }
.brand-text span { color: var(--teal); font-style: italic; }
.brand small { display: block; font-family: var(--sans); font-size: .7rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: .3rem; }
.site-nav { display: flex; align-items: center; gap: 1.6rem; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: .95rem; font-weight: 500; }
.site-nav a:hover { color: var(--teal); }
.site-nav a.btn { color: var(--on-teal); padding: .6rem 1.2rem; }
.nav-toggle { display: none; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; background: none; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.nav-toggle svg { width: 1.4rem; height: 1.4rem; }
.back-link { font-size: .95rem; font-weight: 500; text-decoration: none; }
.back-link:hover { text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; text-decoration: none; cursor: pointer; font: inherit; font-weight: 600; font-size: .98rem; padding: .9rem 1.6rem; border-radius: var(--radius-sm); border: 1.5px solid var(--teal); transition: background-color .15s, color .15s, border-color .15s; }
.btn--primary { background: var(--teal); color: var(--on-teal); }
.btn--primary:hover { background: var(--teal-deep); border-color: var(--teal-deep); color: var(--on-teal); }
.btn--ghost { background: transparent; color: var(--teal); }
.btn--ghost:hover { background: var(--tint); color: var(--teal-deep); }
.btn-row { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.25rem; }

/* ---------- Hero ---------- */
.hero { padding: 5.5rem 0 6rem; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 4.5rem; align-items: center; }
.hero h1 { margin-bottom: 1.5rem; }

/* Signature: a video-frame with corner brackets. */
.frame { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 2.25rem 2.1rem; }
.frame::before {
  content: ""; position: absolute; inset: -12px; pointer-events: none;
  background:
    linear-gradient(var(--brass), var(--brass)) top left / 26px 2px no-repeat,
    linear-gradient(var(--brass), var(--brass)) top left / 2px 26px no-repeat,
    linear-gradient(var(--brass), var(--brass)) top right / 26px 2px no-repeat,
    linear-gradient(var(--brass), var(--brass)) top right / 2px 26px no-repeat,
    linear-gradient(var(--brass), var(--brass)) bottom left / 26px 2px no-repeat,
    linear-gradient(var(--brass), var(--brass)) bottom left / 2px 26px no-repeat,
    linear-gradient(var(--brass), var(--brass)) bottom right / 26px 2px no-repeat,
    linear-gradient(var(--brass), var(--brass)) bottom right / 2px 26px no-repeat;
}
.frame-label { display: flex; align-items: center; gap: .55rem; font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--teal); margin-bottom: 1.25rem; }
.frame-label::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: var(--teal); }
.frame h2 { font-size: 1.6rem; margin-bottom: 1.5rem; }
.facts { display: grid; gap: 0; }
.fact { padding: .95rem 0; border-top: 1px solid var(--line); }
.fact dt { font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.fact dd { margin: .25rem 0 0; font-weight: 500; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; }
.card--tint { background: var(--tint); border-color: var(--tint-line); }
.card h3 { margin-bottom: .75rem; }
.card p, .card li { font-size: 1rem; }
.section--surface .card { background: var(--paper); }
.section--surface .card--tint { background: var(--tint); }

/* ---------- Suitability ---------- */
.fit { border-radius: var(--radius); padding: 2rem; }
.fit--yes { background: var(--tint); border: 1px solid var(--tint-line); }
.fit--no { background: var(--no-bg); border: 1px solid var(--no-line); }
.fit h3 { margin-bottom: 1.1rem; }
.fit--no h3 { color: var(--no-ink); }
.marks { list-style: none; padding: 0; display: grid; gap: .8rem; }
.marks li { position: relative; padding-left: 1.85rem; }
.marks li::before { content: ""; position: absolute; left: 0; top: .42em; width: 1rem; height: 1rem; }
.fit--yes .marks li::before { width: .5rem; height: .85rem; left: .25rem; top: .28em; border: solid var(--teal); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.fit--no .marks li::before {
  color: var(--no-ink);
  background:
    linear-gradient(45deg, transparent 43%, currentColor 43% 57%, transparent 57%),
    linear-gradient(-45deg, transparent 43%, currentColor 43% 57%, transparent 57%);
}
.fit--no .marks li { color: var(--ink); }

.rows { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.rows li { display: grid; grid-template-columns: 17rem 1fr; gap: 1.5rem; padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
.rows strong { font-weight: 600; }
.rows span { color: var(--muted); }
.subhead { margin: 4rem 0 .5rem; }
.note { margin-top: 2rem; padding: 1.25rem 1.5rem; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--brass); border-radius: var(--radius-sm); color: var(--muted); font-size: .98rem; }
.note strong { color: var(--ink); }
.note p + p { margin-top: .6rem; }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; counter-reset: step; }
.step { position: relative; padding-top: 1.1rem; border-top: 2px solid var(--line); }
.step::before { counter-increment: step; content: counter(step); display: block; font-family: var(--serif); font-size: 2.4rem; line-height: 1; color: var(--brass); margin-bottom: .6rem; }
.step strong { display: block; font-size: 1.05rem; margin-bottom: .3rem; }
.step span { font-size: .96rem; color: var(--muted); }

.checklist { list-style: none; padding: 0; columns: 2; column-gap: 2.5rem; margin-top: 1.25rem; }
.checklist li { position: relative; padding-left: 1.4rem; margin-bottom: .7rem; break-inside: avoid; font-size: 1rem; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .7em; width: .6rem; height: 2px; background: var(--brass); }
.stack > * + * { margin-top: 2rem; }
.secure-box { text-align: center; padding: 2.5rem 2rem; }
.secure-box p { max-width: 38rem; margin-left: auto; margin-right: auto; }

/* ---------- Fees ---------- */
.fee { display: grid; gap: 1rem; padding-block: .5rem; }
.fee-label { margin-top: -.25rem; margin-bottom: .5rem; }
.grid-2 .checklist { columns: 1; }
.fee-amount { font-family: var(--serif); font-size: clamp(4rem, 9vw, 6.5rem); font-weight: 400; line-height: .95; color: var(--teal); letter-spacing: -.03em; }
.fee-label { font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: .75rem; }
.table-wrap { overflow-x: auto; margin-inline: -.25rem; }
.fee-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .98rem; }
.fee-table th, .fee-table td { padding: .85rem .5rem; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
.fee-table th[scope="row"], .fee-table thead th:first-child { text-align: left; font-weight: 500; }
.fee-table thead th { font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.fee-table .item-no { display: block; margin-top: .2rem; font-size: .8rem; font-weight: 400; color: var(--muted); letter-spacing: .01em; }
.fee-table td:last-child { color: var(--teal); font-weight: 600; }
@media (max-width: 560px) { .fee-table { font-size: .9rem; } .fee-table th, .fee-table td { padding: .7rem .35rem; } }
.fee ul { list-style: none; padding: 0; display: grid; gap: .75rem; margin-top: .5rem; }
.fee li { padding-left: 1.4rem; position: relative; }
.fee li::before { content: ""; position: absolute; left: 0; top: .7em; width: .6rem; height: 2px; background: var(--brass); }

/* ---------- Alerts ---------- */
.emergency { margin-top: 2.5rem; padding: 1.2rem 1.5rem; background: var(--alert-bg); border-left: 4px solid var(--alert-line); border-radius: var(--radius-sm); font-size: .98rem; color: var(--alert-ink); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.contact-block { padding: 1.6rem; }
.contact-block h3 { font-family: var(--sans); font-size: .76rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }
.contact-block p { font-size: 1.05rem; word-break: break-word; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); padding: 3.5rem 0; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.site-footer .brand { color: var(--footer-ink); }
.site-footer .brand-text span { color: #6fd8b4; }
.site-footer .bm-barbs { stroke: #6fd8b4; }
.site-footer .bm-quill { stroke: #c9a45c; }
.site-footer a { color: var(--footer-ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: var(--footer-ink); }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; font-size: .95rem; align-items: flex-start; }
.footer-small { font-size: .88rem; color: var(--footer-muted); max-width: 44rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid #234640; }

/* ---------- Long-form pages ---------- */
.doc { padding: 4rem 0 5rem; }
.doc h1 { font-size: clamp(2.1rem, 4.5vw, 3rem); margin-bottom: .75rem; }
.doc h2 { margin: 3.5rem 0 1rem; font-size: 1.85rem; }
.doc h3 { margin: 2rem 0 .5rem; font-family: var(--sans); font-size: 1.02rem; font-weight: 600; letter-spacing: 0; color: var(--ink); }
.doc p, .doc li { font-size: 1.02rem; }
.doc ul { padding-left: 1.4rem; margin: .75rem 0 1rem; }
.doc li + li { margin-top: .4rem; }
.doc .callout { background: var(--tint); border: 1px solid var(--tint-line); border-radius: var(--radius); padding: 1.4rem 1.6rem; margin: 2rem 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 3.5rem; }
  .grid-3, .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .rows li { grid-template-columns: 1fr; gap: .25rem; }
}
@media (max-width: 860px) {
  .section { padding: 4rem 0; }
  .hero { padding: 3.5rem 0 4.5rem; }
  .grid-2 { grid-template-columns: 1fr; }
  .checklist { columns: 1; }
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: .25rem; padding: .75rem var(--gutter) 1.25rem; background: var(--surface); border-bottom: 1px solid var(--line); }
  .js .site-nav.is-open { display: flex; }
  .js .site-nav a { padding: .7rem 0; }
  .js .site-nav a.btn { text-align: center; margin-top: .5rem; padding: .85rem 1.2rem; }
  html:not(.js) .header-inner { flex-wrap: wrap; }
  html:not(.js) .site-nav { flex-wrap: wrap; gap: .5rem 1rem; }
}
@media (max-width: 560px) {
  :root { --gutter: 1.1rem; }
  .grid-3, .contact-grid, .steps { grid-template-columns: 1fr; }
  .btn-row .btn { width: 100%; text-align: center; }
  .card, .fit { padding: 1.5rem; }
  .frame { padding: 1.75rem 1.4rem; }
  .brand { font-size: 1.35rem; }
  .brand-mark { height: 2.6rem; }
}
@media print {
  .site-header, .nav-toggle, .skip-link { display: none; }
  body { background: #fff; color: #000; }
}
