/* ========================================
   KYRA MDR - Terminal / Matrix Theme
   ======================================== */

:root {
  --bg: #0a0a0a;
  --bg-terminal: #0d1117;
  --bg-terminal-header: #161b22;
  --green: #00ff41;
  --green-dim: #00cc33;
  --green-dark: #003b00;
  --accent: #00ff41;
  --text: #c9d1d9;
  --text-dim: #6e7681;
  --text-bright: #e6edf3;
  --red: #ff3333;
  --yellow: #ffcc00;
  --blue: #58a6ff;
  --border: #21262d;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --glow: 0 0 10px rgba(0, 255, 65, 0.3);
}

/* Screen-reader only (SEO h1) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 60px;
}

body {
  font-family: var(--font-mono);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--green);
  text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
}

a:hover {
  color: #33ff66;
  text-shadow: var(--glow);
}

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

/* Matrix Canvas */
#matrix-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.06;
  pointer-events: none;
}

/* Scanline */
.scanline {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

/* Container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navigation */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.nav-logo {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

.nav-links a {
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 400;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--green);
  text-shadow: none;
}

.nav-cta {
  color: var(--green) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  border: 1px solid var(--green-dark);
  padding: 6px 16px;
  border-radius: 4px;
  transition: all 0.2s !important;
  white-space: nowrap;
}

.nav-cta:hover {
  background: rgba(0, 255, 65, 0.08) !important;
  border-color: var(--green) !important;
}

.nav-signup {
  color: #111 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  background: var(--green) !important;
  padding: 6px 18px;
  border-radius: 4px;
  transition: all 0.2s !important;
  white-space: nowrap;
}

.nav-signup:hover {
  background: #00cc41 !important;
  text-shadow: none !important;
}

/* Pricing footer (scale text + CTA) — pushed to bottom */
.tier-footer {
  margin-top: auto;
  padding-top: 16px;
}

.tier-footer .output {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Pricing CTA buttons — base */
.tier-cta {
  display: inline-block;
  padding: 10px 24px;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
}

.tier-cta:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--text-dim);
}

/* FREE — ghost/dim outline */
.tier-cta-free {
  border-color: var(--text-dim);
  color: var(--text);
}

.tier-cta-free:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--text);
  color: var(--text-bright);
}

/* MDR — filled green (primary) */
.tier-cta-featured {
  background: var(--green);
  color: #0a0a0a;
  border-color: var(--green);
  font-weight: 700;
  box-shadow: 0 0 12px rgba(0, 255, 65, 0.25);
}

.tier-cta-featured:hover {
  background: #00cc41;
  border-color: #00cc41;
  color: #0a0a0a;
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
}

/* PRO — filled blue */
.tier-cta-pro {
  background: var(--blue);
  color: #0a0a0a;
  border-color: var(--blue);
  font-weight: 700;
  box-shadow: 0 0 12px rgba(88, 166, 255, 0.2);
}

.tier-cta-pro:hover {
  background: #79b8ff;
  border-color: #79b8ff;
  color: #0a0a0a;
  box-shadow: 0 0 20px rgba(88, 166, 255, 0.35);
}

/* CUSTOM — bright outline */
.tier-cta-custom {
  border-color: var(--text-bright);
  color: var(--text-bright);
}

.tier-cta-custom:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #fff;
  color: #fff;
}

/* Signup form */
.signup-wrapper {
  max-width: 520px;
  margin: 0 auto;
}

.signup-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.signup-field {
  display: flex;
  align-items: center;
  gap: 12px;
}

.signup-field .label {
  min-width: 120px;
  font-size: 13px;
  text-align: right;
  flex-shrink: 0;
}

.signup-input {
  flex: 1;
  background: rgba(0, 255, 65, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.2s;
}

.signup-input:focus {
  border-color: var(--green-dark);
}

.signup-input::placeholder {
  color: var(--text-dim);
  opacity: 0.5;
}

.signup-btn {
  margin-top: 4px;
  cursor: pointer;
  font-family: var(--mono);
}

.signup-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.signup-error {
  color: #ff6b6b;
  font-size: 13px;
  padding: 8px 0;
}

.signup-success {
  color: var(--green);
  font-size: 13px;
  padding: 8px 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  transition: 0.2s;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 52px;
}

.hero-terminal {
  max-width: 750px;
}

.hero-ascii pre {
  color: var(--green);
  font-size: 11px;
  line-height: 1.2;
  margin-bottom: 24px;
  text-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
  overflow-x: auto;
}

.hero-desc {
  margin: 8px 0 16px 0;
}

.status-grid {
  display: grid;
  gap: 4px;
  margin: 8px 0 16px 0;
}

.status-item {
  display: flex;
  gap: 16px;
}

.status-item .label {
  color: var(--text-dim);
  min-width: 180px;
}

.cursor-line {
  margin-top: 8px;
}

/* Terminal Window */
.terminal-window {
  background: var(--bg-terminal);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-terminal-header);
  border-bottom: 1px solid var(--border);
}

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

.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.terminal-title {
  color: var(--text-dim);
  font-size: 11px;
  margin-left: 8px;
}

.terminal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Text Styles */
.prompt {
  color: var(--green);
  font-weight: 700;
}

.cmd {
  color: var(--blue);
  font-weight: 500;
}

.output {
  color: var(--text);
}

.highlight {
  color: var(--green);
  font-weight: 500;
}

.dim {
  color: var(--text-dim) !important;
}

.ok {
  color: var(--green);
  font-weight: 700;
}

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

.blink {
  animation: blink-cursor 1s step-end infinite;
  color: var(--green);
  font-weight: 700;
}

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

/* Labels & Values */
.label {
  color: var(--blue);
  font-weight: 400;
  padding-right: 16px;
  white-space: nowrap;
}

.value {
  color: var(--text-bright);
}

/* Sections */
.section {
  padding: 80px 0;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 32px;
  letter-spacing: 0.5px;
}

.mt-2 {
  margin-top: 24px;
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* Info Table */
.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table tr {
  border-bottom: 1px solid rgba(33, 38, 45, 0.5);
}

.info-table tr:last-child {
  border-bottom: none;
}

.info-table td {
  padding: 6px 0;
  vertical-align: top;
}

.info-table td:first-child {
  color: var(--blue);
  padding-right: 20px;
  white-space: nowrap;
  width: 1%;
}

.info-table td:last-child {
  color: var(--text-dim);
  font-size: 12px;
}

/* Tree View */
.tree-view {
  margin: 8px 0;
}

/* Bar Chart */
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bar-label {
  color: var(--text-dim);
  font-size: 11px;
  min-width: 140px;
  text-align: right;
}

.bar {
  flex: 1;
  height: 12px;
  background: rgba(0, 255, 65, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green-dark), var(--green-dim));
  border-radius: 2px;
  transition: width 1.5s ease;
  box-shadow: 0 0 8px rgba(0, 255, 65, 0.2);
}

.bar-val {
  color: var(--green);
  font-size: 11px;
  min-width: 36px;
  text-align: right;
  font-weight: 500;
}

/* MITRE Grid */
.mitre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}

.mitre-tactic {
  text-align: center;
}

.mitre-name {
  font-size: 9px;
  color: var(--text-dim);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mitre-cells {
  display: flex;
  gap: 3px;
  justify-content: center;
}

.cell {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.cell.covered {
  background: var(--green-dark);
  border-color: var(--green-dim);
  box-shadow: 0 0 4px rgba(0, 255, 65, 0.15);
}

/* Method Grid */
.method-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.method-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(0, 255, 65, 0.01);
}

.method-title {
  color: var(--green);
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 13px;
}

/* Flow Diagram */
.flow-diagram pre,
.arch-diagram,
.pipeline-flow {
  color: var(--text);
  font-size: 11px;
  line-height: 1.4;
  overflow-x: auto;
  white-space: pre;
}

/* Capability Grid */
.cap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.cap-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.cap-icon {
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Connectors */
.connector-section {
  margin-bottom: 16px;
}

.connector-category {
  color: var(--text-dim);
  font-size: 11px;
  margin-bottom: 8px;
  font-style: italic;
}

.connector-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.connector {
  font-size: 11px;
  color: var(--text-bright);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(0, 255, 65, 0.02);
  transition: all 0.2s;
}

.connector:hover {
  border-color: var(--green-dim);
  background: rgba(0, 255, 65, 0.06);
  box-shadow: 0 0 8px rgba(0, 255, 65, 0.1);
}

/* Tier Cards */
.tier-card {
  transition: transform 0.3s, box-shadow 0.3s;
}

.tier-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.tier-card.featured {
  border-color: var(--green-dark);
  box-shadow: 0 0 24px rgba(0, 255, 65, 0.08);
}

.tier-card.featured:hover {
  box-shadow: 0 0 32px rgba(0, 255, 65, 0.15);
}

.tier-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.tier-name.accent {
  color: var(--green);
  text-shadow: var(--glow);
}

.tier-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--green);
  margin: 6px 0 4px;
}

.tier-price-unit {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-dim);
}

.tier-price-annual {
  font-size: 11px;
  margin-bottom: 2px;
}

/* Showcase Section */
.showcase-section {
  padding-bottom: 40px;
}

.showcase-subtitle {
  color: var(--text-dim);
  font-size: 13px;
  margin-top: -24px;
  margin-bottom: 28px;
}

.showcase-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.showcase-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.showcase-tab:hover {
  color: var(--text);
}

.showcase-tab.active {
  color: var(--green);
  border-bottom-color: var(--green);
}

.showcase-viewport {
  position: relative;
  background: var(--bg-terminal);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.showcase-screen {
  display: none;
}

.showcase-screen.active {
  display: block;
  animation: showcaseFadeIn 0.3s ease;
}

@keyframes showcaseFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.showcase-screen img {
  width: 100%;
  height: auto;
  display: block;
}

.showcase-caption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-terminal-header);
}

.showcase-caption .highlight {
  font-size: 13px;
}

.showcase-caption .dim {
  font-size: 11px;
  line-height: 1.5;
}

/* Compliance Grid */
.compliance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.compliance-item {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.compliance-item .highlight {
  font-size: 14px;
  margin-bottom: 4px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: 40px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  margin-bottom: 32px;
}

.footer-logo {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

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

.footer-links div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-links .highlight {
  font-size: 12px;
  margin-bottom: 4px;
}

.footer-links a {
  color: var(--text-dim);
  font-size: 12px;
}

.footer-links a:hover {
  color: var(--green);
}

.footer-link {
  color: var(--green) !important;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 11px;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section {
  animation: fadeInUp 0.6s ease-out;
}

/* Responsive */
@media (max-width: 900px) {
  .grid-2, .method-grid, .cap-grid {
    grid-template-columns: 1fr;
  }

  .grid-3, .grid-4 {
    grid-template-columns: 1fr;
    gap: 16px;
  }

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

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

@media (max-width: 700px) {
  body {
    font-size: 12px;
  }

  .hero-ascii pre {
    font-size: 7px;
  }

  .container {
    padding: 0 16px;
  }

  .section {
    padding: 48px 0;
  }

  .terminal-body {
    padding: 16px;
  }

  .status-item .label {
    min-width: 120px;
  }

  .bar-label {
    min-width: 100px;
    font-size: 10px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.98);
    flex-direction: column;
    padding: 16px 24px;
    gap: 12px;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-signup,
  .nav-cta {
    text-align: center;
  }

  .footer-content {
    flex-direction: column;
    gap: 24px;
  }

  .footer-links {
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 4px;
  }

  .arch-diagram,
  .pipeline-flow,
  .flow-diagram pre {
    font-size: 9px;
  }

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

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

/* Print */
@media print {
  #matrix-bg, .scanline, #nav {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .terminal-window {
    border: 1px solid #ccc;
    box-shadow: none;
  }
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  gap: 2px;
  margin-left: 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.lang-btn {
  background: transparent;
  color: var(--text-dim);
  border: none;
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.5px;
}

.lang-btn:hover {
  color: var(--green);
  background: var(--green-dark);
}

.lang-btn.active {
  color: var(--bg);
  background: var(--green);
  font-weight: 700;
}

@media (max-width: 768px) {
  .lang-switcher {
    position: absolute;
    top: 12px;
    right: 56px;
  }
}
