*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(245, 200, 72, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 200, 72, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: grid-drift 80s linear infinite;
}

@keyframes grid-drift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-48px, -24px, 0);
  }
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #ffe08a;
}

img {
  max-width: 100%;
  height: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #111;
  z-index: 1000;
  border-radius: var(--radius-sm);
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 6, 10, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  width: min(100% - 1.5rem, var(--container));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
  font-size: 1.05rem;
}

.brand span {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
}

.nav-list a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.35rem 0.45rem;
  border-radius: var(--radius-sm);
}

.nav-list a:hover,
.nav-list a[aria-current="page"] {
  color: var(--text);
  background: rgba(245, 200, 72, 0.08);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease);
}

.btn-primary {
  background: linear-gradient(135deg, #f5c842, #e0a82a);
  color: #141109;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 1px rgba(245, 200, 72, 0.25), 0 12px 40px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

main {
  position: relative;
  z-index: 1;
  padding-block: 2.5rem 4rem;
}

.page-hero {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  margin: 0 0 0.75rem;
  letter-spacing: 0.02em;
}

.page-hero .lead {
  margin: 0;
  color: var(--muted);
  max-width: 68ch;
  font-size: 1.05rem;
}

.prose {
  max-width: 72ch;
}

.prose h2 {
  font-size: 1.25rem;
  margin: 2.25rem 0 0.75rem;
  color: #fff;
  letter-spacing: 0.02em;
}

.prose h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.5rem;
  color: #e6ecff;
}

.prose p {
  margin: 0 0 1rem;
  color: #c9d2e8;
}

.prose ul {
  margin: 0 0 1rem 1.1rem;
  color: #c9d2e8;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 2rem;
  font-size: 0.92rem;
}

.prose th,
.prose td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.65rem;
  text-align: left;
}

.prose th {
  background: var(--surface-2);
  color: var(--accent);
}

.table-wrap {
  overflow-x: auto;
  margin-bottom: 2rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 2rem;
  background: #04050a;
  position: relative;
  z-index: 1;
}

.footer-grid {
  width: min(100% - 1.5rem, var(--container));
  margin-inline: auto;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "brand map"
    "legal legal";
}

@media (min-width: 780px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
    grid-template-areas: "brand map legal";
  }
}

.footer__brand {
  grid-area: brand;
}

.footer__map {
  grid-area: map;
}

.footer__legal {
  grid-area: legal;
}

.footer__title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-dim);
  margin: 0 0 0.65rem;
}

.footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.footer__list a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer__list a:hover {
  color: var(--text);
}

.footer__fine {
  margin: 1rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 72ch;
}

@media (max-width: 899px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    right: 0.75rem;
    top: calc(var(--header-h) + 6px);
    width: min(100vw - 1.5rem, 380px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    box-shadow: var(--shadow);
  }

  .nav.is-open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-list .btn {
    width: 100%;
    margin-top: 0.35rem;
  }
}

@media (min-width: 900px) {
  .nav {
    display: block !important;
  }
}
