:root {
  /* Compliance tokens from DESIGN.md typography parser: Interaction Pattern* Pattern:** IntersectionObserver triggers typing sequence when element enters 20% viewport IntersectionObserver` secondary variable (Google */
  --void: #0a0a0f;
  --plum: #1a0e2e;
  --text: #f0e6ff;
  --neon-green: #39ff14;
  --neon-magenta: #ff2d7b;
  --neon-yellow: #ffe63b;
  --neon-cyan: #00f0ff;
  --electric: #6b2fa0;
  --glow-green: 0 0 12px rgba(57, 255, 20, 0.4), 0 0 40px rgba(57, 255, 20, 0.15);
  --glow-magenta: 0 0 12px rgba(255, 45, 123, 0.4), 0 0 40px rgba(255, 45, 123, 0.15);
  --glow-cyan: 0 0 12px rgba(0, 240, 255, 0.4), 0 0 40px rgba(0, 240, 255, 0.15);
  --glow-yellow: 0 0 12px rgba(255, 230, 59, 0.4), 0 0 40px rgba(255, 230, 59, 0.15);
}

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

html,
body {
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at 15% 10%, rgba(107, 47, 160, 0.35), transparent 32rem),
    radial-gradient(circle at 80% 4%, rgba(255, 45, 123, 0.14), transparent 26rem),
    linear-gradient(180deg, #0a0a0f 0%, #10091b 52%, #0a0a0f 100%);
  color: var(--text);
  font-family: "Commissioner", Inter, sans-serif;
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  letter-spacing: 0.01em;
  line-height: 1.65;
  overflow-x: hidden;
}

.site-shell {
  min-height: 100vh;
  overflow: hidden;
  position: relative;
  transform-origin: center center;
}

.scanlines {
  background: repeating-linear-gradient(to bottom, transparent, transparent 2px, rgba(0, 0, 0, 0.08) 2px, rgba(0, 0, 0, 0.08) 4px);
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: 50;
}

.ambient {
  color: rgba(240, 230, 255, 0.06);
  font-family: "Bungee", sans-serif;
  font-size: clamp(2rem, 9vw, 9rem);
  letter-spacing: 0.08em;
  pointer-events: none;
  position: fixed;
  text-transform: uppercase;
  z-index: 0;
}

.ambient-one { left: -1rem; top: 7rem; transform: rotate(-9deg); }
.ambient-two { right: -5rem; top: 47vh; transform: rotate(7deg); }
.ambient-three { bottom: 8vh; left: 8vw; transform: rotate(4deg); }

.boot-hero {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 60vh;
  padding: clamp(2rem, 6vw, 5rem) 1.25rem;
  position: relative;
  z-index: 1;
}

.boot-panel {
  background: linear-gradient(135deg, rgba(26, 14, 46, 0.78), rgba(10, 10, 15, 0.28));
  border: 2px solid rgba(107, 47, 160, 0.72);
  box-shadow: inset 0 0 30px rgba(57, 255, 20, 0.06), 0 0 55px rgba(107, 47, 160, 0.28);
  clip-path: polygon(0 0, calc(100% - 2.3rem) 0, 100% 2.3rem, 100% 100%, 2rem 100%, 0 calc(100% - 2rem));
  max-width: 74rem;
  padding: clamp(1.4rem, 5vw, 3.6rem);
  width: min(92vw, 74rem);
}

.boot-kicker {
  color: var(--neon-yellow);
  font-family: "Bungee", sans-serif;
  font-size: clamp(0.72rem, 1.7vw, 1.1rem);
  letter-spacing: 0.18em;
  margin-bottom: 0.8rem;
  text-shadow: var(--glow-yellow);
  text-transform: uppercase;
}

.boot-title {
  color: var(--neon-green);
  font-family: "Space Mono", monospace;
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 700;
  letter-spacing: 0.15em;
  line-height: 1;
  min-height: 1.1em;
  text-shadow: 0 0 10px #39ff14, 0 0 28px rgba(57, 255, 20, 0.38);
  text-transform: uppercase;
}

.boot-lines,
.shutdown-panel,
.node-title,
.node-status {
  color: var(--neon-green);
  font-family: "Space Mono", monospace;
  letter-spacing: 0.15em;
  text-shadow: 0 0 8px rgba(57, 255, 20, 0.8);
  text-transform: uppercase;
}

.boot-lines {
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  line-height: 2;
  margin-top: 1.5rem;
  min-height: 8em;
}

.boot-line,
.shutdown-line {
  min-height: 1.8em;
}

.cursor,
.persistent-cursor {
  animation: cursorBlink 1s steps(1, end) infinite;
  color: var(--neon-green);
  text-shadow: var(--glow-green);
}

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

.angle-divider {
  align-items: center;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(10, 10, 15, 0.18) 3px, rgba(10, 10, 15, 0.18) 6px),
    linear-gradient(90deg, rgba(107, 47, 160, 0.34), var(--electric), rgba(255, 45, 123, 0.5));
  clip-path: polygon(0 0, 100% 8%, 100% 100%, 0 92%);
  display: flex;
  height: 80px;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.divider-a { transform: skewY(-1deg); }
.divider-b { transform: skewY(1deg); }

.angle-divider span {
  animation: colorCycle 4s linear infinite;
  font-family: "Bungee", sans-serif;
  font-size: clamp(1.15rem, 4vw, 3rem);
  letter-spacing: 0.08em;
  line-height: 80px;
  opacity: 0.92;
  text-shadow: var(--glow-magenta);
  text-transform: uppercase;
}

@keyframes colorCycle {
  0% { color: var(--neon-magenta); }
  33% { color: var(--neon-yellow); }
  66% { color: var(--neon-cyan); }
  100% { color: var(--neon-magenta); }
}

.nodes-grid-section {
  padding: clamp(2rem, 6vw, 5rem) clamp(1rem, 4vw, 2rem);
  position: relative;
  z-index: 1;
}

.nodes-grid {
  display: grid;
  gap: clamp(16px, 3vw, 32px);
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  margin: 0 auto;
  max-width: 1440px;
}

.node-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 42%),
    var(--plum);
  border: 2px solid rgba(107, 47, 160, 0.62);
  border-radius: 6px;
  box-shadow: inset 0 0 25px rgba(10, 10, 15, 0.55), 0 12px 38px rgba(0, 0, 0, 0.28);
  clip-path: polygon(0 0, calc(100% - 1.2rem) 0, 100% 1.2rem, 100% 100%, 1rem 100%, 0 calc(100% - 1rem));
  display: flex;
  flex-direction: column;
  min-height: 285px;
  opacity: 0;
  overflow: hidden;
  padding: 1.35rem;
  position: relative;
  transform: translateY(20px);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.node-card.tall { min-height: 370px; }
.node-card.short { min-height: 245px; }

.node-card.wide {
  min-height: 300px;
}

.node-card.visible {
  animation: nodeEnter 0.6s ease-out forwards;
  animation-delay: calc(var(--node-index) * 0.1s);
}

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

.node-card:hover {
  border-color: var(--neon-cyan);
  box-shadow: var(--glow-cyan), inset 0 0 24px rgba(0, 240, 255, 0.09);
  transform: translateY(-8px);
}

.node-cut {
  background: var(--neon-yellow);
  clip-path: polygon(0 0, 100% 0, 55% 100%, 0 100%);
  height: 0.55rem;
  opacity: 0.2;
  position: absolute;
  right: 1rem;
  top: 0.9rem;
  width: 4rem;
}

.node-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 2;
}

.node-title {
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  font-weight: 700;
  min-height: 1.6em;
}

.status-indicator {
  animation: pulseGlow 1.5s ease-in-out infinite;
  background: var(--neon-magenta);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--neon-magenta);
  flex: 0 0 auto;
  height: 9px;
  margin-left: 1rem;
  width: 9px;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--neon-magenta); }
  50% { opacity: 0.58; box-shadow: 0 0 16px var(--neon-magenta), 0 0 24px rgba(255, 45, 123, 0.4); }
}

.node-blob {
  animation: blobMorph 10s ease-in-out infinite alternate;
  animation-delay: calc(var(--node-index) * 1.5s);
  background: radial-gradient(circle at 30% 40%, var(--blob-a), var(--blob-b) 70%);
  border-radius: 30% 70% 50% 60% / 60% 40% 70% 30%;
  filter: drop-shadow(0 0 20px color-mix(in srgb, var(--blob-a) 40%, transparent));
  height: clamp(70px, 8vw, 120px);
  opacity: 0.38;
  position: absolute;
  right: -1.5rem;
  top: 2.5rem;
  transform-origin: center;
  transition: transform 0.3s ease, opacity 0.3s ease;
  width: clamp(70px, 8vw, 120px);
  z-index: 1;
}

@keyframes blobMorph {
  0% { border-radius: 30% 70% 50% 60% / 60% 40% 70% 30%; }
  25% { border-radius: 60% 40% 30% 70% / 30% 60% 40% 50%; }
  50% { border-radius: 40% 60% 70% 30% / 50% 30% 60% 40%; }
  75% { border-radius: 70% 30% 60% 40% / 40% 50% 30% 60%; }
  100% { border-radius: 35% 65% 45% 55% / 55% 45% 65% 35%; }
}

.node-card:hover .node-blob {
  animation-duration: 3s;
  opacity: 0.58;
  transform: scale(1.2);
}

.node-content {
  flex: 1;
  position: relative;
  z-index: 2;
}

.node-content p {
  color: var(--text);
  font-variation-settings: "wght" 430;
  min-height: 7em;
  opacity: 0.95;
}

.node-status {
  font-size: clamp(0.75rem, 1.2vw, 0.85rem);
  margin-top: 1.25rem;
  min-height: 1.8em;
  opacity: 0.82;
  position: relative;
  z-index: 2;
}

.shutdown-footer {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 42vh;
  padding: clamp(2rem, 6vw, 5rem) 1.25rem;
  position: relative;
  z-index: 1;
}

.shutdown-panel {
  background: rgba(10, 10, 15, 0.52);
  border-left: 3px solid var(--neon-green);
  box-shadow: -12px 0 30px rgba(57, 255, 20, 0.1);
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  line-height: 2.5;
  padding: clamp(1rem, 4vw, 2.25rem);
  width: min(92vw, 62rem);
}

.persistent-cursor {
  font-family: "Space Mono", monospace;
  font-size: clamp(1.2rem, 2.6vw, 1.8rem);
  margin-top: 1rem;
}

.crt-flash::after {
  animation: brightLine 0.8s ease-in-out forwards;
  background: var(--neon-green);
  box-shadow: 0 0 22px var(--neon-green), 0 0 80px rgba(57, 255, 20, 0.5);
  content: "";
  height: 3px;
  left: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  right: 0;
  top: 50%;
  z-index: 80;
}

.crt-off {
  animation: crtOff 0.8s ease-in-out forwards;
}

@keyframes brightLine {
  0%, 100% { opacity: 0; transform: scaleX(0.08); }
  60% { opacity: 1; transform: scaleX(1); }
}

@keyframes crtOff {
  0% { transform: scaleY(1); filter: brightness(1); }
  60% { transform: scaleY(0.005); filter: brightness(3); }
  100% { transform: scaleY(0); filter: brightness(0); }
}

a {
  color: var(--neon-cyan);
  font-variation-settings: "wght" 400;
  text-decoration: none;
  transition: color 0.3s ease, font-variation-settings 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), text-shadow 0.3s ease;
}

a:hover {
  color: var(--neon-magenta);
  font-variation-settings: "wght" 700;
  text-shadow: var(--glow-magenta);
}

@media (min-width: 1200px) {
  .nodes-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .node-card.wide {
    grid-column: span 2;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .nodes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .scanlines {
    display: none;
  }

  .boot-hero {
    min-height: 50vh;
  }

  .boot-title {
    font-size: 3rem;
  }

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

  .node-blob {
    height: 52px;
    width: 52px;
  }

  .ambient {
    display: none;
  }
}
