:root {
  color-scheme: dark;
  --landing-page-bg: #0a0d13;
  --landing-panel-bg: #03100a;
  --landing-screen: #000;
  --landing-text: #c8d3e2;
  --landing-text-soft: rgba(200, 211, 226, 0.62);
  --landing-text-dim: rgba(200, 211, 226, 0.45);
  --landing-title: #dfffe9;
  --landing-accent: #79ffae;
  --landing-accent-2: #0c4;
  --landing-accent-shadow: #00cc44;
  --landing-cta-text: #03100a;
  --landing-accent-rgb-dark: rgba(0, 255, 119, 0.3);
  --landing-accent-rgb: rgba(0, 204, 68, 0.18);
  --landing-accent-rgb-strong: rgba(0, 204, 68, 0.45);
  --landing-edge-soft: rgba(0, 255, 119, 0.55);
  --landing-border: rgba(121, 255, 174, 0.25);
  --landing-border-subtle: rgba(121, 255, 174, 0.14);
  --landing-border-muted: rgba(121, 255, 174, 0.7);
  --landing-fg-muted: rgba(121, 255, 174, 0.7);
  --landing-border-muted-2: rgba(121, 255, 174, 0.16);
  --landing-border-line: rgba(121, 255, 174, 0.18);
  --landing-border-line-strong: rgba(121, 255, 174, 0.2);
  --landing-box: rgba(4, 18, 11, 0.7);
  --landing-shell-bg: rgba(0, 0, 0, 0.25);
  --landing-shell-bg-2: rgba(0, 0, 0, 0.4);
  --landing-shell-shadow: rgba(0, 204, 68, 0.06);
  --landing-shadow-strong: rgba(0, 0, 0, 0.5);
  --landing-scanline: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0px, rgba(0, 0, 0, 0) 2px, rgba(0, 8, 4, 0.22) 3px, rgba(0, 8, 4, 0.22) 4px);
  --landing-scanline-screen: repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0) 0px, rgba(0, 0, 0, 0) 2px, rgba(0, 12, 6, 0.1) 3px, rgba(0, 12, 6, 0.1) 4px);
  --landing-panel-head: rgba(0, 0, 0, 0.25);
  --landing-panel-head-2: rgba(0, 0, 0, 0.4);
  --landing-shadow-light: rgba(0, 204, 68, 0.08);
  --landing-shadow-panel: rgba(0, 180, 80, 0.5);
  --landing-shadow-screen: rgba(0, 0, 0, 0.6);
  --landing-dot-red: #c4663a;
  --landing-dot-yellow: #e8b06a;
  --landing-dot-green: #0c4;
  --landing-flag-border: rgba(200, 211, 226, 0.25);
  --landing-flag-text: rgba(121, 255, 174, 0.4);
  --landing-terminal-text: #f00;
  --landing-bright-text: #79ffae;
  --landing-theme-toggle-bg: rgba(0, 0, 0, 0.65);
  --landing-theme-toggle-border: rgba(121, 255, 174, 0.4);
  --landing-theme-toggle-text: #dfffe9;
  --landing-theme-toggle-shadow: rgba(0, 255, 119, 0.24);
  --landing-pulse: 0 0 0 1px var(--landing-edge-soft), 0 0 20px var(--landing-accent-rgb), inset 0 0 16px var(--landing-accent-rgb-dark);
  --landing-pulse-strong: 0 0 0 1px rgba(121, 255, 174, 0.85), 0 0 38px var(--landing-accent-rgb-strong), inset 0 0 22px rgba(0, 204, 68, 0.18);
  --landing-hero-bg: radial-gradient(130% 80% at 50% 118%, #43180b 0%, #23100c 32%, #0b0e14 66%);
  --landing-haze-bg: radial-gradient(ellipse at 50% 100%, rgba(232, 176, 106, 0.5) 0%, rgba(196, 102, 58, 0.22) 38%, transparent 70%);
  --landing-haze-dust: radial-gradient(rgba(232, 176, 106, 0.28) 1px, transparent 1.6px), radial-gradient(rgba(223, 255, 233, 0.18) 1px, transparent 1.6px);
  --landing-haze-screen: rgba(0, 8, 4, 0.22);
  --landing-hero-text-shadow: 0 0 6px rgba(121, 255, 174, 0.55), 0 0 26px rgba(0, 204, 68, 0.45), 0 0 60px rgba(0, 204, 68, 0.2);
  --landing-prompt-glow: rgba(0, 255, 119, 0.7);
  --landing-tint: rgba(0, 0, 0, 0.55);
  --landing-terminal-line: #aaffd0;
  --landing-glow-line: rgba(0, 255, 119, 0.5);
  --landing-terrain-filter: none;
  --landing-hero-byline-color: var(--landing-text);
  --landing-feed-shell-max-width: 960px;
  --landing-signal-bg: var(--landing-accent);
  --selection-bg: rgba(0, 255, 119, 0.3);
}

html[data-theme='light'] {
  color-scheme: light;
  --landing-page-bg: #f4f1ea;
  --landing-panel-bg: #f6f2ea;
  --landing-screen: #f8f8f8;
  --landing-text: #2d333d;
  --landing-text-soft: rgba(47, 54, 66, 0.72);
  --landing-text-dim: rgba(54, 61, 75, 0.55);
  --landing-title: #18202d;
  --landing-accent: #1f6e4d;
  --landing-accent-2: #1f7a54;
  --landing-accent-shadow: #145a3d;
  --landing-cta-text: #f3fff8;
  --landing-accent-rgb-dark: rgba(31, 110, 77, 0.2);
  --landing-accent-rgb: rgba(24, 122, 84, 0.18);
  --landing-accent-rgb-strong: rgba(23, 120, 76, 0.35);
  --landing-edge-soft: rgba(31, 110, 77, 0.5);
  --landing-border: rgba(31, 110, 77, 0.28);
  --landing-border-subtle: rgba(31, 110, 77, 0.2);
  --landing-border-muted: rgba(31, 110, 77, 0.7);
  --landing-fg-muted: rgba(31, 110, 77, 0.7);
  --landing-border-muted-2: rgba(31, 110, 77, 0.3);
  --landing-border-line: rgba(31, 110, 77, 0.28);
  --landing-border-line-strong: rgba(31, 110, 77, 0.3);
  --landing-box: rgba(255, 255, 255, 0.82);
  --landing-shell-bg: rgba(255, 255, 255, 0.55);
  --landing-shell-bg-2: rgba(255, 255, 255, 0.48);
  --landing-shell-shadow: rgba(31, 110, 77, 0.1);
  --landing-shadow-strong: rgba(15, 24, 31, 0.16);
  --landing-scanline: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0) 0px, rgba(255, 255, 255, 0) 2px, rgba(15, 12, 7, 0.08) 3px, rgba(15, 12, 7, 0.08) 4px);
  --landing-scanline-screen: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0) 0px, rgba(255, 255, 255, 0) 2px, rgba(255, 255, 255, 0.08) 3px, rgba(255, 255, 255, 0.08) 4px);
  --landing-panel-head: rgba(255, 255, 255, 0.45);
  --landing-panel-head-2: rgba(0, 0, 0, 0.16);
  --landing-shadow-light: rgba(31, 110, 77, 0.09);
  --landing-shadow-panel: rgba(31, 110, 77, 0.22);
  --landing-shadow-screen: rgba(17, 24, 34, 0.2);
  --landing-dot-red: #c96b33;
  --landing-dot-yellow: #d69b33;
  --landing-dot-green: #1f6e4d;
  --landing-flag-border: rgba(47, 54, 66, 0.25);
  --landing-flag-text: rgba(47, 54, 66, 0.45);
  --landing-terminal-text: #145a3d;
  --landing-bright-text: #1f6e4d;
  --landing-theme-toggle-bg: rgba(255, 255, 255, 0.78);
  --landing-theme-toggle-border: rgba(31, 110, 77, 0.45);
  --landing-theme-toggle-text: #18202d;
  --landing-theme-toggle-shadow: rgba(31, 110, 77, 0.2);
  --landing-pulse: 0 0 0 1px rgba(31, 110, 77, 0.45), 0 0 20px rgba(24, 122, 84, 0.2), inset 0 0 16px rgba(24, 122, 84, 0.12);
  --landing-pulse-strong: 0 0 0 1px rgba(31, 110, 77, 0.65), 0 0 24px rgba(31, 110, 77, 0.3), inset 0 0 20px rgba(24, 122, 84, 0.2);
  --landing-hero-bg: radial-gradient(130% 80% at 50% 118%, #f3e6d3 0%, #e5dac6 32%, #f7f5ef 72%);
  --landing-haze-bg: radial-gradient(ellipse at 50% 100%, rgba(222, 166, 110, 0.45) 0%, rgba(196, 116, 62, 0.2) 38%, transparent 70%);
  --landing-haze-dust: radial-gradient(rgba(214, 144, 80, 0.22) 1px, transparent 1.6px), radial-gradient(rgba(42, 71, 54, 0.14) 1px, transparent 1.6px);
  --landing-haze-screen: rgba(15, 12, 7, 0.08);
  --landing-hero-text-shadow: 0 0 8px rgba(31, 110, 77, 0.25), 0 0 28px rgba(31, 110, 77, 0.2), 0 0 60px rgba(31, 110, 77, 0.12);
  --landing-prompt-glow: rgba(31, 110, 77, 0.65);
  --landing-tint: rgba(255, 255, 255, 0.55);
  --landing-terminal-line: #2a6f4f;
  --landing-glow-line: rgba(31, 110, 77, 0.55);
  --landing-terrain-filter: saturate(0.6) brightness(1.25) sepia(0.22);
  --landing-hero-byline-color: var(--landing-bright-text);
  --selection-bg: rgba(31, 110, 77, 0.26);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--landing-page-bg); }
::selection { background: var(--selection-bg); color: var(--landing-title); }

@keyframes flicker {
  0%, 100% { opacity: 1; }
  90% { opacity: 1; }
  91% { opacity: 0.45; }
  92% { opacity: 1; }
  94% { opacity: 0.75; }
  95% { opacity: 1; }
  97% { opacity: 0.55; }
  98% { opacity: 1; }
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes ctaPulse {
  0%, 100% { box-shadow: var(--landing-pulse); }
  50% { box-shadow: var(--landing-pulse-strong); }
}

@keyframes drift {
  from { background-position: 0 0, 80px 40px; }
  to { background-position: 360px 130px, -260px 110px; }
}

@keyframes scan {
  from { background-position: 0 0; }
  to { background-position: 0 240px; }
}

@keyframes beacon {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 1; }
}

.landing-shell {
  position: relative;
  overflow-x: hidden;
  background: var(--landing-page-bg);
  color: var(--landing-text);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.scanline {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.55;
  animation: scan 8s linear infinite;
}

.scanline.one {
  z-index: 9000;
  background: var(--landing-scanline);
  background-size: 100% 4px;
}

.scanline.two {
  z-index: 9001;
  background: radial-gradient(120% 90% at 50% 40%, transparent 55%, var(--landing-tint) 100%);
  mix-blend-mode: normal;
  opacity: 1;
  animation: none;
}

.landing-hero {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 64px 24px;
  background: var(--landing-hero-bg);
}

.hero-haze {
  position: absolute;
  left: 50%;
  bottom: 14%;
  width: 680px;
  max-width: 120%;
  height: 340px;
  transform: translateX(-50%);
  background: var(--landing-haze-bg);
  filter: blur(6px);
  pointer-events: none;
}

.hero-dust {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: var(--landing-haze-dust);
  background-size: 130px 130px, 190px 190px;
  opacity: 0.5;
  animation: drift 26s linear infinite;
}

.hero-scene {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 62%;
  pointer-events: none;
  filter: var(--landing-terrain-filter);
}

.hero-scene-beacon {
  animation: beacon 2.4s ease-in-out infinite;
}

.hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  width: 100%;
  max-width: 920px;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-badge {
  padding: 7px 14px 7px 18px;
  border: 1px solid var(--landing-accent-2);
  border-radius: 2px;
  background: var(--landing-shell-bg);
  box-shadow: inset 0 0 18px var(--landing-accent-shadow);
  color: var(--landing-accent);
  font-size: 11px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}

.hero-title {
  margin: 30px 0 0;
  color: var(--landing-title);
  font-size: clamp(2.7rem, 11vw, 8.2rem);
  font-weight: 700;
  letter-spacing: clamp(0.06em, 1.4vw, 0.22em);
  line-height: 0.96;
  text-shadow: var(--landing-hero-text-shadow);
  animation: flicker 7s infinite;
}

.hero-subtitle {
  margin: 26px 0 0;
  color: var(--landing-bright-text);
  font-size: clamp(0.95rem, 2.4vw, 1.35rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-byline {
  max-width: 540px;
  margin: 18px 0 0;
  color: var(--landing-hero-byline-color);
  font-size: clamp(0.78rem, 1.6vw, 0.95rem);
  letter-spacing: 0.04em;
}

.cursor-blink,
.cursor-indicator {
  display: inline-block;
  background: var(--landing-accent);
  vertical-align: -2px;
  animation: blink 1.1s steps(1) infinite;
}

.cursor-blink {
  width: 9px;
  height: 1.05em;
  margin-left: 6px;
  box-shadow: 0 0 8px var(--landing-prompt-glow);
}

.cursor-indicator {
  width: 8px;
  height: 1em;
  margin-left: 6px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-top: 42px;
}

.cta {
  display: inline-block;
  padding: 17px 34px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--landing-accent), var(--landing-accent-2));
  color: var(--landing-cta-text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 0.12s ease;
  animation: ctaPulse 2.8s ease-in-out infinite;
}

.cta:hover { transform: translateY(-2px); }
.cta:focus-visible,
.theme-toggle:focus-visible { outline: 2px solid var(--landing-title); outline-offset: 3px; }
.cta:active { transform: scale(0.96); }

.theme-toggle {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 9020;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--landing-theme-toggle-border);
  border-radius: 50%;
  background: var(--landing-theme-toggle-bg);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 8px 22px var(--landing-theme-toggle-shadow);
  color: var(--landing-theme-toggle-text);
  cursor: pointer;
  font: 700 18px/1 inherit;
  transition: transform 0.12s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover { transform: translateY(-1px); }

.landing-section {
  position: relative;
  padding: clamp(72px, 10vw, 128px) 24px;
}

.mission-log {
  border-top: 1px solid var(--landing-border-subtle);
  border-bottom: 1px solid var(--landing-border-subtle);
  background: var(--landing-panel-bg);
}

.mission-log-inner {
  max-width: 820px;
  margin: 0 auto;
}

.terminal-window {
  overflow: hidden;
  border: 1px solid var(--landing-border);
  border-radius: 5px;
  background: var(--landing-box);
  box-shadow: inset 0 0 60px var(--landing-shell-shadow), 0 0 40px var(--landing-shadow-strong);
}

.terminal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--landing-border-line);
  background: var(--landing-panel-head);
}

.terminal-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.terminal-dot.red { background: var(--landing-dot-red); }
.terminal-dot.yellow { background: var(--landing-dot-yellow); }
.terminal-dot.green { background: var(--landing-dot-green); }

.terminal-title {
  margin-left: 8px;
  color: var(--landing-fg-muted);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.terminal-body {
  padding: clamp(28px, 5vw, 48px);
  color: var(--landing-title);
  font-size: clamp(0.95rem, 2vw, 1.25rem);
  line-height: 1.85;
}

.prompt {
  margin: 0 0 14px;
  color: var(--landing-text);
}

.prompt-okay { color: var(--landing-accent-2); }

.prompt-emphasis {
  color: var(--landing-accent);
  text-shadow: 0 0 12px var(--landing-glow-line);
}

.landing-feed {
  background: var(--landing-page-bg);
}

.feed-shell {
  max-width: var(--landing-feed-shell-max-width);
  margin: 0 auto;
}

.feed-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.feed-head-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--landing-bright-text);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.feed-led {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--landing-dot-green);
  box-shadow: 0 0 10px var(--landing-prompt-glow);
  animation: beacon 1.8s ease-in-out infinite;
}

.feed-rule {
  flex: 1;
  height: 1px;
  background: var(--landing-border-line-strong);
}

.feed-id {
  color: var(--landing-text-dim);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.feed-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--landing-border);
  border-radius: 6px;
  background: var(--landing-screen);
  box-shadow: inset 0 0 60px var(--landing-shadow-light), 0 0 50px var(--landing-shadow-screen);
}

.feed-control {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--landing-border-line);
  background: var(--landing-panel-head-2);
}

.feed-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--landing-screen);
}

.feed-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.feed-screen-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--landing-scanline-screen);
  background-size: 100% 4px;
  mix-blend-mode: multiply;
  opacity: 0.5;
}

.site-footer {
  position: relative;
  padding: 48px 24px 56px;
  border-top: 1px solid var(--landing-border-subtle);
  background: var(--landing-panel-bg);
}

.footer-row,
.footer-copy {
  max-width: 1180px;
  margin: 0 auto;
}

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

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

.footer-brand-title {
  color: var(--landing-title);
  font-size: 13px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.footer-brand-copy,
.footer-meta {
  color: var(--landing-text-dim);
  font-size: 11px;
}

.footer-brand-copy { letter-spacing: 0.1em; }

.footer-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0.12em;
}

.flag {
  display: inline-flex;
  width: 30px;
  height: 20px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--landing-flag-border);
  border-radius: 2px;
}

.flag-top { flex: 1; background: #ff9933; }
.flag-middle {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  background: #f4f4f0;
}
.flag-dot {
  display: block;
  width: 6px;
  height: 6px;
  border: 1px solid #0a3d91;
  border-radius: 50%;
}
.flag-bottom { flex: 1; background: #138808; }

.footer-copy {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px dashed var(--landing-border-muted-2);
  color: var(--landing-flag-text);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-signal {
  background: var(--landing-signal-bg);
}

@media (max-width: 720px) {
  .landing-hero {
    padding-top: 88px;
  }

  .feed-head {
    flex-wrap: wrap;
  }

  .theme-toggle {
    top: 12px;
    right: 12px;
  }
}
