:root {
  --bg: #F0F9FF;
  --surface: #FFFFFF;
  --text: #0C4A6E;
  --muted: #7DD3FC;
  --primary: #0EA5E9;
  --secondary: #BAE6FD;
  --accent: #38BDF8;
  --border: rgba(12, 74, 110, 0.12);
  --distorted-offset: 3px;
  --rebellion-skew: -2deg;
  --digital-punk-shift: 4px;
  --noisy-opacity: 0.04;
  --font-stretch: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-stretch);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image:
    linear-gradient(135deg, var(--bg) 0%, var(--secondary) 45%, var(--bg) 100%),
    radial-gradient(ellipse 80% 60% at 90% 10%, rgba(14, 165, 233, 0.15) 0%, transparent 60%);
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(12, 74, 110, var(--noisy-opacity)) 2px,
      rgba(12, 74, 110, var(--noisy-opacity)) 4px
    );
  pointer-events: none;
  z-index: 0;
  animation: noisy-glitch-scan 8s linear infinite;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 85%, rgba(56, 189, 248, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(14, 165, 233, 0.1) 0%, transparent 35%);
  pointer-events: none;
  z-index: 0;
  animation: rebellion-drift 14s ease-in-out infinite alternate;
}

@keyframes noisy-glitch-scan {
  0% { transform: translateY(0); }
  100% { transform: translateY(4px); }
}

@keyframes rebellion-drift {
  0% { opacity: 0.6; transform: skewX(0deg); }
  50% { opacity: 0.85; transform: skewX(var(--rebellion-skew)); }
  100% { opacity: 0.7; transform: skewX(0deg); }
}

@keyframes glitch-rebellion-flicker {
  0%, 90%, 100% { opacity: 1; transform: translate(0); }
  92% { opacity: 0.85; transform: translate(calc(var(--distorted-offset) * -1), 0); }
  94% { opacity: 1; transform: translate(var(--distorted-offset), 0); }
  96% { opacity: 0.9; transform: translate(0, 1px); }
}

@keyframes digital-punk-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes distorted-rgb-split {
  0%, 100% { filter: none; }
  50% { filter: drop-shadow(calc(var(--digital-punk-shift) * -1) 0 0 rgba(14, 165, 233, 0.4)) drop-shadow(var(--digital-punk-shift) 0 0 rgba(186, 230, 253, 0.4)); }
}

.disclosure-bar {
  width: 100%;
  background: var(--secondary);
  padding: 6px 16px;
  text-align: center;
  position: relative;
  z-index: 100;
}

.disclosure-bar p {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(12, 74, 110, 0.75);
  line-height: 1.4;
  max-width: 1200px;
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: #0C4A6E;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
}

.nav-logo img {
  height: 34px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 18px;
  list-style: none;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links li {
  position: relative;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 0;
  display: block;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a:focus {
  color: #fff;
}

.nav-links a:hover::after,
.nav-links a:focus::after {
  width: 100%;
}

.nav-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.nav-burger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--accent);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

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

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

.page-shell {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}

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

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

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

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

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

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

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

.footer-badges a {
  display: block;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.footer-badges a:hover {
  transform: scale(1.05);
  filter: invert(0.15);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  list-style: none;
  margin-bottom: 24px;
}

.footer-links a {
  color: var(--text);
  opacity: 0.7;
  text-decoration: none;
  font-size: 0.85rem;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--primary);
}

.footer-legal {
  font-size: 0.8rem;
  color: var(--text);
  opacity: 0.65;
  line-height: 1.8;
}

.footer-nz-disclosure {
  font-size: 11px;
  color: var(--text);
  opacity: 0.6;
  line-height: 1.7;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.footer-copy {
  margin-top: 24px;
  font-size: 0.75rem;
  color: var(--text);
  opacity: 0.5;
}

.content-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px 64px;
  overflow-wrap: break-word;
}

.content-page h1 {
  font-size: 2rem;
  margin-bottom: 24px;
  color: var(--text);
  letter-spacing: -0.02em;
  transform: skewX(-1deg);
}

.content-page h2 {
  font-size: 1.35rem;
  margin: 32px 0 12px;
  color: var(--primary);
}

.content-page h3 {
  font-size: 1.1rem;
  margin: 24px 0 8px;
  color: var(--accent);
}

.content-page p {
  margin-bottom: 16px;
}

.content-page ul,
.content-page ol {
  margin: 0 0 16px 24px;
}

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

.contact-form {
  margin-top: 32px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.contact-form::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--secondary));
}

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

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

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

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

.form-error {
  color: #dc2626;
  font-size: 0.85rem;
  margin-top: 6px;
  display: none;
}

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

.btn-primary {
  display: inline-block;
  padding: 14px 32px;
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, filter 0.15s ease;
  text-decoration: none;
}

.btn-primary:hover {
  transform: scale(1.03);
  filter: invert(0.08);
}

.form-success {
  padding: 32px;
  background: rgba(186, 230, 253, 0.4);
  border: 1px solid var(--primary);
  text-align: center;
  display: none;
}

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

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 74, 110, 0.92);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(8px);
}

.modal-overlay.is-hidden {
  display: none;
}

.modal-box {
  background: var(--surface);
  padding: 40px 32px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(12, 74, 110, 0.2);
}

.modal-box h2 {
  font-size: 1.5rem;
  margin-bottom: 16px;
  color: var(--text);
}

.modal-box p {
  margin-bottom: 24px;
  color: var(--text);
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-modal {
  padding: 12px 28px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-modal:hover {
  transform: scale(1.05);
}

.btn-confirm {
  background: var(--primary);
  color: #fff;
}

.btn-decline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  z-index: 950;
  box-shadow: 0 -8px 32px rgba(12, 74, 110, 0.12);
}

.cookie-banner.is-hidden {
  display: none;
}

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

.cookie-inner p {
  flex: 1;
  min-width: 240px;
  font-size: 0.9rem;
  color: var(--text);
}

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

.btn-cookie {
  padding: 10px 20px;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.btn-cookie:hover {
  transform: scale(1.05);
}

.btn-cookie-accept {
  background: var(--primary);
  color: #fff;
}

.btn-cookie-reject {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
}

.error-page h1 {
  font-size: 4rem;
  margin-bottom: 16px;
  animation: glitch-rebellion-flicker 4s ease infinite;
}

.error-page p {
  margin-bottom: 32px;
  color: var(--text);
  opacity: 0.7;
}

.dead-pixel {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--primary);
  opacity: 0.6;
  pointer-events: none;
}

.dead-pixel-1 { top: 12%; left: 8%; animation: glitch-rebellion-flicker 3s infinite; }

.dead-pixel-2 { top: 45%; right: 6%; animation: glitch-rebellion-flicker 5s infinite 1s; }

.dead-pixel-3 { bottom: 20%; left: 15%; animation: glitch-rebellion-flicker 4s infinite 0.5s; }

@media (max-width: 900px) {
  .nav-burger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 85vw);
    background: #0C4A6E;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 80px 32px 32px;
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 85;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3);
  }

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

  .nav-links li {
    border-left: 3px solid transparent;
    transition: border-color 0.2s ease;
  }

  .nav-links li:has(a:hover),
  .nav-links li:has(a:focus) {
    border-left-color: var(--accent);
  }

  .nav-links a {
    font-size: 1rem;
    padding: 14px 0 14px 12px;
  }

  .nav-links a::after {
    display: none;
  }

  .page-shell,
  .content-page,
  .footer-inner {
    max-width: 100%;
    overflow-x: hidden;
  }
}

@media (max-width: 375px) {
  .disclosure-bar {
    padding: 6px 10px;
  }

  .nav-inner {
    padding: 12px 14px;
  }

  .content-page {
    padding: 32px 14px 48px;
  }

  .site-footer {
    padding: 36px 14px 28px;
  }

  .footer-badges img {
    height: 40px;
    max-width: 100%;
  }
}

.subpage-hero {
  background: var(--text);
  color: #fff;
  padding: 48px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.subpage-hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  max-width: 800px;
  margin: 0 auto;
  transform: skewX(-1deg);
}

.subpage-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 3px,
    rgba(56, 189, 248, 0.05) 3px,
    rgba(56, 189, 248, 0.05) 4px
  );
  pointer-events: none;
}
