:root {
  --ink: #12141a;
  --paper: #f7f6f3;
  --accent: #3454d1;
  --accent-soft: #e7ecff;
  --grey: #6b6f76;
  --line: rgba(18, 20, 26, 0.1);
  --sans: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
}

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  position: relative;
  overflow: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at top right, rgba(0,0,0,0.6), transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at top right, rgba(0,0,0,0.6), transparent 70%);
}

.line-art {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  width: min(42vw, 520px);
  height: auto;
  right: 0;
  top: 0;
  opacity: 0.45;
}

.site-header, main, .site-footer {
  position: relative;
  z-index: 1;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}

.site-header {
  padding: clamp(16px, 4vh, 40px) clamp(24px, 6vw, 96px) 0;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.logo-mark {
  display: block;
  object-fit: contain;
}

.hero {
  padding: clamp(24px, 6vh, 100px) clamp(24px, 6vw, 96px) clamp(16px, 4vh, 60px);
  max-width: 980px;
}

.keywords-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 500;
}

h1 {
  font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.lede {
  margin-top: 24px;
  font-size: 1.15rem;
  color: var(--grey);
  font-weight: 400;
}

.keywords {
  padding: clamp(16px, 3vh, 40px) clamp(24px, 6vw, 96px) clamp(24px, 5vh, 56px);
  border-top: 1px solid var(--line);
  margin-top: clamp(8px, 2vh, 20px);
}

.keywords-eyebrow {
  display: block;
  margin-bottom: 28px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
}

.tag-row li {
  border: 1px solid rgba(18, 20, 26, 0.15);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  background: #fff;
}

.site-footer {
  margin-top: auto;
  padding: 0 clamp(24px, 6vw, 96px) clamp(16px, 3vh, 32px);
}

.site-footer p {
  font-size: 0.78rem;
  color: var(--grey);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: var(--ink);
  color: #fff;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.15);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; max-width: 640px; font-size: 0.85rem; color: #eee; }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }

.cookie-banner .btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.85rem;
  font-family: inherit;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.cookie-banner .btn-primary { background: var(--accent); color: #fff; }
.cookie-banner .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.cookie-banner .btn-ghost:hover { border-color: #fff; }

.reveal {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }
  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 601px) and (max-width: 1024px) {
  .hero {
    padding: clamp(20px, 5vh, 70px) clamp(24px, 5vw, 64px) clamp(14px, 3vh, 44px);
  }

  h1 {
    font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  }

  .keywords {
    padding: clamp(14px, 2.5vh, 32px) clamp(24px, 5vw, 64px) clamp(20px, 4vh, 44px);
  }
}

@media (max-width: 860px) {
  .line-art {
    width: 60vw;
    opacity: 0.3;
  }
}

@media (max-width: 600px) {
  .line-art {
    display: none;
  }
  .hero {
    padding: 72px 20px 40px;
  }
  .keywords {
    padding: 32px 20px 72px;
  }
}

.error-code {
  font-weight: 700;
  font-size: clamp(3.5rem, 10vw, 6rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--accent);
  margin: 0;
}

.back-link {
  display: inline-block;
  margin-top: 28px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 3px;
}

.back-link:hover {
  opacity: 0.75;
}
