/* ZELUNA legal pages — shared styles
   Brand tokens mirror ZELUNA/Theme/Colors.swift */

:root {
  --eclipse-black: #050711;
  --deep-navy: #0b1026;
  --midnight-blue: #1a2242;
  --twilight-plum: #38234e;
  --card-surface: #171c34;
  --glow-gold: #ffd98a;
  --soft-gold: #e6b85c;
  --primary-text: #fff8ef;
  --secondary-text: #d7dcf8;
  --muted-text: #96a0d0;
  --hairline: rgba(215, 220, 248, 0.14);
  --measure: 44rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--eclipse-black);
  background-image:
    radial-gradient(58rem 42rem at 12% -8%, rgba(56, 35, 78, 0.55), transparent 62%),
    radial-gradient(48rem 38rem at 92% 6%, rgba(26, 34, 66, 0.7), transparent 60%),
    radial-gradient(64rem 48rem at 50% 108%, rgba(11, 16, 38, 0.9), transparent 66%);
  background-attachment: fixed;
  color: var(--secondary-text);
  font-family: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.85;
  letter-spacing: 0.005em;
}

.shell {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
}

/* ---------- masthead ---------- */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--hairline);
}

.wordmark {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  font-variation-settings: "SOFT" 40, "WONK" 1;
  letter-spacing: 0.22em;
  color: var(--primary-text);
  text-decoration: none;
}

.masthead nav {
  margin-left: auto;
  display: flex;
  gap: 1.25rem;
  font-size: 0.85rem;
}

.masthead nav a {
  color: var(--muted-text);
  text-decoration: none;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
}

.masthead nav a:hover,
.masthead nav a:focus-visible {
  color: var(--primary-text);
  border-bottom-color: var(--soft-gold);
}

.masthead nav a[aria-current="page"] {
  color: var(--primary-text);
  border-bottom-color: var(--glow-gold);
}

/* ---------- headings ---------- */

h1 {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2rem, 5vw, 2.7rem);
  font-weight: 600;
  font-variation-settings: "SOFT" 60, "WONK" 1;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--primary-text);
  margin: 3rem 0 0.75rem;
}

h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.3rem;
  font-weight: 600;
  font-variation-settings: "SOFT" 40;
  line-height: 1.35;
  color: var(--primary-text);
  margin: 3rem 0 0.9rem;
  scroll-margin-top: 2rem;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--primary-text);
  margin: 2rem 0 0.5rem;
}

.lede {
  font-size: 1.05rem;
  color: var(--secondary-text);
  margin: 0 0 1.5rem;
}

.stamp {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-text);
  margin: 0 0 2.5rem;
}

/* ---------- body copy ---------- */

p {
  margin: 0 0 1.15rem;
}

ul,
ol {
  margin: 0 0 1.15rem;
  padding-left: 1.35rem;
}

li {
  margin-bottom: 0.55rem;
}

li::marker {
  color: var(--soft-gold);
}

strong {
  color: var(--primary-text);
  font-weight: 600;
}

a {
  color: var(--glow-gold);
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(255, 217, 138, 0.45);
}

a:hover,
a:focus-visible {
  text-decoration-color: var(--glow-gold);
}

hr {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: 3rem 0;
}

/* ---------- callout & data table ---------- */

.callout {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--hairline);
  border-left: 2px solid var(--soft-gold);
  border-radius: 12px;
  background: rgba(23, 28, 52, 0.5);
  font-size: 0.95rem;
}

.callout p:last-child {
  margin-bottom: 0;
}

.table-scroll {
  overflow-x: auto;
  margin: 1.5rem 0 2rem;
  border: 1px solid var(--hairline);
  border-radius: 12px;
}

table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.6;
}

th,
td {
  padding: 0.85rem 1.1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--hairline);
}

th {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-text);
  background: rgba(11, 16, 38, 0.6);
}

tbody tr:last-child td {
  border-bottom: 0;
}

/* ---------- index cards ---------- */

.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

.cards li {
  margin: 0;
}

.cards a {
  display: block;
  height: 100%;
  padding: 1.5rem;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  background: rgba(23, 28, 52, 0.55);
  color: var(--secondary-text);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.cards a:hover,
.cards a:focus-visible {
  border-color: rgba(255, 217, 138, 0.5);
  transform: translateY(-2px);
}

.cards h2 {
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}

.cards p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted-text);
}

/* ---------- footer ---------- */

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.82rem;
  color: var(--muted-text);
}

footer p {
  margin: 0 0 0.4rem;
}

footer a {
  color: var(--muted-text);
}

@media (max-width: 34rem) {
  .shell {
    padding: 2.5rem 1.25rem 4rem;
  }

  .masthead nav {
    margin-left: 0;
    width: 100%;
    gap: 1rem;
  }
}

@media print {
  body {
    background: #fff;
    color: #111;
  }

  .masthead nav {
    display: none;
  }

  h1,
  h2,
  h3,
  strong {
    color: #000;
  }

  a {
    color: #111;
  }
}
