/* ================================================================
   states.css — Per-state visual overrides
   ================================================================ */

/* ══ PRE-BOOT ══ */
  position: fixed; inset: 0; z-index: 9999;
  background-color: #000000;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  gap: 1.5rem; font-family: var(--font-mono);
  transition: opacity 0.3s ease;
}
.pre-boot-title {
  color: rgba(0, 255, 65, 0.5); font-size: 0.8rem;
  letter-spacing: 0.2em; text-transform: uppercase;
}
  appearance: none; -webkit-appearance: none;
  background-color: transparent !important;
  border: 1px solid #00ff41 !important; color: #00ff41 !important;
  padding: 1rem 2rem; font-family: var(--font-mono);
  font-size: 1rem; letter-spacing: 0.1em;
  cursor: pointer; text-transform: uppercase;
  transition: all 0.3s ease;
  outline: none;
}
  background-color: rgba(0, 255, 65, 0.12) !important;
  box-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
}

/* ══ STATE: TERMINAL ═══════════════════════════════════════════ */
[data-state="terminal"] body,
[data-state="terminal"] .top-nav { display: none; }

#terminal-screen {
  position: fixed; inset: 0; z-index: 9990;
  background: #050505;
  display: flex; flex-direction: column;
  padding: 3rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.9;
  color: #00ff41;
  overflow: hidden;
}

.terminal-line {
  opacity: 0;
  white-space: pre;
  animation: termFadeIn 0.08s ease forwards;
}

.terminal-line.dim  { color: #006614; }
.terminal-line.warn { color: #aaff00; }
.terminal-line.err  { color: #ff4444; }
.terminal-line.ok   { color: #00ff41; }

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

  --bg:       #eaf5eb;
  display: inline-block;
  width: 8px; height: 14px;
  background: #00ff41;
  vertical-align: middle;
  animation: termBlink 0.8s step-end infinite;
}
@keyframes termBlink { 50% { opacity: 0; } }

/* Terminal progress bar */
.term-bar-wrap {
  width: 100%; max-width: 500px;
  height: 4px; background: rgba(0,255,65,0.1);
  border-radius: 2px; margin: 0.5rem 0;
  overflow: hidden;
}
.term-bar-fill {
  height: 100%; background: #00ff41;
  border-radius: 2px; width: 0%;
  transition: width 0.4s ease;
  box-shadow: 0 0 8px rgba(0,255,65,0.6);
}

/* Scanlines */
#terminal-screen::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,255,65,0.015) 2px, rgba(0,255,65,0.015) 4px
  );
}

/* ══ STATE: IDE ═════════════════════════════════════════════════ */
#ide-screen {
  position: fixed; inset: 0; z-index: 9985;
  background: #0d1117;
  display: flex; flex-direction: column;
  font-family: var(--font-mono);
}

.ide-titlebar {
  height: 36px; background: #161b22;
  display: flex; align-items: center; padding: 0 1rem; gap: 0.5rem;
  border-bottom: 1px solid rgba(240,246,252,0.08);
  flex-shrink: 0;
}
.ide-dot { width: 10px; height: 10px; border-radius: 50%; }
.ide-dot.r { background: #ff5f57; }
.ide-dot.y { background: #febc2e; }
.ide-dot.g { background: #28c840; }
.ide-filename {
  margin-left: 0.75rem; font-size: 0.72rem;
  color: rgba(240,246,252,0.5); letter-spacing: 0.04em;
}
.ide-filename span { color: rgba(240,246,252,0.8); }

.ide-body {
  display: flex; flex: 1; overflow: hidden;
}

.ide-sidebar {
  width: 220px; background: #13161d;
  border-right: 1px solid rgba(240,246,252,0.06);
  padding: 0.75rem 0; flex-shrink: 0;
  font-size: 0.72rem;
}
.ide-sidebar-title {
  color: rgba(240,246,252,0.3); letter-spacing: 0.1em;
  text-transform: uppercase; padding: 0 1rem; margin-bottom: 0.5rem;
  font-size: 0.6rem;
}
.ide-file {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.3rem 1rem; color: rgba(240,246,252,0.45);
  cursor: pointer; transition: all 0.15s;
}
.ide-file.active {
  background: rgba(240,246,252,0.06);
  color: rgba(240,246,252,0.9);
}
.ide-file-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #3fb950; flex-shrink: 0;
}

.ide-editor {
  flex: 1; padding: 1.5rem; overflow: hidden;
  font-size: 0.8rem; line-height: 1.9; position: relative;
}

.ide-line {
  display: flex; gap: 1.5rem;
  opacity: 0; transform: translateY(4px);
  animation: ideLine 0.12s ease forwards;
}
@keyframes ideLine { to { opacity: 1; transform: translateY(0); } }

.ide-linenum {
  color: rgba(240,246,252,0.2);
  min-width: 24px; text-align: right; user-select: none;
  font-size: 0.72rem;
}

/* Syntax colors */
.syn-kw   { color: #ff7b72; }   /* keyword: const, function, import */
.syn-fn   { color: #d2a8ff; }   /* function names */
.syn-str  { color: #a5d6ff; }   /* strings */
.syn-num  { color: #79c0ff; }   /* numbers */
.syn-cmt  { color: #8b949e; font-style: italic; }  /* comments */
.syn-cls  { color: #ffa657; }   /* class names */
.syn-op   { color: #e6edf3; }   /* operators */
.syn-prop { color: #7ee787; }   /* properties */
.syn-punc { color: rgba(230,237,243,0.5); }

.ide-statusbar {
  height: 24px; background: #0f7b6c;
  display: flex; align-items: center; padding: 0 1rem; gap: 1.5rem;
  font-size: 0.62rem; color: rgba(255,255,255,0.75);
  flex-shrink: 0;
}
.ide-status-item { display: flex; align-items: center; gap: 0.35rem; }

.ide-build-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: rgba(13,17,23,0.92);
  backdrop-filter: blur(4px);
  gap: 1rem; opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.ide-build-overlay.show { opacity: 1; }
.ide-build-text {
  font-family: var(--font-mono); font-size: 0.85rem;
  color: #3fb950; letter-spacing: 0.1em;
}
.ide-build-bar-wrap {
  width: 320px; height: 3px;
  background: rgba(63,185,80,0.15); border-radius: 2px; overflow: hidden;
}
.ide-build-bar {
  height: 100%; background: #3fb950;
  border-radius: 2px; width: 0%;
  transition: width 0.5s ease;
  box-shadow: 0 0 10px rgba(63,185,80,0.5);
}
.ide-success {
  font-family: var(--font-mono); font-size: 1.1rem;
  color: #3fb950; display: none;
}

/* ══ STATE: ENTERPRISE ══════════════════════════════════════════ */
[data-state="enterprise"] .engine-container {
  perspective: none;
}

[data-state="enterprise"] .hero-block {
  background: var(--surface);
  border-color: var(--border);
  padding: 6rem 5rem;
}

[data-state="enterprise"] .hero-block::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent2) 0%, transparent 60%);
}

[data-state="enterprise"] .hero-eyebrow {
  font-family: var(--font-mono); font-size: 0.62rem;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--accent2); margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: 0.75rem;
}
[data-state="enterprise"] .hero-eyebrow::before {
  content: ''; width: 32px; height: 1px; background: var(--accent2);
}

[data-state="enterprise"] h1 {
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 300; line-height: 1.0;
  color: var(--text);
  font-style: italic;
}

[data-state="enterprise"] .hero-sub {
  font-size: 1.05rem; color: var(--text2);
  max-width: 540px; line-height: 1.8; margin-bottom: 3rem;
  font-weight: 300;
}

[data-state="enterprise"] .btn-primary {
  padding: 1rem 2.5rem;
  background: var(--text); color: var(--bg);
  border: none; border-radius: 0;
  font-family: var(--font-display); font-size: 1rem;
  font-style: italic; font-weight: 300;
  cursor: pointer; letter-spacing: 0.04em;
  transition: opacity 0.2s;
}
[data-state="enterprise"] .btn-primary:hover { opacity: 0.8; }

[data-state="enterprise"] .btn-ghost {
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--text3); background: transparent; border: none;
  cursor: pointer; letter-spacing: 0.06em;
  text-decoration: underline; text-underline-offset: 4px;
  transition: color 0.2s;
}
[data-state="enterprise"] .btn-ghost:hover { color: var(--text2); }

[data-state="enterprise"] .service-card {
  border-left: 3px solid transparent;
  transition: border-color 0.3s, transform 0.3s;
}
[data-state="enterprise"] .service-card:hover {
  border-left-color: var(--accent2);
  transform: translateX(4px);
}

[data-state="enterprise"] .stat-num { color: var(--accent2); }

/* The hint — appears after 5s in enterprise state */
.state-hint {
  position: fixed; bottom: 5rem; right: 2rem; z-index: 400;
  font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--text3); letter-spacing: 0.08em;
  opacity: 0; transition: opacity 0.8s ease;
  pointer-events: none;
}
.state-hint.show { opacity: 1; }
[data-state="enterprise"] .state-hint { color: var(--accent2); }

/* Auto-progress bar at bottom of screen */
.auto-progress {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9000;
  height: 2px; background: transparent; pointer-events: none;
}
.auto-progress-fill {
  height: 100%; width: 0%;
  background: var(--accent2);
  transition: width linear;
}

/* ══ STATE: EVOLUTION ════════════════════════════════════════════ */
[data-state="evolution"] .hero-block {
  border-color: rgba(249,115,22,0.2);
  background: var(--surface);
}
[data-state="evolution"] h1 {
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 70%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Crack effect */
[data-state="evolution"] .engine-container::after {
  content: '';
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: crackPulse 1.5s ease infinite;
  z-index: 100;
}
@keyframes crackPulse {
  0%,100% { opacity: 0.3; transform: scaleX(0.8); }
  50%      { opacity: 1;   transform: scaleX(1); }
}

[data-state="evolution"] .anomaly-msg {
  display: block !important;
}

.anomaly-msg {
  display: none;
  position: fixed; bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 0.65rem;
  color: var(--accent); letter-spacing: 0.15em;
  text-transform: uppercase; z-index: 400;
  animation: anomalyPulse 1s ease infinite;
}
@keyframes anomalyPulse { 50% { opacity: 0.4; } }

/* ══ STATE: CYBERPUNK ════════════════════════════════════════════ */
[data-state="cyberpunk"] .engine-container {
  perspective: var(--perspective);
  transform-style: preserve-3d;
}

[data-state="cyberpunk"] .hero-block {
  transform: translateZ(var(--z));
  border-color: var(--border);
  position: relative; overflow: hidden;
}

[data-state="cyberpunk"] .hero-block::before {
  content: '';
  position: absolute; top: 0; left: -100%; right: 100%;
  height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: scanLine 4s linear infinite;
}
@keyframes scanLine { to { left: 200%; right: -100%; } }

[data-state="cyberpunk"] h1 {
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 50%, var(--accent2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-state="cyberpunk"] .btn-primary {
  padding: 1rem 2.5rem;
  background: transparent; border: 1px solid var(--accent);
  color: var(--accent); border-radius: var(--r);
  font-family: var(--font-mono); font-size: 0.78rem;
  letter-spacing: 0.12em; cursor: pointer;
  position: relative; overflow: hidden; transition: all 0.3s;
}
[data-state="cyberpunk"] .btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: var(--accent); transform: translateX(-101%);
  transition: transform 0.3s ease;
}
[data-state="cyberpunk"] .btn-primary:hover::before { transform: translateX(0); }
[data-state="cyberpunk"] .btn-primary span { position: relative; z-index: 1; }
[data-state="cyberpunk"] .btn-primary:hover span { color: #000; }

[data-state="cyberpunk"] .service-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(249,115,22,0.12);
}

[data-state="cyberpunk"] .stat-num {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Particle canvas */
#particle-canvas {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 1;
  opacity: 0; transition: opacity 1.5s ease;
}
[data-state="cyberpunk"] #particle-canvas { opacity: 1; }

/* Custom cursor */
#custom-cursor {
  display: none;
  position: fixed; z-index: 99999;
  width: 16px; height: 16px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s;
  mix-blend-mode: exclusion;
}
[data-state="cyberpunk"] #custom-cursor { display: block; }
[data-state="cyberpunk"] body { cursor: none; }

/* Cyber terminal readout */
.cyber-hud {
  display: none;
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  font-family: var(--font-mono); font-size: 0.58rem;
  color: var(--accent); opacity: 0.4; text-align: right;
  line-height: 1.9; pointer-events: none; z-index: 400;
}
[data-state="cyberpunk"] .cyber-hud { display: block; }

/* Now cta glows */
[data-state="cyberpunk"] .nav-cta {
  background: var(--accent); color: #000;
  animation: ctaGlow 2s ease infinite;
}
@keyframes ctaGlow {
  0%,100% { box-shadow: 0 0 12px rgba(249,115,22,0.4); }
  50%      { box-shadow: 0 0 30px rgba(249,115,22,0.7), 0 0 60px rgba(34,211,238,0.2); }
}
