/* Shared Madrugada theme for legal pages */
:root {
  --bg: #0e1820;
  --bg-deep: #080d12;
  --bg-card: rgba(15, 25, 33, 0.65);
  --ink: #ede8dc;
  --ink-soft: #c4c0b3;
  --ink-fade: #918c80;
  --ink-whisper: #a39e90;
  --gold: #d6ad6a;
  --gold-deep: #b78a3f;
  --gold-on: #0e1820;
  --amber: #d39a4d;
  --rule: rgba(165, 175, 190, 0.30);
  --rule-soft: rgba(165, 175, 190, 0.16);
  --rule-gold: rgba(214, 173, 106, 0.22);
}

@supports (color: oklch(0 0 0)) {
  :root {
    --bg: oklch(15% 0.022 235);
    --bg-deep: oklch(9% 0.018 235);
    --ink: oklch(91% 0.015 78);
    --ink-soft: oklch(80% 0.018 78);
    --ink-fade: oklch(64% 0.022 75);
    --ink-whisper: oklch(70% 0.020 78);
    --gold: oklch(78% 0.135 72);
    --gold-deep: oklch(68% 0.155 65);
    --amber: oklch(72% 0.16 60);
    --rule: oklch(45% 0.025 235 / 0.30);
    --rule-soft: oklch(45% 0.025 235 / 0.16);
    --rule-gold: oklch(78% 0.135 72 / 0.22);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.78;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}
a { color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--rule-gold); transition: color 0.2s ease, border-color 0.2s ease; }
a:hover { color: var(--amber); border-color: var(--amber); }
strong, em { font-style: normal; }
em { font-weight: 600; color: var(--gold); }

/* Atmospheric layers */
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 60% 80% at 82% 8%, rgba(211, 154, 77, 0.10) 0%, transparent 65%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}
body::after {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 99;
  background: radial-gradient(ellipse 100% 78% at 50% 50%, transparent 56%, rgba(4, 7, 11, 0.55) 100%);
}
.grain {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 100;
  opacity: 0.10; mix-blend-mode: overlay;
}

/* Skip link */
.skip-link {
  position: absolute; top: -100px; left: 1rem;
  background: var(--gold); color: var(--gold-on);
  padding: 0.75rem 1.25rem; font-weight: 600;
  text-decoration: none; z-index: 200;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

/* Top nav */
.topnav {
  position: sticky; top: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem clamp(1.4rem, 4vw, 4rem);
  background: rgba(8, 13, 18, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule-soft);
  z-index: 90;
}
.topnav .brand {
  font-size: 0.86rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink); display: inline-flex; align-items: center; gap: 0.6rem;
  border: 0;
}
.topnav .brand:hover { color: var(--gold); }
.topnav .brand .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--gold);
  box-shadow: 0 0 10px rgba(214, 173, 106, 0.7);
}
.topnav .nav-cta {
  font-size: 0.82rem; font-weight: 600;
  padding: 0.7rem 1.1rem; min-height: 44px;
  display: inline-flex; align-items: center;
  border: 1px solid var(--gold);
  color: var(--gold);
  letter-spacing: 0.02em;
  transition: background 0.18s ease, color 0.18s ease;
}
.topnav .nav-cta:hover { background: var(--gold); color: var(--gold-on); }
.topnav .nav-cta:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* Layout */
.wrap { position: relative; z-index: 2; }
.legal-hero {
  padding: clamp(3rem, 7vw, 6rem) clamp(1.4rem, 4vw, 4rem) clamp(2rem, 4vw, 3rem);
  text-align: center;
  border-bottom: 1px solid var(--rule-soft);
}
.legal-hero .eyebrow {
  display: block;
  font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase;
  font-weight: 700; color: var(--amber);
  margin-bottom: 1rem;
}
.legal-hero h1 {
  font-size: clamp(2.2rem, 2vw + 1.5rem, 3.6rem);
  font-weight: 700; line-height: 1.08;
  letter-spacing: -0.022em;
  margin: 0 0 1rem;
  max-width: 36rem; margin-left: auto; margin-right: auto;
  text-wrap: balance;
}
.legal-hero h1 em { color: var(--gold); font-weight: 700; }
.legal-hero .updated {
  font-size: 0.82rem; color: var(--ink-fade);
  letter-spacing: 0.05em;
}
.legal-hero .updated strong { color: var(--gold); font-weight: 600; }

/* Jurisdiction switcher */
.juris {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  justify-content: center;
  margin: 2rem auto 0;
  max-width: 36rem;
}
.juris a {
  font-size: 0.78rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: 1px solid var(--rule-gold);
  color: var(--ink-soft);
  background: var(--bg-card);
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.juris a:hover, .juris a:focus-visible {
  border-color: var(--gold); color: var(--gold);
  background: rgba(214, 173, 106, 0.06);
  outline: none;
}

/* Content */
.content {
  max-width: 50rem;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.4rem, 4vw, 3rem);
}
.content h2 {
  font-size: clamp(1.4rem, 0.5vw + 1.1rem, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.012em;
  line-height: 1.2;
  margin: clamp(2.5rem, 5vw, 4rem) 0 1rem;
  color: var(--ink);
  scroll-margin-top: 100px;
}
.content h2:first-of-type { margin-top: 0; }
.content h3 {
  font-size: 1.18rem;
  font-weight: 700;
  margin: 2rem 0 0.6rem;
  color: var(--gold);
  letter-spacing: -0.005em;
  scroll-margin-top: 100px;
}
.content p {
  margin: 0 0 1.1rem;
  line-height: 1.78;
  color: var(--ink);
}
.content p.lead {
  font-size: 1.18rem;
  color: var(--ink-soft);
  margin-bottom: 2rem;
  line-height: 1.65;
}
.content ul, .content ol {
  margin: 0 0 1.4rem;
  padding-left: 1.4rem;
}
.content li {
  margin-bottom: 0.55rem;
  line-height: 1.7;
  color: var(--ink);
}
.content li::marker { color: var(--gold); font-weight: 700; }
.content blockquote {
  margin: 1.6rem 0;
  padding: 1.2rem 1.4rem;
  background: var(--bg-card);
  border-left: 2px solid var(--gold);
  font-size: 1rem;
  color: var(--ink-soft);
}
.content blockquote strong { color: var(--ink); }

/* Per-country block */
.country {
  margin: 2.5rem 0;
  padding: 1.6rem 1.4rem 1.6rem 1.6rem;
  background: var(--bg-card);
  border: 1px solid var(--rule-soft);
  border-left: 3px solid var(--gold);
  scroll-margin-top: 100px;
}
.country h3 {
  margin: 0 0 0.6rem;
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 1.05rem;
}
.country .flag {
  display: inline-block;
  font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold-on);
  background: var(--gold);
  padding: 0.18rem 0.55rem;
  border-radius: 2px;
}
.country p { font-size: 0.96rem; margin-bottom: 0.7rem; }
.country p:last-child { margin-bottom: 0; }

/* Contact form / methods */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
  margin: 2rem 0;
}
.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--rule-soft);
  border-top: 2px solid var(--gold);
  padding: 1.6rem 1.4rem;
}
.contact-card .label {
  display: block;
  font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase;
  font-weight: 700; color: var(--amber);
  margin-bottom: 0.8rem;
}
.contact-card .value {
  font-size: 1.08rem; font-weight: 600;
  color: var(--ink);
  word-break: break-word;
  border: 0; padding: 0;
}
.contact-card .value a { border-bottom: 1px solid var(--gold); }
.contact-card .desc {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.86rem;
  color: var(--ink-soft);
  line-height: 1.55;
}
@media (max-width: 640px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* Footer */
footer {
  padding: 3rem clamp(1.4rem, 4vw, 4rem) 4rem;
  border-top: 1px solid var(--rule);
  font-size: 0.82rem;
  color: var(--ink-fade);
}
footer .inner { max-width: 1320px; margin: 0 auto; }
footer .copy {
  color: var(--ink-soft); max-width: 38rem;
  line-height: 1.65; margin: 0 0 1.4rem;
}
footer .meta { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; margin-bottom: 1.4rem; }
footer .meta a { color: var(--ink-soft); border-bottom-color: var(--rule); padding-bottom: 0.1em; }
footer .meta a:hover { color: var(--gold); border-color: var(--gold); }
footer .disclaimer {
  font-weight: 400; line-height: 1.7;
  max-width: 56rem; color: var(--ink-whisper);
  margin-top: 1.6rem; padding-top: 1.4rem;
  border-top: 1px solid var(--rule-soft);
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
