/* Moynihan Therapy Group — Version A "Lowcountry Editorial"
   Palette: ivory #F6F1E7 · marsh green #22423A · ink-green #14211D · brass #A8722C · sage #E4E7DD
   Type: Fraunces (display, 400–600) + Source Sans 3 (body, 400/600)
   Register: quiet literary editorial — hairline rules, generous measure, engraved botanical marker */

:root {
  --ivory: #F6F1E7;
  --ivory-deep: #EFE8D9;
  --sage: #E4E7DD;
  --green: #22423A;
  --ink: #14211D;
  --brass: #A8722C;
  --brass-deep: #8C5E20;
  --hairline: rgba(34, 66, 58, 0.22);
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Source Sans 3', 'Avenir Next', 'Helvetica Neue', Arial, sans-serif;
  --measure: 68ch;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px; --s8: 128px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--green); text-wrap: balance; line-height: 1.15; }
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 600; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.375rem); }
h3 { font-size: 1.25rem; line-height: 1.35; }
p, li { max-width: var(--measure); }
a { color: var(--brass-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green); }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--s3); }
.prose > * + * { margin-top: var(--s2); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 241, 231, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding-top: var(--s2); padding-bottom: var(--s2); }
.brand { font-family: var(--serif); font-weight: 600; font-size: 1.125rem; color: var(--green); text-decoration: none; letter-spacing: 0.01em; }
.brand small { display: block; font-family: var(--sans); font-weight: 400; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brass-deep); margin-top: 2px; }
.nav { display: flex; align-items: center; gap: var(--s3); }
.nav a { font-weight: 600; font-size: 0.9375rem; text-decoration: none; color: var(--ink); }
.nav a[aria-current="page"] { color: var(--brass-deep); border-bottom: 2px solid var(--brass); padding-bottom: 2px; }
.nav .cta { border: 1px solid var(--green); color: var(--green); padding: 10px 18px; border-radius: 2px; transition: background 0.2s, color 0.2s; }
.nav .cta:hover { background: var(--green); color: var(--ivory); }
@media (max-width: 720px) {
  .site-header .wrap { flex-wrap: wrap; row-gap: 4px; padding-top: 10px; padding-bottom: 10px; }
  .brand { font-size: 1rem; }
  .brand small { font-size: 0.6875rem; }
  .nav { gap: var(--s2); }
  .nav a:not(.cta) { font-size: 0.875rem; }
  .nav .cta { padding: 8px 12px; font-size: 0.875rem; }
}

/* Focus visibility — shared high-contrast ring for all interactive elements */
a:focus-visible, .btn:focus-visible, .nav a:focus-visible, .faq summary:focus-visible, button:focus-visible {
  outline: 2px solid var(--brass-deep); outline-offset: 2px; border-radius: 2px;
}

/* Buttons */
.btn { display: inline-block; font-family: var(--sans); font-weight: 600; font-size: 1rem; text-decoration: none; padding: 14px 28px; border-radius: 2px; border: 1px solid var(--green); transition: background 0.2s, color 0.2s; }
.btn-primary { background: var(--green); color: var(--ivory); }
.btn-primary:hover { background: var(--ink); color: var(--ivory); }
.btn-quiet { background: transparent; color: var(--green); }
.btn-quiet:hover { background: var(--sage); color: var(--green); }

/* Hero split */
.hero { padding: var(--s7) 0 var(--s6); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--s6); align-items: center; }
.hero .kicker { font-family: var(--sans); font-weight: 600; font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brass-deep); margin-bottom: var(--s2); }
.hero p.lede { font-size: 1.1875rem; margin-top: var(--s3); }
.hero .actions { display: flex; gap: var(--s2); margin-top: var(--s4); flex-wrap: wrap; }
.hero .note { font-size: 0.875rem; color: var(--green); margin-top: var(--s2); }
.hero-media { position: relative; }
.hero-media img { border: 1px solid var(--hairline); border-radius: 2px; max-height: 560px; width: 100%; object-fit: cover; object-position: top; }
.hero-media figcaption { font-size: 0.8125rem; color: var(--green); margin-top: var(--s1); font-style: italic; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; gap: var(--s4); } .hero { padding: var(--s5) 0; } }

/* Section rhythm */
.section { padding: var(--s7) 0; }
.section.tint { background: var(--sage); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.section.deep { background: var(--green); color: var(--ivory); }
.section.deep h2, .section.deep h3 { color: var(--ivory); }
.section.deep a { color: var(--ivory-deep); }
.section-head { max-width: var(--measure); margin-bottom: var(--s5); }
.section-head .marker { margin-bottom: var(--s2); }
@media (max-width: 720px) { .section { padding: var(--s6) 0; } }

/* Engraved sweetgrass marker (engraved-book register — a hairline botanical rule, not a badge) */
.marker svg { display: block; width: 72px; height: 24px; stroke: var(--brass); stroke-width: 1; fill: none; opacity: 0.85; }
.section.deep .marker svg { stroke: var(--ivory-deep); }

/* Specialty list-cards: rectangular, hairline-bordered */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); }
.card { border: 1px solid var(--hairline); border-radius: 2px; padding: var(--s4); background: var(--ivory); }
.section.tint .card { background: var(--ivory); }
.card h3 { margin-bottom: var(--s1); }
.card p { font-size: 0.9688rem; }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }

/* Split feature bands (image + prose) */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s6); align-items: center; }
.feature + .feature { margin-top: var(--s7); }
.feature.flip .media, .feature.flip .plate-wrap { order: 2; }
.feature .media img { border: 1px solid var(--hairline); border-radius: 2px; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; gap: var(--s4); } .feature.flip .media, .feature.flip .plate-wrap { order: 0; } }

/* Full-bleed calm band */
.band { position: relative; }
.band img { width: 100%; height: 320px; object-fit: cover; }
.band .overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; background: rgba(20, 33, 29, 0.35); }
.band .overlay p, .band .overlay h1 { font-family: var(--serif); font-size: clamp(1.375rem, 3vw, 1.875rem); color: var(--ivory); max-width: 26ch; font-weight: 400; }

/* Steps — hairline-ruled rows (no numbered circles) */
.steps { border-top: 1px solid var(--hairline); max-width: 800px; }
.step { display: grid; grid-template-columns: 96px 1fr; gap: var(--s4); padding: var(--s4) 0; border-bottom: 1px solid var(--hairline); }
.step .n { font-family: var(--serif); font-weight: 400; font-size: 1.125rem; color: var(--brass-deep); }
@media (max-width: 600px) { .step { grid-template-columns: 1fr; gap: var(--s1); } }

/* Credentials band */
.creds { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s3) var(--s6); max-width: 900px; }
.creds div { border-left: 2px solid var(--brass); padding-left: var(--s3); }
.creds .label { font-size: 0.8125rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; color: var(--brass-deep); }
.section.deep .creds div { border-left-color: var(--ivory-deep); }
.section.deep .creds .label { color: var(--ivory-deep); }
@media (max-width: 720px) { .creds { grid-template-columns: 1fr; } }

/* FAQ */
.faq { max-width: 800px; }
.faq details { border-bottom: 1px solid var(--hairline); padding: var(--s3) 0; }
.faq details:first-of-type { border-top: 1px solid var(--hairline); }
.faq summary { font-family: var(--serif); font-weight: 500; font-size: 1.125rem; color: var(--green); cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
.faq summary::after { content: "+"; font-family: var(--sans); color: var(--brass-deep); font-size: 1.25rem; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: var(--s2); }

/* Forms */
.form { max-width: 560px; }
.form label { display: block; font-weight: 600; font-size: 0.9375rem; margin-top: var(--s3); margin-bottom: var(--s1); color: var(--green); }
.form input, .form textarea {
  width: 100%; font-family: var(--sans); font-size: 1rem; color: var(--ink);
  background: #FFFDF8; border: 1px solid var(--hairline); border-radius: 2px; padding: 12px 14px;
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--brass); outline-offset: 1px; }
.form button { margin-top: var(--s4); cursor: pointer; }
.form .fine { font-size: 0.8438rem; color: var(--green); margin-top: var(--s2); }

/* CTA close band */
.close-band { text-align: center; }
.close-band .inner { max-width: 620px; margin: 0 auto; }
.close-band .btn { margin-top: var(--s4); }

/* Footer */
.site-footer { background: var(--ink); color: var(--ivory-deep); padding: var(--s6) 0; margin-top: 0; }
.site-footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--s5); }
.site-footer h4 { font-family: var(--serif); font-weight: 500; font-size: 1.0625rem; color: var(--ivory); margin-bottom: var(--s2); }
.site-footer a { color: var(--ivory-deep); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; }
.site-footer li { margin-top: var(--s1); }
.site-footer .fine { grid-column: 1 / -1; border-top: 1px solid rgba(246, 241, 231, 0.18); padding-top: var(--s3); font-size: 0.8125rem; color: rgba(246, 241, 231, 0.72); }
@media (max-width: 720px) { .site-footer .wrap { grid-template-columns: 1fr; gap: var(--s4); } }

/* Inline plate images inside prose sections */
.plate { border: 1px solid var(--hairline); border-radius: 2px; }
figure.plate-fig figcaption { font-size: 0.8125rem; font-style: italic; color: var(--green); margin-top: var(--s1); }

/* Subtle reveal */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(12px); animation: rise 0.7s ease forwards; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}

/* ——— Book-register design pass (round 2) ——— */

/* Hero as composed jacket: asymmetric columns, matted portrait plate */
.hero .wrap { grid-template-columns: 1.15fr 0.85fr; }
.hero-media { position: relative; padding: 14px; background: #FFFDF8; border: 1px solid var(--hairline); box-shadow: 0 1px 0 var(--hairline); }
.hero-media::before { content: ""; position: absolute; top: 22px; right: -22px; bottom: -22px; left: 22px; background: var(--sage); border: 1px solid var(--hairline); z-index: -1; }
.hero-media img { border: none; }
.hero-media figcaption { font-style: italic; text-align: center; padding-top: var(--s1); }
.hero .kicker { display: flex; align-items: center; gap: 12px; }
.hero .kicker::before { content: ""; width: 40px; height: 1px; background: var(--brass); }

/* Chapter divider: hairline + centered fleuron */
.divider { display: flex; align-items: center; gap: var(--s3); max-width: 1120px; margin: 0 auto; padding: 0 var(--s3); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }
.divider svg { width: 56px; height: 20px; stroke: var(--brass); stroke-width: 1; fill: none; opacity: 0.8; flex: none; }

/* Table of contents (replaces the card grid) */
.toc { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2) var(--s7); max-width: 980px; }
.toc-item { padding: var(--s3) 0; border-bottom: 1px solid var(--hairline); }
.toc-line { display: flex; align-items: baseline; gap: var(--s2); }
.toc-line .n { font-family: var(--serif); font-size: 0.9375rem; color: var(--brass-deep); min-width: 28px; }
.toc-line .t { font-family: var(--serif); font-weight: 500; font-size: 1.1875rem; color: var(--green); }
.toc-line .leader { flex: 1; border-bottom: 1px dotted rgba(34, 66, 58, 0.35); transform: translateY(-4px); }
.toc-item p { font-size: 0.9375rem; margin-top: var(--s1); max-width: 44ch; }
@media (max-width: 760px) { .toc { grid-template-columns: 1fr; gap: 0; } }

/* Plate compositions for feature bands: offset panel + caption */
.feature { grid-template-columns: 0.9fr 1.1fr; }
.feature.flip { grid-template-columns: 1.1fr 0.9fr; }
.plate-wrap { position: relative; margin: 0; padding: 14px; background: #FFFDF8; border: 1px solid var(--hairline); box-shadow: 0 1px 0 var(--hairline); }
.plate-wrap::before { content: ""; position: absolute; top: 22px; right: -22px; bottom: -22px; left: 22px; background: var(--ivory); border: 1px solid var(--hairline); z-index: -1; }
.feature.flip .plate-wrap::before { right: 22px; left: -22px; }
.plate-wrap img { position: relative; z-index: 1; }
.plate-cap { font-style: italic; font-size: 0.8438rem; color: var(--green); margin-top: var(--s1); padding: 0 2px; text-align: center; }
@media (max-width: 860px) { .plate-wrap::before { display: none; } }

/* Band plate caption */
.band-cap { text-align: center; font-style: italic; font-size: 0.8438rem; color: var(--green); padding: var(--s2) var(--s3) 0; }

/* End plate close */
.end-plate { border: 1px solid var(--hairline); background: var(--ivory); padding: var(--s6) var(--s5); max-width: 720px; margin: 0 auto; }

/* Steps: roman numerals in serif */
.step .n { font-style: italic; }

/* Mobile fold: consult CTA must sit above 580px on 375-wide screens */
@media (max-width: 430px) {
  .hero { padding: var(--s3) 0 var(--s5); }
  .hero .kicker { margin-bottom: var(--s1); font-size: 0.75rem; }
  h1 { font-size: 1.9375rem; }
  .hero p.lede { font-size: 1.03125rem; margin-top: var(--s2); }
  .hero .actions { margin-top: var(--s3); }
}

/* Skip link */
.skip { position: absolute; left: -9999px; top: 0; background: var(--green); color: var(--ivory); padding: 10px 16px; z-index: 100; }
.skip:focus { left: var(--s2); }
