/* Olive Tree Health Ops: shared styles for every page */

@font-face {
  font-family: "Sora";
  src: url("assets/fonts/sora-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand palette */
  --soot: #161813;
  --pit: #1e2318;
  --grove: #2b3122;
  --olive: #5d6a3a;
  --sage: #8a9658;
  --leaf: #abb07a;
  --stone: #f2f1eb;

  /* Roles on the dark theme */
  --bg: var(--soot);
  --bg-alt: var(--pit);
  --text: var(--stone);
  --text-muted: rgb(242 241 235 / 0.7);
  --accent: var(--leaf);
  --line: var(--grove);

  --font: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --content: 68rem;
  --measure: 36rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

p,
dl,
dd {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--text);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  text-decoration-color: var(--sage);
  transition: color 200ms ease, text-decoration-color 200ms ease;
}

a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

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

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--stone);
  color: var(--soot);
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.skip-link:hover {
  color: var(--soot);
}

/* Header */
.site-header {
  position: relative;
  z-index: 50;
  background: rgb(22 24 19 / 0.88);
  border-bottom: 1px solid transparent;
  transition: border-color 300ms ease;
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-header {
    background: rgb(22 24 19 / 0.72);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }
}

@media (min-width: 40rem) {
  .site-header {
    position: sticky;
    top: 0;
  }
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 1.5rem;
}

/* The lockup SVG carries generous built-in clear space. The negative margins trim part of it
   (at least one olive height of empty space remains on every side) so the logo can be larger without a tall header. */
.brand {
  display: block;
  flex-shrink: 0;
  margin-left: -0.7rem;
}

.brand img {
  width: auto;
  height: 96px;
  margin-block: -6px -11px;
}

@media (min-width: 64rem) {
  .brand img {
    height: 112px;
    margin-block: -8px -14px;
  }
}

.site-nav ul {
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  position: relative;
  display: inline-block;
  padding-block: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.2rem;
  height: 1px;
  background: var(--sage);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms var(--ease);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

/* Phones: navigation sits on its own row under the logo */
@media (max-width: 39.99rem) {
  .site-header .wrap {
    padding-bottom: 0.5rem;
  }

  .site-nav {
    width: 100%;
    border-top: 1px solid var(--line);
  }

  .site-nav ul {
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.25rem;
  }
}

/* Shared type */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: var(--sage);
}

.muted {
  color: var(--text-muted);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero .wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(4rem, 10vw, 7rem);
}

@media (min-width: 48rem) {
  .hero .wrap {
    min-height: min(78vh, 46rem);
  }

  .hero--compact .wrap {
    min-height: min(56vh, 32rem);
  }
}

.hero h1 {
  max-width: 19em;
  font-size: clamp(1.75rem, 1.15rem + 2.1vw, 2.875rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.hero .lede {
  max-width: 34em;
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-size: clamp(0.9375rem, 0.88rem + 0.3vw, 1.0625rem);
  line-height: 1.75;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  margin-top: 2.5rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}

.text-link::after {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: var(--sage);
  transition: width 300ms var(--ease), background-color 300ms ease;
}

.text-link:hover::after {
  width: 2.5rem;
  background: var(--accent);
}

/* Tree-ring graphic: decorative, drifts slowly with scroll */
.rings {
  position: absolute;
  z-index: -1;
  top: 50%;
  right: -16rem;
  width: 44rem;
  max-width: none;
  margin-top: -22rem;
  opacity: 0.32;
  pointer-events: none;
  will-change: transform;
}

@media (min-width: 48rem) {
  .rings {
    right: -12rem;
    width: 52rem;
    margin-top: -26rem;
    opacity: 0.85;
  }
}

@media (min-width: 75rem) {
  .rings {
    right: calc((100vw - var(--content)) / 2 - 18rem);
  }
}

/* Content sections */
.section {
  border-top: 1px solid var(--line);
}

.section--alt {
  background: var(--bg-alt);
}

.section .wrap {
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

.split {
  display: grid;
  gap: 1.25rem 3rem;
}

.section h2 {
  max-width: 16em;
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.75rem);
}

.prose {
  display: grid;
  gap: 1.1rem;
  max-width: var(--measure);
  color: var(--text-muted);
}

@media (min-width: 56rem) {
  .split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }

  .split .prose {
    padding-top: 2.4rem;
  }
}

/* Statement band */
.statement {
  max-width: 24em;
  font-size: clamp(1.25rem, 1rem + 1.2vw, 2rem);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.statement + .text-link {
  margin-top: 2rem;
}

/* Principles */
.principles {
  display: grid;
  gap: 2.5rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

.principles li {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.principles .num {
  display: block;
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.principles h3 {
  margin-bottom: 0.6rem;
  font-size: 1rem;
}

.principles p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

@media (min-width: 48rem) {
  .principles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
  }
}

/* Contact */
.contact-email {
  display: inline-block;
  font-size: clamp(1.0625rem, 0.6rem + 2.4vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}

.contact-band .wrap {
  display: grid;
  gap: 1.25rem 3rem;
  align-items: end;
}

.contact-band p {
  max-width: 28em;
  color: var(--text-muted);
}

@media (min-width: 56rem) {
  .contact-band .wrap {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

.details {
  display: grid;
  gap: 0;
  max-width: 40rem;
  margin-top: 1rem;
}

.details div {
  display: grid;
  gap: 0.25rem 2rem;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--line);
}

.details div:first-child {
  border-top: 1px solid var(--line);
}

.details dt {
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

@media (min-width: 40rem) {
  .details div {
    grid-template-columns: 10rem minmax(0, 1fr);
    align-items: baseline;
  }
}

/* Legal pages */
.hero--legal .wrap {
  min-height: 0;
  padding-block: clamp(3.5rem, 8vw, 5.5rem) clamp(2.5rem, 6vw, 4rem);
}

@media (min-width: 48rem) {
  .hero--legal .wrap {
    min-height: min(40vh, 22rem);
  }
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem 4rem;
}

.legal-toc ol {
  display: grid;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
  font-size: 0.8125rem;
}

.legal-toc li {
  counter-increment: toc;
}

.legal-toc a {
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  padding-block: 0.35rem;
  color: var(--text-muted);
  line-height: 1.45;
  text-decoration: none;
}

.legal-toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.9;
}

.legal-toc a:hover {
  color: var(--text);
}

@media (max-width: 55.99rem) {
  .legal-toc {
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--line);
  }
}

@media (min-width: 56rem) {
  .legal-layout {
    grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  }

  .legal-toc {
    position: sticky;
    top: 7.5rem;
    align-self: start;
    max-height: calc(100vh - 9rem);
    overflow-y: auto;
  }
}

.legal-body {
  max-width: 44rem;
  color: rgb(242 241 235 / 0.82);
  font-size: 0.9375rem;
  line-height: 1.75;
}

.legal-body p,
.legal-body ul,
.legal-body address,
.legal-body .table-wrap {
  margin: 0 0 1.1rem;
}

.legal-body strong {
  color: var(--text);
  font-weight: 600;
}

.legal-meta {
  font-size: 0.875rem;
}

.legal-body .legal-meta {
  margin-bottom: 0.35rem;
}

.legal-caps {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.7;
}

.legal-body .legal-notice {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  border-left: 2px solid var(--sage);
  background: var(--bg-alt);
  color: var(--text);
}

.legal-section {
  padding-top: 2.5rem;
  scroll-margin-top: 7.5rem;
}

.legal-section h2 {
  max-width: none;
  margin-bottom: 1.25rem;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
}

.legal-body ul {
  display: grid;
  gap: 0.55rem;
  padding: 0;
  list-style: none;
}

.legal-body li {
  position: relative;
  padding-left: 1.5rem;
}

.legal-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 0.75rem;
  height: 1px;
  background: var(--sage);
}

.legal-body address {
  font-style: normal;
  color: var(--text);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
}

.legal-body table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.8125rem;
  line-height: 1.55;
}

.legal-body th,
.legal-body td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.legal-body tr:last-child td {
  border-bottom: 0;
}

.legal-body th {
  background: var(--bg-alt);
  color: var(--accent);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-body td:first-child {
  color: var(--text);
}

/* 404 */
.not-found .wrap {
  padding-block: clamp(5rem, 14vw, 9rem);
}

.not-found h1 {
  font-size: clamp(1.875rem, 1.2rem + 2.6vw, 3.25rem);
  letter-spacing: -0.03em;
}

.not-found .text-link {
  margin-top: 2rem;
}

/* Footer */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
}

.site-footer .wrap {
  display: grid;
  gap: 2rem;
  padding-block: 3rem 2.5rem;
}

/* Never render the branch mark below 40px tall */
.site-footer .mark {
  width: auto;
  height: 44px;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--text);
}

.site-footer .legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
}

.site-footer .disclaimer {
  font-size: 0.75rem;
}

.legal-links {
  font-size: 0.75rem;
}

.legal-links span {
  margin-inline: 0.4rem;
  color: var(--sage);
}

.legal-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.legal-links a:hover {
  color: var(--text);
}

@media (min-width: 48rem) {
  .site-footer .wrap {
    grid-template-columns: auto 1fr;
    align-items: center;
  }

  .footer-nav ul {
    justify-content: flex-end;
  }

  .site-footer .legal {
    grid-column: 1 / -1;
  }
}

/* Helpers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.hero-email {
  margin-top: 1.75rem;
}

.d1 {
  --delay: 90ms;
}

.d2 {
  --delay: 180ms;
}

.d3 {
  --delay: 270ms;
}

/* Scroll reveal: only hides content when scripting runs and motion is welcome */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 800ms var(--ease), transform 800ms var(--ease);
    transition-delay: var(--delay, 0ms);
  }

  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  .rings {
    animation: rings-in 1400ms var(--ease) both;
  }

  @keyframes rings-in {
    from {
      opacity: 0;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
