/* CodeGraph - Obsidian Graph Experience */

:root {
  --bg-deep-obsidian: #020617;
  --bg-surface: rgba(10, 18, 38, 0.74);
  --bg-surface-strong: rgba(12, 22, 48, 0.92);
  --accent-neural-green: #22c55e;
  --accent-graph-purple: #8b5cf6;
  --accent-cyan: #2dd4bf;
  --text-primary: #f8fafc;
  --text-secondary: #9fb0c9;
  --text-muted: #7686a3;
  --glass-border: rgba(120, 141, 178, 0.26);
  --glass-border-strong: rgba(135, 160, 208, 0.36);
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Fira Code', 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: radial-gradient(circle at 18% 10%, rgba(45, 212, 191, 0.12), transparent 38%),
              radial-gradient(circle at 82% 14%, rgba(139, 92, 246, 0.14), transparent 40%),
              var(--bg-deep-obsidian);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

canvas#background-graph {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.55;
  pointer-events: none;
}

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

.container {
  width: min(1160px, 100% - 3rem);
  margin: 0 auto;
}

section {
  padding: 6rem 0;
  scroll-margin-top: 5.5rem;
}

.glass {
  background: linear-gradient(155deg, rgba(15, 25, 50, 0.9), rgba(8, 14, 33, 0.86));
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.text-gradient {
  background: linear-gradient(97deg, var(--accent-neural-green) 0%, #3ec6aa 38%, #7f87ef 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  font-weight: 600;
  margin-bottom: 1rem;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

/* Header */
header {
  position: fixed;
  inset: 0 0 auto;
  height: 5rem;
  z-index: 60;
  border-bottom: 1px solid rgba(130, 157, 206, 0.25);
  background: rgba(2, 6, 23, 0.84);
  backdrop-filter: blur(14px);
}

header nav {
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.04em;
}

.logo span {
  color: var(--text-secondary);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.9rem;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.66rem;
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.74rem 1.35rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #042311;
  background: linear-gradient(100deg, #20bf58, #30e07b);
  box-shadow: 0 8px 28px rgba(34, 197, 94, 0.32);
}

.btn-outline {
  color: var(--text-primary);
  border: 1px solid var(--glass-border-strong);
  background: rgba(16, 28, 58, 0.65);
}

.btn-outline:hover {
  border-color: rgba(161, 178, 230, 0.65);
}

.btn-highlight {
  padding: 1rem 2.35rem;
  font-size: 1.02rem;
  color: #042311;
  background: linear-gradient(95deg, #21be5a, #34e681);
  border: 1px solid rgba(134, 255, 189, 0.55);
  box-shadow: 0 10px 32px rgba(34, 197, 94, 0.44);
  animation: pulse-glow 2.4s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 10px 28px rgba(34, 197, 94, 0.34);
  }
  50% {
    box-shadow: 0 14px 38px rgba(34, 197, 94, 0.54);
  }
}

/* Hero */
.hero {
  padding-top: 9.4rem;
  text-align: center;
}

.hero h1 {
  margin: 0 auto 1.5rem;
  max-width: 16ch;
  font-size: clamp(2.5rem, 7vw, 4.9rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 auto;
  max-width: 64ch;
  color: var(--text-secondary);
  font-size: clamp(1rem, 2vw, 1.26rem);
}

.hero-cta-group {
  margin-top: 2.2rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.trust-bar {
  margin-top: 2.4rem;
  border-radius: 0.9rem;
  padding: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.trust-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: #d9e7f9;
  border: 1px solid rgba(114, 137, 175, 0.26);
  border-radius: 0.65rem;
  min-height: 3rem;
  background: rgba(10, 20, 44, 0.72);
}

.trust-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-neural-green);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.7);
}

/* Value pillars */
.value-pillar-section {
  padding-top: 4.2rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.feature-card {
  border-radius: 1rem;
  padding: 1.5rem;
}

.feature-card-title {
  margin-bottom: 0.95rem;
}

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

.rarity-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.7);
  color: #c5b5ff;
  background: rgba(139, 92, 246, 0.15);
  font-size: 0.73rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
}

.rarity-badge-green {
  border-color: rgba(34, 197, 94, 0.7);
  color: #8cf4b2;
  background: rgba(34, 197, 94, 0.13);
}

/* Product section */
.gap-section {
  display: grid;
  grid-template-columns: 1.12fr 1fr;
  gap: 2rem;
  align-items: start;
  text-align: left;
}

.section-copy {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.accuracy-chart-container {
  border-radius: 0.95rem;
  min-height: 290px;
  padding: 1.4rem;
}

.accuracy-delta-container {
  border-radius: 0.95rem;
  min-height: 170px;
  margin-top: 0.75rem;
  padding: 0.5rem 0.9rem;
}

.evidence-caption {
  margin-top: 0.8rem;
  color: #cde0ff;
  font-size: 0.84rem;
  font-weight: 600;
}

.impact-callout {
  margin-top: 0.85rem;
  border-radius: 0.9rem;
  padding: 0.85rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.impact-item {
  border: 1px solid rgba(108, 134, 183, 0.35);
  border-radius: 0.7rem;
  background: rgba(7, 16, 35, 0.72);
  padding: 0.6rem 0.7rem;
}

.impact-label {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.67rem;
  margin-bottom: 0.2rem;
}

.impact-value {
  color: #e5f1ff;
  font-weight: 700;
  font-size: 0.92rem;
}

.terminal {
  border: 1px solid rgba(128, 151, 199, 0.35);
  border-radius: 0.9rem;
  background: #04070f;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid rgba(95, 118, 161, 0.35);
  background: rgba(22, 24, 34, 0.94);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot-red { background: #ff5f56; }
.terminal-dot-yellow { background: #ffbd2e; }
.terminal-dot-green { background: #27c93f; }

.terminal-meta {
  margin-left: auto;
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.terminal-content {
  font-family: var(--font-mono);
  font-size: 0.98rem;
  line-height: 1.55;
  height: 320px;
  max-height: 320px;
  overflow-x: hidden;
  overflow-y: auto;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  padding: 1rem;
  scrollbar-gutter: stable;
  contain: layout paint;
}

.terminal-line {
  margin-bottom: 0.22rem;
  min-height: 1.55em;
}

.terminal-line-command,
.terminal-line-success {
  color: var(--accent-neural-green);
}

.architecture-card {
  border-radius: 1rem;
  margin-top: 2.2rem;
  padding: 1.35rem;
}

.architecture-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #d9e8ff;
}

.architecture-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.arch-node {
  border-radius: 999px;
  border: 1px solid rgba(106, 132, 179, 0.45);
  background: rgba(7, 16, 35, 0.78);
  color: #d7e8ff;
  font-size: 0.79rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
}

.arch-arrow {
  color: var(--accent-cyan);
  font-weight: 700;
}

/* Solutions */
.solutions-section {
  border-radius: 2rem;
  background: linear-gradient(160deg, rgba(15, 22, 44, 0.7), rgba(10, 19, 38, 0.95));
  border: 1px solid rgba(106, 131, 179, 0.28);
}

.solutions-intro {
  margin: -1rem auto 2.2rem;
  max-width: 68ch;
  text-align: center;
  color: var(--text-secondary);
}

.solutions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.solutions-card {
  padding: 1.55rem;
  border-radius: 1rem;
}

.solutions-card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.9rem;
}

.solutions-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 0.7rem;
  color: var(--accent-neural-green);
  background: rgba(34, 197, 94, 0.11);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.solutions-card-icon svg {
  width: 22px;
  height: 22px;
}

.solutions-card h4 {
  font-size: 1.16rem;
}

.solutions-card > p {
  color: var(--text-secondary);
  font-size: 0.94rem;
  margin-bottom: 1rem;
}

.example-panel {
  border-radius: 0.75rem;
  border: 1px solid rgba(109, 133, 176, 0.38);
  background: rgba(6, 12, 28, 0.76);
  padding: 0.75rem;
}

.example-title {
  font-size: 0.75rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 0.45rem;
}

.example-panel p {
  font-size: 0.8rem;
  color: #c7d8f4;
  line-height: 1.45;
  margin-bottom: 0.4rem;
}

.example-panel p:last-child {
  margin-bottom: 0;
}

.example-panel code {
  font-family: var(--font-mono);
  color: #eff6ff;
  font-size: 0.75rem;
}

.stack-trace-scan {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.scan-panel {
  border-radius: 0.85rem;
  border: 1px solid rgba(107, 129, 167, 0.42);
  position: relative;
  overflow: hidden;
  padding: 1.25rem;
}

.scan-panel-before {
  background: rgba(8, 10, 14, 0.95);
}

.scan-panel-after {
  background: linear-gradient(152deg, rgba(18, 44, 37, 0.4), rgba(24, 32, 61, 0.44));
}

.scan-label {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.25rem 0.62rem;
  background: rgba(0, 0, 0, 0.52);
}

.scan-beam {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(to bottom, rgba(34, 197, 94, 0), rgba(34, 197, 94, 0.8), rgba(34, 197, 94, 0));
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.6);
  animation: scanBeam 3s ease-in-out infinite;
}

@keyframes scanBeam {
  0%, 100% { left: 0; opacity: 0; }
  10%, 90% { opacity: 1; }
  100% { left: 100%; }
}

.scan-content {
  white-space: pre;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
}

.scan-content-before {
  color: #a8b8d2;
}

.scan-content-after {
  color: #e8f4ff;
}

.scan-highlight {
  color: var(--accent-neural-green);
  font-weight: 700;
}

/* Security */
.security-section {
  padding-top: 5.2rem;
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  --product-block-gap: 1rem;
  align-items: stretch;
}

.product-visuals,
.product-terminal {
  display: grid;
  gap: var(--product-block-gap);
}

.product-visuals {
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.accuracy-chart-container,
.accuracy-delta-container {
  min-height: 290px;
}

.product-terminal .terminal {
  height: 100%;
  min-height: calc((290px * 2) + var(--product-block-gap));
  display: flex;
  flex-direction: column;
}

.product-terminal .terminal-content {
  height: auto;
  max-height: none;
  flex: 1;
}

.security-card {
  border-radius: 1rem;
  padding: 1.4rem;
}

.security-card h3 {
  font-size: 1.07rem;
  margin-bottom: 0.6rem;
}

.security-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.deployment-panel {
  border-radius: 1rem;
  margin-top: 1.2rem;
  padding: 1.4rem;
}

.deployment-panel h3 {
  font-size: 1.07rem;
  margin-bottom: 0.95rem;
}

.deployment-table-wrap {
  overflow-x: auto;
}

.deployment-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.deployment-table th,
.deployment-table td {
  text-align: left;
  padding: 0.72rem;
  border-bottom: 1px solid rgba(98, 122, 162, 0.3);
  font-size: 0.88rem;
}

.deployment-table th {
  color: #d6e7ff;
  font-weight: 600;
}

.deployment-table td {
  color: var(--text-secondary);
}

.deployment-note {
  margin-top: 0.8rem;
  color: #c7daf8;
  font-size: 0.84rem;
}

/* Demo */
.demo-title-wrap {
  margin-bottom: 2rem;
}

.demo-subcopy {
  max-width: 62ch;
  margin: 0.65rem auto 0;
  color: var(--text-secondary);
}

.calendly-inline-widget {
  min-width: 320px;
  height: 690px;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(118, 139, 183, 0.33);
}

/* Footer */
footer {
  border-top: 1px solid rgba(100, 124, 167, 0.33);
  margin-top: 4rem;
  padding: 3rem 0;
}

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

.footer-contact {
  color: var(--text-secondary);
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.footer-contact strong {
  color: var(--text-primary);
}

.footer-contact a {
  color: var(--accent-neural-green);
}

.footer-copyright {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: 0;
  padding: 0.4rem;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}

.hamburger span {
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.22s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Chart helpers */
.accuracy-svg {
  width: 100%;
  height: 100%;
}

.chart-axis-label {
  fill: var(--text-muted);
  font-size: 10px;
}

.chart-accuracy-label {
  fill: #7ceca8;
  font-size: 11px;
  font-weight: 700;
}

.delta-title {
  fill: #deebff;
  font-size: 12px;
  font-weight: 700;
}

.delta-subtitle {
  fill: var(--text-muted);
  font-size: 10px;
}

.delta-bar-label {
  fill: #d5e6ff;
  font-size: 10px;
  font-weight: 600;
}

.delta-bar-value {
  fill: #eff6ff;
  font-size: 14px;
  font-weight: 700;
}

.delta-callout {
  fill: var(--accent-cyan);
  font-size: 9px;
  font-weight: 700;
}

.chart-line-graph,
.chart-line-vector {
  animation: drawLine 2.2s ease forwards;
}

@keyframes drawLine {
  from {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
  }
  to {
    stroke-dasharray: 1000;
    stroke-dashoffset: 0;
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .features-grid,
  .solutions-grid,
  .security-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .impact-callout {
    grid-template-columns: 1fr;
  }

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

  .terminal-content {
    height: 250px;
    max-height: 250px;
    font-size: 0.9rem;
  }

  .product-grid {
    gap: 0.9rem;
  }

  .accuracy-delta-container {
    min-height: 170px;
  }

  .accuracy-chart-container {
    min-height: 240px;
  }

  .product-terminal .terminal {
    min-height: 0;
  }
}

@media (max-width: 768px) {
  .container {
    width: min(1160px, 100% - 1.4rem);
  }

  header {
    height: 4rem;
  }

  header nav {
    height: 4rem;
  }

  section {
    padding: 3.25rem 0;
    scroll-margin-top: 4.2rem;
  }

  .logo {
    font-size: 1.08rem;
  }

  .logo span {
    font-size: 0.94rem;
  }

  .hamburger {
    display: flex;
  }

  .nav-cta {
    display: none;
  }

  .nav-links {
    position: fixed;
    top: 4rem;
    left: 0;
    width: 100%;
    background: rgba(5, 12, 30, 0.97);
    border-bottom: 1px solid rgba(100, 126, 170, 0.34);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.7rem 1rem;
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.24s ease, opacity 0.24s ease;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    width: 100%;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(96, 117, 152, 0.25);
  }

  .hero {
    padding-top: 6.7rem;
  }

  .hero h1 {
    font-size: clamp(2rem, 12vw, 3rem);
  }

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

  .hero-cta-group {
    flex-direction: column;
  }

  .hero-cta-group .btn {
    width: 100%;
  }

  .trust-bar {
    grid-template-columns: 1fr;
  }

  .features-grid,
  .solutions-grid,
  .security-grid,
  .stack-trace-scan {
    grid-template-columns: 1fr;
  }

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

  .product-visuals,
  .product-terminal {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
  }

  .accuracy-delta-container {
    min-height: 150px;
  }

  .accuracy-chart-container {
    min-height: 230px;
  }

  .terminal-content {
    height: 220px;
    max-height: 220px;
  }

  .impact-callout {
    grid-template-columns: 1fr;
  }

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

  .section-title h2 {
    font-size: clamp(1.5rem, 7vw, 2.1rem);
  }

  .solutions-section {
    border-radius: 1.2rem;
  }

  .scan-content {
    font-size: 0.78rem;
  }

  .calendly-inline-widget {
    height: 650px;
  }

  .footer-container {
    flex-direction: column;
    align-items: flex-start;
  }
}
