:root {
  --bg: #F5F5F7;
  --surface: #FFFFFF;
  --line: rgba(0, 0, 0, 0.08);
  --accent: #111111;
  --text: #111111;
  --muted: #555555;
  --max: 66rem;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --matrix-green: #00FF41;
  --matrix-bg: #0D0208;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  min-height: 100%;
  font-family: "Figtree", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
.wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(245, 245, 247, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(0.9rem + var(--safe-t)) 0 0.9rem;
}
.brand {
  font-family: "Source Serif 4", serif;
  font-weight: 700; font-size: 1.15rem;
}
.brand em { font-style: normal; text-decoration: underline; text-underline-offset: 3px; }

.hero { padding: 4rem 0 3rem; }
.hero h1 {
  font-family: "Source Serif 4", serif;
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.12;
  margin-bottom: 1rem;
  max-width: 18ch;
}
.hero__lead { color: var(--muted); max-width: 34rem; margin-bottom: 2rem; font-size: 1.05rem; }

.kicker {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 0.6rem;
}
section { padding: 3rem 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 44px; padding: 0.75rem 1.5rem;
  font-family: inherit; font-weight: 600; font-size: 0.95rem;
  border-radius: 0.2rem; cursor: pointer; border: 1px solid var(--accent);
  background: var(--accent); color: #fff;
}
.btn--ghost { background: transparent; color: var(--accent); margin-left: 0.75rem; }
.btn--ghost:hover { background: rgba(0,0,0,0.04); }

.sovereignty {
  border-block: 1px solid var(--line);
  background: var(--surface);
}
.sovereignty p { color: var(--muted); max-width: 38rem; margin-bottom: 1rem; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 calc(2rem + var(--safe-b)); text-align: center;
}
.eco-footer__links { font-size: 0.85rem; margin-bottom: 1rem; }
.eco-footer__links a { font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.site-footer__copy { font-size: 0.78rem; color: var(--muted); }

/* Terminal overlay */
.terminal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: var(--matrix-bg);
  display: none; flex-direction: column;
  font-family: "JetBrains Mono", "Courier New", monospace;
  color: var(--matrix-green);
}
.terminal-overlay.is-open { display: flex; }

.terminal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1rem; border-bottom: 1px solid rgba(0,255,65,0.2);
  font-size: 0.8rem;
}
.terminal__close {
  min-height: 44px; min-width: 44px;
  background: transparent; border: 1px solid var(--matrix-green);
  color: var(--matrix-green); font-family: inherit;
  font-size: 0.85rem; cursor: pointer; padding: 0.5rem 1rem;
}
.terminal__body {
  flex: 1; overflow-y: auto; padding: 1.5rem;
  font-size: 0.85rem; line-height: 1.7;
}
.terminal__body p { margin-bottom: 0.75rem; }
.terminal__cursor {
  display: inline-block; width: 0.55em; height: 1em;
  background: var(--matrix-green); animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}
@keyframes blink { 50% { opacity: 0; } }

.matrix-rain {
  position: absolute; inset: 0; z-index: -1; opacity: 0.15;
  pointer-events: none; overflow: hidden;
}
.matrix-col {
  position: absolute; top: -100%; font-size: 0.7rem;
  animation: rain linear infinite; white-space: nowrap;
}
@keyframes rain { to { transform: translateY(200vh); } }

.fade-in { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-in.is-visible { opacity: 1; transform: translateY(0); }
