/* Sanctuaire Practice — single stylesheet, no build step.
   Palette sampled from the hero footage: warm cream ground, indigo ink, amber accent. */

:root {
  --cream: #F5F0E6;
  --paper: #FBF8F1;
  --ink: #17202A;
  --ink-soft: #2B333E;
  --line: #DDD3C2;
  --amber: #8A5A2B;      /* 5.5:1 on paper — passes AA at label size */
  --amber-lite: #E3B27C; /* on dark grounds */

  --font-word: "Tenor Sans", "Futura", "Gill Sans", sans-serif;
  --font-body: "Roboto Slab", Georgia, "Times New Roman", serif;

  --gutter: clamp(1.25rem, 4vw, 4rem);
  --measure: 1800px;
  --section: clamp(4rem, 8vw, 8.5rem);
  --header-h: 4.75rem;
}

/* ---------- type scale ----------
   Five sizes, and everything on the site uses one of them.

   6.25rem   hero wordmark only — Tenor Sans, uppercase, 0.18em tracking
   1.45-3.4  headings, fluid between those rem bounds
   1.125rem  intro paragraphs: .lede, .lede-lg
   1rem      body, cards, values, all uppercase labels, buttons, nav links,
             form labels and inputs, footer text
   0.875rem  small print: field notes, form notes, credentials, footer base

   Body text is a fluid clamp, so it renders 18px on a wide screen and 16px on a
   small one. Every other size is fixed, which keeps the rhythm predictable.
   --------------------------------- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(1rem, 0.55vw + 0.9rem, 1.125rem);
  line-height: 1.7;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; }

/* Author display rules (e.g. .form) would otherwise beat the UA's [hidden]. */
[hidden] { display: none !important; }

a { color: inherit; }

h1, h2, h3, h4 { font-weight: 300; line-height: 1.2; margin: 0; }

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

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

.skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--ink); color: var(--cream);
  padding: 0.75rem 1rem; z-index: 100;
  text-decoration: none; font-size: 0.875rem;
}
.skip:focus { top: 1rem; }

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

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

.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  color: #fff;
  transition: background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}

.site-header.is-solid,
.site-header--solid {
  background: rgba(251, 248, 241, 0.95);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
  backdrop-filter: saturate(140%) blur(10px);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; height: var(--header-h);
  max-width: var(--measure); margin-inline: auto;
  padding-inline: var(--gutter);
}

.wordmark {
  font-family: var(--font-word);
  text-transform: uppercase;
  letter-spacing: 0.26em;
  font-size: 1rem;
  text-decoration: none;
  white-space: nowrap;
}

.site-header .wordmark { transition: opacity 0.3s ease; }

/* On the home page the giant wordmark carries the name, so the small one stays
   out of the way until the video band has scrolled behind the header. */
body.home .site-header:not(.is-solid) .wordmark { opacity: 0; pointer-events: none; }

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.5rem); }

.nav a {
  color: inherit; text-decoration: none;
  font-size: 1rem; letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 500;
  padding-block: 0.35rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.nav a:hover { border-bottom-color: currentColor; }
.nav a[aria-current="page"] { border-bottom-color: currentColor; }

/* Over the video the nav needs a little separation from the water behind it. */
body.home .site-header:not(.is-solid) .nav a {
  text-shadow: 0 1px 12px rgba(10, 16, 24, 0.55);
}

.nav .nav-cta {
  border: 1px solid currentColor;
  padding: 0.7rem 1.05rem;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.nav .nav-cta:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.site-header:not(.is-solid) .nav .nav-cta:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }

.nav-toggle {
  display: none;
  background: none; border: 0; padding: 0.5rem;
  color: inherit; cursor: pointer;
}
.nav-toggle span:not(.sr-only) {
  display: block; width: 22px; height: 1px;
  background: currentColor; margin: 5px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.site-header.is-open .nav-toggle span:nth-of-type(1) { transform: translateY(3px) rotate(45deg); }
.site-header.is-open .nav-toggle span:nth-of-type(2) { opacity: 0; }
.site-header.is-open .nav-toggle span:nth-of-type(3) { transform: translateY(-3px) rotate(-45deg); }

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

/* ---------- hero video band ---------- */

.hero {
  position: relative;
  height: 50vh;
  height: 50svh;
  min-height: 18rem;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  overflow: hidden;
  isolation: isolate;
  color: #fff;
}

.hero-wordmark {
  position: relative; z-index: 2;
  font-family: var(--font-word);
  text-transform: uppercase;
  /* Capped at 100px. 7vw reaches the cap at about 1430px wide, so a laptop sits
     just under it and larger screens sit exactly on it. */
  font-size: clamp(2.6rem, 7vw, 6.25rem);
  line-height: 0.9;
  letter-spacing: 0.18em;
  margin-right: -0.18em; /* cancel the tracking after the last letter */
  color: #fff;
  text-decoration: none;
  text-shadow: 0 2px 40px rgba(10, 16, 24, 0.4);
  text-align: center;
}

.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img, .hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-video {
  opacity: 0;
  transition: opacity 0.9s ease;
}
.hero-video.is-ready { opacity: 1; }
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 16, 24, 0.62) 0%,
    rgba(10, 16, 24, 0.3) 24%,
    rgba(10, 16, 24, 0.28) 60%,
    rgba(10, 16, 24, 0.55) 100%
  );
}

/* ---------- hero title block ---------- */

.hero-intro {
  padding-block: clamp(2.25rem, 4vw, 3.5rem) clamp(2rem, 4vw, 3rem);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

.eyebrow {
  font-size: 1rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--amber); margin: 0 0 1.1rem;
}

.hero-intro h1 {
  font-size: clamp(1.45rem, 2.2vw, 2.1rem);
  line-height: 1.22;
  max-width: 24ch;
  margin: 0;
  text-wrap: balance;
}

.hero-intro .lede {
  max-width: 52ch;
  color: var(--ink-soft);
  margin: 0 0 2rem;
}

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

.video-toggle {
  position: absolute; right: var(--gutter); bottom: clamp(1.25rem, 3vw, 2rem);
  z-index: 3;
  width: 2.6rem; height: 2.6rem;
  display: grid; place-items: center;
  background: rgba(14, 20, 28, 0.35);
  border: 1px solid rgba(245, 240, 230, 0.45);
  color: var(--cream); cursor: pointer;
  transition: background 0.2s ease;
}
.video-toggle:hover { background: rgba(14, 20, 28, 0.7); }
.video-toggle svg { width: 12px; height: 12px; fill: currentColor; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.75em;
  padding: 1em 1.5em;
  border: 1px solid currentColor;
  font-size: 1rem; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 500;
  text-decoration: none; background: none; color: inherit; cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn:hover { background: var(--cream); color: var(--ink); }

.btn--ink:hover { background: var(--ink); color: var(--cream); }

.link-quiet {
  font-size: 1rem; letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; border-bottom: 1px solid currentColor;
  padding-bottom: 0.2em;
}

/* The address and number are the page's real call to action, not small print. */
.contact-line {
  display: inline-block;
  font-size: clamp(1.15rem, 1.5vw, 1.35rem);
  line-height: 1.35;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--amber);
  padding-bottom: 0.18em;
}
.contact-line:hover { border-bottom-color: var(--ink); }

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

.section { padding-block: var(--section); }
.wrap {
  max-width: var(--measure); margin-inline: auto;
  padding-inline: var(--gutter);
}

.section--ink { background: var(--ink); color: var(--cream); }
.section--tint { background: var(--cream); }

.label {
  font-size: 1rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--amber); margin: 0 0 1.25rem;
}
.section--ink .label { color: var(--amber-lite); }

.section-head { max-width: 52ch; margin-bottom: clamp(2rem, 4vw, 3.75rem); }
.section-head h2 { font-size: clamp(1.55rem, 2.6vw, 2.5rem); margin-bottom: 1.25rem; }
.section-head p { color: var(--ink-soft); }
.section--ink .section-head p { color: rgba(245, 240, 230, 0.78); }

.lede-lg {
  font-size: clamp(1.1rem, 1.4vw, 1.35rem);
  line-height: 1.65;
  max-width: 62ch;
}

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

.cards {
  display: grid; gap: clamp(1.5rem, 3vw, 3rem);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  display: grid; gap: 0.85rem; align-content: start;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}
.card h3 { font-size: 1.125rem; font-weight: 400; margin: 0; }
.card p { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.card .card-link {
  justify-self: start;
  font-size: 1rem; letter-spacing: 0.13em; text-transform: uppercase;
  text-decoration: none; border-bottom: 1px solid var(--amber);
  padding-bottom: 0.15em; margin-top: 0.25rem;
}

/* ---------- values ---------- */

.values {
  display: grid; gap: clamp(1.5rem, 2.5vw, 2.75rem);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.value { border-top: 1px solid rgba(245, 240, 230, 0.22); padding-top: 1.15rem; }
.value h3 { font-size: 1rem; font-weight: 400; margin: 0 0 0.5rem; }
.value p { margin: 0; color: rgba(245, 240, 230, 0.76); font-size: 1rem; }

/* ---------- split / prose ---------- */

.split {
  display: grid; gap: clamp(2rem, 4vw, 4rem);
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: start;
}

.portrait {
  aspect-ratio: 4 / 5;
  background: linear-gradient(160deg, #E7DDCB 0%, #CEC2AE 100%);
  display: grid; place-items: center;
  color: #8A7C67;
  font-size: 0.875rem; letter-spacing: 0.18em; text-transform: uppercase;
}

.prose { max-width: 62ch; }
.prose p { color: var(--ink-soft); }
.prose p:first-of-type { color: var(--ink); font-size: 1.125rem; }

/* ---------- details ---------- */

.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary {
  cursor: pointer; list-style: none;
  padding: 1.15rem 2rem 1.15rem 0;
  position: relative;
  font-size: 1rem; letter-spacing: 0.02em;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "+"; position: absolute; right: 0; top: 50%;
  transform: translateY(-50%);
  font-size: 1rem; color: var(--amber);
}
.accordion details[open] summary::after { content: "\2013"; }
.accordion .accordion-body { padding: 0 0 1.35rem; color: var(--ink-soft); max-width: 62ch; }

/* ---------- forms ---------- */

.form { display: grid; gap: 1.25rem; max-width: 34rem; }
.field { display: grid; gap: 0.45rem; }
.field label {
  font-size: 1rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft);
}
.field input, .field textarea, .field select {
  font: inherit; font-size: 1rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff; color: var(--ink);
  width: 100%;
}
.field textarea { min-height: 7.5rem; resize: vertical; }
.field-note { font-size: 0.875rem; color: var(--ink-soft); margin: 0.6rem 0 0; }
.form-note {
  font-size: 0.875rem; color: var(--ink-soft);
  border-left: 2px solid var(--amber); padding-left: 0.9rem;
}

/* the honeypot is for scripts, not people */
.hp {
  position: absolute; left: -9999px;
  width: 1px; height: 1px; overflow: hidden;
}

/* post-submission confirmation, shown in place of the form */
.form-sent {
  max-width: 34rem;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}
.form-sent h2 { font-size: 1.5rem; margin: 0 0 0.85rem; color: var(--ink); }
.form-sent p { margin: 0; color: var(--ink-soft); }
.form-sent a { color: var(--ink); }

.form-error {
  font-size: 0.95rem;
  color: #7E2B22;
}

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

.site-footer {
  background: var(--ink); color: var(--cream);
  padding-block: clamp(3rem, 6vw, 5rem) clamp(2rem, 4vw, 3rem);
}
.footer-grid {
  display: grid; gap: clamp(2rem, 4vw, 4rem);
  grid-template-columns: 1.5fr 1fr 1fr;
}
.footer-grid h3 {
  font-size: 1rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--amber-lite); margin: 0 0 1rem; font-weight: 400;
}
.footer-grid p, .footer-grid address {
  margin: 0 0 0.5rem; font-style: normal;
  color: rgba(245, 240, 230, 0.8); font-size: 1rem;
}
.footer-grid a {
  color: rgba(245, 240, 230, 0.92);
  text-decoration: none;
  border-bottom: 1px solid rgba(245, 240, 230, 0.28);
}
.footer-grid a:hover { border-bottom-color: var(--cream); }

/* Contact details in the footer, sized to be read rather than squinted at. */
.footer-grid a[href^="mailto:"],
.footer-grid a[href^="tel:"] {
  font-size: 1.12rem;
  letter-spacing: 0.005em;
}
.footer-wordmark {
  font-family: var(--font-word); text-transform: uppercase;
  letter-spacing: 0.26em; font-size: 1rem;
}
.footer-credentials { color: rgba(245, 240, 230, 0.62); font-size: 0.875rem; margin-top: 0.75rem; }

.crisis {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid rgba(245, 240, 230, 0.2);
  padding-top: 1.5rem;
  font-size: 1rem; color: rgba(245, 240, 230, 0.85);
  max-width: 78ch;
}
.crisis strong { color: var(--cream); font-weight: 400; }

.footer-base {
  margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem;
  justify-content: space-between;
  font-size: 0.875rem; color: rgba(245, 240, 230, 0.55);
}

/* ---------- page header (interior pages) ---------- */

.page-head {
  padding-block: calc(var(--header-h) + clamp(3rem, 7vw, 6rem)) clamp(2rem, 4vw, 3.5rem);
  background: var(--cream);
}
.page-head h1 { font-size: clamp(1.9rem, 4vw, 3.4rem); max-width: 24ch; text-wrap: balance; }
.page-head .lede { max-width: 54ch; color: var(--ink-soft); margin-top: 1.25rem; }

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

@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .intro-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav { display: none; }
  .nav.is-open {
    display: flex; position: fixed;
    inset: var(--header-h) 0 0;
    flex-direction: column; justify-content: center; align-items: flex-start;
    gap: 2rem; padding: var(--gutter);
    background: var(--paper); color: var(--ink);
    z-index: 49;
    border-top: 1px solid var(--line);
  }
  .nav.is-open a { font-size: 1rem; letter-spacing: 0.1em; }
  /* header must stay legible while the panel is open */
  .site-header.is-open,
  .site-header:has(.nav.is-open) {
    background: var(--paper); color: var(--ink); box-shadow: 0 1px 0 var(--line);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .video-toggle { display: none; }
}
