@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap');

:root {
  --bg-deep: #050505;
  --bg-surface: #0a0a0a;
  --accent-blue: #00d2ff;
  --accent-green: #39ff14;
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);
  --blur: 20px;
  --transition-smooth: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Glassmorphism Utility */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
}

/* Animations */
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.05); opacity: 0.8; }
  100% { transform: scale(1); opacity: 0.5; }
}

@keyframes data-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: var(--transition-smooth);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Logic Flow / Signal Animations */
.signal-path {
  position: relative;
  height: 2px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.signal-path::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--accent-blue), var(--accent-green), transparent);
  animation: signal-flow 3s infinite linear;
}

@keyframes signal-flow {
  0% { left: -100%; }
  100% { left: 100%; }
}

.node {
  padding: 1.5rem;
  border-radius: 50%;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 800;
  border: 2px solid var(--glass-border);
  position: relative;
  z-index: 2;
}

.node.engine {
  border-color: var(--accent-green);
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.2);
  background: rgba(57, 255, 20, 0.05);
  animation: pulse 4s infinite ease-in-out;
}

/* Typography Gradient */
.text-gradient {
  background: linear-gradient(90deg, var(--text-primary), var(--accent-blue));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.5rem;
  }
}

section {
  padding: 100px 0;
  position: relative;
}

/* Header */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 0;
  transition: var(--transition-smooth);
}

header.scrolled {
  background: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  border-bottom: 1px solid var(--glass-border);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-decoration: none;
}

.logo span {
  color: var(--accent-blue);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* Hero */
#hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: radial-gradient(circle at center, #0a0a0a 0%, #050505 100%);
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.4;
  object-fit: cover;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.hero-tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(0, 210, 255, 0.1);
  border: 1px solid rgba(0, 210, 255, 0.2);
  border-radius: 100px;
  color: var(--accent-blue);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 2rem;
  letter-spacing: 0.1em;
}

h1 {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.04em;
}

.hero-desc {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  .hero-desc {
    font-size: 1.1rem;
    margin-bottom: 2rem;
  }
}

/* Modular Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.module {
  padding: 2.5rem;
  text-align: left;
}

.module-icon {
  width: 48px;
  height: 48px;
  background: rgba(57, 255, 20, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--accent-green);
}

.module h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.module p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-deep);
}

.btn-primary:hover {
  background: var(--accent-blue);
  color: var(--text-primary);
  box-shadow: 0 0 30px rgba(0, 210, 255, 0.3);
}

/* Performance Matrix */
.matrix-item {
  margin-bottom: 2rem;
}

.matrix-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
  width: 0;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.5);
  transition: width 1.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.reveal.active .progress-fill.fill-roas { width: 92%; }
.reveal.active .progress-fill.fill-spo { width: 85%; }
.reveal.active .progress-fill.fill-match { width: 96%; }

/* Data Pulse Accents */
.pulse-line {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
  width: 100%;
  opacity: 0.2;
}

/* Footer */
footer {
  padding: 80px 0;
  border-top: 1px solid var(--glass-border);
  background: var(--bg-surface);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 3rem;
}

.footer-logo-part {
  flex: 1;
  min-width: 250px;
}

.footer-links-part {
  display: flex;
  gap: 4rem;
}

.footer-column h4 {
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.footer-column ul {
  list-style: none;
}

.footer-column li {
  margin-bottom: 0.75rem;
}

.footer-column a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}

.footer-column a:hover {
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .nav-links { 
    display: none; 
  }
  
  header .container {
    justify-content: center;
  }

  section {
    padding: 60px 0;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .module {
    padding: 1.5rem;
  }

  .footer-links-part {
    gap: 2rem;
    flex-direction: column;
  }
}

/* Intelligence Layer Diagram Responsive */
.flow-diagram {
  display: flex; 
  justify-content: space-around; 
  align-items: center; 
  margin-top: 4rem; 
  flex-wrap: wrap; 
  gap: 2rem;
}

@media (max-width: 768px) {
  .flow-diagram {
    flex-direction: column;
    gap: 1rem;
  }
  .flow-diagram div[style*="flex: 1"] {
    width: 2px;
    height: 40px;
    background: linear-gradient(180deg, var(--accent-blue), var(--accent-green));
  }
}
