/* ════════════════════════════════════════════════════════
   SHOEBILL STUDIO — legal / document pages
   Shared by privacy.html · cookies.html · terms.html
   Reuses the exact design tokens from styles.css, but is
   authored for long-form, scrollable, selectable documents
   (the main site locks scroll + hides the cursor; a legal
   page must not).
   ════════════════════════════════════════════════════════ */

:root {
  --paper: #d9d4c9;
  --paper-deep: #cdc7ba;
  --ink: #100d0b;
  --ink-soft: #1a1614;
  --red: #a32017;
  --red-bright: #c0392b;
  --red-deep: #7e120d;
  --font-ui: "Jost", system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, monospace;
  --font-display: "Archivo Black", var(--font-ui);
}

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

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background:
    linear-gradient(rgba(217, 212, 201, 0.92), rgba(217, 212, 201, 0.92)),
    url("assets/tex-wall-stucco.jpg") center / cover fixed;
  color: var(--ink);
  font-family: var(--font-ui);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--red); color: #f3efe6; }

a { color: var(--red-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red-bright); }

/* keyboard-only focus ring — mirrors styles.css */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--red-bright);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ─────────────── layout ─────────────── */

.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(2.4rem, 6vw, 5rem) clamp(1.4rem, 5vw, 2.6rem) 4rem;
}

/* skip link (a11y) — hidden until focused */
.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--ink);
  color: #f3efe6;
  padding: 0.6rem 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: top 0.15s ease;
  z-index: 10;
}
.skip:focus { top: 1rem; }

/* ─────────────── masthead ─────────────── */

.legal-mast {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 1.4rem;
  border-bottom: 3px solid var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%); /* subtle torn edge */
}
.legal-brand {
  font-weight: 800;
  font-size: clamp(0.9rem, 2.4vw, 1.05rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.legal-brand em { font-style: normal; color: var(--red); margin: 0 0.15em; }
.legal-home {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
}
.legal-home:hover { color: var(--red-bright); }

/* ─────────────── title block ─────────────── */

.legal-title {
  margin: clamp(2rem, 6vw, 3.4rem) 0 0.4rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.1rem, 8vw, 3.6rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
  color: var(--red);
}
.legal-meta {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  color: rgba(16, 13, 11, 0.62);
  margin-bottom: clamp(1.8rem, 5vw, 2.8rem);
}
.legal-intro {
  font-size: clamp(1.02rem, 2.4vw, 1.16rem);
  max-width: 62ch;
  margin-bottom: 2.6rem;
}

/* ─────────────── sections ─────────────── */

.legal section { margin-bottom: 2.4rem; max-width: 68ch; }

.legal h2 {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-weight: 800;
  font-size: clamp(1.05rem, 3vw, 1.32rem);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.9rem;
}
.legal h2::before {
  content: "\2715"; /* ✕ cross-stitch motif */
  color: var(--red-bright);
  font-size: 0.7em;
  font-weight: 400;
  transform: translateY(-0.08em);
}

.legal h3 {
  font-weight: 800;
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0.02em;
  margin: 1.4rem 0 0.5rem;
}

.legal p { margin-bottom: 1rem; }
.legal p:last-child { margin-bottom: 0; }

.legal ul { list-style: none; margin: 0 0 1rem; padding: 0; }
.legal li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.6rem;
}
.legal li::before {
  content: "\2715";
  position: absolute;
  left: 0;
  top: 0.05em;
  color: var(--red-bright);
  font-size: 0.72em;
}
.legal li strong { font-weight: 800; }

/* term / definition rows used for the data + services tables */
.legal dl {
  display: grid;
  grid-template-columns: minmax(9rem, 12rem) 1fr;
  gap: 0.5rem 1.4rem;
  margin: 0.4rem 0 1rem;
}
.legal dt {
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.01em;
}
.legal dd { margin: 0; }
@media (max-width: 520px) {
  .legal dl { grid-template-columns: 1fr; gap: 0.15rem 0; }
  .legal dd { margin-bottom: 0.7rem; }
}

.legal code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: rgba(16, 13, 11, 0.07);
  padding: 0.05em 0.4em;
  border-radius: 2px;
}

.legal-note {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.6;
  color: rgba(16, 13, 11, 0.72);
  border-left: 3px solid var(--red);
  padding: 0.4rem 0 0.4rem 1rem;
  margin: 1rem 0;
}

/* ─────────────── footer ─────────────── */

.legal-foot {
  margin-top: clamp(3rem, 8vw, 4.5rem);
  padding-top: 1.6rem;
  border-top: 3px solid var(--ink);
  clip-path: polygon(0 8%, 100% 0, 100% 100%, 0 100%); /* torn top edge */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}
.legal-foot a {
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
}
.legal-foot a[aria-current="page"] { color: var(--red); font-weight: 500; }
.legal-foot a:hover { color: var(--red-bright); }
.legal-foot .sep { color: rgba(16, 13, 11, 0.4); }
.legal-foot .legal-foot__brand { margin-left: auto; color: rgba(16, 13, 11, 0.55); }

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