:root {
  --bg: #0F0F0F;
  --surface: #1A1A1A;
  --text: #FFFFFF;
  --muted: #9CA3AF;
  --primary: #E5E7EB;
  --secondary: #6B7280;
  --accent: #EF4444;
  --border: rgba(255,255,255,0.16);
  --line: #22D3EE;
  --line-dim: rgba(34, 211, 238, 0.22);
  --theme-label: dark mode;
  --style-architecture: architecture;
  --style-precise: precise;
  --style-draft: draft;
  --style-cad: cad;
  --font-mono: "SF Mono", "Cascadia Code", "Segoe UI Mono", "Roboto Mono", Consolas, "Courier New", monospace;
  --font-sans: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-mono);
  background-color: var(--bg);
  background-image:
    linear-gradient(165deg, rgba(34, 211, 238, 0.05) 0%, transparent 42%),
    linear-gradient(345deg, rgba(239, 68, 68, 0.06) 0%, transparent 38%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 47px,
      rgba(34, 211, 238, 0.04) 47px,
      rgba(34, 211, 238, 0.04) 48px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 47px,
      rgba(34, 211, 238, 0.03) 47px,
      rgba(34, 211, 238, 0.03) 48px
    );
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.55;
  overflow-x: hidden;
}

main {
  flex: 1 0 auto;
  width: 100%;
  padding-bottom: 40px;
}

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

a {
  color: var(--line);
  text-decoration: none;
}

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

.architecture-grid {
  position: relative;
}

.architecture-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line-dim) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-dim) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.35;
  z-index: 0;
}

.precise-measure {
  border-left: 2px solid var(--line);
  padding-left: 14px;
}

.dark-mode {
  color: var(--text);
}

.draft-hatch {
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 6px,
    rgba(34, 211, 238, 0.06) 6px,
    rgba(34, 211, 238, 0.06) 7px
  );
}

.cad-ruler {
  position: relative;
}

.cad-ruler::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 100%;
  background: repeating-linear-gradient(
    180deg,
    var(--line) 0,
    var(--line) 1px,
    transparent 1px,
    transparent 8px
  );
  opacity: 0.45;
}

.disclosure-banner {
  display: block;
  width: fit-content;
  max-width: calc(100% - 24px);
  margin: 8px auto;
  padding: 5px 18px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  line-height: 1.4;
}

.navbar {
  position: static;
  background: var(--bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 100;
}

.navbar__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  height: 70px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.navbar__left,
.navbar__right {
  display: flex;
  align-items: center;
  gap: 8px 18px;
  list-style: none;
}

.navbar__left {
  justify-content: flex-end;
}

.navbar__right {
  justify-content: flex-start;
}

.navbar__left a,
.navbar__right a,
.drawer a {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 500;
}

.navbar__left a:hover,
.navbar__right a:hover,
.drawer a:hover {
  color: var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-size: 15px;
}

.brand img {
  width: 48px;
  height: 40px;
  object-fit: contain;
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  justify-self: end;
}

.burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--line);
  margin: 0 auto;
  transition: transform 0.2s ease;
}

.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 200;
}

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

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 210;
  padding: 80px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.drawer.open {
  transform: translateX(0);
}

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 20px 28px;
  margin-top: auto;
  position: relative;
  flex-shrink: 0;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

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

.footer__brand {
  margin-bottom: 24px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

.footer__grid h3 {
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--line);
  margin-bottom: 12px;
}

.footer__grid p,
.footer__grid li {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.footer__grid ul {
  list-style: none;
}

.footer__grid a {
  color: var(--muted);
}

.footer__grid a:hover {
  color: var(--line);
}

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

.footer-badges a,
.footer-badges span {
  display: inline-flex;
  align-items: center;
}

.footer-badges img {
  height: 36px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
}

.footer__meta {
  font-size: 12px;
  color: var(--secondary);
  border-top: 1px solid var(--border);
  padding-top: 16px;
  line-height: 1.6;
}

.footer__meta p {
  margin-bottom: 8px;
}

.age-gate,
.cookie-banner {
  display: none;
  position: fixed;
  z-index: 1000;
}

.age-gate.active {
  display: flex;
  inset: 0;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.82);
  padding: 20px;
}

.age-gate__panel {
  background: var(--surface);
  border: 1px solid var(--line);
  max-width: 420px;
  width: 100%;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.15);
}

.age-gate__panel h2 {
  font-size: 18px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: var(--primary);
}

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

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

.age-gate__actions button,
.cookie-banner button,
.btn {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px 18px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--line);
  cursor: pointer;
}

.age-gate__actions button:first-child,
.btn-primary {
  background: var(--line);
  color: var(--bg);
  border-color: var(--line);
}

.age-denied {
  display: none;
  margin-top: 16px;
  color: var(--accent);
  font-size: 13px;
}

.age-denied.visible {
  display: block;
}

.cookie-banner.active {
  display: block;
  left: 16px;
  right: 16px;
  bottom: 16px;
  max-width: 560px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 18px 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.cookie-banner p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}

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

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

.page-shell h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: var(--primary);
}

.page-shell h2 {
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--line);
  margin: 28px 0 12px;
}

.page-shell h3 {
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--primary);
  margin: 20px 0 10px;
}

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

.page-shell ul,
.page-shell ol {
  padding-left: 20px;
  margin-bottom: 14px;
}

.section-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--line);
  margin-bottom: 8px;
}

.decor-img {
  max-width: 500px;
  max-height: 320px;
  width: 100%;
  height: auto;
  object-fit: cover;
  border: 1px solid var(--border);
}

.decor-wrap {
  max-width: 100%;
  overflow: hidden;
}

@media (max-width: 375px) {
  .decor-wrap {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .decor-img {
    max-width: 100%;
    max-height: 220px;
  }

  .topic-mosaic-band {
    max-width: 100%;
    min-height: 140px;
    overflow: hidden;
  }

  .footer-badges {
    max-width: 100%;
  }

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

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 520px;
  margin-top: 24px;
}

.contact-form label {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--primary);
}

.contact-form input,
.contact-form textarea {
  font-family: var(--font-mono);
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 14px;
  font-size: 14px;
  width: 100%;
}

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

.contact-form .error {
  display: none;
  color: var(--accent);
  font-size: 12px;
}

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

.contact-success {
  display: none;
  border: 1px solid var(--line);
  padding: 20px;
  color: var(--primary);
  margin-top: 24px;
}

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

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

.redirect-page__box {
  max-width: 440px;
}

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

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

.ad-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--accent);
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 2px 8px;
  margin-bottom: 12px;
}

.info-cta,
.home-link {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  color: var(--line);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.info-cta:hover,
.home-link:hover {
  background: rgba(34, 211, 238, 0.1);
  color: var(--line);
}

@media (max-width: 900px) {
  .navbar__left,
  .navbar__right {
    display: none;
  }

  .navbar__inner {
    grid-template-columns: 1fr auto;
  }

  .brand {
    justify-self: center;
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .burger {
    display: flex;
    grid-column: 2;
    grid-row: 1;
    z-index: 2;
  }

  .footer__grid {
    grid-template-columns: 1fr;
  }
}
