/* ─── Hero Section ───────────────────────────────────────────────────────── */

/* ── Background canvas ── */
#grid-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── Screen glow halo ── */
.screen-glow {
  position: fixed;
  top: -20%; left: -20%;
  width: 140%; height: 140%;
  z-index: -1;
  background: radial-gradient(
    ellipse at 50% 35%,
    rgba(120,177,90,0.06) 0%,
    transparent 55%
  );
  pointer-events: none;
}

/* ── CRT flicker ── */
.crt-flicker {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  animation: flicker 0.08s infinite alternate;
  background: transparent;
}

@keyframes flicker {
  0%   { opacity: 0.97; }
  100% { opacity: 1; }
}

/* ── CRT overlay (scanlines + vignette) ── */
.crt-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1000;
  pointer-events: none;
}

.crt-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.12) 2px,
    rgba(0,0,0,0.12) 4px
  );
  z-index: 1001;
}

.crt-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 50%,
    rgba(0,0,0,0.5) 85%,
    rgba(0,0,0,0.85) 100%
  );
  z-index: 1002;
}

/* ── Noise grain ── */
.noise {
  position: fixed;
  inset: 0;
  z-index: 998;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' 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");
  background-size: 128px 128px;
}

/* ── Header ── */
.hero {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 60px 20px 50px;
  border-bottom: 1px solid var(--g12);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 10%;
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    var(--g55) 20%,
    var(--g) 50%,
    var(--g55) 80%,
    transparent
  );
  filter: blur(1px);
}

/* ── Pixel logo ── */
.logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.pixel-logo {
  width: min(580px, 90%);
  height: auto;
  display: block;
  fill: var(--g);
  filter: drop-shadow(0 0 18px rgba(120,177,90,0.25))
          drop-shadow(0 0 60px rgba(120,177,90,0.08));
  animation: logoFadeIn 1.2s ease-out both;
}

@keyframes logoFadeIn {
  0%   { opacity: 0; filter: drop-shadow(0 0 40px rgba(120,177,90,0.6)) blur(4px); transform: scale(1.02); }
  60%  { opacity: 1; filter: drop-shadow(0 0 30px rgba(120,177,90,0.4)); }
  100% { opacity: 1; filter: drop-shadow(0 0 18px rgba(120,177,90,0.25)) drop-shadow(0 0 60px rgba(120,177,90,0.08)); transform: scale(1); }
}

/* ── Logo ghost reflection ── */
.logo-reflection {
  display: flex;
  justify-content: center;
  margin-top: -4px;
  opacity: 0.08;
  transform: scaleY(-0.35);
  filter: blur(2px);
  pointer-events: none;
  overflow: hidden;
  height: 40px;
}

.logo-reflection .pixel-logo {
  filter: none;
  animation: none;
}

/* ── Subtitle / typing ── */
.subtitle-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  font-family: 'Share Tech Mono', var(--mono);
  animation: subtitleIn 0.6s 1.4s ease-out both;
}

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

.prompt-symbol {
  color: var(--g-bright);
  font-size: 0.85rem;
  opacity: 0.7;
  text-shadow: 0 0 6px rgba(120,177,90,0.3);
}

.typed-text {
  font-size: 0.82rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--g55);
}

.typed-text .char {
  opacity: 0;
  animation: typeIn 0.03s forwards;
}

@keyframes typeIn {
  to { opacity: 1; }
}

.cursor-block {
  display: inline-block;
  width: 8px;
  height: 1em;
  background: var(--g);
  vertical-align: text-bottom;
  animation: cursorBlink 1s steps(2) infinite;
  box-shadow: 0 0 8px rgba(120,177,90,0.4);
}

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

/* ── Status bar ── */
.status-bar {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 22px;
  font-family: 'Share Tech Mono', var(--mono);
  font-size: 0.68rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(120,177,90,0.28);
  animation: subtitleIn 0.6s 2.8s ease-out both;
  opacity: 0;
}

.status-bar span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--g);
  box-shadow: 0 0 6px rgba(120,177,90,0.5);
  animation: dotPulse 2.5s ease-in-out infinite;
}

.status-dot.amber {
  background: #c9a227;
  box-shadow: 0 0 6px rgba(201,162,39,0.5);
}

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

/* ── Mobile ── */
@media (max-width: 600px) {
  .hero { padding: 40px 16px 36px; }
  .status-bar { gap: 16px; flex-wrap: wrap; justify-content: center; }
  .prompt-symbol { display: none; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .crt-flicker, .noise { display: none !important; }
  .cursor-block { animation: none !important; opacity: 1; }
  .pixel-logo { animation: none !important; filter: drop-shadow(0 0 12px rgba(120,177,90,0.2)); }
  .status-dot { animation: none !important; opacity: 0.8; }
  .typed-text .char { animation: none !important; opacity: 1; }
  .subtitle-row, .status-bar { animation: none !important; opacity: 1; }
}
