/* Figure8Therapy design previews: one shared stylesheet, three themes.
   Each page sets body.theme-landscape | theme-portrait | theme-editorial. */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --bar-h: 2.75rem;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 14px;

  /* Theme tokens (overridden per theme) */
  --bg: #fff;
  --bg-alt: #f5f5f5;
  --ink: #1b1d21;
  --ink-soft: #3d4148;
  --accent: #134e4a;
  --accent-ink: #fff;
  --heading: #134e4a;
  --rule: #d9d4c8;
  --focus: #b3501d;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
p { margin: 0 0 1.1em; }
h1, h2 { font-family: var(--font-head); color: var(--heading); font-weight: 500; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.5rem); margin-bottom: .2em; }
ul[role="list"] { list-style: none; margin: 0; padding: 0; }

a { color: var(--accent); text-underline-offset: .2em; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 46rem; }

.section { padding-block: clamp(3.5rem, 8vw, 6rem); scroll-margin-top: var(--bar-h); }

.eyebrow {
  font-size: .8125rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: .9rem;
}
.lede {
  font-family: var(--font-head);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 6px;
}
.skip-link:focus { top: .5rem; }

/* ---------- Design preview switcher ---------- */
.preview-bar {
  position: sticky; top: 0; z-index: 50;
  min-height: var(--bar-h);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: .25rem .9rem;
  padding: .35rem var(--gutter);
  background: #1d1f22; color: #e9e6df;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: .875rem; line-height: 1.3;
}
.preview-title { font-weight: 600; letter-spacing: .04em; color: #bdb8ae; }
.preview-bar ul { display: flex; flex-wrap: wrap; gap: .25rem; }
.preview-bar a {
  display: inline-block; padding: .3rem .7rem; border-radius: 999px;
  color: #e9e6df; text-decoration: none; border: 1px solid transparent;
}
.preview-bar a:hover { border-color: #6b6760; }
.preview-bar a[aria-current="page"] {
  background: #f6efe2; color: #1d1f22; font-weight: 700;
  text-decoration: underline; text-underline-offset: .25em;
}
.preview-bar a:focus-visible { outline-color: #ffc56b; }

/* ---------- Site header ---------- */
.site-header { padding-block: 1.1rem; }
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .9rem 1.75rem;
}
.wordmark {
  font-family: var(--font-head);
  font-size: 1.75rem; line-height: 1.1; margin: 0;
  color: var(--heading); text-decoration: none;
}
.site-nav ul { display: flex; flex-wrap: wrap; gap: .2rem 1.25rem; }
.site-nav a {
  color: var(--ink); text-decoration: none; font-size: .975rem;
  padding: .3rem 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--accent); }

.button {
  display: inline-block;
  background: var(--accent); color: var(--accent-ink);
  padding: .65rem 1.25rem; border-radius: 999px;
  font-weight: 600; font-size: .95rem; text-decoration: none; line-height: 1.3;
}
.button:hover { filter: brightness(1.08); }

@media (max-width: 52rem) {
  .header-inner { justify-content: flex-start; }
  .site-nav { order: 3; width: 100%; }
}

/* ---------- Shared layout pieces ---------- */
.about-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 52rem) { .about-grid:has(.about-media) { grid-template-columns: 1fr 1fr; } }

.with-photo { display: grid; gap: clamp(1.75rem, 5vw, 3.5rem); align-items: center; }

.contact-grid { display: grid; gap: 2rem; align-items: start; }

.actions { display: grid; gap: .75rem; }
.action-preview {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .95rem 1.15rem;
  border: 1.5px dashed var(--rule);
  border-radius: var(--radius);
  background: var(--bg);
  font-weight: 600; color: var(--heading);
}
.action-tag {
  flex-shrink: 0;
  font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  padding: .15rem .55rem; border-radius: 999px;
  background: var(--bg-alt); color: var(--ink-soft);
}
.preview-note { margin-top: .9rem; font-size: .9rem; color: var(--ink-soft); font-style: italic; }

.site-footer { padding-block: 2.5rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 2rem; }
.tagline { margin: 0; font-family: var(--font-head); font-style: italic; font-size: 1.15rem; }

/* =========================================================
   Landscape: cream, deep teal, burnt orange. Closest to the mock-up.
   ========================================================= */
.theme-landscape {
  --bg: #fbf4e6;
  --bg-alt: #f2e2c4;
  --ink: #23302f;
  --ink-soft: #4a5654;
  --heading: #0f4a4c;
  --accent: #b14a1b;
  --rule: #c9a77a;
  --focus: #0f4a4c;
}
.theme-landscape .site-header { background: var(--bg); }
.theme-landscape .about { position: relative; padding-bottom: clamp(5rem, 10vw, 7.5rem); }
.theme-landscape .about-media img {
  width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: 28px 28px 28px 120px;
  box-shadow: 0 18px 40px -22px rgba(15, 74, 76, .55);
}
.theme-landscape .wave {
  position: absolute; left: 0; right: 0; bottom: -1px;
  width: 100%; height: clamp(40px, 6vw, 80px);
  fill: var(--bg-alt);
}
.theme-landscape .expect { background: var(--bg-alt); }
.theme-landscape .practice { background: var(--bg); }
.theme-landscape .contact { background: var(--bg-alt); }
.theme-landscape .narrow.with-photo { max-width: var(--wrap); }
.theme-landscape .side-photo img { border-radius: var(--radius); width: 100%; object-fit: cover; }
.theme-landscape .photo-tall img { aspect-ratio: 4 / 5; max-height: 34rem; }
.theme-landscape .photo-wide img { aspect-ratio: 4 / 3; }
.theme-landscape .lede { color: var(--heading); }
.theme-landscape .lede::after {
  content: ""; display: block; width: 3.5rem; height: 2px; margin-top: .9rem;
  background: var(--accent);
}
@media (min-width: 52rem) {
  .theme-landscape .with-photo { grid-template-columns: 5fr 7fr; }
  .theme-landscape .practice .with-photo { grid-template-columns: 7fr 5fr; }
  .theme-landscape .practice .side-photo { order: 2; }
  .theme-landscape .contact-grid { grid-template-columns: 10rem 1.25fr minmax(17rem, 1fr); gap: 2.5rem; }
}
.theme-landscape .contact-portrait img {
  width: 10rem; aspect-ratio: 1; object-fit: cover; object-position: 50% 30%;
  border-radius: 50%; border: 5px solid var(--bg);
  box-shadow: 0 10px 30px -16px rgba(15, 74, 76, .6);
}
.theme-landscape .contact-actions {
  background: var(--bg); border-radius: var(--radius); padding: 1.25rem;
  box-shadow: 0 14px 34px -24px rgba(35, 48, 47, .5);
}
.theme-landscape .action-preview { border-color: var(--rule); }
.theme-landscape .site-footer { background: var(--heading); color: #f6ecd9; }
.theme-landscape .site-footer .wordmark { color: #fbf4e6; }

/* =========================================================
   Portrait: oat, sage, dark green. Mark's face beside the welcome.
   ========================================================= */
.theme-portrait {
  --bg: #f4efe6;
  --bg-alt: #e4eadf;
  --ink: #23302a;
  --ink-soft: #4b5a51;
  --heading: #1f3b2d;
  --accent: #2b5741;
  --rule: #a9bba5;
  --focus: #8a4b12;
  --font-head: "Avenir Next", Avenir, "Segoe UI", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Avenir Next", Avenir, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
.theme-portrait h1, .theme-portrait h2 { font-weight: 600; letter-spacing: -.01em; }
.theme-portrait .wordmark { font-weight: 700; font-size: 1.55rem; letter-spacing: -.01em; }
.theme-portrait .lede { font-family: var(--font-body); font-style: normal; font-weight: 500; font-size: 1.2rem; color: var(--accent); }
.theme-portrait .eyebrow { color: var(--accent); }
.theme-portrait .about { padding-top: clamp(2rem, 5vw, 4rem); }
@media (min-width: 52rem) {
  .theme-portrait .about-grid { grid-template-columns: 1.15fr .85fr; }
}
.theme-portrait .about-media { position: relative; }
.theme-portrait .about-media::before {
  content: ""; position: absolute; inset: 1.25rem -1.25rem -1.25rem 1.25rem;
  background: var(--bg-alt); border-radius: 200px 200px 24px 24px; z-index: 0;
}
.theme-portrait .about-media img {
  position: relative; z-index: 1;
  width: 100%; max-width: 26rem; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 25%;
  border-radius: 200px 200px 24px 24px;
}
@media (max-width: 51.99rem) {
  .theme-portrait .about-media { max-width: 20rem; margin-right: 1.25rem; }
}
.theme-portrait .expect { background: var(--bg-alt); }
.theme-portrait .practice { background: var(--bg); }
.theme-portrait .contact { background: var(--bg-alt); }
@media (min-width: 52rem) {
  .theme-portrait .contact-grid { grid-template-columns: 1.3fr 1fr; gap: 3.5rem; }
}
.theme-portrait .action-preview { background: var(--bg); border-color: var(--rule); }
.theme-portrait .action-tag { background: var(--bg-alt); }
.theme-portrait .site-footer { background: var(--heading); color: #e4eadf; }
.theme-portrait .site-footer .wordmark { color: #f4efe6; }
.theme-portrait .tagline { font-family: var(--font-body); }

/* =========================================================
   Editorial: off-white, dark ink, muted blue. Type and space lead.
   ========================================================= */
.theme-editorial {
  --bg: #faf9f6;
  --bg-alt: #eef0f3;
  --ink: #1b1d21;
  --ink-soft: #4a4f57;
  --heading: #1b1d21;
  --accent: #3b5878;
  --rule: #cfccc4;
  --focus: #3b5878;
  --font-head: "Iowan Old Style", "Charter", "Bitstream Charter", Baskerville, "Palatino Linotype", Georgia, serif;
  --font-body: "Charter", "Bitstream Charter", "Iowan Old Style", Georgia, "Times New Roman", serif;
  font-size: 1.125rem;
}
.theme-editorial .site-header { border-bottom: 1px solid var(--rule); }
.theme-editorial .wordmark { font-size: 1.5rem; letter-spacing: .01em; }
.theme-editorial .site-nav a { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: .9rem; }
.theme-editorial .button {
  background: transparent; color: var(--accent); border: 1.5px solid var(--accent);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
.theme-editorial .button:hover { background: var(--accent); color: #fff; filter: none; }
.theme-editorial .eyebrow { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--accent); }
.theme-editorial .about { padding-top: clamp(4rem, 12vw, 9rem); padding-bottom: clamp(4rem, 10vw, 7rem); }
.theme-editorial .about-copy { max-width: 40rem; }
.theme-editorial h1 {
  font-size: clamp(2.75rem, 8vw, 5.75rem);
  font-weight: 400; letter-spacing: -.02em; line-height: 1.02;
  margin-bottom: 2.5rem;
}
.theme-editorial .about-copy > p:not(.eyebrow) { max-width: 34rem; }
.theme-editorial .about-copy > p:nth-of-type(2) { font-size: 1.25rem; line-height: 1.6; }
.theme-editorial h2 { font-weight: 400; font-size: clamp(2rem, 4vw, 2.75rem); letter-spacing: -.01em; }
.theme-editorial .lede { color: var(--accent); }
.theme-editorial .section + .section { border-top: 1px solid var(--rule); }
.theme-editorial .section .wrap { max-width: 44rem; }
.theme-editorial .section.about .wrap { max-width: var(--wrap); }
.theme-editorial .contact .wrap { max-width: 60rem; }
@media (min-width: 52rem) {
  .theme-editorial .contact-grid { grid-template-columns: 8rem 1fr 17rem; gap: 2.75rem; }
}
.theme-editorial .contact-portrait img {
  width: 8rem; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 25%;
  filter: grayscale(.25);
}
.theme-editorial .action-preview {
  border-radius: 0; border: 0; border-top: 1px solid var(--ink); background: transparent;
  padding-inline: 0; font-family: var(--font-head); font-weight: 400; font-size: 1.15rem;
}
.theme-editorial .action-tag { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; border-radius: 0; }
.theme-editorial .site-footer { border-top: 1px solid var(--ink); }
.theme-editorial .site-footer .wordmark { font-size: 1.35rem; }
.theme-editorial .tagline { color: var(--accent); }
