:root {
  --bg: #1C1C1C;
  --surface: #262626;
  --text: #FFFFFF;
  --muted: #A0A0A0;
  --primary: #C5B358;
  --secondary: #D4AF37;
  --accent: #E6E6E6;
  --border: rgba(197, 179, 88, 0.2);
  --kw-technical: technical;
  --kw-draft: draft;
  --kw-precise: precise;
  --kw-architectural: architectural;
  --kw-minimal: minimal;
}

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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-image:
    linear-gradient(135deg, rgba(197, 179, 88, 0.04) 0%, transparent 50%),
    linear-gradient(225deg, rgba(38, 38, 38, 0.9) 0%, var(--bg) 100%);
  position: relative;
}

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

body::after {
  content: var(--kw-technical) " " var(--kw-draft) " " var(--kw-precise) " " var(--kw-architectural) " " var(--kw-minimal);
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

body > * {
  position: relative;
  z-index: 1;
}

main {
  flex: 1 0 auto;
}

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

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

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

.disclosure-banner {
  max-width: 800px;
  margin: 10px auto;
  padding: 8px 16px;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--bg);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 10px;
  white-space: nowrap;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scale(0);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  transition: transform 0.2s;
}

.nav-link:hover::after,
.nav-link:focus::after {
  transform: translateX(-50%) scale(1);
}

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

.burger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

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

.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);
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -260px;
  width: 260px;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 300;
  padding: 70px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: right 0.3s ease;
  overflow-y: auto;
}

.mobile-drawer.is-open {
  right: 0;
}

.drawer-link {
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 250;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

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

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 20px 24px;
  margin-top: 48px;
}

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

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

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

.footer-tagline {
  font-size: 13px;
  color: var(--muted);
  max-width: 320px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

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

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

.footer-badge {
  display: block;
}

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

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

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  font-size: 11px;
  color: var(--muted);
}

.footer-cookie-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 32px;
  max-width: 480px;
  width: 100%;
}

.modal-box h2 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--primary);
  font-family: "Courier New", Courier, monospace;
  letter-spacing: 0.5px;
}

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

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

.btn-primary {
  background: var(--primary);
  color: var(--bg);
  border: none;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.3px;
}

.btn-primary:hover {
  background: var(--secondary);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
  padding: 10px 20px;
  font-size: 13px;
  cursor: pointer;
}

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

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

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

.cookie-inner {
  max-width: 1280px;
  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: 240px;
}

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

.legal-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.legal-page h1 {
  font-size: 1.75rem;
  margin-bottom: 20px;
  color: var(--primary);
  font-family: "Courier New", Courier, monospace;
}

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

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

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

.legal-page ul {
  margin: 12px 0 12px 24px;
  font-size: 14px;
  color: var(--muted);
}

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

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

.contact-form {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 6px;
  font-family: "Courier New", Courier, monospace;
  letter-spacing: 0.3px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  border-radius: 0;
}

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

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

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

.contact-success {
  display: none;
  padding: 24px;
  background: rgba(197, 179, 88, 0.1);
  border: 1px solid var(--border);
  text-align: center;
}

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

.contact-success p {
  color: var(--accent);
  font-size: 15px;
}

.redirect-wrap {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.redirect-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 40px;
  max-width: 480px;
  text-align: center;
}

.ad-flag {
  display: inline-block;
  font-size: 11px;
  font-family: "Courier New", Courier, monospace;
  color: var(--primary);
  border: 1px solid var(--border);
  padding: 2px 8px;
  margin-bottom: 20px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.redirect-card h1 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--accent);
}

.redirect-card p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}

.redirect-meta {
  font-size: 12px;
}

.page-404 {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.page-404 h1 {
  font-size: 4rem;
  font-family: "Courier New", Courier, monospace;
  color: var(--primary);
  margin-bottom: 12px;
}

.page-404 p {
  color: var(--muted);
  margin-bottom: 24px;
}

.mono-label {
  font-family: "Courier New", Courier, monospace;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--primary);
}

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

  .burger-btn {
    display: flex;
    order: 3;
  }

  .logo-link {
    order: 1;
    margin-right: auto;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 0 16px;
  }

  .disclosure-banner {
    margin: 8px 12px;
    font-size: 10px;
  }
}
