:root {
  color-scheme: dark;
  --bg-1: #07111a;
  --bg-2: #0c1722;
  --panel: rgba(12, 19, 29, 0.94);
  --panel-strong: rgba(18, 28, 42, 0.98);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(229, 255, 103, 0.28);
  --text: #f4f8fb;
  --muted: #94a7b9;
  --accent-primary: #e5ff67;
  --accent-secondary: #7bd7ff;
  --accent-glow: rgba(123, 215, 255, 0.28);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
  --radius-xl: 32px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --ease: 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(123, 215, 255, 0.16), transparent 28%),
    radial-gradient(circle at 85% 20%, rgba(229, 255, 103, 0.12), transparent 20%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg-1) 100%);
}

button,
a {
  font: inherit;
}

.page-shell {
  width: min(1240px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(360px, 1.05fr);
  gap: 24px;
  align-items: stretch;
}

.hero-copy,
.live-preview {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(11, 18, 28, 0.92), var(--panel));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-copy {
  padding: 42px;
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  position: absolute;
  inset: auto -20% -28% auto;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(123, 215, 255, 0.18), transparent 68%);
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent-primary);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 5vw, 5.5rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
  max-width: 8ch;
}

.hero-body {
  margin: 22px 0 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-action,
.secondary-action {
  min-height: 50px;
  padding: 0 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition:
    transform var(--ease),
    border-color var(--ease),
    background var(--ease),
    color var(--ease),
    box-shadow var(--ease);
}

.primary-action {
  background: linear-gradient(135deg, var(--accent-primary), #ffc857);
  color: #09111b;
  font-weight: 700;
}

.secondary-action {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

.primary-action:hover,
.secondary-action:hover,
.primary-action:focus-visible,
.secondary-action:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
}

.hero-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-notes span {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.9rem;
}

.live-preview {
  border-radius: var(--radius-xl);
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  gap: 18px;
  min-height: 640px;
}

.preview-stage {
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, rgba(14, 24, 37, 0.92), rgba(9, 16, 26, 0.92));
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.preview-stage-head,
.signal-ribbon,
.board-track,
.side-panel,
.board-card,
.flow-node {
  transition:
    transform var(--ease),
    border-color var(--ease),
    background var(--ease),
    opacity var(--ease),
    box-shadow var(--ease);
}

.preview-stage-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.stage-label,
.panel-tag,
.card-label,
.flow-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.stage-label,
.panel-tag,
.card-label {
  color: var(--accent-primary);
}

.stage-status {
  color: var(--muted);
  font-size: 0.84rem;
}

.signal-ribbon {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(123, 215, 255, 0.18);
  background: rgba(123, 215, 255, 0.08);
  color: #d7f0ff;
}

.signal-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent-secondary);
  box-shadow: 0 0 0 0 rgba(123, 215, 255, 0.4);
  animation: pulse 1.8s infinite;
}

.preview-flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.flow-node {
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  padding: 14px;
  color: var(--text);
  cursor: pointer;
}

.flow-node:hover,
.flow-node:focus-visible,
.flow-node.is-active {
  border-color: var(--line-strong);
  background: rgba(229, 255, 103, 0.08);
  transform: translateY(-2px);
}

.flow-kicker {
  color: var(--accent-primary);
}

.flow-title {
  display: block;
  margin-top: 6px;
  font-size: 1rem;
  font-weight: 700;
}

.flow-copy {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.preview-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: auto;
}

.board-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.board-progress {
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
  transition: width 420ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.board-cards {
  display: grid;
  gap: 12px;
}

.board-card {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.025);
  opacity: 0.58;
  transform: scale(0.985);
}

.board-card.is-active {
  opacity: 1;
  transform: scale(1);
  border-color: rgba(123, 215, 255, 0.26);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.board-card h2,
.side-panel h3 {
  margin: 8px 0 8px;
  font-size: 1.05rem;
  line-height: 1.2;
}

.board-card p,
.side-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.sidebar-panels {
  display: grid;
  gap: 12px;
  align-content: start;
}

.side-panel {
  min-height: 132px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  opacity: 0.58;
}

.side-panel.is-active {
  opacity: 1;
  border-color: rgba(229, 255, 103, 0.24);
  background: linear-gradient(180deg, rgba(229, 255, 103, 0.1), rgba(255, 255, 255, 0.04));
  transform: translateX(-4px);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(123, 215, 255, 0.4);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(123, 215, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(123, 215, 255, 0);
  }
}

@media (max-width: 1040px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .live-preview {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .sidebar-panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body {
    padding: 0;
  }

  .page-shell {
    width: min(100vw, 100%);
    padding: 16px 16px 28px;
  }

  .hero-copy,
  .live-preview {
    border-radius: 24px;
  }

  .hero-copy {
    padding: 28px 22px;
  }

  .live-preview {
    padding: 16px;
  }

  .preview-flow {
    grid-template-columns: 1fr;
  }

  .sidebar-panels {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }
}
