/* ============ TOKENS ============ */
:root {
  --bg-0: #0a0a0b;
  --bg-1: #111113;
  --bg-2: #18181b;
  --bg-3: #1f1f23;
  --text: #f4f4f5;
  --text-dim: #a1a1aa;
  --text-mute: #71717a;
  --border: #27272a;
  --border-strong: #3f3f46;
  --accent: #06b6d4;
  --accent-soft: rgba(6, 182, 212, 0.14);
  --accent-2: #a3e635;
  --font-brand: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #f43f5e;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-12: 48px;
  --sp-16: 64px;
  --max-w: 1080px;
  --grid-line: rgba(244, 244, 245, 0.045);
  --grid-size: 48px;
  --grid-offset-y: 56px;
  --nav-h: 54px;
}

/* ============ RESET ============ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}
html:focus-within {
  scroll-behavior: smooth;
}
section[id],
[id="hero"] {
  scroll-margin-top: 72px;
}

/* Back-to-top button */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: color-mix(in oklab, var(--bg-2) 88%, transparent);
  color: var(--text);
  cursor: pointer;
  z-index: 60;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease;
}
.to-top:not([hidden]) {
  opacity: 1;
  transform: translateY(0);
}
.to-top:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.to-top:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Nav active link (scroll-spy) */
.nav-menu a.is-active {
  color: var(--text);
}
.nav-menu a.is-active::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 4px;
  border-radius: 2px;
  background: var(--accent);
}
body {
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* Global grid sub-layer (fixed, subtle) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  background-position: center var(--grid-offset-y);
  mask-image: radial-gradient(ellipse 100% 80% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 100% 80% at 50% 0%, #000 30%, transparent 75%);
}

/* Ensure content sits above grid (z-index only — do NOT touch position) */
body > *:not(.to-top):not(.nav):not(.modal):not(.skip-link) {
  z-index: 1;
}
.nav,
.modal,
.to-top,
.skip-link {
  z-index: 100;
}
body.modal-open {
  overflow: hidden;
  padding-right: var(--scrollbar-w, 0px);
}
body.modal-open .nav {
  padding-right: var(--scrollbar-w, 0px);
}
img,
video {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}
.skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  z-index: 999;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-md);
  font-weight: 500;
  font-size: 14px;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 8px;
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}

.section-title {
  font-family: var(--font-mono);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--sp-8);
}

/* ============ NAV ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 11, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--sp-3) var(--sp-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.nav-logo {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  font-size: 14px;
  color: var(--text-dim);
}
.nav-menu a {
  transition: color 0.15s;
}
.nav-menu a:hover {
  color: var(--text);
}
.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-md);
  font-weight: 500;
  transition:
    background 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
  will-change: transform;
}
.nav-cta:hover {
  background: #0891b2;
  transform: scale(1.02);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.4);
}
.nav-cta:active {
  transform: scale(0.98);
}
.nav-toggle {
  display: none;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition:
    transform 0.2s,
    opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============ HERO ============ */
.hero {
  position: relative;
  padding: var(--sp-16) 0 var(--sp-12);
  text-align: center;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1100px;
  height: 720px;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse 55% 60% at 50% 45%, rgba(6, 182, 212, 0.16), transparent 65%),
    radial-gradient(ellipse 40% 45% at 65% 35%, rgba(163, 230, 53, 0.07), transparent 70%);
  filter: blur(8px);
}
.hero-title {
  font-family: var(--font-brand);
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--sp-4);
}
.hero-title.glitch {
  animation: glitch 0.18s steps(2) 1;
}
@keyframes glitch {
  0% {
    text-shadow:
      2px 0 var(--danger),
      -2px 0 var(--accent);
    transform: translateX(0);
  }
  50% {
    text-shadow:
      -2px 0 var(--danger),
      2px 0 var(--accent);
    transform: translateX(1px);
  }
  100% {
    text-shadow: none;
    transform: translateX(0);
  }
}
.hero-sub {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto var(--sp-8);
}
.hero-cta {
  display: flex;
  gap: var(--sp-3);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
}
.hero-trust {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mute);
  margin-bottom: var(--sp-12);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hero-trust svg {
  color: var(--accent);
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.1s;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  transition:
    background 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
  will-change: transform;
}
.btn-primary:hover {
  background: #0891b2;
  transform: scale(1.02);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.4);
}
.btn-primary:active {
  transform: scale(0.98);
}
.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.btn-secondary:hover {
  background: var(--bg-2);
  border-color: var(--text-mute);
}
.btn-full {
  width: 100%;
  justify-content: center;
}

/* terminal mock */
.terminal-mock {
  max-width: 560px;
  margin: 0 auto;
  background: var(--bg-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  overflow: hidden;
  text-align: left;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.45),
    0 4px 20px -4px rgba(0, 0, 0, 0.6);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-r {
  background: #ff5f57;
}
.dot-y {
  background: #febc2e;
}
.dot-g {
  background: #28c840;
}
.terminal-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  margin-left: var(--sp-2);
}
.terminal-body {
  padding: var(--sp-4);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-dim);
}
.terminal-line {
  white-space: pre-wrap;
}
.prompt {
  color: var(--success);
}
.cursor {
  color: var(--accent);
  animation: blink 1s steps(2) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
.terminal-out {
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
  animation-delay: 2.2s;
}
.terminal-out-2 {
  animation-delay: 2.8s;
}
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}
.ok {
  color: var(--success);
}

/* ============ SECTIONS ============ */
.problem,
.solution,
.features,
.pricing,
.faq,
.demo,
.final-cta {
  padding: var(--sp-16) 0;
}
.section-title {
  padding-top: var(--sp-2);
}
.problem {
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* steps */
.steps {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: var(--sp-8);
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  min-width: 130px;
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.6);
}
.step-num {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
}
.step-label {
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
}
.step-arrow {
  color: var(--text-mute);
  font-size: 20px;
}
.problem-foot {
  text-align: center;
  color: var(--text-dim);
  font-size: 15px;
}
.problem-foot strong {
  color: var(--text);
}

/* ====== FLOW STAGE (Section 3) ====== */
.flow-stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  max-width: 1080px;
  margin: 0 auto var(--sp-6);
}
.stage-panel {
  position: relative;
  background: var(--bg-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 4px 20px -4px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  min-height: 440px;
  transition: min-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
/* Mobile order: Terminal first, then Connector, then Claude */
.stage-terminal {
  order: 1;
}
.stage-connector {
  order: 2;
}
.stage-browser {
  order: 3;
}
.demo-trigger {
  order: 4;
}
.stage-browser::before,
.stage-terminal::before {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
  z-index: 0;
}
.stage-browser::before {
  top: -80px;
  left: -80px;
  background: rgba(6, 182, 212, 0.18);
}
.stage-terminal::before {
  top: -80px;
  right: -80px;
  background: rgba(163, 230, 53, 0.14);
}
.panel-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 10px var(--sp-3);
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 1;
}
.panel-url {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  margin-left: var(--sp-2);
}
.panel-body {
  position: relative;
  z-index: 1;
  padding: var(--sp-4) var(--sp-4) var(--sp-6);
  font-size: 13px;
  line-height: 1.6;
  flex: 1;
}

/* Browser chat bubbles */
.chat-bubble {
  margin-bottom: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  max-width: 90%;
  position: relative;
  animation: bubbleFadeIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes bubbleFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.chat-role {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: middle;
}
.chat-user {
  margin-left: auto;
  background: var(--bg-2);
  color: var(--text);
  font-size: 13px;
}
.chat-user .chat-role {
  background: rgba(161, 161, 170, 0.15);
  color: var(--text-dim);
}
.chat-ai {
  background: rgba(6, 182, 212, 0.06);
  border: 1px solid rgba(6, 182, 212, 0.38);
  color: var(--text);
}
.chat-ai .chat-role.ai {
  background: rgba(6, 182, 212, 0.2);
  color: #22d3ee;
}
.chat-code {
  margin-top: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-dim);
  white-space: pre;
  overflow-x: auto;
  animation: codeSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes codeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-stream {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 220px;
}

/* Typing dots */
.typing-dots {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  margin-left: 4px;
}
.typing-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: dotPulse 1.2s ease-in-out infinite;
}
.typing-dots span:nth-child(2) {
  animation-delay: 0.15s;
}
.typing-dots span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes dotPulse {
  0%,
  60%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

/* Terminal stream */
.term-stream {
  min-height: 200px;
}
.term-stream .term-line {
  opacity: 0;
  animation: termFadeIn 0.25s ease forwards;
}
@keyframes termFadeIn {
  to {
    opacity: 1;
  }
}

/* Terminal */
.terminal-body {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-dim);
  background: var(--bg-0);
}
.term-line {
  white-space: pre-wrap;
}
.term-banner {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding-bottom: var(--sp-3);
  margin-bottom: var(--sp-3);
  border-bottom: 1px dashed var(--border);
}
.term-logo {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.term-banner-text {
  color: var(--text);
  font-weight: 600;
  font-family: var(--font-brand);
  letter-spacing: -0.01em;
}
.term-banner-ver {
  color: var(--text-mute);
  font-size: 11px;
  margin-left: auto;
}
.term-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  font-size: 13px;
  line-height: 1.6;
}
.term-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  text-align: center;
  font-family: var(--font-mono);
  user-select: none;
}
.term-glyph-cmd {
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
}
.term-glyph-dot {
  color: var(--accent);
  font-size: 9px;
  line-height: 1;
}
.term-status.tone-lime .term-glyph-dot {
  color: var(--accent-2);
  font-size: 8px;
  animation: readyGlow 2.2s ease-in-out infinite;
}
@keyframes readyGlow {
  0%, 100% {
    opacity: 0.65;
    transform: scale(0.95);
  }
  50% {
    opacity: 1;
    transform: scale(1.25);
  }
}
.term-glyph-arrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.term-glyph-ok {
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.term-cmd .term-text {
  color: var(--text);
  font-weight: 500;
}
.term-status .term-label {
  display: inline-block;
  min-width: 68px;
  flex-shrink: 0;
  color: var(--text-dim);
  font-weight: 500;
}
.term-status .term-sep {
  color: var(--text-mute);
  opacity: 0.5;
  margin-right: 2px;
}
.term-status .term-val {
  color: var(--text-dim);
}
.term-status.tone-lime .term-val {
  color: var(--accent-2);
}
.term-event {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  color: var(--text);
}
.term-event .term-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-weight: 500;
}
.term-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 500;
  padding: 1px 7px;
  border-radius: 4px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.28);
  color: var(--accent);
  line-height: 1.3;
}
.term-step {
  color: var(--text-dim);
}
.term-step .term-text {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  flex-wrap: wrap;
}
.term-count {
  color: var(--text-mute);
}
.term-file {
  color: var(--text);
  font-weight: 600;
}
.term-meta {
  color: var(--text-mute);
}
.term-ok {
  color: var(--text);
}
.term-ok .term-text {
  color: var(--text);
}
.term-info {
  color: var(--text-dim);
}
.term-sub {
  color: var(--text-mute);
  font-size: 12px;
}

/* Connector */
.stage-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 60px;
  position: relative;
  z-index: 2;
}
.connector-line {
  flex: 1;
  width: 2px;
  background: linear-gradient(
    to bottom,
    rgba(163, 230, 53, 0),
    rgba(163, 230, 53, 0.55),
    rgba(6, 182, 212, 0.55),
    rgba(6, 182, 212, 0)
  );
  min-height: 24px;
}
.connector-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  animation: connPulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}
.connector-badge > span {
  display: inline-block;
  transform: rotate(90deg);
}
@keyframes connPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(6, 182, 212, 0);
    opacity: 0.75;
  }
  50% {
    box-shadow: 0 0 0 8px rgba(6, 182, 212, 0.1);
    opacity: 1;
  }
}

/* Blinking cursor */
.blink-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--accent);
  vertical-align: middle;
  margin-left: 4px;
  animation: blink 1s step-end infinite;
}
.blink-cursor::after {
  content: "";
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* Demo trigger */
.demo-trigger {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin: var(--sp-4) auto 0;
  padding: 10px 20px;
  background: var(--bg-1);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  isolation: isolate;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.25s ease;
  grid-column: 1 / -1;
  justify-self: center;
  will-change: transform;
}
.demo-trigger::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 60%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.22) 35%,
    rgba(6, 182, 212, 0.45) 50%,
    rgba(255, 255, 255, 0.22) 65%,
    transparent 100%
  );
  transform: translateX(-180%);
  opacity: 0;
  animation: shine-sweep 3.6s ease-in-out 1.5s infinite;
}
.demo-trigger > * {
  position: relative;
  z-index: 1;
}
.demo-trigger {
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow:
    0 0 0 1px rgba(6, 182, 212, 0.12),
    0 4px 18px rgba(6, 182, 212, 0.15);
}
.demo-trigger:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  transform: scale(1.02);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}
.demo-trigger:hover::before {
  animation-duration: 0.6s;
  animation-delay: 0s;
}
.demo-trigger-play {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  transition: transform 0.2s ease;
}
.demo-trigger:hover .demo-trigger-play {
  transform: scale(1.12);
}

@keyframes shine-sweep {
  0% {
    transform: translateX(-180%);
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  22% {
    transform: translateX(220%);
    opacity: 1;
  }
  30% {
    transform: translateX(220%);
    opacity: 0;
  }
  100% {
    transform: translateX(220%);
    opacity: 0;
  }
}

/* Demo video in modal */
.demo-video {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-0);
  object-fit: cover;
  display: block;
}
.modal-video-wrap {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
}
.modal-card-video {
  max-width: 860px;
}

/* Desktop: 2 columns with connector between */
@media (min-width: 900px) {
  .flow-stage {
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: auto auto;
    gap: var(--sp-6) var(--sp-6);
    align-items: stretch;
  }
  .stage-panel {
    min-height: 440px;
  }
  /* Desktop order: Claude (left) -> Connector (middle) -> Terminal (right) */
  .stage-browser {
    order: 1;
  }
  .stage-connector {
    order: 2;
    flex-direction: row;
    min-height: auto;
  }
  .stage-terminal {
    order: 3;
  }
  .connector-badge > span {
    transform: none;
  }
  .connector-line {
    width: auto;
    height: 2px;
    min-height: 2px;
    min-width: 20px;
    background: linear-gradient(
      to right,
      rgba(6, 182, 212, 0),
      rgba(6, 182, 212, 0.55),
      rgba(163, 230, 53, 0.55),
      rgba(163, 230, 53, 0)
    );
  }
  .demo-trigger {
    order: 4;
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .connector-badge,
  .blink-cursor {
    animation: none;
    opacity: 1;
  }
  .demo-trigger::before,
  .price-badge::before,
  .yt-play::after {
    animation: none;
  }
  .demo-trigger:hover,
  .btn-primary:hover,
  .nav-cta:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .price-card-pro::after {
    animation: subtle-pulse 3.5s ease-in-out infinite;
  }
}

@media (max-width: 640px) {
  body::before {
    background-size: 32px 32px;
    background-position: center 56px;
    mask-image: radial-gradient(ellipse 120% 60% at 50% 0%, #000 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 120% 60% at 50% 0%, #000 20%, transparent 70%);
  }
  .hero::before {
    height: 480px;
  }
}
.solution-bullets {
  display: flex;
  gap: var(--sp-6);
  justify-content: center;
  list-style: none;
  flex-wrap: wrap;
  color: var(--text-dim);
  font-size: 14px;
}
.solution-bullets li::before {
  content: "•";
  color: var(--accent);
  margin-right: var(--sp-2);
}

/* features */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}
.feature-card {
  background: var(--bg-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: var(--sp-6);
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.6);
  transition:
    background 0.15s,
    border-color 0.15s,
    box-shadow 0.15s;
}
.feature-card:hover {
  background: var(--bg-2);
  border-color: var(--border-strong);
}
.feature-icon {
  color: var(--accent);
  width: 24px;
  height: 24px;
  margin-bottom: var(--sp-3);
}
.feature-icon svg {
  width: 100%;
  height: 100%;
}
.feature-title {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: var(--sp-2);
}
.feature-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* pricing */
.pricing {
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  margin-bottom: var(--sp-6);
}
.price-card {
  background: var(--bg-0);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  padding: var(--sp-8);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.6);
}
.price-card-pro {
  position: relative;
  border-color: var(--accent);
  background: var(--bg-1);
}
.price-card-pro::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  box-shadow:
    0 0 0 1px rgba(6, 182, 212, 0.65),
    0 0 22px rgba(6, 182, 212, 0.22);
  opacity: 0.7;
}

@keyframes subtle-pulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 0.9;
  }
}
.price-badge {
  position: absolute;
  top: -16px;
  left: var(--sp-8);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 6px 16px;
  border-radius: var(--r-full, 999px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
}
.price-badge::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 100%
  );
  transform: translateX(-150%);
  animation: badge-shimmer 4.5s ease-in-out infinite;
}
.price-badge {
  z-index: 1;
}

@keyframes badge-shimmer {
  0%,
  60% {
    transform: translateX(-150%);
  }
  85% {
    transform: translateX(280%);
  }
  100% {
    transform: translateX(280%);
  }
}
.price-name {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--sp-3);
}
.price-amount {
  font-size: 36px;
  font-weight: 600;
  margin-bottom: var(--sp-6);
}
.price-per {
  font-size: 14px;
  color: var(--text-mute);
  font-weight: 400;
}
.price-list {
  list-style: none;
  margin-bottom: var(--sp-6);
  flex: 1;
}
.price-list li {
  font-size: 14px;
  color: var(--text-dim);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--border);
}
.price-list li:last-child {
  border-bottom: none;
}
.price-list li::before {
  content: "✓";
  color: var(--success);
  margin-right: var(--sp-2);
}
.pricing-foot {
  text-align: center;
  color: var(--text-mute);
  font-size: 14px;
}
.link-btn {
  color: var(--accent);
  text-decoration: underline;
  font-size: 14px;
}
.link-btn:hover {
  color: #22d3ee;
}

.final-cta {
  position: relative;
  isolation: isolate;
}
.final-cta::before {
  content: "";
  position: absolute;
  inset: -80px 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 80% at 50% 50%, rgba(6, 182, 212, 0.12), transparent 70%),
    radial-gradient(ellipse 45% 60% at 40% 60%, rgba(163, 230, 53, 0.06), transparent 70%);
  filter: blur(8px);
}

/* demo */
.yt-wrap {
  max-width: 800px;
  margin: 0 auto var(--sp-6);
  aspect-ratio: 16/9;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
}
.yt-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.yt-poster {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: var(--bg-1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.yt-poster-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.yt-poster:hover .yt-poster-img {
  transform: scale(1.03);
}
.yt-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 11, 0.2), rgba(10, 10, 11, 0.5));
  transition: background 0.2s;
  pointer-events: none;
  z-index: 1;
}
.yt-poster:hover::before {
  background: linear-gradient(180deg, rgba(10, 10, 11, 0.05), rgba(10, 10, 11, 0.3));
}
.yt-play {
  position: relative;
  z-index: 2;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.35);
}
.yt-play::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  border: 2px solid rgba(6, 182, 212, 0.85);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.35);
  animation: ripple-pulse 2.4s ease-out infinite;
}

@keyframes ripple-pulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.3);
    opacity: 0;
  }
}
.yt-play svg {
  margin-left: 3px;
}
.yt-poster:hover .yt-play {
  transform: scale(1.1);
}
.demo-foot {
  text-align: center;
  color: var(--text-mute);
  font-size: 14px;
}

/* ============ SECTION HEADER (FAQ, reusable) ============ */
.section-header {
  text-align: center;
  margin-bottom: var(--sp-8);
}
.section-sub {
  color: var(--text-dim);
  font-size: 15px;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ============ FAQ ============ */
.faq {
  background: var(--bg-0);
}
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.faq-item {
  background: var(--bg-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.6);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}
.faq-item:hover {
  border-color: rgba(6, 182, 212, 0.25);
}
.faq-item.is-open {
  border-color: var(--accent);
  background: var(--bg-2);
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.08);
}
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: 18px 24px;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  cursor: pointer;
}
.faq-icon {
  position: relative;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}
.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--accent);
  border-radius: 1px;
  transition: transform 0.2s ease;
}
.faq-icon::before {
  width: 14px;
  height: 2px;
  transform: translate(-50%, -50%);
}
.faq-icon::after {
  width: 2px;
  height: 14px;
  transform: translate(-50%, -50%);
}
.faq-item.is-open .faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease-out;
}
.faq-item.is-open .faq-a {
  grid-template-rows: 1fr;
}
.faq-a > p {
  overflow: hidden;
  margin: 0;
  padding: 0 24px;
  min-height: 0;
  max-height: 0;
  opacity: 0;
  transition:
    max-height 0.25s ease-out,
    opacity 0.2s ease-out,
    padding 0.25s ease-out;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.75;
}
.faq-item.is-open .faq-a > p {
  max-height: 500px;
  opacity: 1;
  padding: 0 24px 22px;
}

/* final cta */
.final-cta {
  text-align: center;
}

/* footer */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--sp-8) 0;
  background: var(--bg-1);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  align-items: center;
  text-align: center;
}
.footer {
  font-size: 13px;
  color: var(--text-mute);
}
.footer-links {
  display: flex;
  gap: var(--sp-6);
}
.footer-links a:hover {
  color: var(--text);
}

/* ============ MODAL ============ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
}
.modal.is-open {
  display: flex;
}
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}
.modal-card {
  position: relative;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--sp-8);
}
.modal-close {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  font-size: 22px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover {
  background: var(--bg-2);
  color: var(--text);
}
.modal-title {
  font-family: var(--font-brand);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--sp-6);
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.compare-table th,
.compare-table td {
  padding: var(--sp-3);
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.compare-table th {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.compare-table td:nth-child(2),
.compare-table td:nth-child(3) {
  text-align: center;
}
.compare-table th:nth-child(2),
.compare-table th:nth-child(3) {
  text-align: center;
}
.modal-note {
  margin-top: var(--sp-4);
  font-size: 12px;
  color: var(--text-mute);
  font-style: italic;
}

/* ============ COMING SOON MODAL ============ */
.modal-card-center {
  max-width: 480px;
  text-align: center;
}
.coming-soon-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--sp-3);
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--accent, var(--text));
  line-height: 0;
  flex: 0 0 auto;
}
.coming-soon-icon svg {
  display: block;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
}
.modal-title-center {
  text-align: center;
  margin-bottom: var(--sp-4);
}
.coming-soon-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-dim);
  margin-bottom: var(--sp-3);
}
.coming-soon-text:last-of-type {
  margin-bottom: 0;
}
.coming-soon-text strong {
  color: var(--text);
}
.coming-soon-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}
.coming-soon-actions .btn {
  width: 100%;
  justify-content: center;
}
@media (min-width: 480px) {
  .coming-soon-actions {
    flex-direction: row;
  }
  .coming-soon-actions .btn {
    width: auto;
    flex: 1 1 0;
  }
}

/* ============ RESPONSIVE ============ */
@media (min-width: 768px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}
@media (min-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
  }
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-1);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--sp-2);
    display: none;
  }
  .nav-menu.is-open {
    display: flex;
  }
  .nav-menu a {
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--r-sm);
  }
  .nav-menu a:hover {
    background: var(--bg-2);
  }
  .nav-cta {
    text-align: center;
    margin-top: var(--sp-2);
  }
  .steps {
    flex-direction: column;
  }
  .step-arrow {
    transform: rotate(90deg);
  }
  .hero {
    padding: var(--sp-12) 0 var(--sp-8);
  }
  .problem,
  .solution,
  .features,
  .pricing,
  .faq,
  .demo,
  .final-cta {
    padding: var(--sp-12) 0;
  }
  .modal-card {
    padding: var(--sp-6);
  }
  .compare-table {
    font-size: 13px;
  }
  .compare-table th,
  .compare-table td {
    padding: var(--sp-2);
  }
}

/* ============ A11Y ============ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .cursor {
    animation: none;
    opacity: 1;
  }
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
