/* Ralphify landing page — cinematic dark theme */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --purple: #8B6CF0;
  --purple-dark: #7C5CE0;
  --purple-light: #A78BF5;
  --purple-deep: #7C4DFF;
  --orange: #E06030;
  --orange-light: #E87B4A;
  --bg: #050509;
  --bg-surface: #0A0A14;
  --bg-elevated: #10101E;
  --border-subtle: rgba(139, 108, 240, 0.06);
  --border-medium: rgba(139, 108, 240, 0.15);
  --text: #E2E2F2;
  --text-muted: #6E6E96;
  --mono: "SF Mono", "Fira Code", "JetBrains Mono", Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius: 10px;
  --max-width: 1100px;
}

/* -- Utilities ------------------------------------------------ */

.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;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--purple);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  z-index: 100;
  text-decoration: none;
  font-family: var(--sans);
}

.skip-link:focus {
  top: 0.5rem;
  color: #fff;
  text-decoration: none;
}

/* -- Base ----------------------------------------------------- */

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: rgba(167, 139, 245, 0.3);
  color: inherit;
}

code {
  font-family: var(--mono);
}

p code,
dd code,
li code {
  background: rgba(167, 139, 245, 0.10);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.85em;
}

a {
  color: var(--purple-light);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* -- Sections shared ------------------------------------------ */

section {
  padding: 7rem 2rem;
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-inner-narrow {
  max-width: 760px;
}

.section-heading {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.05em;
  line-height: 1.04;
  text-align: center;
}

.section-heading.left {
  text-align: left;
}

.section-eyebrow {
  text-align: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--purple-light);
  margin-bottom: 1.25rem;
  font-weight: 600;
}

.section-eyebrow.left {
  text-align: left;
}

.section-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 600px;
  margin: 1.25rem auto 0;
  line-height: 1.7;
}

.section-sub.left {
  text-align: left;
  margin-left: 0;
}

.section-sub strong {
  color: var(--text);
}

/* Fade-up animation */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #8B6CF0 0%, #D06040 50%, #E87B4A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* -- Nav ------------------------------------------------------ */

header {
  background: rgba(5, 5, 9, 0.65);
  backdrop-filter: blur(40px) saturate(1.4);
  -webkit-backdrop-filter: blur(40px) saturate(1.4);
  border-bottom: 1px solid rgba(139, 108, 240, 0.04);
  padding: 0.75rem 2rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  color: #fff;
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo:hover {
  text-decoration: none;
}

.logo-symbol {
  background: linear-gradient(135deg, var(--purple), var(--orange-light));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: #fff;
  text-decoration: none;
}

.nav-cta {
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  color: #fff !important;
  padding: 0.4rem 1rem;
  border-radius: 8px;
  font-weight: 600 !important;
  font-size: 0.78rem !important;
  transition: all 0.15s ease !important;
  box-shadow: 0 2px 8px rgba(139, 108, 240, 0.2);
}

.nav-cta:hover {
  box-shadow: 0 4px 16px rgba(139, 108, 240, 0.35);
  transform: translateY(-1px);
}

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

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* -- Hero ----------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  padding: 0 2rem 4rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
}

.hero-glow-1 {
  width: 800px;
  height: 800px;
  top: -30%;
  left: 10%;
  background: radial-gradient(circle, rgba(139, 108, 240, 0.25) 0%, transparent 60%);
  animation: glow-drift-1 22s ease-in-out infinite alternate;
}

.hero-glow-2 {
  width: 600px;
  height: 600px;
  top: 10%;
  right: -5%;
  background: radial-gradient(circle, rgba(232, 123, 74, 0.15) 0%, transparent 60%);
  animation: glow-drift-2 26s ease-in-out infinite alternate;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(139, 108, 240, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 30%, black 15%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 30%, black 15%, transparent 70%);
}

@keyframes glow-drift-1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 25px) scale(1.08); }
}

@keyframes glow-drift-2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-40px, 50px) scale(1.12); }
}

/* Hero content — centered layout */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  padding: 0.4rem 1.1rem;
  border-radius: 100px;
  border: 1px solid rgba(139, 108, 240, 0.12);
  background: rgba(139, 108, 240, 0.04);
  margin-bottom: 2.5rem;
  letter-spacing: 0.03em;
  backdrop-filter: blur(8px);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34D399;
  display: inline-block;
  animation: pulse-glow 2s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
  flex-shrink: 0;
}

.status-dot-dead {
  background: #F87171;
  box-shadow: 0 0 8px rgba(248, 113, 113, 0.3);
  animation: none;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(52, 211, 153, 0.5); }
  50% { opacity: 0.6; box-shadow: 0 0 16px rgba(52, 211, 153, 0.3); }
}

/* Hero headline */
.hero-headline {
  max-width: 900px;
  margin-bottom: 1.5rem;
}

.hero-line-muted {
  display: block;
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.hero-line-bright {
  display: block;
  font-size: clamp(2.8rem, 6.5vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.05em;
  margin-top: 0.25rem;
}

.hero-runner {
  display: inline-block;
  font-size: 0.6em;
  vertical-align: middle;
  margin-left: 0.1em;
  animation: runner-jog 0.5s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(232, 123, 74, 0.4));
}

@keyframes runner-jog {
  0%, 100% { transform: translateY(0) translateX(0); }
  25% { transform: translateY(-6px) translateX(2px); }
  50% { transform: translateY(0) translateX(4px); }
  75% { transform: translateY(-4px) translateX(2px); }
}

/* Hero sub / actions */
.hero-sub {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.7;
  max-width: 480px;
  text-align: center;
}

.hero-sub code {
  background: linear-gradient(135deg, rgba(139, 108, 240, 0.15), rgba(232, 123, 74, 0.08));
  padding: 0.15em 0.45em;
  border-radius: 4px;
  font-size: 0.88em;
  color: var(--purple-light);
  border: 1px solid rgba(139, 108, 240, 0.12);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.6rem;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  border: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  color: #fff;
  box-shadow: 0 2px 12px rgba(139, 108, 240, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 6px 24px rgba(139, 108, 240, 0.4);
  transform: translateY(-1px);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid rgba(139, 108, 240, 0.15);
}

.btn-ghost:hover {
  background: rgba(139, 108, 240, 0.06);
  color: #fff;
  border-color: rgba(139, 108, 240, 0.3);
}

/* Hero install command */
.hero-install {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: 10px;
  padding: 0.55rem 0.7rem 0.55rem 1.1rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.hero-install code {
  color: var(--text);
}

.copy-btn {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  background: rgba(139, 108, 240, 0.08);
  color: var(--purple-light);
  border: 1px solid rgba(139, 108, 240, 0.15);
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.copy-btn:hover {
  background: rgba(139, 108, 240, 0.15);
  border-color: rgba(139, 108, 240, 0.3);
}

.copy-btn.copied {
  background: rgba(52, 211, 153, 0.12);
  color: #34D399;
  border-color: rgba(52, 211, 153, 0.2);
}

/* -- Hero terminal -------------------------------------------- */

.hero-terminal-wrapper {
  position: relative;
  z-index: 2;
  max-width: 680px;
  width: 100%;
  margin: 3.5rem auto 0;
}

.terminal-window {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: 12px;
  overflow: hidden;
}

.terminal-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(10, 10, 20, 0.6);
}

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

.terminal-dot.red { background: #FF5F57; }
.terminal-dot.yellow { background: #FFBD2E; }
.terminal-dot.green { background: #28CA41; }

.terminal-title {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.terminal-body {
  padding: 1rem 1.25rem;
  min-height: 240px;
  max-height: 320px;
  overflow-y: auto;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.65;
}

.terminal-body::-webkit-scrollbar {
  width: 0;
}

.term-line {
  white-space: pre;
}

.term-dim { color: var(--text-muted); }
.term-ok { color: #34D399; }
.term-err { color: #F87171; }
.term-purple { color: var(--purple-light); }

.cursor-blink {
  animation: blink 1s step-end infinite;
  color: var(--purple-light);
}

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

.terminal-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  background: rgba(10, 10, 20, 0.3);
  border-radius: 0 0 12px 12px;
}

.terminal-status-text {
  color: #34D399;
  font-weight: 600;
}

.terminal-status-meta {
  margin-left: auto;
  opacity: 0.6;
}

/* -- Scene (Standup) ------------------------------------------ */

.scene {
  background: var(--bg);
  border-top: 1px solid var(--border-subtle);
}

.scene-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.scene-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: 14px;
  padding: 2rem 1.5rem;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.scene-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.scene-card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.scene-card-quote {
  font-size: 1rem;
  color: var(--text);
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.scene-card-commits {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: #34D399;
  font-weight: 600;
}

.scene-card-empty {
  color: #F87171;
}

.scene-you {
  border-color: rgba(248, 113, 113, 0.2);
  background: rgba(248, 113, 113, 0.03);
}

.scene-them {
  border-color: rgba(52, 211, 153, 0.15);
}

.check {
  color: #34D399;
  font-weight: 700;
}

.scene-punchline {
  text-align: center;
  font-size: 1.3rem;
  color: var(--text-muted);
  margin-top: 3rem;
}

.scene-punchline strong {
  color: #fff;
}

/* -- Fix (Before/After) --------------------------------------- */

.fix {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
}

.fix-comparison {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-top: 3rem;
}

.fix-card {
  background: var(--bg);
  border: 1px solid var(--border-medium);
  border-radius: 14px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fix-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.fix-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(10, 10, 20, 0.4);
}

.fix-card-body {
  padding: 1rem 1.25rem;
}

.fix-line {
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 0.35rem 0;
  color: var(--text);
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.fix-line code {
  color: var(--purple-light);
  font-size: 0.78rem;
}

.fix-empty {
  color: var(--text-muted);
  opacity: 0.4;
}

.fix-ts {
  color: var(--text-muted);
  min-width: 80px;
  font-size: 0.72rem;
  flex-shrink: 0;
}

.fix-result {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.fix-result-bad {
  color: #F87171;
}

.fix-result-good {
  color: #34D399;
}

.fix-vs {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  align-self: center;
  padding-top: 2rem;
  opacity: 0.5;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.fix-before {
  border-color: rgba(248, 113, 113, 0.12);
}

.fix-after {
  border-color: rgba(52, 211, 153, 0.15);
}

/* -- Loop ----------------------------------------------------- */

.loop {
  background: var(--bg);
  border-top: 1px solid var(--border-subtle);
}

.loop-visual {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 3rem;
  justify-content: center;
}

.loop-step {
  text-align: center;
  max-width: 240px;
}

.loop-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--purple-deep));
  color: #fff;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 16px rgba(139, 108, 240, 0.2);
}

.loop-step h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.loop-step p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.loop-arrow {
  color: var(--text-muted);
  width: 28px;
  flex-shrink: 0;
  margin-top: 0.6rem;
  opacity: 0.35;
}

.loop-return {
  text-align: center;
  margin-top: 2rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.5;
}

/* -- Ralph file ----------------------------------------------- */

.ralph-file {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
}

.ralph-split {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
}

.ralph-features {
  list-style: none;
  margin-top: 1.5rem;
}

.ralph-features li {
  padding: 0.4rem 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.ralph-features li strong {
  color: var(--purple-light);
  font-family: var(--mono);
  font-size: 0.85rem;
}

.ralph-code pre {
  padding: 1.25rem;
  font-size: 0.8rem;
  line-height: 1.7;
  overflow-x: auto;
}

.hl-dim { color: var(--text-muted); opacity: 0.5; }
.hl-key { color: var(--purple-light); }
.hl-placeholder { color: var(--orange-light); }

/* -- Why loops ------------------------------------------------ */

.why {
  background: var(--bg);
  border-top: 1px solid var(--border-subtle);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: 14px;
  padding: 2rem 1.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(139, 108, 240, 0.08);
}

.card-icon {
  font-family: var(--mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--purple-light);
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* -- Agents --------------------------------------------------- */

.agents {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
}

.agent-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 3rem;
}

.agent-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border-medium);
  border-radius: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.agent-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  border-color: rgba(139, 108, 240, 0.3);
  box-shadow: 0 8px 24px rgba(139, 108, 240, 0.08);
}

.agent-icon {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}

.agent-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 0.25rem;
}

.agent-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* -- Install -------------------------------------------------- */

.install {
  background: var(--bg);
  border-top: 1px solid var(--border-subtle);
}

.install-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-top: 3rem;
}

.install-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
}

.install-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--purple-deep));
  color: #fff;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.install-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.install-cmd {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: 10px;
  padding: 0.55rem 0.7rem 0.55rem 1.1rem;
  font-family: var(--mono);
  font-size: 0.8rem;
}

.install-cmd code {
  color: var(--text);
}

.install-connector {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--border-medium), rgba(139, 108, 240, 0.06));
  margin: 0 0.5rem;
  margin-top: 1rem;
}

.install-alt {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2rem;
}

/* -- FAQ ------------------------------------------------------ */

.faq {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
}

.faq-list {
  margin-top: 2.5rem;
}

.faq-item {
  border-bottom: 1px solid var(--border-medium);
}

.faq-item:first-child {
  border-top: 1px solid var(--border-medium);
}

.faq-item summary {
  padding: 1.25rem 0;
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-family: var(--mono);
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding-bottom: 1.25rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* -- Bottom CTA ----------------------------------------------- */

.cta-bottom {
  position: relative;
  padding: 8rem 2rem;
  text-align: center;
  overflow: hidden;
}

.cta-bottom-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.cta-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
}

.cta-glow-1 {
  width: 600px;
  height: 600px;
  top: -20%;
  left: 20%;
  background: radial-gradient(circle, rgba(139, 108, 240, 0.2) 0%, transparent 60%);
}

.cta-glow-2 {
  width: 500px;
  height: 500px;
  bottom: -20%;
  right: 20%;
  background: radial-gradient(circle, rgba(232, 123, 74, 0.12) 0%, transparent 60%);
}

.cta-bottom .section-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta-bottom-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: #34D399;
  margin-bottom: 2rem;
  font-weight: 600;
}

.cta-bottom-headline {
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.05em;
  line-height: 1.05;
  margin-bottom: 2.5rem;
}

.cta-cmd {
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
}

/* -- Footer --------------------------------------------------- */

footer {
  padding: 3.5rem 2rem 2.5rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.footer-nav {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  gap: 6rem;
  margin-bottom: 2.5rem;
}

.footer-col h3 {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.4rem;
}

.footer-col a {
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.footer-col a:hover {
  color: #fff;
  text-decoration: none;
}

.footer-copy {
  max-width: var(--max-width);
  margin: 0 auto;
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.6;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.footer-copy a {
  color: inherit;
}

/* -- Responsive ----------------------------------------------- */

@media (max-width: 768px) {
  /* Prevent horizontal overflow */
  body {
    overflow-x: hidden;
  }

  .terminal-window,
  .hero-terminal-wrapper,
  .install-cmd,
  .cta-cmd {
    max-width: 100%;
  }

  section {
    padding: 3.5rem 1rem;
  }

  .hero {
    padding: 0 1rem 2.5rem;
  }

  .hero-content {
    padding-top: 3rem;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 0.45rem 1rem;
    gap: 0.5rem;
  }

  .hero-line-muted {
    font-size: clamp(1.1rem, 5vw, 1.6rem);
  }

  .hero-line-bright {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
  }

  .btn {
    width: 100%;
    min-height: 44px;
    padding: 0.75rem 1.6rem;
  }

  .hero-install {
    max-width: 100%;
    font-size: 0.75rem;
    padding: 0.5rem 0.6rem 0.5rem 0.9rem;
  }

  .copy-btn {
    min-height: 36px;
    min-width: 44px;
    padding: 0.4rem 0.75rem;
    font-size: 0.72rem;
  }

  /* Terminal mobile */
  .term-line {
    white-space: pre-wrap;
    word-break: break-all;
  }

  .terminal-body {
    font-size: 0.72rem;
    padding: 0.75rem 1rem;
    min-height: 200px;
  }

  /* Nav mobile */
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(5, 5, 9, 0.95);
    backdrop-filter: blur(40px);
    padding: 1rem 2rem 1.5rem;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
  }

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

  /* Scene cards stack */
  .scene-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .scene-card {
    padding: 1.5rem 1.25rem;
  }

  .scene-card-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
  }

  .scene-punchline {
    font-size: 1.1rem;
    margin-top: 2rem;
  }

  /* Fix comparison stack */
  .fix-comparison {
    grid-template-columns: 1fr;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
  }

  .fix-vs {
    text-align: center;
    padding-top: 0;
  }

  .fix-card-body {
    padding: 0.75rem 1rem;
  }

  .fix-line {
    gap: 0.5rem;
    font-size: 0.72rem;
  }

  .fix-ts {
    min-width: 65px;
    font-size: 0.65rem;
  }

  /* Loop steps stack */
  .loop-visual {
    flex-direction: column;
    align-items: center;
  }

  .loop-arrow {
    transform: rotate(90deg);
    margin: 0;
  }

  .loop-step {
    max-width: 100%;
  }

  /* Ralph split stack */
  .ralph-split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .section-heading.left,
  .section-eyebrow.left,
  .section-sub.left {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .ralph-features {
    text-align: center;
  }

  .ralph-code pre {
    font-size: 0.72rem;
    padding: 1rem;
  }

  /* Cards stack */
  .card-grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 1.5rem 1.25rem;
  }

  /* Agents 2 col */
  .agent-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .agent-card {
    padding: 1.5rem 0.75rem;
  }

  /* Install steps stack */
  .install-steps {
    flex-direction: column;
  }

  .install-connector {
    width: 2px;
    height: 24px;
    margin: 0;
  }

  .install-cmd {
    font-size: 0.72rem;
    padding: 0.5rem 0.6rem 0.5rem 0.9rem;
    overflow-x: auto;
  }

  /* Footer */
  .footer-nav {
    flex-direction: column;
    gap: 2rem;
  }

  /* Bottom CTA */
  .cta-bottom {
    padding: 4rem 1rem;
  }

  .cta-cmd {
    overflow-x: auto;
    max-width: 100%;
    font-size: 0.68rem;
  }

  .cta-cmd code {
    white-space: nowrap;
  }

  .cta-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
  }

  .cta-buttons .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  section {
    padding: 3rem 0.75rem;
  }

  /* Hero */
  .hero {
    padding: 0 0.75rem 2rem;
  }

  .hero-content {
    padding-top: 2.5rem;
  }

  .hero-badge {
    font-size: 0.68rem;
    padding: 0.4rem 0.8rem;
    letter-spacing: 0;
  }

  .hero-line-muted {
    font-size: clamp(1rem, 5vw, 1.4rem);
  }

  .hero-line-bright {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }

  .hero-sub {
    font-size: 0.9rem;
    margin-bottom: 2rem;
  }

  .hero-sub br {
    display: none;
  }

  .hero-install {
    font-size: 0.68rem;
    padding: 0.45rem 0.5rem 0.45rem 0.75rem;
  }

  /* Terminal */
  .terminal-body {
    font-size: 0.65rem;
    min-height: 180px;
    padding: 0.6rem 0.75rem;
  }

  .terminal-status {
    font-size: 0.6rem;
    padding: 0.5rem 0.75rem;
  }

  /* Scene */
  .scene-grid {
    max-width: 100%;
  }

  .scene-card {
    padding: 1.25rem 1rem;
  }

  .scene-card-icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
  }

  .scene-card-quote {
    font-size: 0.9rem;
  }

  .scene-punchline {
    font-size: 1rem;
  }

  /* Fix comparison */
  .fix-comparison {
    max-width: 100%;
  }

  .fix-card-header {
    font-size: 0.68rem;
    padding: 0.65rem 0.9rem;
  }

  .fix-card-body {
    padding: 0.6rem 0.75rem;
  }

  .fix-line {
    font-size: 0.65rem;
    gap: 0.4rem;
  }

  .fix-ts {
    min-width: 55px;
    font-size: 0.6rem;
  }

  /* Loop */
  .loop-step h3 {
    font-size: 1rem;
  }

  .loop-step p {
    font-size: 0.85rem;
  }

  /* Ralph code */
  .ralph-code pre {
    font-size: 0.65rem;
    padding: 0.75rem;
    line-height: 1.6;
  }

  /* Cards */
  .card {
    padding: 1.25rem 1rem;
  }

  .card h3 {
    font-size: 1rem;
  }

  .card p {
    font-size: 0.85rem;
  }

  /* Agents */
  .agent-grid {
    grid-template-columns: 1fr;
  }

  .agent-card {
    padding: 1.25rem 0.75rem;
  }

  /* Install */
  .install-cmd {
    font-size: 0.65rem;
  }

  /* Bottom CTA */
  .cta-bottom {
    padding: 3rem 0.75rem;
  }

  .cta-cmd {
    font-size: 0.6rem;
  }

  .cta-bottom-headline {
    font-size: clamp(2rem, 5.5vw, 3rem);
    margin-bottom: 2rem;
  }

  /* Section headings */
  .section-heading {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
  }

  .section-sub {
    font-size: 0.95rem;
  }

  .section-eyebrow {
    font-size: 0.65rem;
  }

  /* Footer */
  footer {
    padding: 2.5rem 0.75rem 2rem;
  }

  .footer-nav {
    gap: 1.5rem;
  }
}
