/* ==========================================================================
   Quetzal Corp — legal pages (privacy.html, terms.html)
   Shares the main site's tokens, type and dark canvas so these read as the
   same brand, not a separate template. Body copy stays serif: these are
   long documents meant to be read start to finish, and a serif text face
   at a slightly generous line-height is the easier read for that length.
   ========================================================================== */

:root {
  --ink:        #0C0A0A;
  --ink-raised: #151111;
  --ink-line:   #251E1E;
  --crimson:    #CC2029;
  --crimson-lo: #8E1219;
  --bone:       #F2EDE7;
  --stone:      #948A82;

  --fg:       var(--bone);
  --fg-quiet: var(--stone);
  --bg:       var(--ink);

  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --text:    "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --serif:   "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;

  --gutter: clamp(20px, 5vw, 92px);
  --ease-out:  cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.33, .66, .66, 1);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

a { color: var(--crimson); }
a:hover, a:focus-visible { text-decoration-thickness: 1.5px; }
:focus-visible { outline: 2px solid var(--crimson); outline-offset: 3px; }
::selection { background: var(--crimson); color: #fff; }

/* --------------------------------------------------------------------------
   Top bar — same pattern as the main site, linking back to it.
   -------------------------------------------------------------------------- */
.legal-top {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px var(--gutter);
  border-bottom: 1px solid var(--ink-line);
}
.legal-top__mark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.legal-top__mark img { width: 128px; height: auto; display: block; }
.legal-top__sep {
  width: 1px; height: 22px;
  background: var(--ink-line);
}
.legal-top__dev {
  font-family: var(--text);
  font-size: 13.5px;
  color: var(--fg-quiet);
}
.legal-top__nav {
  display: flex;
  gap: clamp(14px, 2vw, 26px);
  margin-left: auto;
  font-family: var(--text);
  font-size: 14px;
}
.legal-top__nav a {
  color: var(--fg-quiet);
  text-decoration: none;
  padding-block: 3px;
  border-bottom: 1px solid transparent;
  transition: color .22s var(--ease-soft), border-color .22s var(--ease-soft);
}
.legal-top__nav a:hover { color: var(--fg); }
.legal-top__nav a[aria-current="page"] {
  color: var(--fg);
  border-bottom-color: var(--crimson);
}
@media (max-width: 560px) {
  .legal-top { padding: 16px var(--gutter); flex-wrap: wrap; gap: 10px; }
  .legal-top__sep, .legal-top__dev { display: none; }
}

/* --------------------------------------------------------------------------
   Page shell
   -------------------------------------------------------------------------- */
.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(32px, 6vh, 64px) var(--gutter) 80px;
}

.kicker {
  font-family: var(--text);
  font-size: 13px;
  font-weight: 600;
  color: var(--crimson);
  margin: 0 0 10px;
}
h1 {
  font-family: var(--display);
  font-size: clamp(32px, 5.5vw, 48px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.05;
  margin: 0 0 12px;
}
.meta {
  font-family: var(--text);
  font-size: 14px;
  color: var(--fg-quiet);
  margin: 0 0 28px;
}
.note {
  font-family: var(--text);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--fg-quiet);
  background: var(--ink-raised);
  border-left: 2px solid var(--crimson);
  border-radius: 0 3px 3px 0;
  padding: 14px 18px;
  margin: 0 0 28px;
}

h2 {
  font-family: var(--display);
  font-size: clamp(19px, 2.2vw, 24px);
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.3;
  margin: 46px 0 14px;
  padding-top: 24px;
  border-top: 1px solid var(--ink-line);
}
h3 {
  font-family: var(--text);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.005em;
  margin: 26px 0 10px;
}

p, li { color: color-mix(in srgb, var(--bone) 92%, transparent); }
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px; padding-left: 1.3em; }
li { margin: 0 0 8px; }
strong { color: var(--fg); font-weight: 600; }

/* Table of contents */
.toc {
  font-family: var(--text);
  background: var(--ink-raised);
  border: 1px solid var(--ink-line);
  border-radius: 6px;
  padding: 18px 20px 14px;
  margin: 0 0 32px;
}
.toc h2 {
  border: 0; padding: 0; margin: 0 0 10px;
  font-size: 13px; font-weight: 600;
  color: var(--fg-quiet);
  letter-spacing: .01em;
}
.toc ol { margin: 0; padding-left: 1.15em; columns: 1; }
.toc a {
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  color: color-mix(in srgb, var(--bone) 86%, transparent);
}
.toc a:hover { color: var(--crimson); }
@media (min-width: 640px) {
  .toc ol { columns: 2; column-gap: 28px; }
}

address {
  font-style: normal;
  font-family: var(--text);
  font-size: 14.5px;
  line-height: 1.7;
  color: color-mix(in srgb, var(--bone) 88%, transparent);
  margin: 0 0 16px;
}
.contact-block {
  background: var(--ink-raised);
  border: 1px solid var(--ink-line);
  border-radius: 6px;
  padding: 18px 20px;
}

/* --------------------------------------------------------------------------
   Footer — the legal-page variant of the site footer.
   -------------------------------------------------------------------------- */
.legal-foot {
  border-top: 1px solid var(--ink-line);
  padding: 28px var(--gutter) 40px;
  font-family: var(--text);
}
.legal-foot p {
  margin: 0 0 6px;
  font-size: 13.5px;
  color: var(--fg-quiet);
}
.legal-foot a { color: var(--fg-quiet); text-decoration: underline; text-decoration-color: var(--ink-line); }
.legal-foot a:hover { color: var(--crimson); text-decoration-color: var(--crimson); }

@media print {
  body { background: #fff; color: #000; }
  .legal-top, .legal-foot, .toc { display: none; }
  a { color: #000; }
}
