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

:root {
  --bg: #0C1E33;
  --surface: #162C46;
  --text: #FFFFFF;
  --muted: #8BA1B8;
  --primary: #EAB308;
  --secondary: #1E3A8A;
  --accent: #FACC15;
  --border: rgba(255, 255, 255, 0.1);
  --ai-glow: rgba(234, 179, 8, 0.35);
  --future-blur: 24px;
  --smart-radius: 12px;
  --adaptive-gap: clamp(1rem, 3vw, 2rem);
  --assistant-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

html {
  scroll-behavior: smooth;
}

.ai-future-ui {
  font-variant-numeric: tabular-nums;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(30, 58, 138, 0.45), transparent),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(234, 179, 8, 0.08), transparent),
    linear-gradient(180deg, var(--bg) 0%, #081525 100%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 80px,
      rgba(255, 255, 255, 0.015) 80px,
      rgba(255, 255, 255, 0.015) 81px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 80px,
      rgba(255, 255, 255, 0.015) 80px,
      rgba(255, 255, 255, 0.015) 81px
    );
  pointer-events: none;
  z-index: 0;
}

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 {
  position: relative;
  z-index: 10;
  max-width: fit-content;
  margin: 8px auto;
  padding: 6px 24px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(234, 179, 8, 0.05);
}

.page-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 100vh;
  width: 100%;
}

.page-wrap > main,
.page-wrap > .not-found {
  flex: 1 0 auto;
}

.navbar-back {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  height: 64px;
  background: rgba(22, 44, 70, 0.95);
  backdrop-filter: blur(var(--future-blur));
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 0;
  position: relative;
}

.navbar-front {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1160px;
  height: 48px;
  margin-top: -8px;
  padding: 0 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--assistant-shadow), 0 0 20px var(--ai-glow);
}

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

.nav-toggle {
  display: none;
}

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

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  display: block;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(234, 179, 8, 0.1);
  box-shadow: 0 0 12px var(--ai-glow);
}

.site-footer {
  margin-top: auto;
  padding: 3rem 1.5rem 2rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0.5;
}

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

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-logo img {
  height: 36px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  list-style: none;
}

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

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

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.footer-badges a,
.footer-badges span {
  display: block;
}

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

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

.footer-copy {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 12px;
  color: var(--muted);
}

.cookie-dismiss {
  display: none;
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 1rem 1.5rem;
  background: rgba(12, 30, 51, 0.97);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(var(--future-blur));
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s ease, opacity 0.4s ease;
}

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

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

.cookie-actions {
  display: flex;
  gap: 0.75rem;
}

.cookie-btn {
  display: inline-block;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--smart-radius);
  cursor: pointer;
  border: 1px solid var(--border);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.cookie-btn-accept {
  background: var(--primary);
  color: var(--bg);
  border-color: var(--primary);
}

.cookie-btn-accept:hover {
  box-shadow: 0 0 16px var(--ai-glow);
}

.cookie-btn-reject {
  background: transparent;
  color: var(--muted);
}

.cookie-btn-reject:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.cookie-banner:has(.cookie-dismiss:checked) {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

.legal-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

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

.legal-page h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
  color: var(--primary);
}

.legal-page h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--accent);
}

.legal-page p {
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 15px;
}

.legal-page ul {
  margin: 0 0 1rem 1.5rem;
  color: var(--muted);
  font-size: 15px;
}

.legal-page li {
  margin-bottom: 0.5rem;
}

.legal-page strong {
  color: var(--text);
}

.subpage-hero {
  padding: 3rem 1.5rem;
  text-align: center;
  background: var(--surface);
  border-bottom: 2px solid var(--accent);
  position: relative;
  overflow: hidden;
}

.subpage-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--ai-glow), transparent 60%);
  pointer-events: none;
}

.subpage-hero h1 {
  position: relative;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.03em;
}

.subpage-hero p {
  position: relative;
  color: var(--muted);
  margin-top: 0.5rem;
  font-size: 15px;
}

.not-found {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.not-found h1 {
  font-size: 5rem;
  color: var(--primary);
  text-shadow: 0 0 40px var(--ai-glow);
  line-height: 1;
}

.not-found p {
  color: var(--muted);
  margin: 1rem 0 2rem;
  font-size: 1.1rem;
}

.btn-primary {
  display: inline-block;
  padding: 12px 28px;
  background: var(--primary);
  color: var(--bg);
  font-weight: 600;
  border-radius: var(--smart-radius);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.btn-primary:hover {
  color: var(--bg);
  box-shadow: 0 0 24px var(--ai-glow);
  transform: translateY(-2px);
}

@media (max-width: 900px) {
  .navbar-back {
    height: auto;
    min-height: 56px;
  }

  .navbar-inner {
    align-items: center;
    padding: 0;
  }

  .navbar-front {
    margin-top: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    height: 56px;
    box-shadow: none;
    overflow: visible;
    position: relative;
  }

  .burger-label {
    display: flex;
  }

  .burger-label:has(.nav-toggle:checked) span:nth-of-type(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .burger-label:has(.nav-toggle:checked) span:nth-of-type(2) {
    opacity: 0;
  }

  .burger-label:has(.nav-toggle:checked) span:nth-of-type(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    gap: 0;
    box-shadow: var(--assistant-shadow);
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    padding: 12px 16px;
    width: 100%;
  }

  .navbar-front:has(.nav-toggle:checked) .nav-links {
    display: flex;
  }
}
