@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Manrope:wght@400;500;600;700&display=swap');

body.kybriq-theme {
  --bg: #f4fbff;
  --surface: #ffffff;
  --surface-alt: #eef6ff;
  --text: #0b1b3a;
  --muted: #43536a;
  --accent: #0ea5a4;
  --accent-2: #0b2d4d;
  --accent-3: #77e8d4;
  --border: rgba(11, 27, 58, 0.12);
  --shadow: 0 24px 60px rgba(11, 27, 58, 0.16);
  --radius: 22px;
  --banner-height: 48px;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Manrope', sans-serif;
  background: var(--bg);
}

body.kybriq-theme main {
  overflow: hidden;
}

body.kybriq-theme .top-banner {
  background: linear-gradient(90deg, #041225, #0b2d4d);
}

body.kybriq-theme .site-header {
  background: rgba(244, 251, 255, 0.86);
}

body.kybriq-theme .hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem;
  align-items: center;
}

body.kybriq-theme .pill {
  background: rgba(14, 165, 164, 0.12);
  color: var(--accent-2);
}

body.kybriq-theme .hero h1 {
  font-size: clamp(2.4rem, 4vw, 3.7rem);
  letter-spacing: -0.02em;
}

body.kybriq-theme .hero-art {
  position: relative;
  min-height: 280px;
}

body.kybriq-theme .hero-mesh {
  position: absolute;
  inset: 0;
  border-radius: 32px;
  background: radial-gradient(circle at 20% 20%, rgba(14, 165, 164, 0.35), transparent 50%),
    radial-gradient(circle at 80% 30%, rgba(14, 72, 120, 0.4), transparent 55%),
    radial-gradient(circle at 40% 80%, rgba(119, 232, 212, 0.45), transparent 45%);
  filter: blur(2px);
  animation: meshPulse 12s ease-in-out infinite;
}

body.kybriq-theme .hero-workflow {
  position: absolute;
  inset: 22% 8% auto 8%;
  height: 4px;
  background: linear-gradient(90deg, rgba(11, 45, 77, 0.2), rgba(11, 45, 77, 0.8));
  border-radius: 999px;
}

body.kybriq-theme .hero-workflow span {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--accent);
  transform: translate(-50%, -50%);
  animation: dotMove 6s linear infinite;
}

body.kybriq-theme .hero-workflow span:nth-child(1) { left: 0%; animation-delay: 0s; }
body.kybriq-theme .hero-workflow span:nth-child(2) { left: 20%; animation-delay: 0.8s; }
body.kybriq-theme .hero-workflow span:nth-child(3) { left: 40%; animation-delay: 1.6s; }
body.kybriq-theme .hero-workflow span:nth-child(4) { left: 60%; animation-delay: 2.4s; }
body.kybriq-theme .hero-workflow span:nth-child(5) { left: 80%; animation-delay: 3.2s; }
body.kybriq-theme .hero-workflow span:nth-child(6) { left: 100%; animation-delay: 4s; }

@keyframes meshPulse {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 0.6; }
}

@keyframes dotMove {
  0% { transform: translate(-50%, -50%) scale(0.7); opacity: 0.3; }
  50% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(0.7); opacity: 0.3; }
}

body.kybriq-theme .before-after .card {
  position: relative;
  overflow: hidden;
}

body.kybriq-theme .before-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(11, 27, 58, 0.18);
  border-radius: inherit;
  animation: jitter 1.8s ease-in-out infinite;
}

@keyframes jitter {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(2px, -2px); }
}

body.kybriq-theme .stacked {
  display: grid;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

body.kybriq-theme .timeline-mini {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--muted);
}

body.kybriq-theme .timeline-mini::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(11, 27, 58, 0.2);
}

body.kybriq-theme .timeline-dot {
  position: absolute;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  animation: timelineMove 4s linear infinite;
}

@keyframes timelineMove {
  0% { left: 0%; }
  100% { left: 96%; }
}

body.kybriq-theme .meter-shell {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 2rem;
  align-items: center;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

body.kybriq-theme .meter-ring {
  width: 200px;
  height: 200px;
}

body.kybriq-theme .meter-track {
  fill: none;
  stroke: rgba(11, 27, 58, 0.1);
  stroke-width: 10;
}

body.kybriq-theme .meter-progress {
  fill: none;
  stroke: var(--accent);
  stroke-width: 10;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  stroke-dasharray: 326;
  stroke-dashoffset: 326;
  transition: stroke-dashoffset 0.4s ease;
}

body.kybriq-theme .meter-value {
  position: relative;
  margin-top: -130px;
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
}

body.kybriq-theme .meter-list label {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
}

body.kybriq-theme .replay-shell {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 1.2rem;
  align-items: stretch;
}

body.kybriq-theme .replay-rail {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

body.kybriq-theme .replay-step {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(6, 182, 212, 0.06);
  color: var(--text);
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  text-align: left;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

body.kybriq-theme .replay-step:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(11, 27, 58, 0.08);
}

body.kybriq-theme .replay-step.active {
  background: rgba(6, 182, 212, 0.18);
  border-color: rgba(6, 182, 212, 0.35);
}

body.kybriq-theme .replay-card {
  background: var(--surface);
  border: 1px solid rgba(11, 27, 58, 0.08);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  box-shadow: var(--shadow);
}

body.kybriq-theme .replay-card h3 {
  margin-top: 0.4rem;
}

body.kybriq-theme .replay-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

body.kybriq-theme .arch-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.8rem;
  align-items: center;
}

body.kybriq-theme .arch-node {
  padding: 0.8rem 1rem;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-weight: 600;
  text-align: center;
}

body.kybriq-theme .arch-arrow {
  height: 2px;
  background: linear-gradient(90deg, rgba(11, 27, 58, 0.2), rgba(11, 27, 58, 0.7));
}

body.kybriq-theme .logo-marquee {
  margin-top: 1.5rem;
  display: flex;
  gap: 2rem;
  font-weight: 600;
  color: rgba(11, 27, 58, 0.5);
  overflow: hidden;
  white-space: nowrap;
  animation: marquee 16s linear infinite;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-40%); }
}

body.kybriq-theme .cta-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  align-items: center;
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

body.kybriq-theme .mini-form {
  display: grid;
  gap: 0.75rem;
}

body.kybriq-theme .mini-form select {
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
}

body.kybriq-theme .tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

body.kybriq-theme .tab {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}

body.kybriq-theme .tab.active {
  background: var(--accent);
  color: #fff;
}

body.kybriq-theme .tab-panel {
  display: none;
}

body.kybriq-theme .tab-panel.active {
  display: block;
}

body.kybriq-theme .mock-screen {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

body.kybriq-theme .system-diagram svg {
  width: 100%;
  max-width: 720px;
}

body.kybriq-theme .system-diagram rect {
  fill: var(--surface);
  stroke: var(--border);
  stroke-width: 1.5;
}

body.kybriq-theme .system-diagram text {
  font-size: 0.75rem;
  fill: var(--text);
  font-weight: 600;
}

body.kybriq-theme .system-diagram path {
  stroke: url(#flow);
  stroke-width: 3;
  stroke-linecap: round;
  fill: none;
  stroke-dasharray: 40;
  animation: flow 3s linear infinite;
}

@keyframes flow {
  from { stroke-dashoffset: 40; }
  to { stroke-dashoffset: 0; }
}

body.kybriq-theme .policy-gates {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.8rem;
}

body.kybriq-theme .toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

body.kybriq-theme .toggle.active {
  background: var(--accent);
  color: #fff;
}

body.kybriq-theme .workflow-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 0.5rem;
  padding-top: 1rem;
}

body.kybriq-theme .workflow-timeline::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(11, 27, 58, 0.2);
}

body.kybriq-theme .workflow-dot {
  position: absolute;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--accent);
  animation: timelineMove 6s linear infinite;
}

body.kybriq-theme .security-stack {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

body.kybriq-theme .security-stack .layer {
  padding: 0.8rem 1rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
}

body.kybriq-theme .pricing-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 1rem;
}

body.kybriq-theme .pricing-card.featured {
  border: 2px solid var(--accent);
}

body.kybriq-theme .price {
  font-size: 1.6rem;
  font-weight: 700;
}

body.kybriq-theme .callout {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
}

body.kybriq-theme .chart {
  display: grid;
  gap: 0.6rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

body.kybriq-theme .bar {
  height: 32px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  width: 0;
  transition: width 1s ease;
  display: flex;
  align-items: center;
  padding-left: 0.75rem;
  color: #fff;
  font-weight: 600;
}

body.kybriq-theme .chart.is-visible .bar {
  width: var(--value);
}

body.kybriq-theme .roi-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

body.kybriq-theme .roi-inputs label {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
}

body.kybriq-theme .roi-inputs input {
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border);
}

body.kybriq-theme .compare-shell {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}

body.kybriq-theme .compare-pane {
  position: relative;
  z-index: 1;
}

body.kybriq-theme .compare-right {
  position: absolute;
  inset: 0;
  padding: 2rem;
  background: linear-gradient(120deg, rgba(14, 165, 164, 0.15), rgba(11, 27, 58, 0.08));
  width: 55%;
  overflow: hidden;
  transition: width 0.2s ease;
}

body.kybriq-theme .compare-slider {
  width: 100%;
  margin-top: 1.5rem;
}

body.kybriq-theme .comparison-grid {
  display: grid;
  gap: 1rem;
}

body.kybriq-theme .comparison-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  padding: 1rem;
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--border);
}

body.kybriq-theme .comparison-row.head {
  background: transparent;
  border: none;
  font-weight: 600;
}

body.kybriq-theme .modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
}

body.kybriq-theme .modal.is-open {
  display: flex;
}

body.kybriq-theme .modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 18, 0.5);
}

body.kybriq-theme .modal-card {
  position: relative;
  z-index: 2;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 720px;
  width: min(90vw, 720px);
  box-shadow: var(--shadow);
}

body.kybriq-theme .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

body.kybriq-theme .modal-close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
}

body.kybriq-theme .modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

body.kybriq-theme .toast {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  background: #0b1b3a;
  color: #fff;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  display: none;
  z-index: 70;
}

body.kybriq-theme .toast.show {
  display: block;
}

body.kybriq-theme .concept-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

body.kybriq-theme .micro-diagram {
  margin-top: 1.5rem;
  width: 120px;
}

body.kybriq-theme .micro-diagram circle,
body.kybriq-theme .micro-diagram line {
  stroke: var(--accent);
  stroke-width: 2;
  fill: none;
}

@media (max-width: 900px) {
  body.kybriq-theme .meter-shell {
    grid-template-columns: 1fr;
  }
  body.kybriq-theme .hero-art {
    min-height: 220px;
  }
  body.kybriq-theme .replay-shell {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
