/* NDRC Labs Promo — Main Styles */
/* WarGames/NORAD 80s Supercomputer Aesthetic */

@font-face {
  font-family: 'VT323';
  src: url('../assets/fonts/VT323-Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* === Reset & Base === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --amber: #ffb000;
  --amber-dim: #996a00;
  --amber-glow: #ffb00066;
  --amber-dark: #3d2a00;
  --green: #33ff33;
  --green-dim: #1a991a;
  --green-glow: #33ff3344;
  --red: #ff3333;
  --red-dim: #991a1a;
  --cyan: #33ccff;
  --bg: #0a0a0a;
  --bg-panel: #0d0d0d;
  --bg-card: #111;
  --border: #2a1f00;
  --border-bright: #4d3800;
  --text-dim: #664800;
  --font-terminal: 'VT323', 'Courier New', monospace;
  --font-mono: 'Courier New', 'Consolas', monospace;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-mono);
  background: var(--bg);
  color: var(--amber);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
}

::selection {
  background: var(--amber);
  color: var(--bg);
}

/* === Typography === */
h1, h2, h3, h4 {
  font-family: var(--font-terminal);
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  text-shadow: 0 0 20px var(--amber-glow), 0 0 40px var(--amber-glow);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--amber);
  margin-bottom: 1rem;
  text-shadow: 0 0 10px var(--amber-glow);
}

h3 {
  font-size: 1.3rem;
  color: var(--amber-dim);
}

p {
  font-size: 0.95rem;
  max-width: 70ch;
  margin-left: auto;
  margin-right: auto;
}

a {
  color: var(--amber);
  text-decoration: none;
  border-bottom: 1px solid var(--amber-dim);
  transition: color 0.2s, border-color 0.2s;
}

a:hover {
  color: var(--green);
  border-color: var(--green);
}

/* === Layout === */
.page-wrapper {
  position: relative;
  z-index: 1;
}

section {
  min-height: 100vh;
  padding: 6rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.section-inner {
  max-width: 1200px;
  width: 100%;
}

/* === Section Header === */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header .classification {
  font-family: var(--font-terminal);
  font-size: 0.8rem;
  color: var(--red);
  letter-spacing: 0.3em;
  margin-bottom: 0.5rem;
  opacity: 0.8;
}

.section-header .divider {
  width: 200px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--amber-dim), transparent);
  margin: 1rem auto;
}

/* === Hero Section === */
#hero {
  text-align: center;
  min-height: 100vh;
}

#hero h1 {
  margin-bottom: 1rem;
}

#hero .subtitle {
  font-family: var(--font-terminal);
  font-size: clamp(1rem, 2vw, 1.5rem);
  color: var(--amber-dim);
  letter-spacing: 0.3em;
  margin-bottom: 2.5rem;
}

#hero .description {
  font-size: 1rem;
  color: var(--amber-dim);
  max-width: 65ch;
  margin: 0 auto 3rem;
  line-height: 1.8;
}

.cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.1em;
  background: var(--amber);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

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

/* === Coming Soon === */
#coming-soon {
  min-height: auto;
  padding: 4rem 2rem;
  background: var(--bg);
  border-top: 1px solid var(--border-bright);
  border-bottom: 1px solid var(--border-bright);
}

.coming-soon-border {
  width: 300px;
  max-width: 80%;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--amber), transparent);
  margin: 0 auto;
}

.coming-soon-label {
  font-family: var(--font-terminal);
  font-size: 0.8rem;
  color: var(--red);
  letter-spacing: 0.4em;
  margin: 1.5rem 0 0.5rem;
}

.coming-soon-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: 0.3em;
  margin-bottom: 1.5rem;
  animation: coming-soon-pulse 3s ease-in-out infinite;
}

@keyframes coming-soon-pulse {
  0%, 100% { text-shadow: 0 0 10px var(--amber-glow), 0 0 20px var(--amber-glow); }
  50% { text-shadow: 0 0 20px var(--amber-glow), 0 0 40px var(--amber-glow), 0 0 60px rgba(255, 176, 0, 0.15); }
}

/* === Teaser Video === */
#teaser {
  min-height: auto;
  padding: 5rem 0 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border-bright);
}

.teaser-video-frame {
  width: 100%;
  margin: 2.5rem 0 0;
  background: #000;
  border-top: 1px solid var(--amber-dim);
  border-bottom: 1px solid var(--amber-dim);
  box-shadow:
    0 0 30px rgba(255, 176, 0, 0.15),
    inset 0 0 60px rgba(0, 0, 0, 0.8);
  position: relative;
}

.teaser-video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #000;
  object-fit: cover;
}

/* === Stats Bar === */
#stats {
  min-height: auto;
  padding: 3rem 2rem;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.stat-item {
  text-align: center;
  padding: 1.5rem 2rem;
  border: 1px solid var(--border);
  background: var(--bg);
  min-width: 160px;
  flex: 1;
}

.stat-number {
  font-family: var(--font-terminal);
  font-size: 2.5rem;
  color: var(--amber);
  text-shadow: 0 0 15px var(--amber-glow);
  display: block;
}

.stat-label {
  font-family: var(--font-terminal);
  font-size: 0.8rem;
  color: var(--amber-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 0.25rem;
  display: block;
}

/* === Feature Cards === */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 2rem;
  position: relative;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
  border-color: var(--amber-dim);
  box-shadow: 0 0 20px rgba(255, 176, 0, 0.05);
}

.feature-card .card-icon {
  font-family: var(--font-terminal);
  font-size: 1.5rem;
  color: var(--green);
  margin-bottom: 1rem;
  white-space: pre;
  line-height: 1.2;
}

.feature-card h3 {
  color: var(--amber);
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.feature-card p {
  color: var(--amber-dim);
  font-size: 0.85rem;
  line-height: 1.7;
}

/* === Network Topology === */
#topology {
  background: var(--bg-panel);
}

.topology-container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  overflow-x: auto;
}

/* Mermaid diagram overrides */
.topology-container .mermaid {
  display: flex;
  justify-content: center;
  background: transparent;
}

.topology-container .mermaid svg {
  max-width: 100%;
  height: auto;
}

/* Override mermaid subgraph labels to match theme */
.topology-container .mermaid .cluster-label {
  font-family: var(--font-terminal) !important;
}

.topology-container .mermaid .nodeLabel {
  font-family: var(--font-terminal) !important;
}

.topology-container .mermaid .edgePath path {
  stroke-dasharray: 6 4;
}

/* === Operations / Scenarios === */
.ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.op-card {
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 0;
  overflow: hidden;
}

.op-card-header {
  background: var(--bg-panel);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.op-card-header h3 {
  font-family: var(--font-terminal);
  color: var(--amber);
  font-size: 1rem;
  letter-spacing: 0.1em;
}

.op-difficulty {
  font-family: var(--font-terminal);
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid;
  letter-spacing: 0.1em;
}

.op-difficulty.beginner { color: var(--green); border-color: var(--green-dim); }
.op-difficulty.intermediate { color: var(--amber); border-color: var(--amber-dim); }
.op-difficulty.advanced { color: #ff8800; border-color: #884400; }
.op-difficulty.expert { color: var(--red); border-color: var(--red-dim); }

.op-card-body {
  padding: 1.5rem;
}

.op-card-body .op-meta {
  font-family: var(--font-terminal);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.op-card-body .op-meta span {
  margin-right: 1.5rem;
}

.op-card-body .op-synopsis {
  font-size: 0.85rem;
  color: var(--amber-dim);
  line-height: 1.7;
}

.op-card-body .op-chain {
  font-family: var(--font-terminal);
  font-size: 0.8rem;
  color: var(--green);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* === Systems Grid === */
.systems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.system-item {
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 1.25rem;
  font-family: var(--font-terminal);
}

.system-item .sys-name {
  color: var(--amber);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.system-item .sys-dept {
  color: var(--text-dim);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.system-item .sys-stack {
  color: var(--amber-dim);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.system-item .sys-stack {
  border-bottom: none;
}

/* === BEACON Section === */
#beacon {
  background: var(--bg-panel);
}

.beacon-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.beacon-specs {
  font-family: var(--font-terminal);
}

.beacon-specs table {
  width: 100%;
  border-collapse: collapse;
}

.beacon-specs td {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.beacon-specs td:first-child {
  color: var(--text-dim);
  width: 40%;
}

.beacon-specs td:last-child {
  color: var(--amber);
}

.beacon-ascii {
  font-family: 'Courier New', Consolas, monospace;
  font-size: 0.8rem;
  color: var(--green);
  line-height: 1.4;
  white-space: pre;
  text-align: center;
  text-shadow: 0 0 5px var(--green-glow);
}

/* === CLF Section === */
#clf {
  background: var(--bg);
  border-top: 1px solid var(--green-dim);
  border-bottom: 1px solid var(--green-dim);
}

#clf h2, #clf h3 {
  color: var(--green);
  text-shadow: 0 0 10px var(--green-glow);
}

#clf .section-header .classification {
  color: var(--green);
}

#clf .feature-card {
  border-color: #1a3d1a;
}

#clf .feature-card:hover {
  border-color: var(--green-dim);
  box-shadow: 0 0 20px rgba(51, 255, 51, 0.05);
}

#clf .feature-card h3 {
  color: var(--green);
}

#clf .feature-card p {
  color: var(--green-dim);
}

.clf-quote {
  font-family: var(--font-terminal);
  font-size: 1.5rem;
  color: var(--green);
  text-align: center;
  margin: 2rem 0;
  text-shadow: 0 0 15px var(--green-glow);
  letter-spacing: 0.1em;
}

/* === Tech Stack === */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.tech-item {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-terminal);
}

.tech-item .tech-label {
  color: var(--text-dim);
  font-size: 0.8rem;
  min-width: 120px;
  letter-spacing: 0.1em;
}

.tech-item .tech-value {
  color: var(--amber);
  font-size: 0.9rem;
}

/* === CTA Section === */
#cta {
  min-height: auto;
  padding: 6rem 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

#cta p {
  margin: 0 auto;
}

.cta-prompt {
  font-family: var(--font-terminal);
  font-size: 1.5rem;
  color: var(--amber);
  margin-top: 2rem;
}

/* === Scroll Animations === */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* === Redacted Text === */
.redacted {
  background: var(--amber);
  color: var(--amber);
  padding: 0 0.3em;
  cursor: default;
  user-select: none;
  transition: background 0.3s;
}

.redacted:hover {
  background: transparent;
  color: var(--amber);
}

/* === Terminal Panel === */
.terminal-panel {
  border: 1px solid var(--border);
  background: var(--bg);
  font-family: var(--font-terminal);
}

.terminal-panel .panel-header {
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

.terminal-panel .panel-body {
  padding: 1.5rem;
}

/* === Responsive === */
@media (max-width: 900px) {
  section {
    padding: 4rem 1.5rem;
  }

  .beacon-layout {
    grid-template-columns: 1fr;
  }

  .beacon-ascii {
    font-size: 0.5rem;
  }

  .stat-item {
    min-width: 120px;
    padding: 1rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .features-grid,
  .ops-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

  .systems-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

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

@media (max-width: 600px) {
  section {
    padding: 3rem 1rem;
    min-height: auto;
  }

  #hero {
    min-height: 100vh;
    padding: 4rem 1rem;
  }

  h1 {
    letter-spacing: 0.08em;
  }

  h2 {
    letter-spacing: 0.08em;
  }

  .section-header {
    margin-bottom: 2rem;
  }

  .features-grid,
  .ops-grid {
    grid-template-columns: 1fr;
  }

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

  .stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  .stat-item {
    min-width: 0;
    padding: 0.75rem 0.5rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
  }

  /* Op card header stacks on narrow screens */
  .op-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .op-card-body .op-meta span {
    display: block;
    margin-right: 0;
    margin-bottom: 0.25rem;
  }

  /* BEACON ASCII art responsive */
  .beacon-ascii {
    font-size: 0.42rem;
    padding: 1.5rem 1rem !important;
    overflow-x: auto;
  }

  /* Tech items stack label above value on mobile */
  .tech-item {
    flex-direction: column;
    gap: 0.25rem;
  }

  .tech-item .tech-label {
    min-width: 0;
  }

  /* Terminal panels tighter on mobile */
  .terminal-panel .panel-body {
    padding: 1rem;
  }

  /* Feature cards tighter padding */
  .feature-card {
    padding: 1.5rem;
  }

  /* CTA section */
  .cta-prompt {
    font-size: 1.1rem;
    word-break: break-all;
  }

  /* CLF quote */
  .clf-quote {
    font-size: 1.1rem;
  }

  /* Radar smaller on mobile */
  .radar-container {
    width: 150px;
    height: 150px;
  }
}

/* Extra small screens (< 380px) */
@media (max-width: 380px) {
  section {
    padding: 2.5rem 0.75rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-number {
    font-size: 1.3rem;
  }

  .beacon-ascii {
    font-size: 0.35rem;
  }

  h1 {
    letter-spacing: 0.05em;
  }
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}
