@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Fira+Code:wght@300;400;500;600&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&display=swap');

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

:root {
  --legal-bg: #101310;
  --legal-panel: #151915;
  --legal-panel-raised: #1b201b;
  --legal-ink: #f3f0e9;
  --legal-copy: #c1c4bd;
  --legal-muted: #92988f;
  --legal-accent: #b7d58d;
  --legal-line: rgba(232, 236, 228, .13);
  --legal-line-accent: rgba(183, 213, 141, .28);
  --legal-display: 'Bebas Neue', sans-serif;
  --legal-serif: 'Cormorant Garamond', Georgia, serif;
  --legal-mono: 'Fira Code', monospace;
}

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--legal-bg);
  color: var(--legal-ink);
  font-family: var(--legal-mono);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--legal-accent); color: var(--legal-bg); }

.noise {
  position: fixed;
  inset: 0;
  z-index: 900;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 128px;
  opacity: .035;
  pointer-events: none;
}

#header, #footer { position: relative; }
#header { z-index: 1000; }
#footer { z-index: 2; }

#legal-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 390px;
  padding: clamp(132px, 17vh, 176px) clamp(24px, 8vw, 120px) 68px;
  border-bottom: 1px solid var(--legal-line);
  background:
    linear-gradient(rgba(230,239,222,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230,239,222,.035) 1px, transparent 1px),
    radial-gradient(ellipse at 82% 25%, rgba(183,213,141,.09), transparent 38%),
    #101310;
  background-size: 64px 64px, 64px 64px, auto, auto;
}

#legal-hero::after {
  position: absolute;
  z-index: -1;
  right: clamp(24px, 8vw, 120px);
  bottom: 36px;
  left: clamp(24px, 8vw, 120px);
  height: 1px;
  content: "";
  background: linear-gradient(90deg, var(--legal-accent), rgba(183,213,141,.08) 58%, transparent);
  opacity: .45;
}

.hero-ghost {
  position: absolute;
  z-index: -1;
  top: 50%;
  right: clamp(20px, 7vw, 110px);
  color: transparent;
  font-family: var(--legal-display);
  font-size: clamp(112px, 23vw, 340px);
  line-height: .8;
  letter-spacing: -.025em;
  -webkit-text-stroke: 1px rgba(183,213,141,.09);
  transform: translateY(-38%);
  pointer-events: none;
  user-select: none;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  color: var(--legal-accent);
}

.eyebrow::before {
  width: 30px;
  height: 1px;
  background: currentColor;
  content: "";
}

.eyebrow span {
  font: 500 11px/1.5 var(--legal-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.legal-title {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 0 30px;
  color: var(--legal-ink);
  font: 400 clamp(72px, 10.5vw, 148px)/.79 var(--legal-display);
  letter-spacing: -.025em;
}

.legal-title em {
  color: transparent;
  font-style: normal;
  -webkit-text-stroke: 1px var(--legal-accent);
}

.legal-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-pill {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 6px 11px;
  border: 1px solid var(--legal-line);
  background: rgba(16, 19, 16, .64);
  color: var(--legal-copy);
  font: 400 10px/1.5 var(--legal-mono);
  letter-spacing: .04em;
  transition: border-color .2s ease, color .2s ease;
}

.meta-pill:hover { border-color: var(--legal-line-accent); color: var(--legal-accent); }

#legal-body {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
  gap: clamp(44px, 8vw, 120px);
  max-width: 1440px;
  margin: 0 auto;
  padding: 76px clamp(24px, 8vw, 120px) 112px;
}

.legal-toc {
  position: sticky;
  top: 84px;
  align-self: start;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  padding: 0 20px 20px 0;
  border-right: 1px solid var(--legal-line);
  scrollbar-color: var(--legal-line-accent) transparent;
  scrollbar-width: thin;
}

.toc-label, .toc-also-label {
  margin: 0 0 18px;
  color: var(--legal-muted);
  font: 500 10px/1.5 var(--legal-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.toc-label::before, .toc-also-label::before {
  color: var(--legal-accent);
  content: "// ";
}

.toc-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.toc-item a {
  display: block;
  padding: 9px 10px;
  border-left: 1px solid transparent;
  color: var(--legal-muted);
  font: 400 11px/1.55 var(--legal-mono);
  text-decoration: none;
  transition: color .2s ease, border-color .2s ease, background .2s ease, padding .2s ease;
}

.toc-item a:hover {
  padding-left: 14px;
  border-left-color: var(--legal-accent);
  background: rgba(183,213,141,.045);
  color: var(--legal-ink);
}

.toc-also {
  display: grid;
  gap: 6px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--legal-line);
}

.toc-also-label { margin-bottom: 6px; }

.toc-also a {
  color: var(--legal-copy);
  font: 400 11px/1.6 var(--legal-mono);
  text-decoration: none;
  transition: color .2s ease;
}

.toc-also a:hover { color: var(--legal-accent); }

.legal-content { min-width: 0; max-width: 790px; }

.legal-section {
  scroll-margin-top: 88px;
  margin: 0 0 52px;
  padding: 0 0 48px;
  border-bottom: 1px solid var(--legal-line);
}

.legal-section:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }

.section-num {
  display: block;
  margin-bottom: 12px;
  color: var(--legal-accent);
  font: 500 10px/1.5 var(--legal-mono);
  letter-spacing: .12em;
}

.section-title {
  margin: 0 0 22px;
  color: var(--legal-ink);
  font: 400 clamp(32px, 4vw, 48px)/.95 var(--legal-display);
  letter-spacing: .005em;
}

.legal-text, .legal-list li {
  color: var(--legal-copy);
  font: 300 clamp(18px, 1.65vw, 21px)/1.75 var(--legal-serif);
}

.legal-text { margin: 0 0 16px; }
.legal-text:last-child { margin-bottom: 0; }
.legal-text strong, .legal-list strong { color: var(--legal-ink); font-weight: 600; }
.legal-text em { color: var(--legal-accent); }

.legal-text a, .legal-list a {
  color: var(--legal-accent);
  text-decoration: none;
  text-underline-offset: 4px;
  text-decoration-color: rgba(183,213,141,.45);
  text-decoration-line: underline;
  transition: color .2s ease, text-decoration-color .2s ease;
}

.legal-text a:hover, .legal-list a:hover {
  color: #d3ecad;
  text-decoration-color: currentColor;
}

.legal-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 20px;
  padding: 0;
  list-style: none;
}

.legal-list li { position: relative; padding-left: 24px; }
.legal-list li::before { position: absolute; left: 0; color: var(--legal-accent); content: "—"; }

.legal-note {
  margin-top: 22px;
  padding: 16px 18px;
  border: 1px solid var(--legal-line-accent);
  border-left: 2px solid var(--legal-accent);
  background: rgba(183,213,141,.045);
  color: var(--legal-copy);
  font: 400 12px/1.75 var(--legal-mono);
}

.legal-toc::-webkit-scrollbar { width: 5px; }
.legal-toc::-webkit-scrollbar-thumb { border-radius: 5px; background: var(--legal-line-accent); }
.legal-toc::-webkit-scrollbar-track { background: transparent; }

.toc-item a:focus-visible, .toc-also a:focus-visible, .legal-text a:focus-visible, .legal-list a:focus-visible {
  outline: 1px solid var(--legal-accent);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  #legal-body {
    grid-template-columns: 1fr;
    gap: 38px;
    padding-top: 48px;
  }

  .legal-toc {
    position: static;
    max-height: none;
    padding: 0 0 26px;
    border-right: 0;
    border-bottom: 1px solid var(--legal-line);
  }

  .toc-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; }
  .toc-also { grid-template-columns: repeat(2, max-content); align-items: center; gap: 8px 20px; }
  .toc-also-label { grid-column: 1 / -1; margin: 0; }
  .legal-content { max-width: none; }
}

@media (max-width: 560px) {
  #legal-hero { min-height: 340px; padding: 112px 22px 48px; }
  #legal-hero::after { right: 22px; bottom: 22px; left: 22px; }
  .hero-ghost { top: 42%; right: 10px; font-size: 28vw; }
  .eyebrow { gap: 9px; margin-bottom: 20px; }
  .eyebrow::before { width: 20px; }
  .eyebrow span { font-size: 9px; letter-spacing: .09em; }
  .legal-title { margin-bottom: 24px; font-size: clamp(68px, 17vw, 92px); }
  .meta-pill { min-height: 30px; padding: 5px 8px; font-size: 9px; }
  #legal-body { gap: 30px; padding: 36px 22px 72px; }
  .toc-label { margin-bottom: 12px; }
  .toc-list { grid-template-columns: 1fr; }
  .toc-item a { padding: 8px 10px; }
  .toc-also { grid-template-columns: 1fr; gap: 8px; }
  .toc-also-label { grid-column: auto; }
  .legal-section { margin-bottom: 38px; padding-bottom: 34px; }
  .section-title { margin-bottom: 16px; font-size: 37px; }
  .legal-text, .legal-list li { font-size: 19px; line-height: 1.7; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
