:root {
  --gold: #D4AA60;
  --gold-dim: rgba(212, 170, 96, 0.35);
  --gold-faint: rgba(212, 170, 96, 0.15);
  --ivory: #EFE6D8;
  --parchment: #D4C4A8;
  --bg: #0A1121;
  --panel: rgba(31, 41, 55, 0.42);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ivory);
  background: var(--bg);
  line-height: 1.65;
}

.page-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(212, 170, 96, 0.08), transparent 55%),
    var(--bg);
  pointer-events: none;
  z-index: 0;
}

.page-wrap {
  position: relative;
  z-index: 1;
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

@media (min-width: 640px) {
  .page-wrap {
    padding: 2.5rem 1.5rem 4rem;
  }
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.45rem 0.9rem;
  border-radius: 0.375rem;
  border: 1px solid rgba(212, 170, 96, 0.45);
  background: rgba(0, 0, 0, 0.2);
  color: var(--gold);
  text-decoration: none;
  font-size: 0.875rem;
  transition: background 0.15s ease;
}

.back-button:hover {
  background: rgba(212, 170, 96, 0.1);
}

.legal-panel {
  position: relative;
  overflow: hidden;
  border-radius: 7px;
  border: 1px solid var(--gold-dim);
  background: var(--panel);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow:
    inset 0 1px 0 rgba(255, 235, 180, 0.12),
    0 6px 18px rgba(0, 0, 0, 0.45);
}

.legal-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("https://pub-34f7ade8969e4687945b58e1d1b80dd8.r2.dev/static/backgroundAmbre/BGambre4.webp");
  background-size: cover;
  background-position: center;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.legal-panel > * {
  position: relative;
  z-index: 1;
}

.legal-inner {
  padding: 1.5rem 1.25rem 1.75rem;
}

@media (min-width: 640px) {
  .legal-inner {
    padding: 2rem 2rem 2.25rem;
  }
}

.legal-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.legal-eyebrow {
  margin: 0 0 0.75rem;
  font-family: Georgia, "Palatino Linotype", Palatino, "Times New Roman", serif;
  font-size: 0.6875rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.legal-title {
  margin: 0;
  font-family: Georgia, "Palatino Linotype", Palatino, "Times New Roman", serif;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ivory);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.legal-meta {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: var(--parchment);
}

.legal-intro {
  margin: 1rem 0 0;
  font-size: 0.9375rem;
  color: var(--parchment);
  line-height: 1.6;
}

.legal-divider {
  width: 7rem;
  height: 1px;
  margin: 1rem auto 0;
  background: linear-gradient(to right, transparent, rgba(212, 170, 96, 0.8), transparent);
}

.legal-sections {
  border-top: 1px solid var(--gold-faint);
  border-bottom: 1px solid var(--gold-faint);
}

.legal-section {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--gold-faint);
}

.legal-section:last-child {
  border-bottom: none;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.section-label::before,
.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(212, 170, 96, 0.5));
}

.section-label::after {
  background: linear-gradient(to left, transparent, rgba(212, 170, 96, 0.5));
}

.section-label span {
  font-family: Georgia, "Palatino Linotype", Palatino, "Times New Roman", serif;
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}

.legal-section p {
  margin: 0 0 0.85rem;
  font-size: 0.9375rem;
  color: var(--ivory);
}

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

.legal-section strong {
  color: var(--ivory);
  font-weight: 600;
}

.legal-section ul {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
  color: var(--ivory);
  font-size: 0.9375rem;
}

.legal-section li {
  margin-bottom: 0.55rem;
}

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

.subsection-title {
  margin: 1rem 0 0.5rem;
  font-family: Georgia, "Palatino Linotype", Palatino, "Times New Roman", serif;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.attribution {
  margin: 0.85rem 0;
  padding: 1rem 1.1rem;
  border-radius: 0.375rem;
  border: 1px solid rgba(212, 170, 96, 0.2);
  background: rgba(0, 0, 0, 0.15);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--parchment);
}

a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: #e8c88a;
}

.legal-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gold-faint);
  font-size: 0.8rem;
  color: rgba(212, 196, 168, 0.75);
  text-align: center;
}

.legal-footer a {
  text-decoration: none;
}

.legal-footer a:hover {
  text-decoration: underline;
}
