:root {
  color-scheme: dark;
  --ink: #f4f1e8;
  --muted: #a7b0aa;
  --dim: #6e786f;
  --bg: #080b0a;
  --panel: #101512;
  --panel-2: #151b17;
  --line: rgba(226, 240, 222, 0.14);
  --cyan: #53e3d4;
  --green: #9eff7a;
  --amber: #f0b85a;
  --red: #ff6b5f;
  --blue: #8ebcff;
  --shadow: rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(83, 227, 212, 0.08), transparent 28rem),
    linear-gradient(180deg, #080b0a 0%, #0c110f 45%, #0a0d0c 100%);
  color: var(--ink);
  font-family: "Sora", system-ui, sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

body::selection {
  background: rgba(158, 255, 122, 0.3);
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.13;
  mix-blend-mode: overlay;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  z-index: 40;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 4vw, 54px);
  z-index: 50;
  background: rgba(8, 11, 10, 0.74);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  font-size: 15px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(158, 255, 122, 0.45);
  background: #111913;
  color: var(--green);
  border-radius: 8px;
  box-shadow: 0 0 24px rgba(158, 255, 122, 0.16);
}

.nav-links {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: var(--muted);
}

.nav-links a {
  text-decoration: none;
  transition: color 160ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-button:hover {
  border-color: rgba(158, 255, 122, 0.45);
}

.pause-icon {
  width: 16px;
  height: 18px;
  border-left: 4px solid currentColor;
  border-right: 4px solid currentColor;
}

.icon-button.is-paused .pause-icon {
  width: 0;
  height: 0;
  border-left: 16px solid currentColor;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 0;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  padding: 118px clamp(18px, 5vw, 72px) 84px;
  overflow: hidden;
}

#bridgeCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #070a09;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 11, 10, 0.98) 0%, rgba(8, 11, 10, 0.72) 34%, rgba(8, 11, 10, 0.05) 100%),
    linear-gradient(0deg, rgba(8, 11, 10, 0.86) 0%, transparent 48%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
  padding-bottom: 26px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 16px;
  color: var(--green);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.16em;
  font-weight: 800;
}

h1,
h2 {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0;
}

h1 {
  max-width: 830px;
  font-size: clamp(54px, 8vw, 120px);
  line-height: 0.89;
}

h2 {
  max-width: 820px;
  font-size: clamp(34px, 5vw, 72px);
  line-height: 0.96;
}

.hero-copy,
.section-copy,
.split p,
.setup-note {
  color: var(--muted);
  line-height: 1.7;
  font-size: clamp(16px, 1.6vw, 19px);
}

.hero-copy {
  max-width: 620px;
  margin: 24px 0 0;
}

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

.primary-action,
.secondary-action {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 8px;
  padding: 0 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}

.primary-action {
  color: #07100b;
  background: var(--green);
  border: 1px solid var(--green);
  box-shadow: 0 12px 46px rgba(158, 255, 122, 0.22);
}

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

.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-1px);
}

.hero-panel {
  position: absolute;
  right: clamp(18px, 5vw, 72px);
  bottom: 96px;
  z-index: 3;
  width: min(340px, 33vw);
  border: 1px solid rgba(226, 240, 222, 0.18);
  background: rgba(13, 18, 15, 0.9);
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 18px 44px var(--shadow);
}

.panel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
}

.panel-row:last-child {
  border-bottom: 0;
}

.panel-row span {
  color: var(--muted);
  font-size: 13px;
}

.panel-row strong {
  color: var(--cyan);
  font-size: 15px;
}

.scroll-hint {
  position: absolute;
  left: clamp(18px, 5vw, 72px);
  bottom: 28px;
  color: var(--dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  z-index: 2;
}

.section {
  position: relative;
  scroll-margin-top: 90px;
  padding: clamp(70px, 11vw, 150px) clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
}

.intro-band {
  background: #0a0f0d;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
  gap: clamp(28px, 6vw, 82px);
  align-items: start;
}

.rating-grid {
  display: grid;
  gap: 10px;
}

.rating-item,
.tool-output,
.security-item,
.terminal-card,
.flow-stage {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025));
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.rating-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
}

.rating-item span {
  color: var(--muted);
}

.rating-item strong {
  color: var(--amber);
}

.flow-section {
  background:
    linear-gradient(180deg, rgba(83, 227, 212, 0.04), transparent 36%),
    #080b0a;
}

.simulator-section {
  background:
    radial-gradient(circle at 78% 28%, rgba(158, 255, 122, 0.08), transparent 26rem),
    #0b100d;
}

.section-copy {
  max-width: 760px;
  margin: 18px 0 0;
}

.flow-layout {
  margin-top: 42px;
  display: grid;
  grid-template-columns: minmax(280px, 430px) minmax(0, 1fr);
  gap: 18px;
}

.flow-steps {
  display: grid;
  gap: 10px;
}

.flow-step {
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
  cursor: pointer;
  transition: transform 170ms ease, border-color 170ms ease, background 170ms ease;
}

.flow-step:hover,
.flow-step.active {
  transform: translateX(4px);
  border-color: rgba(158, 255, 122, 0.42);
  background: rgba(158, 255, 122, 0.08);
}

.flow-step strong,
.flow-step span {
  display: block;
}

.step-index {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 10px;
}

.flow-step strong {
  font-size: 18px;
  margin-bottom: 8px;
}

.flow-step span:last-child {
  color: var(--muted);
  line-height: 1.5;
}

.flow-stage {
  min-height: 390px;
  padding: clamp(18px, 4vw, 38px);
  display: grid;
  align-content: center;
}

.stage-header span,
.tool-output span,
.security-item span {
  display: block;
  color: var(--dim);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
  margin-bottom: 8px;
}

.stage-header strong,
.tool-output strong,
.security-item strong {
  display: block;
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1;
}

.stage-diagram {
  margin: 38px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.node {
  min-width: 86px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
  transition: 180ms ease;
}

.node.active {
  color: #06100a;
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 38px rgba(158, 255, 122, 0.24);
}

.line {
  flex: 1;
  height: 1px;
  min-width: 24px;
  background: linear-gradient(90deg, var(--line), rgba(83, 227, 212, 0.42));
}

#stageCopy {
  color: var(--muted);
  line-height: 1.7;
  max-width: 780px;
}

.simulator {
  margin-top: 40px;
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
}

.sim-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

.sim-label {
  display: block;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 12px;
}

.prompt-card textarea {
  width: 100%;
  min-height: 160px;
  resize: vertical;
  border: 1px solid rgba(158, 255, 122, 0.2);
  border-radius: 8px;
  background: #090d0b;
  color: var(--ink);
  padding: 15px;
  font: 700 16px/1.55 "Sora", sans-serif;
  outline: none;
}

.prompt-card textarea:focus {
  border-color: var(--green);
}

.mode-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.mode-pill,
.run-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.mode-pill {
  min-height: 42px;
  background: rgba(255,255,255,0.04);
  color: var(--muted);
}

.mode-pill.active,
.mode-pill:hover {
  color: #06100a;
  background: var(--amber);
  border-color: var(--amber);
}

.run-button {
  width: 100%;
  min-height: 52px;
  background: var(--green);
  color: #06100a;
  border-color: var(--green);
}

.run-button:disabled {
  opacity: 0.68;
  cursor: wait;
}

.run-card {
  display: grid;
  gap: 16px;
}

.run-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.run-hop {
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a0f0d;
  padding: 12px;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.run-hop span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: var(--muted);
  font-weight: 800;
  margin-bottom: 14px;
}

.run-hop strong,
.run-hop em {
  display: block;
}

.run-hop strong {
  font-size: 15px;
  margin-bottom: 8px;
}

.run-hop em {
  color: var(--dim);
  font-style: normal;
  font-size: 12px;
  line-height: 1.4;
}

.run-hop.active {
  transform: translateY(-6px);
  border-color: var(--green);
  background: rgba(158, 255, 122, 0.1);
}

.run-hop.done span {
  color: #06100a;
  background: var(--green);
}

.fake-output {
  border: 1px solid rgba(83, 227, 212, 0.2);
  border-radius: 8px;
  background: #08100f;
  padding: 18px;
}

.fake-output span {
  display: block;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 10px;
}

.fake-output strong {
  display: block;
  font-size: clamp(22px, 3vw, 34px);
  overflow-wrap: anywhere;
}

.fake-output p {
  color: var(--muted);
  line-height: 1.6;
  margin: 12px 0 0;
}

.media-section {
  background: #0c110f;
}

.showcase-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.showcase {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #111713;
}

.showcase.wide {
  grid-column: 1 / -1;
}

.showcase img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  content-visibility: auto;
}

.showcase figcaption {
  padding: 14px 16px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--line);
}

.tools-section {
  background: #080b0a;
}

.tool-output {
  padding: 22px;
}

.tool-output strong {
  color: var(--cyan);
}

.tool-output p {
  color: var(--muted);
  line-height: 1.6;
  margin: 14px 0 0;
}

.tool-grid {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tool-chip {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
  padding: 16px;
}

.tool-chip:hover,
.tool-chip.active {
  color: #06100a;
  background: var(--cyan);
  border-color: var(--cyan);
}

.security-section {
  background:
    linear-gradient(180deg, rgba(240, 184, 90, 0.07), transparent 38%),
    #0a0d0c;
}

.security-board {
  margin-top: 38px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.security-item {
  padding: 20px;
  min-height: 190px;
}

.security-item.safe strong {
  color: var(--green);
}

.security-item.blocked strong {
  color: var(--red);
}

.security-item p {
  color: var(--muted);
  line-height: 1.55;
}

.terminal-card {
  margin-top: 20px;
  overflow: hidden;
}

.terminal-bar {
  padding: 13px 18px;
  color: var(--amber);
  border-bottom: 1px solid var(--line);
  font-weight: 800;
}

pre {
  margin: 0;
  padding: 22px;
  overflow-x: auto;
  color: var(--green);
  font-size: 16px;
  line-height: 1.7;
}

.setup-section {
  background: #0b100d;
}

.command-stack {
  margin-top: 34px;
  display: grid;
  gap: 10px;
}

.command-stack button {
  width: 100%;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f1512;
  color: var(--ink);
  font: 700 clamp(14px, 2vw, 18px) "Sora", sans-serif;
  text-align: left;
  padding: 0 18px;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.command-stack button:hover {
  border-color: var(--green);
}

.setup-note {
  margin-top: 24px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 30px clamp(18px, 5vw, 72px);
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: #080b0a;
}

.footer a {
  color: var(--green);
  text-decoration: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--green);
  color: #07100b;
  font-weight: 800;
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 980px) {
  .nav-links {
    display: none;
  }

  .hero {
    min-height: 92svh;
    padding-top: 100px;
  }

  .hero-panel {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(100%, 420px);
    margin-top: 22px;
  }

  .split,
  .flow-layout,
  .simulator,
  .showcase-grid,
  .tool-grid,
  .security-board {
    grid-template-columns: 1fr;
  }

  .flow-stage {
    min-height: auto;
  }

  .stage-diagram {
    flex-wrap: wrap;
  }

  .run-track {
    grid-template-columns: 1fr;
  }

  .run-hop {
    min-height: auto;
  }

  .line {
    display: none;
  }
}

@media (max-width: 620px) {
  h1 {
    font-size: 52px;
  }

  .hero-scrim {
    background:
      linear-gradient(90deg, rgba(8, 11, 10, 0.96), rgba(8, 11, 10, 0.7)),
      linear-gradient(0deg, rgba(8, 11, 10, 0.88), transparent 55%);
  }

  .hero-actions,
  .footer {
    flex-direction: column;
    align-items: stretch;
  }

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

  .node {
    min-width: calc(50% - 6px);
  }

  .mode-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
