/* Montrésor - static legal documents (/privacy, /support).
   These two pages are plain HTML served by Cloudflare ahead of the Worker, so
   they cannot use the bundled src/styles.css. This file mirrors that
   stylesheet's tokens and shell; keep the two in step when either changes. */

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

:root {
  --bg: #ffffff;
  --surface: #f5f3f0;
  --text-primary: #1a1a1a;
  --text-secondary: #999999;
  /* Both greys are the site's original #999999, restored by design decision
     after the contrast pass: one tone for every grey a reader reads, the
     header nav included. This is BELOW WCAG AA (2.85:1 on #ffffff, 2.57:1 on
     #f5f3f0) and is a knowing trade of contrast for the editorial look --
     see "Accepted deviations" in ACCESSIBILITY.md. The two tokens stay
     separate because their call sites still mean different things; ornament
     that is not read uses --text-decorative. */
  --text-tertiary: #999999;
  --text-decorative: #cccccc;
  --divider: #e8e8e8;
  --accent: #8b6d3f;

  --serif: "Cormorant", Georgia, serif;
  --sans: "Outfit", system-ui, sans-serif;

  --max-w: 1440px;
  --header-h: 64px;
  --footer-h: 36px;
  --page-x: 80px;
  --header-x: 56px;
  --hairline: 0.5px;
}

html,
body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--bg);
  color: var(--text-primary);
  border: var(--hairline) solid var(--text-primary);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: top 200ms ease;
}
.skip-link:focus {
  top: 12px;
}

/* ---------- shell ---------- */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  border-bottom: var(--hairline) solid var(--divider);
  background: var(--bg);
  padding-inline: max(
    var(--header-x),
    calc((100% - var(--max-w)) / 2 + var(--header-x))
  );
}

.wordmark {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.site-nav a {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  transition: color 200ms ease;
  white-space: nowrap;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 1px;
  background: var(--text-primary);
}

.nav-sheet {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--bg);
}

.nav-sheet[data-open="true"] {
  display: block;
}

.nav-sheet__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 var(--header-x);
  border-bottom: var(--hairline) solid var(--divider);
}

.nav-sheet__close {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-sheet nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 32px;
  height: calc(100vh - var(--header-h));
  padding: 0 var(--page-x);
}

.nav-sheet nav a {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 28px;
  color: var(--text-secondary);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  height: var(--footer-h);
  flex-shrink: 0;
  color: var(--text-tertiary);
  background: var(--bg);
  padding-inline: max(24px, calc((100% - var(--max-w)) / 2 + 24px));
}

.site-footer .copyright {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.12em;
}

.site-footer .rule {
  width: 12px;
  height: var(--hairline);
  background: var(--divider);
}

.site-footer a {
  display: flex;
  align-items: center;
  color: var(--text-tertiary);
}

/* ---------- the document itself ---------- */

.document {
  flex: 1;
  width: 100%;
  max-width: 780px;
  margin-inline: auto;
  padding: 64px var(--page-x) 80px;
}

.document h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 52px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.doc-rule {
  width: 32px;
  height: var(--hairline);
  background: var(--text-primary);
  border: 0;
  margin: 40px 0;
}

.document section {
  margin-top: 48px;
}

.document section:first-of-type {
  margin-top: 0;
}

.document h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 32px;
  line-height: 1.15;
  margin-bottom: 14px;
}

.document p {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--text-secondary);
  text-wrap: pretty;
}

.document p + p {
  margin-top: 16px;
}

.text-link {
  color: var(--text-primary);
  border-bottom: var(--hairline) solid var(--divider);
  transition: border-color 200ms ease;
}

.text-link:hover {
  border-bottom-color: var(--text-primary);
}

.footer {
  border-top: var(--hairline) solid var(--divider);
  padding-top: 24px;
  margin-top: 64px;
}

.footer-version,
.footer-links {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-secondary);
}

.footer-copyright {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-top: 24px;
}

/* ---------- tablet ---------- */

@media (max-width: 1100px) {
  :root {
    --page-x: 48px;
    --header-x: 36px;
  }

  .wordmark {
    font-size: 15px;
  }
  .site-nav {
    gap: 22px;
  }
  .site-nav a {
    font-size: 10px;
  }

  .document {
    padding-top: 48px;
  }
  .document h1 {
    font-size: 40px;
  }
  .document h2 {
    font-size: 26px;
  }
}

/* ---------- phone ---------- */

@media (max-width: 640px) {
  :root {
    --page-x: 24px;
    --header-x: 24px;
  }

  .site-nav {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }

  .document {
    padding: 40px var(--page-x) 56px;
  }
  .document h1 {
    font-size: 32px;
  }
  .document h2 {
    font-size: 22px;
  }
  .doc-rule {
    margin: 28px 0;
  }
  .document section {
    margin-top: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
