:root {
  --bg: #000000;
  --bg-2: #02080e;
  --panel: #050a10;
  --ice: #7ec8ff;
  --ice-soft: #9fdcff;
  --ice-dim: #4a8ab0;
  --ink: #c8eaff;
  --mint: #7cffb2;
  --warn: #ffd060;
  --danger: #ff6b6b;
  --line: #1a4a6a;
  --line-hot: #3a9fe0;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --display: "Syne", "IBM Plex Mono", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
}

::selection {
  background: #1a4a6a;
  color: #e8f6ff;
}

a {
  color: var(--ice);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

a:hover {
  color: var(--ice-soft);
  border-bottom-color: var(--ice-dim);
}

code,
kbd {
  font-family: var(--mono);
  font-size: 0.92em;
}

kbd {
  display: inline-block;
  padding: 0.05em 0.4em;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--mint);
}

/* Atmosphere */
.noise,
.scanlines,
.grid-bg {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
}

.noise {
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: noise-shift 0.4s steps(2) infinite;
}

.scanlines {
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(0, 20, 40, 0.12) 2px,
    rgba(0, 20, 40, 0.12) 3px
  );
  opacity: 0.55;
  mix-blend-mode: multiply;
}

.grid-bg {
  background-image:
    linear-gradient(rgba(26, 74, 106, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 74, 106, 0.12) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 20%, transparent 75%);
  animation: grid-drift 28s linear infinite;
}

@keyframes noise-shift {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-1%, 1%); }
  100% { transform: translate(1%, -1%); }
}

@keyframes grid-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 48px 48px, -48px 24px; }
}

.topbar,
main,
.foot {
  position: relative;
  z-index: 1;
}

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 8, 16, 0.85);
  backdrop-filter: blur(6px);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ice-dim);
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar-left {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.topbar-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  image-rendering: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(0, 255, 65, 0.35));
}

.topbar-nav {
  display: flex;
  gap: 1.25rem;
}

.topbar-nav a {
  color: var(--ice-dim);
  border: none;
}

.topbar-nav a:hover {
  color: var(--ice);
}

.live-dot {
  display: inline-block;
  width: 0.5em;
  height: 0.5em;
  margin-right: 0.35em;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(124, 255, 178, 0.5);
  animation: pulse-dot 2.2s ease-out infinite;
  vertical-align: middle;
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(124, 255, 178, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(124, 255, 178, 0); }
  100% { box-shadow: 0 0 0 0 rgba(124, 255, 178, 0); }
}

/* Hero — one composition */
.hero {
  min-height: calc(100vh - 42px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3.5rem 1.5rem 4rem;
  max-width: 980px;
  margin: 0 auto;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 1.25rem 1.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  animation: logo-in 1.1s ease-out both;
}

.brand-mark {
  width: clamp(88px, 14vw, 140px);
  height: clamp(88px, 14vw, 140px);
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 22px rgba(0, 255, 65, 0.28));
  animation: mark-glow 3.6s ease-in-out infinite;
}

.brand-text {
  min-width: 0;
  flex: 1 1 280px;
}

.logo {
  margin: 0 0 0.75rem;
  color: var(--ice);
  font-size: clamp(7px, 1.45vw, 13px);
  line-height: 1.15;
  letter-spacing: 0;
  overflow-x: auto;
  white-space: pre;
  text-shadow: 0 0 18px rgba(126, 200, 255, 0.18);
  animation: logo-flicker 7s 2s infinite;
}

.tagline {
  margin: 0;
  color: var(--ice-dim);
  font-size: 12px;
  letter-spacing: 0.14em;
}

.ascii-art {
  margin: 0 0 2rem;
  max-width: 100%;
  overflow-x: auto;
  color: var(--mint);
  font-size: clamp(9px, 1.35vw, 12px);
  line-height: 1.2;
  white-space: pre;
  text-shadow: 0 0 14px rgba(124, 255, 178, 0.16);
  animation: rise 0.8s 0.2s ease-out both, cursor-blink 1.1s step-end infinite;
}

@keyframes mark-glow {
  0%, 100% { filter: drop-shadow(0 0 14px rgba(0, 255, 65, 0.22)); }
  50% { filter: drop-shadow(0 0 28px rgba(0, 255, 65, 0.42)); }
}

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

.hero-line {
  margin: 0 0 0.85rem;
  max-width: 18ch;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.75rem, 4.2vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #eaf6ff;
  animation: rise 0.8s 0.4s ease-out both;
}

.hero-sub {
  margin: 0 0 1.75rem;
  max-width: 42ch;
  color: var(--ice-soft);
  font-size: 1rem;
  animation: rise 0.8s 0.55s ease-out both;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  animation: rise 0.8s 0.7s ease-out both;
}

.cta {
  display: inline-block;
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--line-hot);
  background: #001828;
  color: var(--ice);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.cta:hover {
  background: #003050;
  border-color: var(--ice);
  border-bottom-color: var(--ice);
  transform: translateY(-1px);
}

.cta.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ice-dim);
}

.cta.ghost:hover {
  color: var(--warn);
  border-color: #6a5a20;
}

.hero-hint {
  margin: 0;
  color: var(--ice-dim);
  font-size: 12px;
  letter-spacing: 0.08em;
  animation: rise 0.8s 0.85s ease-out both;
}

.hero-hint::after {
  content: "▋";
  margin-left: 0.25em;
  color: var(--ice);
  animation: blink 1.05s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes logo-in {
  from { opacity: 0; filter: blur(2px); transform: translateY(8px); }
  to { opacity: 1; filter: none; transform: none; }
}

@keyframes logo-flicker {
  0%, 92%, 100% { opacity: 1; }
  93% { opacity: 0.72; }
  94% { opacity: 1; }
  96% { opacity: 0.85; }
  97% { opacity: 1; }
}

/* Sections */
.block {
  max-width: 760px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem;
  border-top: 1px solid rgba(26, 74, 106, 0.55);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.block.in {
  opacity: 1;
  transform: none;
}

.section-label {
  margin-bottom: 0.75rem;
  color: var(--mint);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-label.warn {
  color: var(--warn);
}

.block h2 {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  color: #eaf6ff;
  line-height: 1.2;
}

.block h3 {
  margin: 2rem 0 0.65rem;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ice);
}

.danger-h {
  color: var(--danger) !important;
}

.lede {
  margin: 0 0 1.5rem;
  color: var(--ice-soft);
  font-size: 1.02rem;
}

.lede.warn-text {
  color: var(--warn);
  border-left: 2px solid #6a5a20;
  padding-left: 1rem;
}

.aside {
  margin: 1.25rem 0 0;
  color: var(--ice-dim);
  font-size: 13px;
}

.panel {
  margin: 0;
  padding: 1rem 1.1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ice-soft);
  font-size: 12px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre;
}

.keys-panel {
  margin-top: 1.25rem;
  line-height: 1.65;
  color: var(--mint);
}

.term-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.term-list li {
  position: relative;
  padding: 0.7rem 0 0.7rem 1.1rem;
  border-bottom: 1px solid rgba(26, 74, 106, 0.35);
  color: var(--ink);
}

.term-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--ice-dim);
}

.term-list.tight li {
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

.term-list .k {
  display: inline-block;
  min-width: 7.5em;
  color: var(--mint);
  font-weight: 500;
}

.os-block {
  margin-top: 2rem;
}

.os-block h3 {
  margin-top: 0;
}

.cmd-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 0.75rem 0;
  border: 1px solid var(--line-hot);
  background: #001018;
}

.cmd {
  flex: 1;
  margin: 0;
  padding: 0.85rem 1rem;
  overflow-x: auto;
  color: var(--mint);
  font-size: 13px;
  border: none;
  background: transparent;
}

.cmd code {
  color: inherit;
}

.copy {
  flex-shrink: 0;
  border: none;
  border-left: 1px solid var(--line);
  background: #001828;
  color: var(--ice);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0 1rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.copy:hover {
  background: #003050;
  color: #fff;
}

.copy.copied {
  color: var(--mint);
}

.danger-zone {
  background: linear-gradient(180deg, transparent, rgba(40, 0, 8, 0.25) 40%, transparent);
}

.danger-list {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  color: var(--ink);
}

.danger-list li {
  margin-bottom: 0.65rem;
  padding-left: 0.25rem;
}

.danger-list li::marker {
  color: var(--danger);
}

.disclaimer {
  margin: 0.75rem 0 0;
  padding: 1rem;
  border: 1px solid #5a2020;
  background: #100408;
  color: #ffb0b0;
  font-size: 12px;
  letter-spacing: 0.02em;
  line-height: 1.55;
}

.foot {
  margin-top: 2rem;
  padding: 2.5rem 1.5rem 3rem;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--ice-dim);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.foot-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}

.foot-mark {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(0, 255, 65, 0.3));
}

.foot-logo {
  margin: 0;
  color: var(--ice);
  font-size: 13px;
  letter-spacing: 0.35em;
  text-align: left;
  line-height: 1.35;
}

.foot-links {
  margin-top: 1rem;
}

.foot-links a {
  color: var(--ice-dim);
  border: none;
}

.foot-links a:hover {
  color: var(--ice);
}

@media (max-width: 720px) {
  .topbar {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  .topbar-nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
  }

  .topbar-right {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 2.5rem;
  }

  .hero-line {
    max-width: none;
  }

  .term-list .k {
    display: block;
    min-width: 0;
    margin-bottom: 0.15rem;
  }

  .cmd-row {
    flex-direction: column;
  }

  .copy {
    border-left: none;
    border-top: 1px solid var(--line);
    padding: 0.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .block {
    opacity: 1;
    transform: none;
  }
}
