/* =========================================================
   legal.css
   Shared styles for privacy.html and terms.html.
   Same tokens, fonts, colours and footer as index.html: this file only
   adds the reading layout for a text page. Nothing here affects index.html.
   ========================================================= */

@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-latin-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('fonts/cormorant-garamond-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('fonts/cormorant-garamond-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #1a1a1a;
  --ink-2: #2e2b28;
  --paper: #f4f1ec;
  --paper-2: #ebe6df;
  --rule: #c9c2b6;
  --mute: #6b6358;
  --clay: #b5512c;
  --clay-deep: #8a3d20;
  --clay-text: #a4461f;
  --serif: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --max: 1200px;
  --gutter: clamp(20px, 4.2vw, 40px);
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--paper);
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--clay-text); outline-offset: 3px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  text-decoration: none;
  font-weight: 500;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--nav-h);
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35em;
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
}
.brand-slash { color: var(--clay); }
.brand-sub {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--clay-deep); border-color: var(--clay-deep); }
.nav-book { min-height: 40px; padding: 0 14px; font-size: 0.875rem; white-space: nowrap; }
@media (max-width: 379.98px) { .hide-xs { display: none; } }
@media (max-width: 559.98px) { .brand-tail { display: none; } }
@media (min-width: 1024px) {
  :root { --nav-h: 76px; }
  .nav-book { min-height: 44px; padding: 0 20px; }
}

/* ---------- document ---------- */
.doc { padding: calc(var(--nav-h) + clamp(36px, 6vw, 72px)) 0 clamp(56px, 7vw, 96px); }
.doc-grid { display: grid; gap: 32px; }
.kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.875rem;
  color: var(--mute);
  margin-bottom: 20px;
}
.kicker::before { content: ''; flex: 0 0 48px; height: 1px; background: var(--ink); }
.doc-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.5rem, 1.9rem + 2.6vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  font-variant-numeric: lining-nums;
}
.doc-updated { margin-top: 16px; font-size: 0.875rem; color: var(--mute); }
.doc-aside-links { margin-top: 20px; font-size: 0.9375rem; }
.doc-aside-links a {
  text-decoration: underline;
  text-decoration-color: var(--clay);
  text-underline-offset: 5px;
}
.doc-aside-links a:hover { color: var(--clay-text); }

.doc-lead { font-size: 1.0625rem; color: var(--ink-2); max-width: 36em; }
.doc-section { margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--rule); }
.doc-section:first-of-type { margin-top: 28px; }
.doc-section h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.5rem, 1.35rem + 0.6vw, 1.875rem);
  line-height: 1.15;
  margin-bottom: 14px;
  font-variant-numeric: lining-nums;
}
.doc-section h3 {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 22px 0 8px;
}
.doc-section p { color: var(--ink-2); max-width: 36em; }
.doc-section p + p { margin-top: 12px; }
.doc-section a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--clay);
  text-underline-offset: 4px;
}
.doc-section a:hover { color: var(--clay-text); }

.doc-list { margin-top: 14px; max-width: 36em; }
.doc-list li {
  position: relative;
  padding: 9px 0 9px 20px;
  color: var(--ink-2);
  border-top: 1px solid var(--rule);
}
.doc-list li::before {
  content: '';
  position: absolute;
  left: 0; top: calc(9px + 0.7em);
  width: 8px; height: 1px;
  background: var(--clay);
}
.doc-basis { margin-top: 14px; max-width: 44em; }
.doc-basis > div { padding: 12px 0; border-top: 1px solid var(--rule); }
.doc-basis dt { font-weight: 600; }
.doc-basis dd { margin: 4px 0 0; color: var(--mute); }
.doc-note { margin-top: 16px; font-size: 0.875rem; color: var(--mute); max-width: 40em; }

@media (min-width: 720px) {
  .doc-basis > div { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
  .doc-basis dd { margin-top: 0; }
}
@media (min-width: 1024px) {
  .doc-grid { grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr); gap: 80px; }
  .doc-aside { position: sticky; top: calc(var(--nav-h) + 32px); align-self: start; }
  .doc-section:first-of-type { margin-top: 30px; padding-top: 0; border-top: 0; }
}

/* ---------- footer ---------- */
.site-footer { background: var(--paper-2); padding: 56px 0 calc(28px + env(safe-area-inset-bottom)); }
.footer-grid { display: grid; gap: 36px; }
.footer-brand { font-family: var(--serif); font-size: 1.75rem; line-height: 1.1; font-variant-numeric: lining-nums; }
.footer-brand span { color: var(--clay); }
.footer-grid p { color: var(--ink-2); }
.footer-grid .footer-brand + p { margin-top: 10px; }
.footer-h {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--mute);
}
.footer-legal-h { margin-top: 24px; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  text-decoration: none;
}
.footer-links a:hover { color: var(--clay-text); }
.footer-bottom {
  display: grid;
  gap: 6px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 0.8125rem;
  color: var(--mute);
}
@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; }
  .footer-bottom { grid-template-columns: auto 1fr auto; gap: 32px; }
  .footer-bottom p:nth-child(2) { text-align: center; }
}

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