/* ============================================================
   Shared chrome + legal-document styles for the static legal
   pages (terms-of-use, privacy-policy, accessibility-statement).
   Reuses the homepage design tokens; the homepage keeps its own
   inline CSS untouched.
   ============================================================ */
:root {
  --paper:      #FBF9F6;
  --shore:      #EDEEE8;
  --ink:        #1A1814;
  --ink-60:     rgba(26, 24, 20, .66);
  --ink-40:     rgba(26, 24, 20, .44);
  --border:     rgba(26, 24, 20, .12);

  --lake:       #59338d;
  --lake-deep:  #2E1A47;

  --paper-60:   rgba(251, 249, 246, .68);
  --paper-40:   rgba(251, 249, 246, .45);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "DM Sans", "Helvetica Neue", Arial, sans-serif;

  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);

  --container: min(1200px, 92vw);

  --text-xs:   0.8125rem;
  --text-sm:   0.9375rem;
  --text-base: 1.0625rem;
  --text-h1:   clamp(2.5rem, 1.6rem + 3.4vw, 3.75rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--lake); color: var(--paper); }
:focus-visible { outline: 2px solid var(--lake); outline-offset: 3px; border-radius: 2px; }
.site-footer :focus-visible { outline-color: var(--paper); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; }
a { color: inherit; text-decoration-color: rgba(89, 51, 141, .4); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--lake); }
img { display: block; max-width: 100%; height: auto; }

.container { width: var(--container); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--lake); color: var(--paper);
  padding: .8em 1.4em; z-index: 100;
}

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  background: var(--lake); color: var(--paper);
  font-family: var(--font-body); font-weight: 700;
  font-size: var(--text-sm); letter-spacing: .02em;
  text-decoration: none; padding: 1em 1.7em; border-radius: 999px;
  border: 1px solid var(--lake);
  transition: background-color .35s var(--ease-out-quart),
              transform .35s var(--ease-out-quart),
              box-shadow .35s var(--ease-out-quart);
}
.btn:hover { background: var(--lake-deep); transform: translateY(-2px); box-shadow: 0 10px 28px -12px rgba(46, 26, 71, .55); }
.btn:active { transform: translateY(0) scale(.97); }

/* --- Header --- */
.site-header { position: static; z-index: 50; border-bottom: 1px solid var(--border); background: var(--paper); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1.1rem; }
.brand { text-decoration: none; line-height: 1.1; display: flex; flex-direction: column; }
.brand .brand-logo { display: block; height: 58px; width: auto; }
.site-nav ul { display: flex; align-items: center; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { font-size: var(--text-sm); font-weight: 500; text-decoration: none; color: var(--ink-60); transition: color .3s var(--ease-out-quart); padding-block: .4rem; }
.site-nav a:hover { color: var(--ink); }
.header-cta { white-space: nowrap; padding: .75em 1.4em; }
.menu-toggle {
  display: none; background: none; border: 1px solid var(--border);
  border-radius: 999px; padding: .65rem 1.1rem;
  font: 700 var(--text-xs) var(--font-body); letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink); cursor: pointer;
}
@media (max-width: 860px) {
  .menu-toggle { display: inline-block; }
  .site-nav { position: fixed; inset: 0; background: var(--paper); display: none; align-items: center; justify-content: center; z-index: 40; }
  html.menu-open .site-nav { display: flex; }
  html.menu-open { overflow: hidden; }
  .site-nav ul { flex-direction: column; gap: 1.4rem; }
  .site-nav a { font-family: var(--font-display); font-size: 2rem; color: var(--ink); }
  .header-cta { display: none; }
}

/* --- Legal document body --- */
.legal { padding-block: clamp(3rem, 7vw, 5rem) clamp(4rem, 9vw, 6rem); }
.legal-head { max-width: 70ch; margin-bottom: clamp(2rem, 5vw, 3rem); }
.legal-head .eyebrow { font-size: var(--text-xs); font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--lake); margin-bottom: 1rem; }
.legal-doc { max-width: 78ch; color: var(--ink-60); }
.legal-doc h1 { font-size: var(--text-h1); color: var(--ink); margin: 1.6rem 0 1rem; }
.legal-doc h1:first-child { margin-top: 0; }
.legal-doc h1:empty, .legal-doc h2:empty, .legal-doc h3:empty, .legal-doc p:empty { display: none; }
.legal-doc h2 { font-size: 1.4rem; color: var(--ink); margin: 2.2rem 0 .8rem; }
.legal-doc h3 { font-size: 1.1rem; color: var(--ink); margin: 1.6rem 0 .6rem; }
.legal-doc h4 { font-size: 1rem; color: var(--ink); margin: 1.3rem 0 .5rem; }
.legal-doc p { margin: 0 0 1.1rem; }
.legal-doc ul, .legal-doc ol { margin: 0 0 1.1rem; padding-left: 1.4rem; }
.legal-doc li { margin-bottom: .5rem; }
.legal-doc strong { color: var(--ink); font-weight: 600; }
.legal-doc a { color: var(--lake); }
.legal-doc table { border-collapse: collapse; width: 100%; margin: 0 0 1.4rem; font-size: var(--text-sm); }
.legal-doc td, .legal-doc th { border: 1px solid var(--border); padding: .6rem .8rem; vertical-align: top; text-align: left; }

/* --- Footer (mirrors the homepage footer chrome) --- */
.site-footer { background: var(--ink); color: var(--paper-60); padding-block: clamp(3.5rem, 8vw, 5.5rem) 2rem; font-size: var(--text-sm); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem 2rem; padding-bottom: 3rem; border-bottom: 1px solid rgba(251, 249, 246, .14); }
.footer-brand .brand-name { font-family: var(--font-display); font-style: italic; font-size: 1.6rem; color: var(--paper); }
.footer-brand p { margin-top: .8rem; max-width: 38ch; }
.site-footer h3 { font-family: var(--font-body); font-size: var(--text-xs); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--paper-40); margin-bottom: 1.1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.site-footer a { color: var(--paper-60); text-decoration: none; transition: color .3s var(--ease-out-quart); }
.site-footer a:hover { color: var(--paper); }
.footer-brand .footer-social { display: flex; grid-auto-flow: unset; flex-flow: row wrap; gap: 1.2rem; margin-top: 1.2rem; }
.footer-legal-links { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; padding-top: 1.6rem; font-size: var(--text-xs); }
.footer-legal-links a { color: var(--paper-60); text-decoration: none; transition: color .3s var(--ease-out-quart); }
.footer-legal-links a:hover { color: var(--paper); }
.footer-legal { padding-top: 1.6rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: var(--text-xs); color: var(--paper-40); }
.footer-disclaimer { padding-top: 1.4rem; font-size: var(--text-xs); line-height: 1.55; color: var(--paper-40); }
.footer-disclaimer p { margin: 0 0 .8rem; max-width: 92ch; }
.footer-disclaimer .footer-eho { font-weight: 700; letter-spacing: .06em; color: var(--paper-60); }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 2.2rem; } }
