:root {
  --color-bg: #0a0e17;
  --color-bg-alt: #0d111b;
  --color-accent-blue: #3b82f6;
  --color-accent-orange: #f97316;
  --color-text-primary: #ffffff;
  --color-text-secondary: #d1d5db;
  --color-text-tertiary: #9ca3af;
  --color-border: rgba(59, 130, 246, 0.15);
  --color-node-bg: rgba(15, 23, 42, 0.7);
  --color-node-border: rgba(59, 130, 246, 0.25);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

/* BACKGROUND LAYER */
.background-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
  background: var(--color-bg);
}

.background-grid {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(0deg, rgba(59, 130, 246, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.06) 1px, transparent 1px);
  background-size: 80px 80px;
  background-position: 0 0;
  pointer-events: none;
  opacity: 0.5;
}

.background-radiance {
  position: absolute;
  width: 1200px;
  height: 1200px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
  pointer-events: none;
  animation: subtle-pulse 8s ease-in-out infinite;
}

@keyframes subtle-pulse {
  0%, 100% {
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

/* VIEWPORT CONTAINER */
.viewport-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

/* SHOWCASE CONTAINER */
.showcase-container {
  width: min(94vw, 1500px);
  height: min(92dvh, 920px);
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* WORKFLOW SECTION */
.workflow-section {
  flex: 0 0 auto;
  height: clamp(240px, 48%, 360px);
  position: relative;
  border-bottom: 1px solid rgba(59, 130, 246, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.workflow-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.workflow-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* SVG STYLING */
.workflow-path {
  stroke: #1e293b;
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.workflow-path.active {
  opacity: 0.9;
}

.workflow-node {
  cursor: pointer;
  transition: all 0.3s ease;
}

.workflow-node:hover .node-bg {
  opacity: 0.95;
  stroke: var(--color-accent-blue);
  stroke-width: 2;
}

.workflow-node:hover .node-indicator {
  r: 6.5;
  filter: drop-shadow(0 0 6px var(--color-accent-blue));
}

.node-bg {
  fill: var(--color-node-bg);
  stroke: var(--color-node-border);
  stroke-width: 1.5;
  opacity: 0.75;
  transition: all 0.3s ease;
}

.node-indicator {
  fill: rgba(100, 116, 139, 0.6);
  transition: all 0.3s ease;
}

.node-text {
  font-family: 'Inter', sans-serif;
  font-size: clamp(14px, 1.8vw, 18px);
  font-weight: 700;
  fill: var(--color-text-primary);
  pointer-events: none;
  text-anchor: start;
  letter-spacing: -0.01em;
}

/* CORE NODE */
.core-node {
  filter: drop-shadow(0 0 25px rgba(59, 130, 246, 0.2));
}

.core-ring-outer,
.core-ring-mid {
  fill: none;
  stroke: var(--color-accent-blue);
  stroke-width: 1.5;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.core-ring-outer.processing,
.core-ring-mid.processing {
  opacity: 0.7;
}

.core-bg {
  fill: none;
  stroke: var(--color-accent-blue);
  stroke-width: 1.5;
  opacity: 0.25;
}

.core-inner {
  fill: none;
  stroke: var(--color-accent-blue);
  stroke-width: 1;
  opacity: 0.15;
}

.core-logo-bg {
  fill: rgba(15, 23, 42, 0.9);
  stroke: var(--color-accent-blue);
  stroke-width: 1;
  opacity: 0.4;
}

.logo-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(200px, 28%, 340px);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.core-glow-bg {
  position: absolute;
  width: clamp(180px, 26%, 320px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
  pointer-events: none;
  animation: core-glow 4s ease-in-out infinite;
}

@keyframes core-glow {
  0%, 100% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.7;
  }
}

.core-glow-bg.processing {
  background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, transparent 70%);
}

.logo-image {
  width: 85%;
  height: auto;
  display: block;
  position: relative;
  z-index: 11;
  filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.2));
}

/* LOWER SECTION: TWO COLUMNS */
.lower-section {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(18px, 2.5%, 22px);
  padding: clamp(14px, 2.5%, 20px);
  overflow: hidden;
  border-bottom: 1px solid rgba(59, 130, 246, 0.08);
}

.lower-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 0;
  padding: clamp(12px, 2%, 20px);
}

.eyebrow {
  font-size: clamp(10px, 1.2vw, 12px);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--color-accent-blue);
  text-transform: uppercase;
  margin: 0 0 clamp(12px, 2%, 16px) 0;
  opacity: 0.8;
}

.headline {
  font-size: clamp(36px, 6.5vw, 52px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-text-primary);
  margin: 0;
  letter-spacing: -0.01em;
  max-width: 95%;
}

.lower-right {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.console-container {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  backdrop-filter: blur(8px);
}

.console-header {
  padding: clamp(9px, 1.3%, 12px);
  background: rgba(10, 14, 23, 0.8);
  border-bottom: 1px solid rgba(59, 130, 246, 0.08);
  display: flex;
  align-items: center;
  gap: clamp(8px, 1%, 10px);
  flex-shrink: 0;
}

.console-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(100, 116, 139, 0.4);
  display: block;
}

.console-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(11px, 0.9vw, 13px);
  color: var(--color-text-secondary);
  font-weight: 500;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.console-live {
  font-size: clamp(10px, 0.8vw, 11px);
  color: var(--color-accent-orange);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  animation: live-pulse 2s ease-in-out infinite;
}

.console-live::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--color-accent-orange);
  border-radius: 50%;
  animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes live-pulse {
  0%, 100% {
    opacity: 0.8;
  }
  50% {
    opacity: 1;
  }
}

.console-content {
  flex: 1;
  min-height: 0;
  padding: clamp(10px, 1.5%, 14px);
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(13px, 1vw, 14.5px);
  color: var(--color-text-secondary);
  line-height: 1.5;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.console-input {
  display: flex;
  align-items: center;
  margin-bottom: clamp(10px, 1.5%, 12px);
  min-height: 1.5em;
  flex-wrap: wrap;
}

.prompt {
  color: var(--color-accent-blue);
  font-weight: 600;
  margin-right: 6px;
  flex-shrink: 0;
}

.command {
  color: var(--color-text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

.cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--color-accent-blue);
  margin-left: 3px;
  animation: blink 1s step-end infinite;
}

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

.cursor.hidden {
  display: none;
}

.console-output {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(6px, 0.8%, 8px);
  flex-shrink: 0;
  margin-top: clamp(6px, 0.8%, 8px);
}

.capability-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 1.55em;
  animation: slideIn 0.4s ease forwards;
  opacity: 0;
  transform: translateX(-8px);
  visibility: hidden;
}

.capability-line.visible {
  visibility: visible;
  opacity: 1;
  transform: translateX(0);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.check {
  color: var(--color-accent-blue);
  flex-shrink: 0;
  font-weight: 600;
  min-width: 1.2em;
}

.check.active {
  color: var(--color-accent-orange);
}

.capability-text {
  color: var(--color-text-secondary);
  flex: 1;
  min-width: 0;
  transition: color 0.3s ease;
}

.capability-text.active {
  color: var(--color-accent-orange);
  font-weight: 500;
}

/* EVENT BAR */
.event-bar {
  flex: 0 0 auto;
  height: auto;
  min-height: clamp(65px, 9%, 80px);
  padding: clamp(12px, 1.8%, 16px);
  background: rgba(10, 14, 23, 0.5);
  border-top: 1px solid rgba(59, 130, 246, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 3%, 24px);
  overflow: hidden;
}

.event-chips-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.2%, 12px);
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.event-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: clamp(8px, 1%, 10px) clamp(12px, 1.5%, 14px);
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 7px;
  font-size: clamp(12px, 0.95vw, 13px);
  color: var(--color-text-primary);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.event-chip-primary {
  border-color: rgba(249, 115, 22, 0.4);
  background: rgba(249, 115, 22, 0.12);
  font-weight: 600;
}

.chip-text {
  display: inline;
}

.event-chip-link {
  border-color: rgba(249, 115, 22, 0.3);
  background: rgba(249, 115, 22, 0.12);
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.event-chip-link:hover {
  border-color: rgba(249, 115, 22, 0.6);
  background: rgba(249, 115, 22, 0.16);
  box-shadow: 0 0 14px rgba(249, 115, 22, 0.2);
  transform: translateY(-1px);
}

.event-chip-link:focus-visible {
  outline: 2px solid var(--color-accent-orange);
  outline-offset: 2px;
}

.chip-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
  font-size: 0.9em;
  margin-left: 2px;
  font-weight: 600;
}

.event-chip-link:hover .chip-arrow {
  transform: translate(2px, -2px);
}

.cta-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: clamp(10px, 0.8%, 12px) clamp(18px, 2%, 26px);
  background: linear-gradient(135deg, var(--color-accent-orange) 0%, #ea6f1f 100%);
  border: 1.5px solid rgba(249, 115, 22, 0.4);
  border-radius: 7px;
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(12px, 0.95vw, 13px);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 6px 18px rgba(249, 115, 22, 0.25),
              inset 0 1px 0 rgba(255, 255, 255, 0.15);
  outline: none;
  white-space: nowrap;
}

.cta-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.cta-button:active {
  transform: translateY(0px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.cta-button:focus-visible {
  outline: 2px solid var(--color-accent-orange);
  outline-offset: 2px;
}

.arrow {
  transition: transform 0.3s ease;
  display: inline-block;
}

.cta-button:hover .arrow {
  transform: translate(2px, -2px);
}

/* RESPONSIVE */
@media (max-height: 850px) {
  .workflow-section {
    height: clamp(200px, 40%, 300px);
  }

  .lower-section {
    gap: 16px;
    padding: clamp(12px, 2%, 16px);
  }

  .eyebrow {
    margin-bottom: clamp(6px, 1%, 8px);
  }

  .headline {
    font-size: clamp(28px, 5vw, 40px);
  }

  .console-content {
    padding: clamp(10px, 1.5%, 12px);
  }

  .event-bar {
    height: clamp(55px, 7%, 65px);
  }
}

@media (max-height: 750px) {
  .workflow-section {
    height: clamp(180px, 35%, 260px);
  }

  .lower-section {
    gap: 12px;
    padding: clamp(10px, 1.5%, 12px);
  }

  .headline {
    font-size: clamp(24px, 4vw, 34px);
  }

  .console-content {
    font-size: clamp(12.5px, 0.95vw, 14px);
  }

  .console-input {
    margin-bottom: clamp(8px, 1%, 10px);
  }

  .console-output {
    gap: clamp(5px, 0.7%, 6px);
  }

  .capability-line {
    min-height: 1.45em;
  }

  .event-bar {
    min-height: clamp(50px, 6%, 60px);
    padding: clamp(10px, 1.2%, 12px);
    gap: 12px;
  }

  .event-chips-group {
    gap: clamp(8px, 1%, 10px);
  }

  .event-chip {
    padding: clamp(7px, 0.9%, 9px) clamp(10px, 1.2%, 12px);
    font-size: clamp(11px, 0.9vw, 12px);
  }
}

@media (max-width: 1024px) {
  .lower-section {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .logo-center {
    width: clamp(160px, 22%, 280px);
  }
}

@media (max-width: 768px) {
  html, body {
    height: auto;
    overflow-y: auto;
  }

  .viewport-container {
    position: static;
    height: auto;
    display: block;
    padding: 20px;
  }

  .showcase-container {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
  }

  .workflow-section {
    height: clamp(250px, 50vw, 400px);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
  }

  .lower-section {
    flex-direction: column;
    gap: 20px;
    padding: 20px;
  }

  .headline {
    font-size: clamp(28px, 7vw, 42px);
  }

  .console-content {
    max-height: 300px;
  }

  .event-bar {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    gap: 14px;
    padding: 16px;
  }

  .event-chips-group {
    width: 100%;
    gap: clamp(8px, 1%, 10px);
  }

  .event-chip {
    font-size: 12px;
    padding: 8px 12px;
  }

  .cta-button {
    width: 100%;
    justify-content: center;
  }
}

/* PREFERS REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .background-radiance {
    animation: none;
    opacity: 0.3;
  }

  .core-glow-bg {
    animation: none;
    opacity: 0.4;
  }

  .console-live {
    animation: none;
  }

  .console-live::before {
    animation: none;
  }

  .event-dot {
    animation: none;
  }

  .cursor {
    animation: none;
    opacity: 1;
  }

  .cta-button::before {
    display: none;
  }
}
