:root {
  --c-bg: #000;
  --c-fg: #ffffff;
  --c-fg-soft: #cfd5d3;
  --c-muted: #6c7378;

  --c-line: rgba(255, 255, 255, 0.2);
  --c-line-soft: rgba(255, 255, 255, 0.08);
  --c-line-faint: rgba(255, 255, 255, 0.04);

  --c-glow: #5fffce;
  --c-glow-bright: #8affda;
  --c-glow-strong: rgba(95, 255, 206, 0.55);
  --c-glow-mid: rgba(95, 255, 206, 0.3);
  --c-glow-soft: rgba(95, 255, 206, 0.14);

  --f-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', 'Courier New', monospace;
  --f-display: 'Orbitron', 'JetBrains Mono', ui-monospace, monospace;
}

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

html, body {
  height: 100%;
  background: var(--c-bg);
  color: var(--c-fg);
  font-family: var(--f-mono);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

@media (hover: hover) and (pointer: fine) {
  html, body { cursor: none; }
  a, button, .btn { cursor: none; }
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ============== BACKDROP LAYERS ============== */

#particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0,0,0,0.85) 100%);
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(95, 255, 206, 0.018) 2px,
    rgba(95, 255, 206, 0.018) 3px
  );
  animation: flicker 7s infinite;
  mix-blend-mode: screen;
}

@keyframes flicker {
  0%, 95%, 100% { opacity: 1; }
  96% { opacity: 0.78; }
  96.5% { opacity: 1; }
  97.5% { opacity: 0.92; }
  98% { opacity: 1; }
}

/* ============== CUSTOM CURSOR ============== */

.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 38px; height: 38px;
  margin-left: -19px;
  margin-top: -19px;
  pointer-events: none;
  z-index: 1000;
  transform: translate3d(-100px, -100px, 0);
  display: none;
  will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
  .cursor { display: block; }
}

.cursor-ring {
  position: absolute;
  inset: 0;
  border: 1px solid #fff;
  border-radius: 50%;
  transition: transform 0.18s ease, border-color 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 0 14px var(--c-glow-mid), inset 0 0 6px var(--c-glow-soft);
}

.cursor-dot {
  position: absolute;
  top: 50%; left: 50%;
  width: 4px; height: 4px;
  background: var(--c-glow);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px var(--c-glow);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.cursor-cross {
  position: absolute;
  background: rgba(255, 255, 255, 0.55);
  transition: background 0.18s ease;
}
.cursor-cross--h { left: -8px; right: -8px; top: 50%; height: 1px; transform: translateY(-50%); }
.cursor-cross--v { top: -8px; bottom: -8px; left: 50%; width: 1px; transform: translateX(-50%); }

.cursor.is-hover .cursor-ring {
  transform: scale(1.45);
  border-color: var(--c-glow);
  box-shadow: 0 0 22px var(--c-glow-strong), inset 0 0 8px var(--c-glow-mid);
}
.cursor.is-hover .cursor-dot {
  background: var(--c-glow-bright);
  box-shadow: 0 0 14px var(--c-glow);
}
.cursor.is-hover .cursor-cross {
  background: var(--c-glow);
}
.cursor.is-down .cursor-ring { transform: scale(0.85); }

/* ============== STATUS BARS ============== */

.status-bar {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--c-muted);
  text-transform: uppercase;
  border-bottom: 1px solid var(--c-line);
}
.status-bar--bottom {
  border-bottom: none;
  border-top: 1px solid var(--c-line);
  margin-top: auto;
}

.status-group {
  display: flex;
  gap: 16px;
  align-items: center;
}

.status-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-glow);
  box-shadow: 0 0 10px var(--c-glow);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}

/* ============== STAGE ============== */

.stage {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 24px 56px;
}

.bracket {
  position: absolute;
  width: 36px; height: 36px;
  pointer-events: none;
  opacity: 0;
  animation: bracketIn 0.8s ease-out 0.3s forwards;
}
.bracket--tl { top: 72px; left: 28px; border-top: 1px solid rgba(255,255,255,0.5); border-left: 1px solid rgba(255,255,255,0.5); }
.bracket--tr { top: 72px; right: 28px; border-top: 1px solid rgba(255,255,255,0.5); border-right: 1px solid rgba(255,255,255,0.5); }
.bracket--bl { bottom: 72px; left: 28px; border-bottom: 1px solid rgba(255,255,255,0.5); border-left: 1px solid rgba(255,255,255,0.5); }
.bracket--br { bottom: 72px; right: 28px; border-bottom: 1px solid rgba(255,255,255,0.5); border-right: 1px solid rgba(255,255,255,0.5); }

@keyframes bracketIn {
  0% { opacity: 0; }
  100% { opacity: 0.55; }
}

.stage-inner {
  width: 100%;
  max-width: 980px;
  text-align: center;
  animation: bootIn 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes bootIn {
  0% { opacity: 0; transform: translateY(8px); filter: blur(6px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.eyebrow {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  letter-spacing: 0.32em;
  color: var(--c-muted);
  text-transform: uppercase;
  margin-bottom: 32px;
}

.eyebrow-bullet {
  width: 6px; height: 6px;
  background: var(--c-glow);
  border-radius: 50%;
  box-shadow: 0 0 14px var(--c-glow);
  animation: pulse 2s ease-in-out infinite;
}

/* ============== LOGO (white + chromatic ghost glow) ============== */

.logo {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(56px, 13vw, 177px);
  letter-spacing: 0.03em;
  line-height: 0.92;
  position: relative;
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
}

.logo > span:not(.visually-hidden) {
  display: block;
  white-space: nowrap;
  pointer-events: none;
}

.logo-main {
  position: relative;
  color: #ffffff;
  text-shadow:
    0 0 22px var(--c-glow-strong),
    0 0 48px var(--c-glow-mid),
    0 0 80px var(--c-glow-soft);
}

.logo-ghost {
  position: absolute !important;
  inset: 0;
  mix-blend-mode: screen;
  opacity: 0.7;
  filter: blur(0.4px);
}

.logo-ghost--a {
  color: var(--c-glow);
  transform: translate(-2px, 0);
  animation: ghostA 7s infinite;
}
.logo-ghost--b {
  color: var(--c-glow-bright);
  transform: translate(2px, 0);
  animation: ghostB 7s infinite;
  opacity: 0.45;
}

@keyframes ghostA {
  0%, 96%, 100% { transform: translate(-2px, 0); }
  96.4% { transform: translate(-5px, 1px); clip-path: polygon(0 20%, 100% 20%, 100% 38%, 0 38%); }
  96.8% { transform: translate(-3px, -1px); clip-path: polygon(0 60%, 100% 60%, 100% 78%, 0 78%); }
  97.2% { transform: translate(-1px, 2px); clip-path: none; }
}
@keyframes ghostB {
  0%, 96%, 100% { transform: translate(2px, 0); }
  96.4% { transform: translate(5px, -1px); clip-path: polygon(0 40%, 100% 40%, 100% 58%, 0 58%); }
  96.8% { transform: translate(3px, 1px); clip-path: polygon(0 10%, 100% 10%, 100% 28%, 0 28%); }
  97.2% { transform: translate(2px, -2px); clip-path: none; }
}

.logo-sub {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(13px, 2.2vw, 22px);
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  color: #fff;
  margin-top: 4px;
  margin-bottom: 36px;
  text-shadow: 0 0 14px var(--c-glow-mid), 0 0 32px var(--c-glow-soft);
}

/* ============== STATUS READOUT ============== */

.status-readout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.025);
  font-size: 11px;
  letter-spacing: 0.24em;
  margin-bottom: 28px;
  position: relative;
  box-shadow: 0 0 14px var(--c-glow-soft), inset 0 0 12px var(--c-glow-soft);
}
.status-readout::before,
.status-readout::after {
  content: '';
  position: absolute;
  width: 5px; height: 5px;
  background: var(--c-glow);
  box-shadow: 0 0 8px var(--c-glow);
}
.status-readout::before { top: -2px; left: -2px; }
.status-readout::after { bottom: -2px; right: -2px; }

.status-prefix { color: var(--c-muted); }
.status-blink {
  color: var(--c-glow);
  animation: blink 1.1s steps(2) infinite;
  text-shadow: 0 0 8px var(--c-glow);
}
.status-value {
  color: #fff;
  font-weight: 700;
  text-shadow: 0 0 10px var(--c-glow-mid);
}

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

/* ============== TAGLINE / LEDE ============== */

.tagline {
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--c-fg);
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}
.tagline span + span::before { content: ' '; }

.lede {
  color: var(--c-muted);
  font-size: 13px;
  max-width: 480px;
  margin: 0 auto 36px;
  line-height: 1.75;
}

/* ============== CONTACT PANEL ============== */

.panel {
  border: 1px solid var(--c-line);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  margin: 0 auto 8px;
  max-width: 520px;
  text-align: left;
  position: relative;
  box-shadow: 0 0 36px var(--c-glow-soft), inset 0 0 24px rgba(255, 255, 255, 0.015);
}
.panel::before,
.panel::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  pointer-events: none;
}
.panel::before {
  top: -1px; left: -1px;
  border-top: 1px solid var(--c-glow);
  border-left: 1px solid var(--c-glow);
  box-shadow: -1px -1px 8px var(--c-glow-soft);
}
.panel::after {
  bottom: -1px; right: -1px;
  border-bottom: 1px solid var(--c-glow);
  border-right: 1px solid var(--c-glow);
  box-shadow: 1px 1px 8px var(--c-glow-soft);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--c-line-soft);
  background: rgba(255, 255, 255, 0.02);
}
.panel-title {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--c-glow);
  text-transform: uppercase;
  text-shadow: 0 0 10px var(--c-glow-mid);
}
.panel-controls .ctl {
  display: inline-block;
  margin-left: 6px;
  color: var(--c-muted);
  font-size: 12px;
  line-height: 1;
}

.contact-list { padding: 14px 18px; }

.contact-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--c-line-soft);
}
.contact-row:last-child { border-bottom: none; }

.contact-row dt {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--c-muted);
  text-transform: uppercase;
}
.contact-row dd { font-size: 14px; color: var(--c-fg); }

.contact-row a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  transition: border-color 0.2s, text-shadow 0.2s, color 0.2s;
}
.contact-row a:hover,
.contact-row a:focus-visible {
  color: var(--c-glow-bright);
  border-color: var(--c-glow);
  text-shadow: 0 0 12px var(--c-glow);
  outline: none;
}

/* ============== SCROLLBAR ============== */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.25); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--c-glow); }

/* ============== RESPONSIVE ============== */

@media (max-width: 900px) {
  .hide-md { display: none; }
}

@media (max-width: 600px) {
  body { overflow-y: auto; }
  .hide-sm { display: none; }
  .bracket { display: none; }
  .stage { padding: 36px 18px 48px; }
  .grid-overlay { background-size: 36px 36px; }
  .status-bar { padding: 9px 14px; font-size: 10px; letter-spacing: 0.1em; gap: 10px; }
  .status-group { gap: 10px; }
  .eyebrow { font-size: 10.5px; letter-spacing: 0.24em; margin-bottom: 24px; }
  .logo { letter-spacing: 0.02em; }
  .logo-sub { letter-spacing: 0.4em; margin-bottom: 28px; }
  .tagline span { display: block; }
  .tagline span + span::before { content: ''; }
  .contact-row {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 9px 0;
  }
  .contact-row dt { font-size: 9.5px; }
}

@media (max-width: 380px) {
  .logo { font-size: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .scanlines, .status-blink, .status-dot, .eyebrow-bullet { animation: none !important; }
}
