/* Legal document styles — semantic HTML only, no classes.
   Uses CSS custom property --legal-header-bg set per page.
   Self-sufficient: pages load base.css + globals.css, and every element a
   legal document uses (header/article/nav/section/aside/address/footer) is
   styled here so nothing depends on a classless library. */

/* ── Header ── */
header {
  padding: 60px 80px 48px;
  background: var(--legal-header-bg, var(--avi-ink));
  position: relative;
  overflow: hidden;
}

/* The header/footer column matches the old classless container so the
   centered narrow layout is preserved. */
header,
footer {
  width: min(100% - 3rem, 750px);
  margin-inline: auto;
}
header::before {
  content: '';
  position: absolute;
  right: -60px;
  bottom: -60px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(255,255,255,.1), transparent 70%);
}
header a {
  font-family: var(--avi-serif);
  font-size: 28px;
  font-weight: 900;
  color: white;
  letter-spacing: -1px;
  margin-bottom: 32px;
  text-decoration: none;
  display: block;
}
header a span {
  color: #8fc48a;
}
header div {
  font-family: var(--avi-serif);
  font-size: 52px;
  font-weight: 900;
  color: white;
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
header small {
  font-family: var(--avi-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(255,255,255,.45);
  text-transform: uppercase;
  position: relative;
  z-index: 1;
  display: block;
}

/* ── Article (doc body) ── */
article {
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 48px;
  background: var(--avi-surface);
  border: 1px solid var(--avi-border-color);
  border-radius: 14px;
}
article p {
  margin: 0 0 16px;
  color: rgba(26,24,20,.8);
}
article ul,
article ol {
  padding-left: 24px;
  margin: 0 0 16px;
}
article li {
  margin-bottom: 8px;
  color: rgba(26,24,20,.8);
}
article li::marker {
  color: var(--avi-muted-color);
}

/* ── Aside (alert box / highlight box) ── */
article > aside {
  background: rgba(181,69,27,.08);
  border: 1px solid rgba(181,69,27,.25);
  border-left: 4px solid var(--avi-red);
  padding: 24px 28px;
  margin-bottom: 48px;
  font-size: 14px;
  line-height: 1.6;
}
article > aside strong {
  color: var(--avi-red);
}

/* ── Nav (table of contents) ── */
article > nav {
  background: var(--avi-surface);
  border: 1px solid var(--avi-border-color);
  border-left: 4px solid var(--avi-primary);
  padding: 32px 36px;
  margin-bottom: 64px;
}
article > nav h2 {
  font-family: var(--avi-mono);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--avi-primary);
  margin-bottom: 20px;
}
article > nav ol {
  padding-left: 20px;
}
article > nav li {
  margin-bottom: 8px;
}
article > nav a {
  color: var(--avi-color);
  text-decoration: none;
  font-size: 14px;
  opacity: .7;
  transition: opacity .2s;
}
article > nav a:hover {
  opacity: 1;
  color: var(--avi-primary);
}

/* ── Section (legal sections) ── */
article > section {
  margin-bottom: 60px;
}
article > section > small {
  font-family: var(--avi-mono);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--avi-primary);
  margin-bottom: 8px;
  display: block;
}
article > section > h2 {
  font-family: var(--avi-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--avi-color);
  margin-bottom: 20px;
  letter-spacing: -.5px;
}

/* ── HR dividers ── */
article hr {
  border: none;
  height: 1px;
  background: var(--avi-border-color);
  margin: 48px 0;
}

/* ── Address (contact box) ── */
article > section > address {
  background: var(--avi-color);
  color: white;
  padding: 40px;
  margin-top: 24px;
  font-style: normal;
}
article > section > address h3 {
  font-family: var(--avi-serif);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
}
article > section > address p {
  color: rgba(255,255,255,.65);
  font-family: var(--avi-mono);
  font-size: 12px;
  line-height: 1.8;
}

/* ── Aside inside section (highlight / disclaimer) ── */
article > section > aside {
  background: color-mix(in srgb, var(--avi-primary) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--avi-primary) 20%, transparent);
  border-left: 3px solid var(--avi-primary);
  padding: 20px 24px;
  margin: 24px 0;
  font-size: 14px;
}

/* ── Footer ── */
footer {
  background: var(--avi-color);
  padding: 32px 80px;
  font-size: 12px;
  color: rgba(255,255,255,.3);
  font-family: var(--avi-mono);
  letter-spacing: .5px;
  display: flex;
  justify-content: space-between;
}

/* ── Responsive ── */
@media (max-width: 700px) {
  header {
    padding: 40px 24px;
  }
  article {
    padding: 48px 24px;
  }
  header div {
    font-size: 36px;
  }
  footer {
    flex-direction: column;
    gap: 8px;
    padding: 24px;
  }
}
