/* =========================================================
   GLOBAL RESET + BASE
========================================================= */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: #05060a;
  color: #e8ecf7;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}


/* =========================================================
   BOOT SCREEN
========================================================= */

#boot-screen {
  position: fixed;
  inset: 0;
  background: #000;
  color: #00ffea;
  font-family: "Consolas", monospace;
  padding: 40px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.boot-console {
  max-width: 700px;
  width: 100%;
}

.boot-line {
  opacity: 0.85;
  margin-bottom: 6px;
}

.boot-final {
  margin-top: 12px;
  color: #00ffaa;
  font-weight: bold;
}

/* =========================================================
   CURSOR GLOW
========================================================= */

#cursor-glow {
  position: fixed;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(127, 181, 255, 0.25), transparent 70%);
  pointer-events: none;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

/* =========================================================
   SOUND INDICATOR
========================================================= */

#sound-indicator {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(12, 16, 32, 0.8);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  color: #9fb4ff;
  border: 1px solid rgba(159, 180, 255, 0.25);
  z-index: 20;
}

/* =========================================================
   GLOBAL PARTICLES
========================================================= */

#global-particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* =========================================================
   HEADER + NAV
========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(5, 6, 10, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #9fb4ff;
  text-decoration: none;
  font-size: 14px;
}

.nav a {
  margin-left: 18px;
  color: #c7d2ff;
  text-decoration: none;
  font-size: 14px;
  transition: 0.2s ease;
}

.nav a:hover {
  color: #ffffff;
}

/* =========================================================
   HERO
========================================================= */

.hero {
  padding: 80px 24px 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-inner {
  max-width: 700px;
}

.hero-title {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.15;
  color: #f5f7ff;
}

.hero-sub {
  margin-top: 16px;
  font-size: 17px;
  color: #a9b4d9;
  max-width: 520px;
}

.hero-actions {
  margin-top: 26px;
  display: flex;
  gap: 14px;
}

/* Buttons */
.btn-primary,
.btn-ghost {
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #4f8cff, #7f5bff);
  color: #fff;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(79, 140, 255, 0.35);
}

.btn-ghost {
  background: rgba(12, 16, 32, 0.8);
  border: 1px solid rgba(159, 180, 255, 0.35);
  color: #c7d2ff;
}

.btn-ghost:hover {
  background: rgba(18, 24, 48, 0.95);
}
/* =========================================================
   SECTION WRAPPER
========================================================= */

.section {
  padding: 80px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 14px;
  color: #f5f7ff;
}

.section-sub {
  font-size: 16px;
  color: #a9b4d9;
  max-width: 600px;
  margin-bottom: 40px;
}

/* =========================================================
   REVEAL ANIMATION
========================================================= */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   MACHINE SECTION
========================================================= */

#machine {
  position: relative;
  padding: 100px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

#machine-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.machine-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 26px;
}

.machine-node {
  background: rgba(12, 16, 32, 0.85);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(159, 180, 255, 0.15);
  color: #c7d2ff;
  font-size: 15px;
  text-align: center;
  transition: 0.25s ease;
}

.machine-node:hover {
  background: rgba(18, 24, 48, 0.95);
  transform: translateY(-4px);
}

/* =========================================================
   TOOLS SECTION
========================================================= */

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 26px;
}

.tool-card {
  background: rgba(12, 16, 32, 0.85);
  padding: 24px;
  border-radius: 14px;
  border: 1px solid rgba(159, 180, 255, 0.15);
  transition: 0.25s ease;
}

.tool-card:hover {
  background: rgba(18, 24, 48, 0.95);
  transform: translateY(-4px);
}

.tool-title {
  font-size: 18px;
  font-weight: 600;
  color: #f5f7ff;
  margin-bottom: 10px;
}

.tool-desc {
  font-size: 14px;
  color: #a9b4d9;
  line-height: 1.5;
}

/* =========================================================
   PROCESS SECTION
========================================================= */

.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 26px;
}

.process-step {
  background: rgba(12, 16, 32, 0.85);
  padding: 24px;
  border-radius: 14px;
  border: 1px solid rgba(159, 180, 255, 0.15);
  transition: 0.25s ease;
}

.process-step:hover {
  background: rgba(18, 24, 48, 0.95);
  transform: translateY(-4px);
}

.process-step-title {
  font-size: 18px;
  font-weight: 600;
  color: #f5f7ff;
  margin-bottom: 10px;
}

.process-step-desc {
  font-size: 14px;
  color: #a9b4d9;
  line-height: 1.5;
}

/* =========================================================
   CONTACT SECTION
========================================================= */

.contact-box {
  background: rgba(12, 16, 32, 0.85);
  padding: 40px;
  border-radius: 16px;
  border: 1px solid rgba(159, 180, 255, 0.15);
  max-width: 700px;
  margin: 0 auto;
}

.contact-title {
  font-size: 26px;
  font-weight: 700;
  color: #f5f7ff;
  margin-bottom: 14px;
}

.contact-sub {
  font-size: 15px;
  color: #a9b4d9;
  margin-bottom: 26px;
}

.contact-btn {
  padding: 14px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4f8cff, #7f5bff);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.25s ease;
}

.contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(79, 140, 255, 0.35);
}
/* =========================================================
   FOOTER
========================================================= */

.footer {
  padding: 40px 24px;
  text-align: center;
  color: #7f8bb3;
  font-size: 14px;
  margin-top: 80px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer a {
  color: #9fb4ff;
  text-decoration: none;
}

.footer a:hover {
  color: #ffffff;
}

/* =========================================================
   DIAGNOSTIC PAGE
========================================================= */

.diagnostic-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 24px;
}

.diagnostic-title {
  font-size: 32px;
  font-weight: 700;
  color: #f5f7ff;
  margin-bottom: 20px;
}

.diagnostic-sub {
  font-size: 16px;
  color: #a9b4d9;
  margin-bottom: 40px;
}

.question-block {
  background: rgba(12, 16, 32, 0.85);
  padding: 24px;
  border-radius: 14px;
  border: 1px solid rgba(159, 180, 255, 0.15);
  margin-bottom: 26px;
}

.question-title {
  font-size: 18px;
  font-weight: 600;
  color: #f5f7ff;
  margin-bottom: 12px;
}

.option {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.option input {
  accent-color: #7f5bff;
}

.option label {
  font-size: 15px;
  color: #c7d2ff;
}

/* =========================================================
   RESULTS PAGE
========================================================= */

.results-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 24px;
}

.results-title {
  font-size: 32px;
  font-weight: 700;
  color: #f5f7ff;
  margin-bottom: 20px;
}

.results-score {
  font-size: 48px;
  font-weight: 700;
  color: #7f5bff;
  margin-bottom: 20px;
}

.tier-label {
  font-size: 20px;
  font-weight: 600;
  color: #c7d2ff;
  margin-bottom: 40px;
}

.pillar {
  margin-bottom: 20px;
}

.pillar-title {
  font-size: 16px;
  font-weight: 600;
  color: #f5f7ff;
  margin-bottom: 6px;
}

.bar-track {
  width: 100%;
  height: 10px;
  background: rgba(159, 180, 255, 0.15);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(135deg, #4f8cff, #7f5bff);
  border-radius: 999px;
}

/* =========================================================
   MODAL
========================================================= */

#emailModal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-box {
  background: rgba(12, 16, 32, 0.95);
  padding: 40px;
  border-radius: 16px;
  border: 1px solid rgba(159, 180, 255, 0.25);
  max-width: 420px;
  width: 100%;
  text-align: center;
}

.modal-title {
  font-size: 22px;
  font-weight: 700;
  color: #f5f7ff;
  margin-bottom: 14px;
}

.modal-sub {
  font-size: 15px;
  color: #a9b4d9;
  margin-bottom: 26px;
}

.modal-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(159, 180, 255, 0.25);
  background: rgba(5, 6, 10, 0.8);
  color: #fff;
  margin-bottom: 20px;
}

.modal-btn {
  padding: 12px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4f8cff, #7f5bff);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: 0.25s ease;
}

.modal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(79, 140, 255, 0.35);
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 768px) {
  .hero-title {
    font-size: 32px;
  }

  .hero-sub {
    font-size: 15px;
  }

  .section-title {
    font-size: 26px;
  }

  .contact-box {
    padding: 28px;
  }

  .modal-box {
    padding: 28px;
  }
}
/* =========================================================
   FINAL LAYOUT FIXES + SAFETY RULES
========================================================= */

.container,
.nav-container,
.hero,
.section,
#machine,
.results-container,
.diagnostic-container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  cursor: pointer;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
}

input,
textarea {
  font-family: inherit;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  overflow-x: hidden;
}

/* Prevent infinite scroll caused by missing height rules */
section,
div,
header,
footer {
  position: relative;
}

/* Smooth fade-in for all sections */
section,
.hero,
.footer {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Fix for mobile overflow */
@media (max-width: 480px) {
  body {
    padding: 0;
    margin: 0;
  }

  .nav-container {
    padding: 14px 16px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-sub {
    font-size: 14px;
  }

  .section {
    padding: 60px 20px;
  }
}
/* =========================================================
   FINAL LAYOUT FIXES + SAFETY RULES
========================================================= */

#global-particles,
canvas {
  max-width: 100%;
  overflow: hidden;
  display: block;
}

canvas {
  position: fixed;
  left: 0;
  top: 0;
}

html, body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden !important;
}

.hero,
.nav-container,
.container,
.section,
#machine,
.results-container,
.diagnostic-container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  cursor: pointer;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
}

input,
textarea {
  font-family: inherit;
}

/* Prevent infinite scroll caused by missing height rules */
section,
div,
header,
footer {
  position: relative;
}

/* Smooth fade-in for all sections */
section,
.hero,
.footer {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Fix for mobile overflow */
@media (max-width: 480px) {
  body {
    padding: 0;
    margin: 0;
  }

  .nav-container {
    padding: 14px 16px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-sub {
    font-size: 14px;
  }

  .section {
    padding: 60px 20px;
  }
}
/* =========================================================
   CINEMATIC HERO EFFECTS
========================================================= */

.hero {
  position: relative;
  overflow: hidden;
}

.hero-light {
  position: absolute;
  top: -20%;
  left: -20%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(127,181,255,0.12), transparent 60%);
  pointer-events: none;
  animation: heroLightPulse 6s ease-in-out infinite;
  z-index: 0;
}

@keyframes heroLightPulse {
  0%, 100% { opacity: 0.25; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.15); }
}

.hero-scan {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(127,181,255,0.08) 50%,
    transparent 100%
  );
  animation: heroScan 4s linear infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes heroScan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

.hero-ripple {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(127,181,255,0.25), transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: ripplePulse 3s ease-out infinite;
  z-index: 2;
}

@keyframes ripplePulse {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.4; }
  100% { transform: translate(-50%, -50%) scale(1.4); opacity: 0; }
}
/* =========================================================
   FUTURE GRID + TIMELINE
========================================================= */

.future-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 26px;
  z-index: 2;
}

.future-node {
  background: rgba(12,16,32,0.85);
  padding: 24px;
  border-radius: 14px;
  border: 1px solid rgba(159,180,255,0.15);
  position: relative;
  overflow: hidden;
  transition: 0.25s ease;
}

.future-node:hover {
  transform: translateY(-4px);
  background: rgba(18,24,48,0.95);
}

.future-node::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(127,181,255,0.15), transparent 70%);
  opacity: 0;
  transition: 0.3s ease;
}

.future-node:hover::after {
  opacity: 1;
}

.timeline {
  position: relative;
  margin-top: 60px;
  padding-left: 20px;
  border-left: 2px solid rgba(127,181,255,0.25);
}

.timeline-step {
  margin-bottom: 40px;
  position: relative;
}

.timeline-step::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 4px;
  width: 14px;
  height: 14px;
  background: #7f5bff;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(127,91,255,0.6);
}
/* =========================================================
   DIAGNOSTIC SHELL + RADAR
========================================================= */

.diagnostic-shell {
  background: rgba(5,6,10,0.9);
  border: 1px solid rgba(127,181,255,0.25);
  padding: 24px;
  border-radius: 12px;
  font-family: Consolas, monospace;
  color: #9fb4ff;
  position: relative;
  overflow: hidden;
}

.diagnostic-line {
  opacity: 0;
  animation: diagLine 0.6s ease forwards;
}

@keyframes diagLine {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.scan-radar {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(127,181,255,0.08), transparent 70%);
  pointer-events: none;
  animation: radarSweep 4s linear infinite;
}

@keyframes radarSweep {
  0% { transform: rotate(0deg); opacity: 0.25; }
  100% { transform: rotate(360deg); opacity: 0.25; }
}

.scan-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(127,181,255,0.25);
  animation: ringPulse 3s ease-out infinite;
}

@keyframes ringPulse {
  0% { transform: scale(0.6); opacity: 0.4; }
  100% { transform: scale(1.4); opacity: 0; }
}
/* =========================================================
   MACHINE MAP LINES
========================================================= */

.machine-line {
  stroke: rgba(127,181,255,0.35);
  stroke-width: 2;
  stroke-linecap: round;
  animation: lineGlow 2s ease-in-out infinite;
}

@keyframes lineGlow {
  0%, 100% { stroke-opacity: 0.3; }
  50% { stroke-opacity: 0.9; }
}

.machine-connector {
  fill: #7f5bff;
  filter: drop-shadow(0 0 6px rgba(127,91,255,0.6));
}
/* =========================================================
   CINEMATIC TRANSITIONS
========================================================= */

.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-left {
  opacity: 0;
  transform: translateX(-20px);
  transition: 0.6s ease;
}

.fade-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-right {
  opacity: 0;
  transform: translateX(20px);
  transition: 0.6s ease;
}

.fade-right.visible {
  opacity: 1;
  transform: translateX(0);
}
/* =========================================================
   PARTICLE LAYERS
========================================================= */

.particle-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(127,181,255,0.8);
  border-radius: 50%;
  animation: particleFloat 6s linear infinite;
}

@keyframes particleFloat {
  0% { transform: translateY(0); opacity: 0.8; }
  100% { transform: translateY(-120vh); opacity: 0; }
}

