.legal-page {
  min-height: 100vh;
  background: #0b100d;
  color: var(--paper);
}

.legal-page .site-header {
  position: relative;
  background: rgba(7, 10, 8, 0.98);
}

.legal-page .site-header nav a[aria-current="page"] {
  color: var(--moss-hot);
}

.legal-page .site-header nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.legal-main {
  isolation: isolate;
}

.legal-hero {
  position: relative;
  min-height: 430px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: clamp(76px, 10vw, 138px) clamp(20px, 8vw, 130px) clamp(58px, 8vw, 96px);
  border-bottom: 1px solid rgba(240, 238, 230, 0.2);
  isolation: isolate;
}

.legal-hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: -4%;
  background: url("/assets/media/landing-hero.webp?v=20260728-refresh") center 58% / cover no-repeat;
  filter: saturate(0.55) contrast(1.08);
  animation: legal-hero-enter 1100ms cubic-bezier(.16,.7,.26,1) both;
}

.legal-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 8, 6, 0.96), rgba(5, 8, 6, 0.68) 58%, rgba(5, 8, 6, 0.3)),
    linear-gradient(0deg, rgba(5, 8, 6, 0.96), transparent 72%);
}

.legal-hero-copy {
  width: min(900px, 100%);
  animation: reveal-up 700ms 110ms cubic-bezier(.2,.75,.25,1) both;
}

.legal-kicker {
  margin: 0 0 17px;
  color: var(--moss-hot);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.legal-hero h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(54px, 8vw, 108px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.92;
}

.legal-lead {
  max-width: 760px;
  margin: 27px 0 0;
  color: rgba(240, 238, 230, 0.72);
  font-size: clamp(16px, 1.7vw, 20px);
  line-height: 1.62;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 11px 24px;
  margin-top: 31px;
  color: rgba(240, 238, 230, 0.5);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-layout {
  width: min(1260px, calc(100% - 40px));
  display: grid;
  grid-template-columns: minmax(190px, 270px) minmax(0, 820px);
  gap: clamp(50px, 8vw, 130px);
  margin: 0 auto;
  padding: clamp(65px, 9vw, 120px) 0 clamp(80px, 11vw, 150px);
}

.legal-index {
  align-self: start;
  position: sticky;
  top: 32px;
}

.legal-index-title {
  margin: 0 0 17px;
  color: var(--moss-hot);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.legal-index nav {
  display: grid;
  border-top: 1px solid rgba(240, 238, 230, 0.2);
}

.legal-index a {
  padding: 10px 0;
  border-bottom: 1px solid rgba(240, 238, 230, 0.1);
  color: rgba(240, 238, 230, 0.55);
  font-size: 12px;
  line-height: 1.35;
  text-decoration: none;
  transition: color 160ms ease, padding-left 160ms ease, border-color 160ms ease;
}

.legal-index a:hover,
.legal-index a:focus-visible {
  padding-left: 6px;
  border-color: rgba(184, 201, 121, 0.55);
  color: var(--moss-hot);
}

.legal-document {
  min-width: 0;
}

.legal-section {
  padding: 0 0 clamp(42px, 6vw, 68px);
  border-bottom: 1px solid rgba(240, 238, 230, 0.15);
  scroll-margin-top: 35px;
  animation: legal-section-enter 620ms cubic-bezier(.2,.75,.25,1) both;
}

.legal-section + .legal-section {
  padding-top: clamp(42px, 6vw, 68px);
}

.legal-section:nth-child(2) { animation-delay: 45ms; }
.legal-section:nth-child(3) { animation-delay: 90ms; }

.legal-section h2 {
  margin: 0 0 24px;
  color: var(--paper);
  font-family: var(--display);
  font-size: clamp(34px, 4.5vw, 52px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}

.legal-section h3 {
  margin: 34px 0 12px;
  color: var(--moss-hot);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-section p,
.legal-section li {
  color: rgba(240, 238, 230, 0.7);
  font-size: 16px;
  line-height: 1.72;
}

.legal-section p {
  margin: 0 0 17px;
}

.legal-section ul,
.legal-section ol {
  margin: 0;
  padding-left: 23px;
}

.legal-section li + li {
  margin-top: 8px;
}

.legal-section strong {
  color: var(--paper);
}

.legal-section a,
.legal-support a {
  color: var(--moss-hot);
  text-underline-offset: 3px;
}

.legal-callout {
  margin: 30px 0 0;
  padding: 19px 22px;
  border-top: 1px solid rgba(238, 139, 130, 0.62);
  border-bottom: 1px solid rgba(238, 139, 130, 0.27);
  background: rgba(238, 139, 130, 0.06);
  color: #f1b2ac;
  font-weight: 650;
}

.deletion-layout .legal-index nav {
  counter-reset: deletion-step;
}

.deletion-layout .legal-index span {
  display: grid;
  grid-template-columns: 27px 1fr;
  gap: 7px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(240, 238, 230, 0.1);
  color: rgba(240, 238, 230, 0.58);
  font-size: 12px;
}

.deletion-layout .legal-index span::before {
  counter-increment: deletion-step;
  content: counter(deletion-step, decimal-leading-zero);
  color: var(--moss);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.deletion-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px 18px;
  margin-top: 30px;
}

.deletion-shot {
  margin: 0;
}

.deletion-shot-frame {
  overflow: hidden;
  border: 1px solid rgba(240, 238, 230, 0.18);
  background: #070a08;
}

.deletion-shot img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 350ms cubic-bezier(.2,.75,.25,1), filter 250ms ease;
}

.deletion-shot:hover img {
  filter: saturate(1.06);
  transform: scale(1.015);
}

.deletion-shot figcaption {
  padding: 13px 0 0;
  color: rgba(240, 238, 230, 0.58);
  font-size: 13px;
}

.deletion-shot figcaption strong {
  display: block;
  margin-bottom: 2px;
  color: var(--moss-hot);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-support {
  padding: clamp(42px, 6vw, 68px) clamp(20px, 8vw, 130px);
  border-top: 1px solid rgba(240, 238, 230, 0.15);
  background: #080c09;
  color: rgba(240, 238, 230, 0.58);
}

.legal-support-inner {
  width: min(1000px, 100%);
  margin: 0 auto;
}

.legal-support p {
  margin: 0;
}

@keyframes legal-hero-enter {
  from { opacity: 0.55; transform: scale(1.09); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes legal-section-enter {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 820px) {
  .legal-page .site-header nav a[href="https://wiki.wastelandrevenant.com/"] { display: none; }
  .legal-layout { grid-template-columns: 1fr; gap: 45px; }
  .legal-index { position: static; }
  .legal-index nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legal-index a { padding-right: 12px; }
}

@media (max-width: 560px) {
  .legal-page .site-header nav a[href="/"] { display: none; }
  .legal-page .site-header nav { gap: 13px; }
  .legal-hero { min-height: 365px; padding: 72px 20px 54px; }
  .legal-hero h1 { font-size: clamp(52px, 17vw, 75px); }
  .legal-lead { font-size: 15px; }
  .legal-layout { width: calc(100% - 40px); padding-top: 54px; }
  .legal-index nav { grid-template-columns: 1fr; }
  .legal-section p, .legal-section li { font-size: 15px; }
  .deletion-gallery { grid-template-columns: 1fr; gap: 31px; }
}

@media (prefers-reduced-motion: reduce) {
  .legal-hero::before,
  .legal-hero-copy,
  .legal-section { animation: none; }
}
