/* callsign design tokens */
:root {
  --void: #06060B;
  --base: #0C0C14;
  --surface: #13131F;
  --elevated: #1A1A2A;
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.14);
  --text-primary: #E8E7ED;
  --text-secondary: #8A8899;
  --text-tertiary: #5C5A6A;
  --accent: #5BF0A5;
  --accent-dim: rgba(91, 240, 165, 0.08);
  --accent-glow: rgba(91, 240, 165, 0.12);
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background-color: var(--void);
  color: var(--text-primary);
  font-family: 'DM Sans', 'Helvetica Neue', sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* noise overlay */
#noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 99;
  pointer-events: none;
  background-repeat: repeat;
  image-rendering: pixelated;
  opacity: 0.7;
}

#noise-canvas {
  display: none;
}

/* nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background-color: rgba(6, 6, 11, 0.7);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  font-family: 'DM Mono', monospace;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.nav-brand .dot {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
  font-family: 'DM Mono', monospace;
  transition: color 0.15s ease;
}

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

.btn-primary {
  background: var(--accent);
  color: var(--void);
  border: none;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.02em;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.btn-primary:hover {
  opacity: 0.9;
}

/* hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 120px 40px 80px;
  text-align: center;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.85;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-label {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 24px;
  font-weight: 500;
}

.hero-title {
  font-size: clamp(48px, 7vw, 80px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0 0 28px;
  color: var(--text-primary);
}

.hero-title .accent {
  color: var(--accent);
  text-shadow: 0 0 60px var(--accent-glow), 0 0 120px var(--accent-glow);
}

.hero-desc {
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 44px;
  font-weight: 400;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.btn-hero-primary {
  background: var(--accent);
  color: var(--void);
  border: none;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: opacity 0.15s ease;
  display: inline-block;
}

.btn-hero-primary:hover {
  opacity: 0.9;
}

.btn-hero-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: border-color 0.15s ease, color 0.15s ease;
  display: inline-block;
}

.btn-hero-secondary:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.scroll-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, transparent, var(--text-tertiary));
}

/* sections */
.section {
  padding: 80px 40px;
  max-width: 960px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--text-tertiary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0 0 40px;
  max-width: 480px;
}

.section-title .muted {
  color: var(--text-secondary);
}

.section-subtitle {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 48px;
  max-width: 480px;
}

/* feature cards */
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.feature-card {
  background: var(--base);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover {
  background: var(--surface);
  border-color: var(--border-hover);
}

.feature-label {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.feature-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  font-weight: 400;
}

/* code blocks */
.code-panel {
  background: var(--base);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.code-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.code-method {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.06em;
  font-weight: 500;
}

.code-path {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--text-tertiary);
}

.code-body {
  margin: 0;
  padding: 20px;
  font-family: 'DM Mono', monospace;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-secondary);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.api-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* flow */
.flow-section {
  padding: 48px 40px 80px;
  max-width: 960px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.flow-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.flow-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  text-align: center;
  min-width: 160px;
}

.flow-step-label {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.flow-step-sub {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 400;
}

.flow-arrow {
  width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-family: 'DM Mono', monospace;
  font-size: 14px;
}

/* cta */
.cta-section {
  padding: 96px 40px;
  text-align: center;
  position: relative;
  overflow-x: clip;
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-title {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  line-height: 1.1;
}

.cta-desc {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.btn-cta {
  background: var(--accent);
  color: var(--void);
  border: none;
  padding: 16px 40px;
  font-size: 16px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: opacity 0.15s ease;
  display: inline-block;
}

.btn-cta:hover {
  opacity: 0.9;
}

/* radar pulse canvas */
.radar-canvas {
  position: absolute;
  left: -20%;
  right: -20%;
  top: -80%;
  bottom: -40%;
  width: 140%;
  height: 220%;
  opacity: 0.85;
  pointer-events: none;
}

/* subtle waves canvas */
.waves-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.6;
  pointer-events: none;
}

/* footer */
.footer {
  padding: 20px 40px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-text {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* syntax highlighting — subtle, low-contrast palette */
.code-body .sh-string { color: #8DBFA3; }
.code-body .sh-key { color: #8A9EC2; }
.code-body .sh-number { color: #C2A96E; }
.code-body .sh-flag { color: #7A7888; }
.code-body .sh-url { color: #7AAA8E; }
.code-body .sh-comment { color: #5C5A6A; font-style: italic; }
.code-body .sh-keyword { color: #B08AAA; }
.code-body .sh-bool { color: #C2A96E; }
.code-body .sh-null { color: #C2A96E; }

/* blink cursor */
.blink {
  animation: blink-anim 1.2s step-end infinite;
}

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

/* tablet */
@media (max-width: 1024px) {
  .flow-step {
    min-width: 130px;
    padding: 16px 18px;
  }

  .flow-arrow {
    width: 32px;
  }
}

/* tablet portrait + large phones */
@media (max-width: 768px) {
  .nav {
    padding: 16px 16px;
  }

  .nav-links {
    gap: 16px;
  }

  .nav-link {
    display: none;
  }

  .hero {
    padding: 100px 20px 60px;
    min-height: calc(100vh - 60px);
    min-height: calc(100dvh - 60px);
  }

  .hero-label {
    font-size: 11px;
    letter-spacing: 0.08em;
  }

  .hero-desc {
    font-size: 16px;
    margin-bottom: 36px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    text-align: center;
    padding: 16px 24px;
    font-size: 15px;
  }

  .section {
    padding: 56px 20px;
  }

  .section-title {
    font-size: 28px;
    margin-bottom: 40px;
  }

  .section-subtitle {
    font-size: 15px;
    margin-bottom: 32px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .feature-card {
    padding: 24px 20px;
  }

  .api-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .code-body {
    font-size: 11px;
    padding: 16px;
  }

  .flow-section {
    padding: 32px 20px 56px;
  }

  .flow-row {
    flex-direction: column;
    gap: 0;
  }

  .flow-step {
    min-width: 0;
    width: 100%;
    max-width: 280px;
  }

  .flow-arrow {
    width: auto;
    height: 32px;
    transform: rotate(90deg);
  }

  .cta-section {
    padding: 64px 20px;
  }

  .cta-title {
    font-size: 32px;
  }

  .cta-desc {
    font-size: 15px;
  }

  .btn-cta {
    padding: 16px 32px;
    width: 100%;
    max-width: 320px;
    text-align: center;
  }

  .footer {
    padding: 24px 16px;
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .scroll-indicator {
    bottom: 24px;
  }
}

/* small phones */
@media (max-width: 420px) {
  .nav {
    padding: 14px 12px;
  }

  .btn-primary {
    padding: 8px 14px;
    font-size: 12px;
  }

  .hero {
    padding: 88px 16px 48px;
  }

  .hero-title {
    font-size: clamp(36px, 10vw, 48px);
  }

  .hero-desc {
    font-size: 15px;
  }

  .section {
    padding: 56px 16px;
  }

  .section-title {
    font-size: 24px;
    margin-bottom: 32px;
  }

  .feature-card {
    padding: 20px 16px;
  }

  .feature-label {
    font-size: 12px;
  }

  .feature-desc {
    font-size: 14px;
  }

  .code-body {
    font-size: 10px;
    padding: 12px;
  }

  .flow-section {
    padding: 40px 16px 56px;
  }

  .cta-section {
    padding: 64px 16px;
  }

  .cta-title {
    font-size: 28px;
  }
}
