:root {
  color-scheme: dark;
  --bg: #10100e;
  --bg-soft: #171814;
  --panel: #1c1d19;
  --panel-strong: #22231f;
  --text: #f6f2e9;
  --muted: #b8b2a7;
  --line: #35362f;
  --teal: #2dd4bf;
  --amber: #f59e0b;
  --coral: #fb7185;
  --green: #22c55e;
  --red: #f87171;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.08), transparent 32%),
    linear-gradient(225deg, rgba(245, 158, 11, 0.08), transparent 36%),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(246, 242, 233, 0.08);
  background: rgba(16, 16, 14, 0.86);
  backdrop-filter: blur(16px);
}

.brand,
.nav-links,
.hero-actions,
.prompt-row,
.panel-heading,
.footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 760;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(45, 212, 191, 0.48);
  border-radius: 8px;
  color: var(--teal);
  font-size: 0.78rem;
  letter-spacing: 0;
  background: rgba(45, 212, 191, 0.08);
}

.nav-links {
  gap: clamp(14px, 3vw, 30px);
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a:hover,
.footer a:hover {
  color: var(--teal);
}

.icon-link,
.copy-button {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
}

.icon-link svg,
button svg,
article svg,
.hero-actions svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(540px, 1.12fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 68px);
  padding: clamp(44px, 7vw, 90px) clamp(18px, 5vw, 72px) clamp(34px, 5vw, 62px);
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(3.2rem, 8vw, 7rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 4.1rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin: 18px 0 8px;
  font-size: 1.08rem;
  letter-spacing: 0;
}

.hero-text {
  max-width: 640px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.9vw, 1.22rem);
  line-height: 1.7;
}

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

.primary-action,
.secondary-action,
.prompt-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  border-radius: 8px;
  font-weight: 760;
}

.primary-action {
  padding: 0 18px;
  background: var(--teal);
  color: #071311;
}

.secondary-action {
  padding: 0 18px;
  border: 1px solid var(--line);
  background: rgba(246, 242, 233, 0.04);
  color: var(--text);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  max-width: 560px;
  margin: 34px 0 0;
  padding: 1px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.metric-strip div {
  min-width: 0;
  padding: 14px;
  background: var(--bg-soft);
}

.metric-strip dt {
  color: var(--muted);
  font-size: 0.75rem;
}

.metric-strip dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  min-width: 0;
}

.chat-panel,
.market-panel,
.code-panel,
.feature-grid article,
.deploy-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(28, 29, 25, 0.92);
  box-shadow: var(--shadow);
}

.chat-panel,
.market-panel {
  min-width: 0;
  padding: 18px;
}

.panel-heading {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.88rem;
}

.status-pill,
.time-pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  border: 1px solid rgba(45, 212, 191, 0.34);
  color: var(--teal);
  background: rgba(45, 212, 191, 0.08);
  font-size: 0.78rem;
  font-weight: 800;
}

.chat-window {
  display: grid;
  min-height: 250px;
  max-height: 250px;
  overflow: hidden;
  gap: 12px;
  align-content: end;
  padding: 12px;
  border: 1px solid rgba(246, 242, 233, 0.08);
  border-radius: 8px;
  background: #121310;
}

.message {
  max-width: 92%;
  padding: 11px 12px;
  border-radius: 8px;
  line-height: 1.45;
  font-size: 0.92rem;
}

.message.user {
  justify-self: end;
  background: rgba(45, 212, 191, 0.15);
  color: var(--text);
}

.message.agent {
  justify-self: start;
  border: 1px solid rgba(246, 242, 233, 0.08);
  background: var(--panel-strong);
  color: var(--muted);
}

.prompt-row {
  gap: 10px;
  margin-top: 12px;
}

.prompt-row button {
  flex: 1 1 0;
  min-width: 0;
  border: 1px solid var(--line);
  background: rgba(246, 242, 233, 0.05);
  color: var(--text);
  cursor: pointer;
}

.prompt-row button:hover,
.secondary-action:hover,
.icon-link:hover,
.copy-button:hover {
  border-color: rgba(45, 212, 191, 0.75);
}

.market-panel canvas {
  display: block;
  width: 100%;
  height: 240px;
  border-radius: 8px;
  background: #121310;
}

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

.ticker-grid div {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(246, 242, 233, 0.08);
  border-radius: 8px;
  background: rgba(246, 242, 233, 0.04);
}

.ticker-grid span,
.ticker-grid strong {
  display: block;
}

.ticker-grid span {
  color: var(--muted);
  font-size: 0.78rem;
}

.ticker-grid strong {
  margin-top: 4px;
  font-size: 1.08rem;
}

.up {
  color: var(--green);
}

.down {
  color: var(--red);
}

.band,
.split-section {
  padding: clamp(54px, 8vw, 96px) clamp(18px, 5vw, 72px);
  border-top: 1px solid rgba(246, 242, 233, 0.08);
}

.band {
  background: rgba(23, 24, 20, 0.8);
}

.section-heading {
  max-width: 780px;
}

.feature-grid,
.deploy-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
}

.feature-grid article,
.deploy-grid article {
  box-shadow: none;
  padding: 22px;
}

.feature-grid article svg,
.deploy-grid article svg {
  color: var(--teal);
}

.feature-grid p,
.deploy-grid p,
.split-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(420px, 1.18fr);
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
}

.split-section > div:first-child {
  max-width: 660px;
}

.split-section p {
  margin-top: 18px;
  font-size: 1.02rem;
}

.code-panel {
  position: relative;
  overflow: hidden;
  box-shadow: none;
  background: #121310;
}

.copy-button {
  position: absolute;
  top: 14px;
  right: 14px;
  cursor: pointer;
}

pre {
  margin: 0;
  padding: 26px;
  overflow-x: auto;
  color: #f6f2e9;
  font-size: clamp(0.82rem, 1.6vw, 0.98rem);
  line-height: 1.65;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.deploy-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.footer {
  justify-content: space-between;
  min-height: 86px;
  padding: 22px clamp(18px, 5vw, 72px);
  border-top: 1px solid rgba(246, 242, 233, 0.08);
  color: var(--muted);
}

@media (max-width: 1080px) {
  .hero,
  .split-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
  }

  .hero-copy {
    max-width: 860px;
  }

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

@media (max-width: 720px) {
  .topbar {
    position: static;
    flex-wrap: wrap;
  }

  .brand {
    flex: 1 1 100%;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  h1 {
    font-size: clamp(2.7rem, 14vw, 4.6rem);
  }

  .metric-strip,
  .ticker-grid,
  .feature-grid,
  .deploy-grid {
    grid-template-columns: 1fr;
  }

  .prompt-row {
    flex-direction: column;
  }

  .prompt-row button {
    width: 100%;
    flex-basis: auto;
  }

  .chat-window {
    min-height: 300px;
    max-height: 300px;
  }

  .market-panel canvas {
    height: 220px;
  }
}
