/* Opus Mental Health — site styles
   Design system taken from the Endel Manifesto reference (recent.design gallery, Health category):
   near-black ground, thin off-white line art, large light type, one idea per screen, long calm scroll.
   Adapted: warm "sumi" black and paper tones (wabi-sabi), brand font Raleway, no accent color. */

@font-face {
  font-family: "Raleway";
  src: url("assets/fonts/raleway-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #141311;        /* page ground: warm black */
  --ink-2: #1c1a17;      /* raised panel */
  --paper: #ede6da;      /* main text, line art */
  --stone: #a39b8f;      /* secondary text */
  --line: #3a3631;       /* hairlines */
  --measure: 34rem;      /* comfortable reading width */
  --gutter: clamp(1rem, 5vw, 3rem);
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: "Raleway", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--paper); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: #fff; }
a:focus-visible { outline: 1px solid var(--paper); outline-offset: 4px; border-radius: 2px; }

.skip {
  position: absolute; left: -999px; top: 0.5rem;
  background: var(--paper); color: var(--ink); padding: 0.5rem 0.75rem; z-index: 10;
}
.skip:focus { left: 0.5rem; }

/* top bar */
.bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem var(--gutter);
  background: rgba(20, 19, 17, 0.88);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.bar.scrolled { border-bottom-color: var(--line); }
.bar .wordmark {
  font-weight: 400; font-size: 0.8rem; letter-spacing: 0.32em; text-transform: uppercase;
  text-decoration: none;
}
.bar nav { display: flex; gap: 1.25rem; }
.bar nav a {
  font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; color: var(--stone);
}
.bar nav a:hover { color: var(--paper); }

/* one idea per screen */
section {
  min-height: 92vh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 6rem var(--gutter);
  text-align: center;
}
section.compact { min-height: auto; padding-top: 5rem; padding-bottom: 5rem; }

.hero .mark { width: min(62vw, 300px); height: auto; display: block; margin: 0 auto 2.5rem; }
.hero h1 {
  margin: 0; text-wrap: balance;
  font-weight: 300; font-size: clamp(1.5rem, 5vw, 2.6rem);
  letter-spacing: 0.3em; text-transform: uppercase;
  padding-left: 0.3em; /* balance trailing tracking */
}
.hero .sub {
  margin: 1.25rem 0 0; color: var(--stone);
  font-size: clamp(1rem, 2.4vw, 1.15rem); letter-spacing: 0.04em;
}
.scroll-cue {
  margin-top: 4rem; width: 1px; height: 56px; background: var(--line); position: relative; overflow: hidden;
}
.scroll-cue::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--paper);
  animation: cue 2.4s ease-in-out infinite;
}
@keyframes cue { to { top: 100%; } }

.statement {
  max-width: 22ch; margin: 0; text-wrap: balance;
  font-weight: 300; font-size: clamp(1.9rem, 6vw, 3.6rem); line-height: 1.2; letter-spacing: -0.005em;
}

.eyebrow {
  margin: 0 0 1.75rem; color: var(--stone);
  font-size: 0.75rem; letter-spacing: 0.32em; text-transform: uppercase;
}
.prose { max-width: var(--measure); margin: 0 auto; }
.prose p { margin: 0 0 1.1rem; }
.prose .lead { font-size: clamp(1.25rem, 3vw, 1.5rem); font-weight: 300; line-height: 1.45; }

.list {
  list-style: none; margin: 0 auto; padding: 0; max-width: var(--measure); width: 100%;
  border-top: 1px solid var(--line);
}
.list li {
  padding: 1.4rem 0; border-bottom: 1px solid var(--line);
  font-weight: 300; font-size: clamp(1.2rem, 3.2vw, 1.6rem);
}

.contact-link {
  display: inline-block; margin: 0.5rem 0 1.5rem;
  font-weight: 300; font-size: clamp(1.4rem, 5vw, 2.4rem); letter-spacing: 0.02em;
  text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 0.2em;
  overflow-wrap: anywhere;
}
.contact-link:hover { border-bottom-color: var(--paper); }
.note { color: var(--stone); font-size: 0.95rem; }

.crisis {
  max-width: var(--measure); margin: 0 auto; padding: 1.5rem 1.75rem;
  border: 1px solid var(--line); background: var(--ink-2); text-align: left;
}
.crisis h2 { margin: 0 0 0.5rem; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; }
.crisis p { margin: 0; }
.crisis strong { font-weight: 600; }

/* longer reading blocks: care details, fees, policies */
.prose.left { text-align: left; margin-top: 2.5rem; width: 100%; }
.prose h3 {
  margin: 2.25rem 0 0.75rem; color: var(--paper);
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase;
}
.prose ul.plain { margin: 0 0 1.1rem; padding-left: 1.1rem; }
.prose ul.plain li { margin: 0 0 0.5rem; }
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rows li {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1.5rem;
  padding: 0.8rem 0; border-bottom: 1px solid var(--line);
}
.rows li span:last-child { color: var(--stone); }
#care .list { margin-bottom: 0; }

.policies { max-width: var(--measure); width: 100%; margin: 0 auto; text-align: left; border-top: 1px solid var(--line); }
.policies details { border-bottom: 1px solid var(--line); }
.policies summary {
  list-style: none; cursor: pointer; padding: 1.2rem 2rem 1.2rem 0; position: relative;
  font-weight: 300; font-size: clamp(1.1rem, 2.8vw, 1.35rem);
}
.policies summary::-webkit-details-marker { display: none; }
.policies summary::after {
  content: "+"; position: absolute; right: 0.25rem; top: 50%; transform: translateY(-50%);
  color: var(--stone); font-weight: 300; font-size: 1.4rem;
}
.policies details[open] summary::after { content: "\2212"; }
.policies summary:focus-visible { outline: 1px solid var(--paper); outline-offset: 4px; }
.policies details p { margin: 0 0 1.1rem; color: var(--paper); }

.contact-link { display: block; width: fit-content; margin: 0.5rem auto 0.75rem; }
.contact-link.phone { margin-bottom: 1.5rem; }

.cta {
  display: inline-block; margin: 0.75rem 0 1.25rem; padding: 0.9rem 1.8rem;
  border: 1px solid var(--paper); color: var(--paper); text-decoration: none;
  font-size: 0.85rem; letter-spacing: 0.2em; text-transform: uppercase;
}
.cta:hover { background: var(--paper); color: var(--ink); }
.prose .lead.spaced { margin-top: 3rem; }

footer {
  padding: 3rem var(--gutter) 2.5rem; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; justify-content: space-between;
  color: var(--stone); font-size: 0.85rem;
}
footer p { margin: 0; }

/* quiet reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 1.1s ease, transform 1.1s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue::after { animation: none; }
}

@media (max-width: 520px) {
  .bar nav { gap: 0.7rem; }
  .bar nav a { font-size: 0.66rem; letter-spacing: 0.08em; }
  .bar .wordmark { letter-spacing: 0.22em; }
  section { min-height: 80vh; padding-top: 4.5rem; padding-bottom: 4.5rem; }
  #care, #fees, #policies { min-height: auto; }
}
@media (max-width: 400px) {
  .bar { justify-content: center; }
  .bar .wordmark { display: none; }
}
