/* ===== RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #0066ff;
  --secondary-color: #00d4ff;
  --accent-color: #ff3366;
  --dark-bg: #0a0e27;
  --light-bg: #0f1419;
  --text-primary: #e1e7ef;
  --text-secondary: #9ca3af;
  --border-color: #2d3748;
  --gradient-1: linear-gradient(135deg, #0066ff 0%, #00d4ff 100%);
  --gradient-2: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-3: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--light-bg);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== HEADER & NAVIGATION ===== */
header {
  background: rgba(10, 14, 39, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.875rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 212, 255, 0.08);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.5px;
}

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

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

.nav-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--secondary-color);
}

/* ===== HERO SECTION ===== */
.hero {
  background: var(--dark-bg);
  color: white;
  padding: 6rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Animated grid overlay */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 102, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 102, 255, 0.06) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 40%, transparent 100%);
  pointer-events: none;
}

/* Glow orbs */
.hero::after {
  content: "";
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(0, 102, 255, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3.75rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 3rem;
  line-height: 1.8;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 4rem;
  margin: 3rem 0;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-size: 3.25rem;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  animation: statPulse 3s ease-in-out infinite;
}

.stat:nth-child(2) .stat-number { animation-delay: 1s; }
.stat:nth-child(3) .stat-number { animation-delay: 2s; }

@keyframes statPulse {
  0%, 100% { filter: drop-shadow(0 0 0px rgba(0, 212, 255, 0)); }
  50% { filter: drop-shadow(0 0 12px rgba(0, 212, 255, 0.5)); }
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.5rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 0.875rem 1.875rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.25s;
  border: 2px solid transparent;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--gradient-1);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 102, 255, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 102, 255, 0.4);
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
  background: var(--secondary-color);
  color: var(--dark-bg);
  box-shadow: 0 8px 20px rgba(0, 212, 255, 0.25);
}

/* ===== MAIN SECTIONS ===== */
main {
  background: #0f1419;
}

section {
  padding: 5rem 0;
}

section:nth-child(even) {
  background: #1a1f2e;
}

h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  text-align: center;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  position: relative;
  padding-bottom: 1rem;
}

h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--gradient-1);
  border-radius: 2px;
  margin: 0.75rem auto 0;
}

.section-intro {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

/* ===== WHAT IS PHOTONIC NPU ===== */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 2rem;
}

.content-text {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.content-text strong {
  color: var(--primary-color);
  font-weight: 600;
}

.content-features {
  display: grid;
  gap: 1.5rem;
}

.feature {
  background: #1a1f2e;
  padding: 1.5rem;
  border-radius: 12px;
  border-left: 3px solid var(--primary-color);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.feature:hover {
  transform: translateX(4px);
  box-shadow: -4px 0 20px rgba(0, 102, 255, 0.2), var(--shadow-md);
}

.feature h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

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

/* ===== COMPARISON TABLE ===== */
.comparison-table {
  overflow-x: auto;
  margin-top: 2rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #1a1f2e;
  box-shadow: var(--shadow-md);
  border-radius: 12px;
  overflow: hidden;
}

thead {
  background: var(--dark-bg);
  color: white;
}

th,
td {
  padding: 1.25rem;
  text-align: left;
}

th {
  font-weight: 600;
  font-size: 1rem;
}

td {
  border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
  background: #252b3b;
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ===== IMPACT GRID ===== */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.impact-card {
  background: #1a1f2e;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s;
}

.impact-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 102, 255, 0.2);
  border-top: 2px solid rgba(0, 212, 255, 0.3);
}

.impact-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.impact-card p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== PLAYERS GRID ===== */
.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.player-card {
  background: #1a1f2e;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s;
}

.player-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 102, 255, 0.2);
  border-top: 2px solid rgba(0, 212, 255, 0.3);
}

.player-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.player-status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.player-status.public {
  background: #2d4a35;
  color: #4ade80;
}

.player-card p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.player-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  background: rgba(45, 55, 72, 0.8);
  color: rgba(225, 231, 239, 0.75);
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===== INVESTMENT SECTION ===== */
.investment-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.investment-category {
  background: #1a1f2e;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.investment-category h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.investment-category ul {
  list-style: none;
}

.investment-category li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.investment-category li:last-child {
  border-bottom: none;
}

.investment-category li strong {
  color: var(--primary-color);
}

.investment-warning {
  background: #3d3420;
  border-left: 4px solid #ffc107;
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 3rem;
}

.investment-warning p {
  color: #f5b545;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== TIMELINE ===== */
.timeline {
  max-width: 800px;
  margin: 3rem auto 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 100%;
  background: var(--gradient-1);
}

.timeline-item {
  margin-bottom: 3rem;
  position: relative;
  padding-left: calc(50% + 40px);
}

.timeline-item:nth-child(even) {
  padding-left: 0;
  padding-right: calc(50% + 40px);
  text-align: right;
}

.timeline-year {
  display: inline-block;
  background: var(--gradient-1);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 700;
  margin-bottom: 1rem;
}

.timeline-item h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.timeline-item p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ===== CTA SECTIONS ===== */
.cta-center {
  text-align: center;
  margin-top: 3rem;
}

.cta-final {
  background: var(--dark-bg);
  color: white;
  text-align: center;
  padding: 5rem 0;
}

.cta-final h2 {
  color: white;
}

.cta-final p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
}

/* ===== FOOTER ===== */
footer {
  background: var(--dark-bg);
  color: white;
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: white;
}

.footer-section p {
  color: rgba(255, 255, 255, 0.7);
}

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

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: var(--secondary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.25rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 2rem;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    flex-direction: column;
    gap: 1rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .timeline::before {
    left: 0;
  }

  .timeline-item,
  .timeline-item:nth-child(even) {
    padding-left: 40px;
    padding-right: 0;
    text-align: left;
  }

  h2 {
    font-size: 1.85rem;
  }
}

/* ===== RELATED RESOURCES ===== */
.related-resources {
    background: #1a1f2e;
    padding: 5rem 0;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.resource-card {
    background: #0f1419;
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid #2d3748;
    text-decoration: none;
    transition: all 0.3s;
    display: block;
    position: relative;
}

.resource-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 102, 255, 0.3);
}

.resource-card h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.resource-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.resource-tag {
    display: inline-block;
    background: var(--gradient-1);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ===== PHOTONIC DEMO ANIMATIONS ===== */
.photonic-demo {
    background: #0a0e27;
    padding: 5rem 0;
}

.demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.demo-card {
    background: #1a1f2e;
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid #2d3748;
}

.demo-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.demo-visual {
    background: #0f1419;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.demo-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: center;
}

/* Waveguide Animation */
.waveguide {
    width: 100%;
    height: 60px;
    background: linear-gradient(to bottom, #2d3748 0%, #1a1f2e 50%, #2d3748 100%);
    border-radius: 30px;
    position: relative;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
}

.light-pulse {
    position: absolute;
    width: 40px;
    height: 20px;
    background: linear-gradient(90deg, transparent, #00d4ff, #0066ff, transparent);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    filter: blur(3px);
    animation: moveThroughWaveguide 3s infinite ease-in-out;
}

.pulse-2 {
    animation-delay: 1s;
}

.pulse-3 {
    animation-delay: 2s;
}

@keyframes moveThroughWaveguide {
    0% {
        left: -50px;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        left: calc(100% + 50px);
        opacity: 0;
    }
}

/* WDM Animation */
.wdm-demo {
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
}

.wdm-channel {
    width: 100%;
    height: 15px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.wdm-channel::before {
    content: '';
    position: absolute;
    width: 60px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    animation: wdmPulse 2s infinite ease-in-out;
}

.red-channel {
    background: linear-gradient(90deg, #ff0000, #ff6b6b);
}

.green-channel {
    background: linear-gradient(90deg, #00ff00, #51cf66);
}

.green-channel::before {
    animation-delay: 0.5s;
}

.blue-channel {
    background: linear-gradient(90deg, #0066ff, #4dabf7);
}

.blue-channel::before {
    animation-delay: 1s;
}

.purple-channel {
    background: linear-gradient(90deg, #9b59b6, #be4bdb);
}

.purple-channel::before {
    animation-delay: 1.5s;
}

@keyframes wdmPulse {
    0% {
        left: -60px;
    }
    100% {
        left: 100%;
    }
}

/* Race Demo Animation */
.race-demo {
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 1rem;
}

.racer {
    width: 100%;
    height: 40px;
    background: #1a1f2e;
    border-radius: 20px;
    position: relative;
    display: flex;
    align-items: center;
}

.racer-label {
    position: absolute;
    left: 10px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    z-index: 10;
}

.racer-particle {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    left: 0;
}

.photon {
    background: radial-gradient(circle, #00d4ff, #0066ff);
    box-shadow: 0 0 20px #00d4ff;
    animation: racePhoton 2s infinite ease-in-out;
}

.electron {
    background: radial-gradient(circle, #ff6b35, #ff3366);
    box-shadow: 0 0 15px #ff6b35;
    animation: raceElectron 20s infinite ease-in-out;
}

@keyframes racePhoton {
    0% {
        left: 0;
    }
    50% {
        left: calc(100% - 30px);
    }
    100% {
        left: 0;
    }
}

@keyframes raceElectron {
    0% {
        left: 0;
    }
    50% {
        left: calc(100% - 30px);
    }
    100% {
        left: 0;
    }
}

/* Matrix Demo Animation */
.matrix-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    width: 120px;
    height: 120px;
}

.matrix-cell {
    background: #2d3748;
    border-radius: 4px;
    animation: matrixPulse 3s infinite ease-in-out;
}

.matrix-cell:nth-child(1) { animation-delay: 0s; }
.matrix-cell:nth-child(2) { animation-delay: 0.1s; }
.matrix-cell:nth-child(3) { animation-delay: 0.2s; }
.matrix-cell:nth-child(4) { animation-delay: 0.3s; }
.matrix-cell:nth-child(5) { animation-delay: 0.4s; }
.matrix-cell:nth-child(6) { animation-delay: 0.5s; }
.matrix-cell:nth-child(7) { animation-delay: 0.6s; }
.matrix-cell:nth-child(8) { animation-delay: 0.7s; }
.matrix-cell:nth-child(9) { animation-delay: 0.8s; }

@keyframes matrixPulse {
    0%, 100% {
        background: #2d3748;
        box-shadow: none;
    }
    50% {
        background: #0066ff;
        box-shadow: 0 0 15px #00d4ff;
    }
}

.matrix-light {
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0,212,255,0.3), transparent);
    border-radius: 50%;
    animation: matrixGlow 3s infinite ease-in-out;
    pointer-events: none;
}

@keyframes matrixGlow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
}

/* Responsive Demo Adjustments */
@media (max-width: 768px) {
    .demo-grid {
        grid-template-columns: 1fr;
    }

    .demo-visual {
        min-height: 120px;
    }
}

/* ===== CANVAS DEMO SECTION ===== */
.canvas-demo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.canvas-demo-card {
    background: #11151f;
    border: 1px solid #2d3748;
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.canvas-demo-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 40px rgba(0, 102, 255, 0.15);
}

.canvas-wide {
    grid-column: span 1;
}

.canvas-full {
    grid-column: span 2;
}

.canvas-demo-header {
    padding: 1.25rem 1.5rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.canvas-demo-badge {
    background: rgba(0, 102, 255, 0.15);
    color: var(--secondary-color);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 212, 255, 0.25);
    white-space: nowrap;
}

.canvas-demo-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.demo-canvas {
    display: block;
    width: 100%;
    height: 220px;
    background: #080c1e;
}

.demo-canvas-tall {
    height: 280px;
}

.canvas-demo-desc {
    padding: 0.75rem 1.5rem 1.25rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
    border-top: 1px solid #1e2535;
    flex-grow: 1;
}

@media (max-width: 900px) {
    .canvas-demo-grid {
        grid-template-columns: 1fr;
    }
    .canvas-full,
    .canvas-wide {
        grid-column: span 1;
    }
}

