:root {
  --bg: #0B1220;
  --surface: #121B2E;
  --text: #EAF0FF;
  --muted: #B6C2E2;
  --primary: #3B82F6;
  --secondary: #22C55E;
  --accent: #A78BFA;
  --border: rgba(255, 255, 255, 0.12);
  --science-grid: rgba(59, 130, 246, 0.06);
  --research-line: rgba(167, 139, 250, 0.15);
  --academic-serif: Georgia, "Times New Roman", serif;
  --data-mono: "Courier New", Courier, monospace;
}

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

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

body {
  font-family: var(--academic-serif);
  background: var(--bg);
  background-image:
    linear-gradient(165deg, var(--bg) 0%, var(--surface) 45%, #0d1528 100%),
    radial-gradient(ellipse 80% 50% at 15% 10%, rgba(59, 130, 246, 0.08) 0%, transparent 55%);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

main {
  flex: 1 0 auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 39px,
      var(--science-grid) 39px,
      var(--science-grid) 40px
    );
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

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

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

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

.disclosure-banner {
  width: 100%;
  background: #f4f6fa;
  color: #64748b;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
  padding: 8px 16px;
  position: relative;
  z-index: 100;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.disclosure-banner p {
  max-width: 960px;
  margin: 0 auto 6px;
}

.disclosure-banner p:last-child {
  margin-bottom: 0;
}

.disclosure-highlight {
  background: #fef08a;
  color: #1e293b;
  padding: 1px 5px;
  border-radius: 2px;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(11, 18, 32, 0.97);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

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

.navbar-logo img {
  height: 34px;
  width: auto;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
}

.navbar-links a {
  color: var(--text);
  font-size: 13px;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.2s ease;
}

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

.navbar-links a:hover {
  color: var(--primary);
}

.navbar-links a:hover::after {
  width: 100%;
}

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

.burger-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

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

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

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: min(320px, 85vw);
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 200;
  flex-direction: column;
  padding: 80px 32px 32px;
  gap: 4px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
}

.mobile-menu.open {
  display: flex;
  transform: translateX(0);
}

.mobile-menu a {
  color: var(--text);
  font-size: 16px;
  padding: 12px 16px;
  border-left: 3px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.mobile-menu a:hover,
.mobile-menu a:focus {
  border-left-color: var(--accent);
  background: rgba(167, 139, 250, 0.08);
  color: var(--primary);
}

.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11, 18, 32, 0.6);
  z-index: 199;
}

.mobile-overlay.open {
  display: block;
}

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

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: radial-gradient(ellipse at center top, var(--research-line) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

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

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

.footer-brand img {
  height: 38px;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 13px;
  color: var(--muted);
  max-width: 300px;
}

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

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

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

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

.footer-badges a {
  display: block;
}

.footer-badges img {
  height: 48px;
  width: auto;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.footer-badges img:hover {
  opacity: 1;
}

.footer-legal {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

.footer-ontario {
  font-size: 11px;
  color: rgba(182, 194, 226, 0.65);
  line-height: 1.65;
  max-width: 920px;
  margin-top: 16px;
}

.footer-copy {
  font-size: 12px;
  color: rgba(182, 194, 226, 0.5);
  margin-top: 20px;
}

.age-overlay,
.cookie-banner {
  position: fixed;
  z-index: 1000;
}

.age-overlay {
  inset: 0;
  background: rgba(11, 18, 32, 0.94);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.age-overlay.hidden {
  display: none;
}

.age-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px 32px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 60px rgba(59, 130, 246, 0.12);
}

.age-modal h2 {
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 12px;
  font-family: var(--academic-serif);
}

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

.age-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--text);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.25);
}

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

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--text);
}

.cookie-banner {
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3);
}

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

.cookie-banner p {
  font-size: 13px;
  color: var(--muted);
  max-width: 640px;
  flex: 1;
}

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

.page-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 64px;
  position: relative;
  z-index: 1;
}

.page-content h1 {
  font-size: 32px;
  font-weight: 400;
  margin-bottom: 24px;
  font-family: var(--academic-serif);
}

.page-content h2 {
  font-size: 22px;
  font-weight: 400;
  margin: 28px 0 12px;
  color: var(--primary);
}

.page-content h3 {
  font-size: 18px;
  font-weight: 400;
  margin: 20px 0 10px;
  color: var(--accent);
}

.page-content p {
  margin-bottom: 14px;
  color: var(--text);
}

.page-content ul,
.page-content ol {
  margin: 12px 0 16px 24px;
  color: var(--text);
}

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

.contact-form {
  margin-top: 32px;
  max-width: 560px;
}

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

.form-group label {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(18, 27, 46, 0.8);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

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

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

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

.form-success {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  display: none;
}

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

.form-success h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--primary);
}

.data-footnote {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--data-mono);
  margin-top: 8px;
}

.legal-page {
  position: relative;
  z-index: 1;
}

.not-found-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  position: relative;
  z-index: 1;
}

.not-found-page h1 {
  font-size: 72px;
  color: var(--accent);
  font-family: var(--data-mono);
  margin-bottom: 16px;
}

.not-found-page p {
  color: var(--muted);
  margin-bottom: 24px;
  max-width: 420px;
}

@media (max-width: 768px) {
  .navbar-links {
    display: none;
  }

  .burger-btn {
    display: flex;
  }

  .cookie-banner {
    flex-direction: column;
    text-align: center;
  }
}
