:root {
  --bg: #0F0A1F;
  --surface: #1A1433;
  --text: #F5F3FF;
  --muted: #C4B5FD;
  --primary: #8B5CF6;
  --secondary: #22C55E;
  --accent: #F59E0B;
  --border: rgba(245, 243, 255, 0.12);
  --max-w: 1200px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Consolas", monospace;
  --crypto-grid: rgba(139, 92, 246, 0.06);
  --dashboard-glow: rgba(245, 158, 11, 0.08);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  background: var(--bg);
  background-image:
    linear-gradient(165deg, var(--bg) 0%, #150E28 45%, var(--surface) 100%),
    radial-gradient(ellipse 70% 45% at 10% 0%, rgba(139, 92, 246, 0.14) 0%, transparent 55%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--crypto-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--crypto-grid) 1px, transparent 1px);
  background-size: 40px 40px;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse at 85% 90%, var(--dashboard-glow) 0%, transparent 45%);
}

main {
  flex: 1;
  position: relative;
  z-index: 1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--accent);
}

.disclosure-pill {
  max-width: fit-content;
  margin: 8px auto;
  padding: 5px 18px;
  border-radius: 4px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.15);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  line-height: 1.5;
  text-align: center;
  position: relative;
  z-index: 10;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  height: 52px;
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 52px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-link img {
  height: 32px;
  width: auto;
}

.nav-cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  background: rgba(139, 92, 246, 0.25);
  border: 1px solid rgba(139, 92, 246, 0.45);
  border-radius: 4px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-cta:hover {
  background: rgba(139, 92, 246, 0.4);
  color: var(--text);
  transform: translateY(-1px);
}

.burger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.2s ease;
}

.burger-btn:hover {
  border-color: rgba(139, 92, 246, 0.5);
}

.burger-btn span {
  display: block;
  height: 2px;
  background: var(--muted);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.burger-btn.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger-btn.is-open span:nth-child(2) {
  opacity: 0;
}

.burger-btn.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 31, 0.75);
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 301;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 64px 20px 32px;
  overflow-y: auto;
}

.nav-drawer.is-open {
  transform: translateX(0);
}

.nav-drawer ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-drawer a {
  display: block;
  padding: 12px 14px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-drawer a:hover {
  background: rgba(139, 92, 246, 0.12);
  border-color: var(--border);
  color: var(--accent);
}

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 20px 32px;
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.footer-logo img {
  height: 28px;
  width: auto;
  margin-bottom: 12px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer-links a {
  font-size: 13px;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.footer-badges img {
  max-height: 48px;
  width: auto;
}

.footer-nz-disclosure {
  font-size: 11px;
  line-height: 1.6;
  color: rgba(196, 181, 253, 0.65);
  max-width: 720px;
  margin-bottom: 16px;
}

.footer-copy {
  font-size: 12px;
  color: rgba(196, 181, 253, 0.5);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 31, 0.92);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px 28px;
  max-width: 420px;
  width: 100%;
  text-align: center;
}

.modal-box h2 {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--text);
}

.modal-box p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: var(--primary);
  color: var(--text);
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-primary:hover {
  background: #7C3AED;
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--muted);
  color: var(--text);
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 8000;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 16px 20px;
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

.cookie-banner.active {
  transform: translateY(0);
}

.cookie-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cookie-inner p {
  font-size: 13px;
  color: var(--muted);
  flex: 1;
  min-width: 200px;
}

.cookie-inner a {
  color: var(--accent);
}

.cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.page-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 20px 64px;
}

.page-wrap h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-bottom: 24px;
  color: var(--text);
  letter-spacing: -0.02em;
}

.page-wrap h2 {
  font-size: 1.15rem;
  margin: 28px 0 12px;
  color: var(--accent);
}

.page-wrap h3 {
  font-size: 1rem;
  margin: 20px 0 8px;
  color: var(--muted);
}

.page-wrap p {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 15px;
}

.page-wrap ul {
  margin: 0 0 16px 20px;
  color: var(--muted);
}

.page-wrap li {
  margin-bottom: 8px;
}

.page-wrap a {
  color: var(--primary);
}

.contact-form {
  max-width: 520px;
  margin-top: 28px;
}

.contact-form.is-hidden {
  display: none;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.6);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-error {
  font-size: 12px;
  color: #F87171;
  margin-top: 6px;
  display: none;
}

.form-error.visible {
  display: block;
}

.form-success {
  display: none;
  padding: 20px 24px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 4px;
  color: var(--secondary);
  font-size: 15px;
  max-width: 520px;
}

.form-success.visible {
  display: block;
}

.not-found-wrap {
  text-align: center;
  padding: 80px 20px;
  max-width: 480px;
  margin: 0 auto;
}

.not-found-wrap h1 {
  font-family: var(--font-mono);
  font-size: 4rem;
  color: var(--primary);
  margin-bottom: 16px;
}

.not-found-wrap p {
  color: var(--muted);
  margin-bottom: 28px;
}

.topic-cta {
  display: inline-flex;
  align-items: center;
  margin-top: 20px;
  padding: 10px 20px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 4px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}

.topic-cta:hover {
  background: rgba(245, 158, 11, 0.22);
  color: var(--accent);
  transform: translateY(-1px);
}

@media (max-width: 480px) {
  .disclosure-pill {
    margin: 8px 12px;
    font-size: 10px;
    padding: 5px 12px;
  }

  .cookie-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-actions {
    width: 100%;
  }

  .cookie-actions button {
    flex: 1;
  }
}
