/* CloudTaser Design System v2 — Gray base, gold accents */

/* =====================
   1. Design Tokens
   ===================== */
:root {
  --bg-base: #2b2b2b;
  --bg-surface: #242424;
  --bg-surface-alt: #1f1f1f;
  --bg-elevated: #353535;
  --bg-card: #323232;
  --border: #444444;
  --border-hover: #5a5a5a;

  --text-primary: #e8e8e8;
  --text-secondary: #b0b0b0;
  --text-muted: #959595;

  --accent: #FFC93B;
  --accent-hover: #e6b400;
  --accent-glow: rgba(255, 201, 59, 0.35);
  --accent-subtle: rgba(255, 201, 59, 0.15);
  --accent-on: #1a1a1a;

  --green: #2d8f45;
  --green-subtle: rgba(45, 143, 69, 0.15);
  --yellow: #FFC93B;
  --yellow-subtle: rgba(255, 201, 59, 0.18);
  --red: #c0392b;
  --orange: #d35400;
  --purple: #7b4caa;

  --radius: 8px;
  --radius-lg: 16px;
  --nav-height: 60px;
  --max-width: 1120px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
}

[data-theme="light"] {
  --bg-base: #fef9f0;
  --bg-surface: #fdf4e8;
  --bg-surface-alt: #f8eedf;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --border: #e8ddf0;
  --border-hover: #c44dff;

  --text-primary: #2d2b3d;
  --text-secondary: #5a5770;
  --text-muted: #7a7690;

  --accent: #c44dff;
  --accent-hover: #a83de0;
  --accent-glow: rgba(196, 77, 255, 0.2);
  --accent-subtle: rgba(196, 77, 255, 0.08);
  --accent-on: #ffffff;

  --green: #4ddb8f;
  --green-subtle: rgba(77, 219, 143, 0.12);
  --yellow: #ffd84d;
  --yellow-subtle: rgba(255, 216, 77, 0.15);
  --red: #ff6b9d;
  --orange: #ff8c4d;
  --purple: #c44dff;

  --font-display: 'Fredoka', 'Inter', sans-serif;
}

/* =====================
   YOLO mode — light theme overrides
   ===================== */
[data-theme="light"] body {
  font-family: 'Fredoka', 'Inter', sans-serif;
}

[data-theme="light"] nav {
  background: rgba(254, 249, 240, 0.85);
  border-bottom: 2px dashed var(--accent);
}

[data-theme="light"] .nav-brand svg {
  color: var(--accent);
}

[data-theme="light"] .nav-links a:hover,
[data-theme="light"] .nav-links a.active {
  background: rgba(196, 77, 255, 0.1);
  border-radius: 999px;
}

[data-theme="light"] .btn-primary {
  background: linear-gradient(135deg, #ff6b9d, #c44dff);
  border: none;
}

[data-theme="light"] .btn-primary:hover {
  box-shadow: 0 6px 20px rgba(196, 77, 255, 0.3);
}

[data-theme="light"] .btn-ghost {
  border: 2px solid var(--accent);
  border-radius: 999px;
}

[data-theme="light"] .card,
[data-theme="light"] .dbox,
[data-theme="light"] .pd-ibox,
[data-theme="light"] .pd-abox {
  border-radius: 16px;
  border: 2px solid #e8ddf0;
}

[data-theme="light"] .card:hover,
[data-theme="light"] .dbox:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(196, 77, 255, 0.1);
}

[data-theme="light"] .dbox-protected {
  border-color: var(--accent);
  background: rgba(196, 77, 255, 0.06);
}

[data-theme="light"] .dbox-tag,
[data-theme="light"] .badge,
[data-theme="light"] .pd-inner-tag {
  border-radius: 999px;
}

[data-theme="light"] .section-num {
  background: linear-gradient(135deg, #ff6b9d, #c44dff);
  color: #fff;
  border-radius: 999px;
  padding: 3px 12px;
}

[data-theme="light"] .vault-box,
[data-theme="light"] .pd-vault {
  border: 2px dashed var(--accent);
  border-radius: 16px;
  background: rgba(196, 77, 255, 0.04);
}

[data-theme="light"] .vault-key,
[data-theme="light"] .pd-vk {
  color: var(--accent);
}

[data-theme="light"] .conn-line,
[data-theme="light"] .pd-line-vault {
  stroke: var(--accent);
}

[data-theme="light"] .section-cta {
  background: linear-gradient(135deg, #f8f0ff, #fff0f5, #f0f7ff);
}

[data-theme="light"] details.component {
  border-radius: 16px;
  border: 2px solid #e8ddf0;
}

[data-theme="light"] details.component:hover {
  border-color: var(--accent);
}

[data-theme="light"] .table-wrap {
  border: 2px solid #e8ddf0;
  border-radius: 16px;
}

[data-theme="light"] footer {
  border-top: 2px dashed var(--accent);
}

[data-theme="light"] footer a {
  color: var(--accent);
}

[data-theme="light"] footer a:hover {
  color: #ff6b9d;
}

[data-theme="light"] body::after {
  border-color: var(--accent);
  border-style: dashed;
}

[data-theme="light"] .problem-tab.active {
  background: linear-gradient(135deg, #ff6b9d, #c44dff);
}

[data-theme="light"] .problem-card-green {
  border: 2px dashed #4ddb8f;
  border-radius: 16px;
  background: rgba(77, 219, 143, 0.05);
}

[data-theme="light"] .problem-card-green h3 {
  color: #2daa6e;
}

[data-theme="light"] #hero-title {
  background: linear-gradient(135deg, #ff6b9d, #c44dff, #4d9fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="light"] .hero-subtitle {
  color: var(--text-secondary);
}

[data-theme="light"] .diagram-label {
  color: var(--accent);
}

[data-theme="light"] .pd-ebpf {
  border-color: #ff6b9d;
  background: rgba(255, 107, 157, 0.06);
}

[data-theme="light"] .pd-ebpf .pd-ibox-name { color: #ff6b9d; }
[data-theme="light"] .pd-ebpf .pd-ibox-port { color: #ff6b9d; }

[data-theme="light"] .dbox-ebpf-hero {
  border-color: var(--accent);
}
[data-theme="light"] .dbox-ebpf-hero .dbox-name { color: var(--accent); }
[data-theme="light"] .dbox-ebpf-hero .dbox-port { color: var(--accent); }

/* Floating blobs for yolo mode */
[data-theme="light"] .hero::before,
[data-theme="light"] .hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  z-index: 0;
  animation: yolo-float 20s ease-in-out infinite;
  pointer-events: none;
}

[data-theme="light"] .hero::before {
  width: 400px;
  height: 400px;
  background: #ff6b9d;
  top: -100px;
  left: -100px;
}

[data-theme="light"] .hero::after {
  width: 350px;
  height: 350px;
  background: #4d9fff;
  bottom: -80px;
  right: -80px;
  animation-delay: -7s;
}

@keyframes yolo-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 14px);
}

body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* =====================
   2b. Viewport Frame (solid borders)
   ===================== */
body::before {
  content: '';
  position: fixed;
  top: 6px;
  left: 8px;
  right: 8px;
  bottom: 6px;
  border: 2px solid var(--accent);
  border-radius: 4px;
  pointer-events: none;
  z-index: 200;
}

/* =====================
   3. Navigation
   ===================== */
nav {
  position: fixed;
  top: 8px;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 32px;
  background: rgba(43, 43, 43, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

[data-theme="light"] nav {
  background: rgba(240, 240, 240, 0.9);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.nav-brand img {
  height: calc(var(--nav-height) - 14px);
  width: auto;
}

.nav-brand .logo-light { display: none; }
.nav-brand .logo-dark { display: block; }

[data-theme="light"] .nav-brand .logo-light { display: block; }
[data-theme="light"] .nav-brand .logo-dark { display: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.theme-toggle:hover {
  color: var(--text-primary);
}

/* =====================
   4. Buttons
   ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-sans);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 6px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
  border-radius: 10px;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-on);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.06);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: var(--accent-on);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border);
}

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

/* =====================
   5. Container & Layout
   ===================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* Legacy support for other pages using <main> */
main {
  max-width: 960px;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 62px) 24px 96px;
}

/* Pages with hero-inner handle their own top spacing */
main:has(.hero-inner) {
  max-width: none;
  padding: 0;
}

/* Full-bleed sections */
.fullbleed {
  width: 100%;
  padding: 100px 0;
}

.section-alt {
  background: var(--bg-surface);
}

/* =====================
   6. Hero
   ===================== */
.hero {
  position: relative;
  overflow: hidden;
}

#cipher-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, transparent 85%, var(--bg-base) 100%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding: calc(var(--nav-height) + 46px) 0 60px;
}

/* Title above diagram */
.hero-text {
  text-align: center;
  margin-bottom: 32px;
}

#eu-uk-toggle,
#vault-region-toggle,
#vault-location-toggle {
  display: inline-block;
  transition: opacity 0.4s;
}

.hero-motto {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 10px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

#hero-title {
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  font-family: var(--font-mono);
}

#hero-title .cipher-char {
  display: inline;
  transition: color 0.2s;
}

#hero-title .cipher-char.accent {
  color: var(--accent);
}

.hero-subtitle {
  font-size: clamp(14px, 1.5vw, 16px);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

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

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* =====================
   7. Section Headers
   ===================== */
.section-header {
  margin-bottom: 48px;
}

.section-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-on);
  background: var(--accent);
  padding: 2px 10px;
  border-radius: 4px;
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.section-header h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-lead {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.6;
}

/* =====================
   7b. Architecture Diagram
   ===================== */
.diagram {
  display: flex;
  gap: 48px;
  align-items: stretch;
  position: relative;
}

.diagram-side {
  flex: 1;
}

.diagram-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.diagram-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.dbox {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  background: var(--bg-card);
  transition: border-color 0.2s;
}

.dbox-name {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.dbox-port {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.dbox-protected {
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.dbox-protected .dbox-name {
  color: var(--text-primary);
}

.dbox-ebpf-hero {
  border-color: var(--accent);
}

.dbox-ebpf-hero .dbox-name {
  color: var(--accent);
}

.dbox-ebpf-hero .dbox-port {
  color: var(--accent);
  opacity: 0.6;
}

/* Tag label on workload boxes */
.dbox-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 6px;
  padding: 2px 6px;
  border: 1px solid var(--accent);
  border-radius: 3px;
  background: var(--accent-subtle);
  width: fit-content;
  opacity: 1;
  transition: opacity 0.5s;
}

/* Hidden state for animated tag */
.dbox-tag.hidden {
  opacity: 0;
}

/* Tag row: label + demo link side by side */
.dbox-tag-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.dbox-tag-row .dbox-tag {
  margin-top: 0;
}

/* Live demo link tag */
.dbox-demo-link {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: #0fa243;
  padding: 2px 7px;
  border: none;
  border-radius: 3px;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.6s, background 0.2s;
  cursor: pointer;
  white-space: nowrap;
}

.dbox-demo-link.visible {
  opacity: 1;
}

.dbox-demo-link:hover {
  background: #0c8a38;
}

/* Connection lines SVG overlay */
.diagram-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.conn-line {
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 6 4;
  opacity: 0.5;
}

.conn-line-anim {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  opacity: 0;
}

.diagram-vault {
  max-width: 240px;
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
}

.diagram-vault .diagram-label {
  flex-shrink: 0;
}

.vault-box {
  flex: 1;
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 20px;
  background: var(--accent-subtle);
}

.vault-header {
  margin-bottom: 16px;
}

.vault-header strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
}

.vault-header .vault-location {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.vault-secrets {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vault-group {
  border: 1px solid var(--accent-glow);
  border-radius: 6px;
  padding: 8px 12px;
  background: var(--bg-card);
}

.vault-key {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  padding: 3px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  position: relative;
}

.vault-key .approved-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0fa243;
  border: 1px solid #0fa243;
  border-radius: 3px;
  padding: 1px 5px;
  opacity: 0;
  transition: opacity 0.5s;
  flex-shrink: 0;
}

.vault-key .approved-badge.visible {
  opacity: 1;
}

@media (max-width: 768px) {
  /* Hero diagram: horizontal scroll to preserve layout + lines */
  .hero-inner {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .diagram {
    min-width: 700px;
  }
  .diagram-vault {
    max-width: 180px;
    flex: 0 0 180px;
  }
  .diagram-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .dbox {
    padding: 8px 10px;
  }
  .dbox-name {
    font-size: 11px;
  }
  .dbox-port {
    font-size: 9px;
  }
  .vault-box {
    padding: 14px;
  }
  .vault-key {
    font-size: 10px;
  }
  .hero-text {
    min-width: 700px;
    text-align: center;
  }
}

/* =====================
   7c. Problem Diagram
   ===================== */
.problem-diagram {
  position: relative;
}

.problem-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--bg-elevated);
  border-radius: 8px;
  padding: 4px;
  width: fit-content;
}

.problem-tab {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 20px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.problem-tab.active {
  background: var(--accent);
  color: var(--accent-on);
}

/* User row on top */
.pd-user-row {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.pd-abox {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
}

.pd-abox-name {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
}

.pd-abox-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: #c0392b;
  margin-top: 3px;
}

/* Cloud + EU row */
.pd-main-row {
  display: flex;
  gap: 20px;
  align-items: stretch;
}

/* Court row below */
.pd-court-row {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.pd-court-box {
  min-width: 120px;
}

/* Center: US Cloud with 2×2 grid */
.pd-cloud {
  flex: 1;
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}

.pd-cloud-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.pd-cloud-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.pd-ibox {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 12px;
  background: var(--bg-card);
  text-align: center;
  transition: border-color 0.3s, background 0.3s;
}

.pd-ibox.pd-protected {
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.pd-ibox-name {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.pd-ibox-port {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

/* eBPF below the grid */
.pd-ebpf {
  border-color: #c0392b;
  background: rgba(192, 57, 43, 0.08);
  margin-top: 8px;
}

.pd-ebpf .pd-ibox-name { color: #c0392b; }
.pd-ebpf .pd-ibox-port { color: #c0392b; opacity: 0.7; }

@keyframes ebpf-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(192,57,43,0); }
  50% { box-shadow: 0 0 14px rgba(192,57,43,0.5); }
}

.pd-ebpf.pulsing {
  animation: ebpf-pulse 0.8s ease-in-out infinite;
}

.pd-hidden { display: none; }

/* Right: EU */
.pd-eu {
  flex-shrink: 0;
  width: 150px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 14px 14px;
}

.pd-eu-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.pd-vault {
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 12px;
  background: var(--accent-subtle);
}

.pd-vault-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}

.pd-vault-loc {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.pd-vault-keys {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pd-vk {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  padding: 3px 0;
}

/* SVG lines */
.pd-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.pd-line {
  stroke-width: 1.5;
  stroke-dasharray: 6 4;
  opacity: 0;
}

.pd-line-user { stroke: var(--accent); }
.pd-line-court { stroke: #0fa243; }
.pd-line-court-red { stroke: #c0392b; stroke-dasharray: 4 6; }
.pd-line-vault { stroke: var(--accent); stroke-dasharray: none; }

/* Inner tags inside infra boxes */
.pd-inner-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 6px;
  padding: 2px 7px;
  border: 1px solid var(--accent);
  border-radius: 3px;
}

@media (max-width: 768px) {
  .pd-main-row { flex-direction: column; }
  .pd-cloud-grid { grid-template-columns: 1fr; }
  .pd-eu { width: auto; }
}

/* Problem text panels */
.problem-toggle { position: relative; }

.problem-panel-hidden { display: none; }

.problem-card {
  border-radius: 12px;
  padding: 28px 32px;
}

.problem-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.problem-card > p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 20px;
}

.problem-card-red {
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.problem-card-red h3 { color: var(--text-primary); }

.problem-card-green {
  border: 1px solid rgba(15, 162, 67, 0.3);
  background: rgba(15, 162, 67, 0.05);
}

.problem-card-green h3 { color: #0fa243; }

.problem-highlights {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.problem-hl {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.problem-hl-icon {
  flex-shrink: 0;
  font-size: 14px;
  color: #c0392b;
  width: 18px;
  text-align: center;
}

.problem-hl-ok .problem-hl-icon {
  color: #0fa243;
}

/* =====================
   8. Cards
   ===================== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 24px var(--accent-glow);
}

.card-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.card-tag.yellow {
  background: var(--accent);
  color: var(--accent-on);
}

.card-tag.blue {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.card-tag.green {
  background: var(--green-subtle);
  color: var(--green);
}

.card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.card p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.65;
}

/* Legacy card grids for other pages */
.card-grid { display: grid; gap: 16px; }
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }

.card .card-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 20px;
}

.card .card-icon.blue { background: var(--accent-subtle); color: var(--text-primary); }
.card .card-icon.green { background: var(--green-subtle); color: var(--green); }
.card .card-icon.yellow { background: var(--yellow-subtle); color: var(--text-primary); }

/* =====================
   9. Steps
   ===================== */
.steps {
  display: flex;
  flex-direction: column;
  border-left: 2px solid var(--accent-glow);
  margin-left: 20px;
  padding-left: 28px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 32px 0;
  position: relative;
}

.step:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.5;
  line-height: 1;
  flex-shrink: 0;
  width: 48px;
}

.step-num::before {
  content: '';
  position: absolute;
  left: -34px;
  top: 40px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.step-body h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.step-body p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.65;
}

/* Legacy step styles */
.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-subtle);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.step-content h3 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.step-content p { color: var(--text-secondary); font-size: 14px; }

/* =====================
   10. Components (expandable)
   ===================== */
.component-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

details.component {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

details.component:hover {
  border-color: var(--accent);
}

details.component summary {
  padding: 18px 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
  user-select: none;
  font-size: 15px;
}

details.component summary::-webkit-details-marker { display: none; }

details.component summary::before {
  content: "›";
  font-size: 20px;
  font-weight: 300;
  color: var(--text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
  line-height: 1;
  width: 12px;
  text-align: center;
}

details.component[open] summary::before {
  transform: rotate(90deg);
  color: var(--accent);
}

.component-name {
  font-weight: 600;
  color: var(--text-primary);
}

.component-desc {
  color: var(--text-muted);
  font-size: 14px;
}

.badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.badge-blue {
  background: var(--accent);
  color: var(--accent-on);
}

.badge-yellow {
  background: var(--accent-glow);
  color: var(--text-primary);
}

.badge-green {
  background: var(--green-subtle);
  color: var(--green);
}

.badge-muted {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-muted);
}

.component-body {
  padding: 0 24px 20px 52px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.65;
}

.component-body p + p {
  margin-top: 8px;
}

/* Legacy status badges */
.status-badge { font-size: 12px; padding: 2px 8px; border-radius: 10px; font-weight: 500; margin-left: auto; }
.status-badge.stable { background: var(--green-subtle); color: var(--green); }
.status-badge.beta { background: var(--accent-subtle); color: var(--text-primary); }
.status-badge.alpha { background: var(--yellow-subtle); color: var(--text-primary); }
.status-badge.preview { background: var(--yellow-subtle); color: var(--orange); }
.status-badge.planned { background: rgba(0, 0, 0, 0.06); color: var(--text-muted); }

/* Legacy detail body */
.detail-body { padding: 0 20px 16px 44px; color: var(--text-secondary); font-size: 14px; line-height: 1.6; }
.detail-body p + p { margin-top: 8px; }

/* =====================
   11. CTA Section
   ===================== */
.section-cta {
  background: var(--bg-surface);
  padding: 80px 0;
}

.cta-content {
  text-align: center;
}

.cta-content h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.cta-content > p {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 32px;
}

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

/* Legacy demo-cta for other pages */
.demo-cta {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  margin: 48px 0;
}
.demo-cta h2 { font-size: 20px; margin-bottom: 8px; }
.demo-cta p { color: var(--text-secondary); font-size: 14px; margin-bottom: 20px; }
.demo-cta .demo-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* =====================
   12. Comparison Table
   ===================== */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

.comparison {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.comparison th,
.comparison td {
  padding: 16px 24px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.comparison th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--bg-elevated);
}

.comparison th:first-child { border-radius: var(--radius-lg) 0 0 0; }
.comparison th:last-child { border-radius: 0 var(--radius-lg) 0 0; }

.comparison th.highlight-col {
  background: var(--accent-subtle);
  color: var(--text-primary);
}

.comparison tr:last-child td { border-bottom: none; }
.val-good { color: var(--green); font-weight: 600; }
.val-bad { color: var(--text-muted); }
.val-neutral { color: var(--text-secondary); }

/* Legacy table styles */
.comparison-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.comparison-table th, .comparison-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.comparison-table th { color: var(--text-secondary); font-weight: 500; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }
.comparison-table tr:last-child td { border-bottom: none; }
.check { color: var(--green); }
.cross { color: var(--text-muted); }

/* =====================
   13. Footer
   ===================== */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 32px;
  color: var(--text-muted);
  font-size: 13px;
}

footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

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

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 20px;
}

/* =====================
   14. Code
   ===================== */
code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
}

pre {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.5;
}

pre code { background: none; padding: 0; }

/* =====================
   15. Animations
   ===================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Stagger children */
.reveal.visible .card:nth-child(2),
.reveal.visible .step:nth-child(2) { transition-delay: 0.1s; }
.reveal.visible .card:nth-child(3),
.reveal.visible .step:nth-child(3) { transition-delay: 0.2s; }
.reveal.visible .step:nth-child(4) { transition-delay: 0.3s; }

/* =====================
   16. Legacy Section Styles (other pages)
   ===================== */
.section { margin-bottom: 64px; }
.section-title { font-size: 24px; font-weight: 600; margin-bottom: 8px; letter-spacing: -0.01em; }
.section-subtitle { color: var(--text-secondary); font-size: 15px; margin-bottom: 24px; }

.hero-legacy { text-align: center; padding: 48px 0 64px; }
.hero-legacy h1 { font-size: 40px; font-weight: 700; line-height: 1.2; margin-bottom: 16px; letter-spacing: -0.02em; }
.hero-legacy h1 .accent { color: var(--accent); }
.hero-legacy .subtitle { font-size: 20px; color: var(--text-secondary); max-width: 640px; margin: 0 auto 32px; line-height: 1.5; }

/* News */
.news-item { padding: 20px 0; border-bottom: 1px solid var(--border); }
.news-item:last-child { border-bottom: none; }
.news-date { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.news-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.news-body { color: var(--text-secondary); font-size: 14px; }

/* Callout */
.callout {
  background: var(--accent-subtle);
  border: 1px solid var(--accent-glow);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.callout-icon { flex-shrink: 0; margin-top: 2px; }

/* =====================
   17. Responsive
   ===================== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  nav { padding: 0 20px; }
  .hero-inner { padding-top: calc(var(--nav-height) + 20px); }
  .fullbleed { padding: 64px 0; }
  .container { padding: 0 20px; }
  .grid-2 { grid-template-columns: 1fr; }
  .card-grid-2, .card-grid-3 { grid-template-columns: 1fr; }
  .steps { margin-left: 12px; padding-left: 20px; }
  .step { gap: 16px; padding: 24px 0; }
  .step-num { font-size: 24px; width: 36px; }
  .step-num::before { left: -26px; width: 9px; height: 9px; }
  .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
  .section-cta { padding: 56px 0; }
  main { padding-top: calc(var(--nav-height) + 32px); }
  .component-desc { display: none; }
  .scroll-indicator { display: none; }
  .problem-card { padding: 20px; }
  .problem-card h3 { font-size: 17px; }
  .problem-hl { font-size: 12px; }
  body::before { display: none; }
}

/* =====================
   18. Interest Panel
   ===================== */
.interest-tab {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 150;
  writing-mode: vertical-rl;
  background: var(--accent);
  color: var(--accent-on);
  padding: 14px 10px;
  border-radius: 8px 0 0 8px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: padding 0.2s, box-shadow 0.2s;
  box-shadow: -2px 0 12px var(--accent-glow);
}

.interest-tab:hover {
  padding: 14px 14px;
  box-shadow: -4px 0 20px var(--accent-glow);
}

.interest-tab.hidden {
  display: none;
}

.interest-panel {
  position: fixed;
  right: -320px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 151;
  width: 300px;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-right: none;
  border-radius: 12px 0 0 12px;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3), -2px 0 12px var(--accent-glow);
  transition: right 0.3s ease;
  overflow: hidden;
}

.interest-panel.open {
  right: 0;
}

.interest-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

.interest-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.2s;
}

.interest-close:hover {
  color: var(--text-primary);
}

.interest-options {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.interest-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-surface);
  cursor: pointer;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.2s, background 0.2s;
  flex-wrap: wrap;
}

.interest-option:hover {
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.interest-option.selected {
  border-color: var(--accent);
  background: var(--accent-subtle);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.interest-send-btn {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: var(--accent-on);
  border: none;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.interest-send-btn:hover:not(:disabled) {
  background: var(--accent-hover);
}

.interest-send-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.interest-option-icon {
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1.2;
}

.interest-option-text {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.interest-contact-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.interest-contact-input:focus {
  border-color: var(--accent);
}

.interest-contact-input::placeholder {
  color: var(--text-muted);
}

.interest-feature-input {
  width: 100%;
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.interest-feature-input:focus {
  border-color: var(--accent);
}

.interest-feature-input::placeholder {
  color: var(--text-muted);
}

.interest-feature-send {
  margin-top: 6px;
  margin-left: auto;
  display: inline-block;
  padding: 6px 16px;
  background: var(--accent);
  color: var(--accent-on);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
}

.interest-feature-send:hover {
  background: var(--accent-hover);
}

.interest-success {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 32px 20px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--green);
}

.interest-success-icon {
  font-size: 20px;
}

@media (max-width: 768px) {
  .interest-tab {
    writing-mode: horizontal-tb;
    top: auto;
    bottom: 16px;
    right: 16px;
    transform: none;
    border-radius: 8px;
    padding: 10px 16px;
    box-shadow: 0 2px 12px var(--accent-glow);
  }

  .interest-tab:hover {
    padding: 10px 16px;
  }

  .interest-panel {
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    transform: none;
    width: 100%;
    border-radius: 12px 12px 0 0;
    border: 1px solid var(--accent);
    border-bottom: none;
    transition: transform 0.3s ease;
    transform: translateY(100%);
  }

  .interest-panel.open {
    transform: translateY(0);
    right: 0;
  }
}

@media (max-width: 480px) {
  .hero-inner { padding-top: calc(var(--nav-height) + 12px); }
  .container { padding: 0 16px; }
  .card { padding: 24px; }
  main { padding-left: 16px; padding-right: 16px; }
  .cta-buttons { flex-direction: column; align-items: center; }
  .hero-actions { flex-direction: column; align-items: center; }
}
