/* Shared styles for secondary pages (Privacy Policy, Terms).
   Tokens, header and footer mirror the inline styles in index.html; keep them in sync. */

@font-face {
  font-family: 'Inter Tight';
  src: url(/fonts/inter-tight-var.woff2) format('woff2');
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url(/fonts/instrument-serif-italic.woff2) format('woff2');
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Sans Fallback';
  src: local('Arial');
  size-adjust: 99%;
  ascent-override: 97%;
  descent-override: 24%;
}

/* ---------- Tokens ---------- */
:root {
  --oak: #24392e;
  --ink: #1b231e;
  --caliche: #f5f0e6;
  --sand: #eadfcb;
  --clay: #c0643e;
  --clay-ink: #9a4a2a;
  --sage: #8a9a7b;
  --sprout: #b7c4a6;
  --sky: #a9c3d3;
  --muted: #5c645c;
  --line: rgba(36, 57, 46, 0.16);

  --sans: 'Inter Tight', 'Sans Fallback', system-ui, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1360px;
  --gap: clamp(16px, 2vw, 28px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --header-h: 72px;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
  margin: 0;
  background: var(--caliche);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}
h1,
h2,
p,
ul,
dl,
dd {
  margin: 0;
}
:focus-visible {
  outline: 2px solid var(--clay-ink);
  outline-offset: 3px;
  border-radius: 4px;
}
::selection {
  background: var(--sprout);
}
.skip {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: var(--oak);
  color: var(--caliche);
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  transition: top 0.2s;
}
.skip:focus {
  top: 12px;
}
.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}
.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1.2em;
  border-radius: 999px;
  border: 1px solid var(--oak);
  background: var(--oak);
  color: var(--caliche);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition:
    background-color 0.3s var(--ease),
    border-color 0.3s var(--ease),
    color 0.3s var(--ease);
}
.btn:hover {
  background: var(--clay-ink);
  border-color: var(--clay-ink);
  color: #fff;
}
.btn--ghost {
  background: transparent;
  color: var(--oak);
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(245, 240, 230, 0.86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--oak);
  flex-shrink: 0;
}
.brand svg {
  width: 42px;
  height: 42px;
}
.brand__name {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand__name b {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.035em;
}
.brand__name small {
  font-size: 0.56rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-top: 5px;
}
.header__cta {
  display: flex;
  gap: 10px;
}
@media (max-width: 560px) {
  .header__cta .btn--ghost,
  .brand__name small {
    display: none;
  }
}

/* ---------- Page hero ---------- */
.page-hero {
  position: relative;
  padding: clamp(56px, 9vw, 120px) 0 clamp(40px, 6vw, 72px);
  overflow: hidden;
  isolation: isolate;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% 0;
  z-index: -1;
  background:
    radial-gradient(40% 60% at 85% 10%, rgba(169, 195, 211, 0.6), transparent 70%),
    radial-gradient(36% 50% at 5% 90%, rgba(183, 196, 166, 0.55), transparent 70%);
}
.page-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--oak);
}
.page-hero .eyebrow::before {
  content: '';
  width: 36px;
  height: 1px;
  background: currentColor;
}
.page-hero h1 {
  margin-top: 22px;
  font-size: clamp(2.8rem, 8vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-weight: 600;
  color: var(--oak);
}
.page-hero .updated {
  margin-top: 24px;
  color: var(--muted);
}
.page-hero .intro {
  margin-top: 20px;
  max-width: 44rem;
  font-size: clamp(1.1rem, 1.4vw, 1.25rem);
  color: var(--ink);
}

/* ---------- Document layout ---------- */
.doc {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: var(--gap);
  padding: 32px 0 clamp(80px, 10vw, 140px);
  border-top: 1px solid var(--line);
}
.toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  align-self: start;
}
.toc p {
  color: var(--clay-ink);
  margin-bottom: 14px;
}
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--line);
}
.toc a {
  display: block;
  padding: 6px 0 6px 14px;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.toc a:hover {
  color: var(--oak);
}
.prose {
  max-width: 46rem;
}
.prose section + section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.prose h2 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 600;
  color: var(--oak);
  margin-bottom: 18px;
}
.prose p + p,
.prose p + ul,
.prose ul + p,
.prose dl + p {
  margin-top: 14px;
}
.prose ul {
  padding-left: 1.2em;
}
.prose li + li {
  margin-top: 8px;
}
.prose li::marker {
  color: var(--clay);
}
.prose strong,
.prose dt {
  color: var(--oak);
  font-weight: 600;
}
.prose a {
  color: var(--clay-ink);
  text-underline-offset: 3px;
}
.prose dl {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
  border-top: 1px solid var(--line);
}
.prose dt,
.prose dd {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.prose dd {
  padding-left: 20px;
}
.prose dd ul {
  margin-top: 8px;
}
.callout {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
}
.contact-card {
  font-style: normal;
  padding: 22px 24px;
  border-radius: 18px;
  background: var(--oak);
  color: var(--caliche);
}
.contact-card strong {
  color: var(--caliche);
  display: block;
  margin-bottom: 6px;
}
.contact-card a {
  color: var(--sprout);
}
@media (max-width: 900px) {
  .doc {
    grid-template-columns: 1fr;
  }
  .toc {
    position: static;
  }
  .toc ol {
    border-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .toc a {
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.82rem;
  }
}
@media (max-width: 600px) {
  .prose dl {
    grid-template-columns: 1fr;
  }
  .prose dt {
    padding-bottom: 0;
    border-bottom: 0;
  }
  .prose dd {
    padding-left: 0;
    padding-top: 6px;
  }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: rgba(245, 240, 230, 0.78);
  padding: clamp(64px, 9vw, 120px) 0 calc(28px + env(safe-area-inset-bottom));
  overflow: hidden;
  font-size: 0.95rem;
}
.footer__top {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 40px;
}
.footer__brand {
  grid-column: 1 / span 4;
}
.footer__brand .brand {
  color: var(--caliche);
}
.footer__brand p {
  margin-top: 18px;
  max-width: 22rem;
}
.footer__col {
  grid-column: span 2;
}
.footer__col--wide {
  grid-column: span 4;
}
.footer h2 {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sprout);
  font-weight: 600;
  margin-bottom: 16px;
}
.footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer__col li + li {
  margin-top: 8px;
}
.footer__col--wide ul {
  columns: 2;
  column-gap: var(--gap);
}
.footer__col--wide li {
  break-inside: avoid;
  margin-bottom: 8px;
}
.footer__col--wide li + li {
  margin-top: 0;
}
.footer a {
  text-decoration: none;
  transition: color 0.25s;
}
.footer a:hover {
  color: var(--caliche);
  text-decoration: underline;
}
.footer__word {
  font-size: clamp(5rem, 24vw, 22rem);
  font-weight: 700;
  letter-spacing: -0.07em;
  line-height: 0.8;
  color: var(--caliche);
  margin: clamp(56px, 8vw, 110px) 0 0;
  padding-bottom: 0.14em;
  white-space: nowrap;
}
.footer__word em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--clay);
  font-weight: 400;
  letter-spacing: -0.02em;
}
.footer__legal {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid rgba(245, 240, 230, 0.14);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  font-size: 0.85rem;
}
.footer__policies {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--caliche);
}
.footer__policies a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer__policies a[aria-current='page'] {
  color: var(--sprout);
}
@media (max-width: 960px) {
  .footer__brand,
  .footer__col--wide {
    grid-column: 1 / -1;
  }
  .footer__col {
    grid-column: span 6;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition-duration: 0.01ms !important;
  }
}
