:root {
  color-scheme: light;
  --bg: #f3efe5;
  --bg-2: #fffaf1;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --surface-dark: rgba(11, 18, 32, 0.96);
  --surface-dark-soft: rgba(16, 24, 40, 0.78);
  --text: #12202f;
  --muted: #5f6774;
  --line: rgba(18, 32, 47, 0.12);
  --shadow: 0 24px 80px rgba(23, 28, 35, 0.12);
  --accent: #155e75;
  --accent-2: #d97706;
  --accent-3: #0f766e;
  --accent-soft: rgba(21, 94, 117, 0.16);
  --glow: rgba(21, 94, 117, 0.18);
}

body[data-theme="night"] {
  color-scheme: dark;
  --bg: #08101a;
  --bg-2: #0d1724;
  --surface: rgba(17, 24, 39, 0.78);
  --surface-strong: rgba(15, 23, 42, 0.92);
  --surface-dark: rgba(7, 13, 22, 0.96);
  --surface-dark-soft: rgba(14, 21, 35, 0.84);
  --text: #eef5fb;
  --muted: #bdc7d4;
  --line: rgba(255, 255, 255, 0.1);
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.36);
  --accent: #67e8f9;
  --accent-2: #f59e0b;
  --accent-3: #34d399;
  --accent-soft: rgba(103, 232, 249, 0.15);
  --glow: rgba(103, 232, 249, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 12%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 26%),
    radial-gradient(circle at 88% 18%, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 24%),
    radial-gradient(circle at 72% 82%, color-mix(in srgb, var(--accent-3) 16%, transparent), transparent 24%),
    linear-gradient(180deg, var(--bg), var(--bg-2) 58%, color-mix(in srgb, var(--bg-2) 88%, #ffffff 12%) 100%);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 36vw;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(18px);
  opacity: 0.45;
}

body::before {
  top: -12vw;
  right: -10vw;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 30%, transparent), transparent 68%);
}

body::after {
  bottom: -14vw;
  left: -12vw;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-2) 28%, transparent), transparent 70%);
}

a {
  color: inherit;
}

.page {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
  position: relative;
  z-index: 1;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(circle at center, black 52%, transparent 92%);
}

.ambient-b {
  transform: rotate(180deg);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.brand strong {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.24rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.brand small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.78), transparent 32%),
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 78%, #ffffff 22%), color-mix(in srgb, var(--accent-2) 62%, #ffffff 38%));
  box-shadow: 0 16px 36px var(--glow);
}

.brand-mark span {
  width: 21px;
  height: 21px;
  border: 2px solid rgba(255, 255, 255, 0.94);
  border-top-color: transparent;
  border-left-color: transparent;
  transform: rotate(45deg);
  border-radius: 4px;
  display: block;
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.pill,
.button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 15px;
  font: 600 0.92rem/1 "DM Sans", "Segoe UI", sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.pill {
  background: color-mix(in srgb, var(--surface-strong) 90%, transparent);
  box-shadow: 0 10px 24px rgba(23, 28, 35, 0.05);
}

.button-ghost {
  color: var(--text);
  cursor: pointer;
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.button-ghost:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(23, 28, 35, 0.08);
}

.button-ghost:focus-visible,
.button:focus-visible,
.brand:focus-visible,
.footer a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 3px;
}

.live .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.14);
  animation: pulse 2.4s ease-in-out infinite;
}

.card {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 22px;
  padding: 28px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto -18% -22% auto;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 68%);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font: 700 0.78rem/1.2 "IBM Plex Mono", monospace;
}

.hero h1,
.section-head h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  letter-spacing: -0.04em;
}

.hero h1 {
  font-size: clamp(2.7rem, 6vw, 5.2rem);
  line-height: 0.96;
  max-width: 11ch;
}

.lede {
  margin: 18px 0 0;
  max-width: 64ch;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.8vw, 1.15rem);
  line-height: 1.8;
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.button {
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 72%, #000000 28%));
  border-color: transparent;
  box-shadow: 0 16px 34px color-mix(in srgb, var(--accent) 24%, transparent);
}

.button-secondary {
  color: var(--text);
  background: color-mix(in srgb, var(--surface-strong) 84%, transparent);
}

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

.stat {
  padding: 16px 16px 18px;
  position: relative;
  overflow: hidden;
}

.stat span,
.feature-kicker,
.panel-top,
.ledger-row span {
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
}

.stat strong {
  display: block;
  margin-top: 12px;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.6rem, 2.8vw, 2.25rem);
  line-height: 1;
}

.stat small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.hero-panel {
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.panel-shell {
  min-height: 100%;
  padding: 20px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.12), transparent 24%),
    linear-gradient(180deg, var(--surface-dark-soft), var(--surface-dark));
  color: #f8fafc;
}

.panel-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: rgba(226, 232, 240, 0.82);
  font-size: 0.76rem;
  margin-bottom: 16px;
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  height: 160px;
  margin-bottom: 18px;
}

.signal {
  display: block;
  border-radius: 18px 18px 10px 10px;
  background: linear-gradient(180deg, rgba(103, 232, 249, 0.95), rgba(20, 184, 166, 0.85));
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.22);
  transform-origin: bottom;
  animation: rise 950ms ease both;
}

.s1 {
  height: 38%;
}

.s2 {
  height: 62%;
  animation-delay: 110ms;
}

.s3 {
  height: 84%;
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.95), rgba(245, 158, 11, 0.86));
  animation-delay: 220ms;
}

.s4 {
  height: 48%;
  animation-delay: 330ms;
}

.s5 {
  height: 73%;
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.96), rgba(16, 185, 129, 0.85));
  animation-delay: 440ms;
}

.ledger {
  display: grid;
  gap: 12px;
}

.ledger-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ledger-row span {
  color: rgba(191, 219, 254, 0.76);
  font-size: 0.7rem;
}

.ledger-row strong {
  text-align: right;
  font: 500 0.96rem/1.5 "IBM Plex Mono", monospace;
}

.section {
  margin-top: 18px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  padding: 0 6px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.02;
  max-width: 14ch;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.feature,
.deploy-copy,
.deploy-code {
  padding: 20px;
}

.feature {
  position: relative;
  overflow: hidden;
}

.feature::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
}

.feature-kicker {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.72rem;
}

.feature h3 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.55rem;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.feature p,
.deploy-copy p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.feature ul {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--text);
  line-height: 1.7;
}

.deploy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(260px, 0.92fr);
  gap: 14px;
  align-items: stretch;
}

.deploy-copy code {
  font-family: "IBM Plex Mono", monospace;
  background: color-mix(in srgb, var(--accent-soft) 78%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  border-radius: 8px;
  padding: 0 5px;
  color: var(--text);
}

.deploy-code {
  margin: 0;
  overflow: auto;
  background: linear-gradient(180deg, rgba(7, 13, 22, 0.98), rgba(13, 20, 34, 0.96));
  color: #dbeafe;
}

.deploy-code code {
  display: block;
  font: 500 0.9rem/1.75 "IBM Plex Mono", monospace;
  white-space: pre;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 18px;
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer a {
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
}

.reveal.in-view {
  opacity: 1;
  transform: none;
  transition: opacity 700ms ease, transform 700ms ease;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.14);
  }

  50% {
    transform: scale(0.94);
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0.08);
  }
}

@keyframes rise {
  from {
    transform: scaleY(0.2);
    opacity: 0.3;
  }

  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

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

  .stats {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: 12ch;
  }

  .hero-panel {
    min-height: 320px;
  }
}

@media (max-width: 680px) {
  .page {
    width: calc(100vw - 20px);
    padding-top: 18px;
  }

  .hero {
    padding: 20px;
  }

  .cta-row,
  .toolbar {
    width: 100%;
  }

  .button,
  .pill {
    width: 100%;
    justify-content: center;
  }

  .section-head {
    align-items: flex-start;
  }

  .brand {
    width: 100%;
  }

  .hero h1 {
    font-size: clamp(2.4rem, 12vw, 4rem);
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
