:root {
  --bg: #faf7f2;
  --bg-alt: #f1ece2;
  --bg-deep: #0e1413;
  --ink: #181a1c;
  --ink-soft: #3a3d40;
  --ink-muted: #6a6d70;
  --line: rgba(20, 22, 24, 0.12);
  --line-strong: rgba(20, 22, 24, 0.22);
  --teal: #0f6e6e;
  --teal-deep: #0a4f4f;
  --teal-tint: #ecf3f1;
  --teal-soft: #d6e8e6;
  --coral: #e07856;
  --coral-deep: #b85a3c;
  --coral-soft: #f6e2d8;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow: 0 2px 8px rgba(20, 22, 24, 0.08), 0 18px 44px rgba(20, 22, 24, 0.12);
  --phone-shadow: 0 30px 60px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.2);
  --font-display: "Fraunces", "Times New Roman", serif;
  --font-body: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

[data-theme="dark"] {
  --bg: #0c0e10;
  --bg-alt: #14171a;
  --bg-deep: #050608;
  --ink: #f3efe7;
  --ink-soft: #c8c3b8;
  --ink-muted: #88837b;
  --line: rgba(255, 247, 232, 0.1);
  --line-strong: rgba(255, 247, 232, 0.2);
  --teal: #4cc4bd;
  --teal-deep: #6cd8d2;
  --teal-tint: #102423;
  --teal-soft: #1a3a39;
  --coral: #f08f6e;
  --coral-deep: #f0a58a;
  --coral-soft: #2a1c16;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.42), 0 18px 44px rgba(0, 0, 0, 0.52);
}

* {
  box-sizing: border-box;
}

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

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background 0.35s ease, color 0.35s ease;
}

body,
button,
input,
textarea {
  font: inherit;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

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

img,
svg {
  display: block;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

section[id] {
  scroll-margin-top: 88px;
}

.wrap {
  width: min(100% - 48px, 1180px);
  margin: 0 auto;
}

.display,
.section-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.02;
}

.hero-title {
  max-width: 780px;
  font-size: 84px;
}

.hero-title em {
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100;
}

.section-title {
  max-width: 720px;
  font-size: 52px;
}

.lead {
  margin: 24px 0 0;
  max-width: 560px;
  color: var(--ink-soft);
  font-size: 20px;
  line-height: 1.5;
}

.eyebrow,
.mono {
  font-family: var(--font-mono);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: uppercase;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.pill-coral {
  border-color: rgba(224, 120, 86, 0.35);
  background: var(--coral-soft);
  color: var(--coral-deep);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.7);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
  white-space: nowrap;
}

.btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.8;
}

.btn svg path[fill],
.btn svg path:not([stroke]) {
  fill: currentColor;
  stroke: none;
}

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

.btn-primary {
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 8px 18px rgba(0, 0, 0, 0.18);
}

.btn-primary:hover {
  background: var(--teal-deep);
  color: #fff;
}

[data-theme="dark"] .btn-primary {
  background: var(--teal);
  color: #081110;
}

[data-theme="dark"] .btn-primary:hover {
  background: #6cd8d2;
  color: #081110;
}

.btn-outline {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.btn-outline:hover {
  border-color: var(--ink);
  background: var(--bg-alt);
}

.btn-ghost {
  min-height: 36px;
  padding: 8px 14px;
  border-color: rgba(255, 247, 232, 0.2);
  background: transparent;
  color: rgba(243, 239, 231, 0.72);
  font-size: 12px;
}

.btn-run {
  min-height: 36px;
  padding: 8px 14px;
  background: #4cc4bd;
  color: #0c0e10;
  font-size: 12px;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-size: 23px;
  letter-spacing: 0;
  line-height: 1;
}

.mark {
  width: 28px;
  height: 28px;
  color: var(--ink);
}

.mark svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.4;
}

.mark-fill {
  fill: currentColor;
  stroke: none;
}

.mark-cutout {
  fill: var(--bg);
  stroke: none;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  color: var(--ink-soft);
  font-size: 14px;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
}

.icon-button svg {
  width: 16px;
  height: 16px;
}

.icon-button path,
.icon-button circle {
  stroke-width: 1.5;
}

.sun-icon {
  display: none;
}

[data-theme="dark"] .moon-icon {
  display: none;
}

[data-theme="dark"] .sun-icon {
  display: block;
}

.nav-cta {
  min-height: 38px;
  padding: 10px 16px;
  font-size: 14px;
}

.hero {
  position: relative;
  min-height: 760px;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  background: #0a0c0d;
}

.hero-media img {
  position: absolute;
  top: -12%;
  right: -4%;
  width: 68%;
  height: 124%;
  object-fit: cover;
  opacity: 0.58;
  filter: contrast(1.1);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(96deg, var(--bg) 0%, var(--bg) 36%, color-mix(in srgb, var(--bg) 84%, transparent) 52%, transparent 82%);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 48px;
  align-items: center;
  padding: 94px 0 108px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 32px;
  margin: 38px 0 0;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
}

.hero-stats div {
  min-width: 112px;
}

.hero-stats dt {
  margin: 0;
  color: var(--ink-muted);
}

.hero-stats dd {
  margin: 3px 0 0;
  color: var(--ink);
}

.hero-phone-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  min-height: 620px;
}

.hero-callout {
  position: absolute;
  z-index: 4;
  max-width: 190px;
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg);
  color: var(--teal-deep);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.callout-right {
  top: 78px;
  right: 6px;
  color: var(--coral-deep);
}

.callout-left {
  bottom: 104px;
  left: 4px;
}

.phone {
  position: relative;
  width: 280px;
  aspect-ratio: 14 / 29;
}

.phone-tilt {
  transform: rotate(-8deg);
}

.phone-glow::before {
  content: "";
  position: absolute;
  inset: -40px;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(224, 120, 86, 0.25), transparent 65%);
  filter: blur(20px);
}

.phone-bezel {
  position: absolute;
  inset: 0;
  padding: 6px;
  border-radius: 38px;
  background: linear-gradient(155deg, #2a2d30 0%, #16181a 50%, #0a0c0e 100%);
  box-shadow: var(--phone-shadow), 0 0 0 1.5px rgba(255, 255, 255, 0.05) inset;
}

.phone-frame {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 3px;
  overflow: hidden;
  border-radius: 32px;
  background: #000;
}

.status-bar {
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 28px;
  padding: 0 18px;
  color: #0e1112;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
}

.status-icons {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.status-icons svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
  stroke: none;
}

.status-icons svg:nth-child(2) {
  width: 14px;
  height: 9px;
}

.status-icons svg:nth-child(3) {
  width: 21px;
  height: 11px;
}

.status-icons rect {
  fill: currentColor;
  stroke: none;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 30px;
  background: var(--bg);
  color: var(--ink);
  padding-top: 28px;
}

.result-screen,
.phone-stage {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 12px 16px 16px;
}

.phone-stage {
  position: absolute;
  inset: 28px 0 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

[data-stage="idle"] .phone-stage-idle,
[data-stage="analyzing"] .phone-stage-analyzing,
[data-stage="result"] .phone-stage-result {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.screen-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 24px;
}

.mini-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.mini-mark {
  width: 18px;
  height: 18px;
  border: 1.4px solid currentColor;
  border-radius: 50%;
  background: radial-gradient(circle at center, currentColor 0 32%, transparent 34%);
}

.offline-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--coral-deep);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
}

.offline-chip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
}

.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--teal-deep, #0f766e);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
}

.live-chip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #14b8a6;
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.25);
}

.phone-title {
  margin-top: 22px;
}

.phone-title.compact {
  margin-top: 16px;
}

.phone-title h3 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.1;
}

.phone-title p {
  margin: 7px 0 0;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.45;
}

.upload-zone {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin-top: 18px;
  padding: 16px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 14px;
  background: var(--bg-alt);
  color: var(--ink-soft);
}

.upload-zone svg {
  width: 38px;
  height: 38px;
  stroke-width: 1.4;
}

.upload-zone span {
  display: grid;
  gap: 3px;
  color: var(--ink);
  text-align: center;
  font-size: 13px;
}

.upload-zone small {
  color: var(--ink-muted);
  font-size: 11px;
}

.phone-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  margin-top: 14px;
  border: 0;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  font-weight: 700;
}

.xray-card,
.scan-frame {
  position: relative;
  margin: 12px 0 0;
  overflow: hidden;
  border-radius: 12px;
  background: #0e1012;
}

.xray-card img,
.scan-frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.xray-card figcaption,
.scan-frame figcaption {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
}

.classification-card {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(224, 120, 86, 0.32);
  border-radius: 10px;
  background: var(--coral-soft);
}

.classification-card p,
.classification-card span,
.two-up span,
.recommendation span {
  margin: 0;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
}

.classification-card p {
  color: var(--coral-deep);
}

.classification-card strong {
  display: block;
  margin-top: 4px;
  color: var(--coral-deep);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.1;
}

.classification-card span {
  display: block;
  margin-top: 4px;
  color: var(--ink-muted);
  text-transform: none;
}

.classification-card b {
  color: var(--ink);
  font-size: 13px;
}

.two-up {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.two-up div {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-alt);
}

.two-up strong {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.recommendation {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 110, 110, 0.22);
  border-radius: 8px;
  background: var(--teal-tint);
}

.recommendation span {
  color: var(--teal-deep);
}

.recommendation p {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.45;
}

.scan-frame {
  margin-top: 12px;
}

.scan-frame img {
  opacity: 0.72;
}

.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--scan-progress, 0%);
  height: 28px;
  background: linear-gradient(180deg, transparent, rgba(76, 196, 189, 0.72), transparent);
  transform: translateY(-50%);
}

.phone-log {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
}

.phone-log div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.phone-log span {
  color: var(--teal-deep);
}

.phone-log .muted {
  opacity: 0.5;
}

.mini-progress {
  height: 4px;
  margin-top: auto;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg-alt);
}

.mini-progress span {
  display: block;
  width: var(--demo-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.phone-progress-text {
  margin: 6px 0 0;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  text-align: right;
}

.band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
}

.split {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
  gap: 64px;
  align-items: start;
  padding: 100px 0;
}

.split p {
  max-width: 460px;
  color: var(--ink-soft);
}

.stat-stack {
  display: grid;
  gap: 12px;
}

.stat-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  align-items: center;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.stat-row strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 400;
  line-height: 1;
}

.stat-row span {
  color: var(--ink-soft);
}

.stat-coral {
  border-left-color: var(--coral);
}

.stat-coral strong {
  color: var(--coral-deep);
}

.who-section,
.how-section,
.stack-section {
  padding: 100px 0;
}

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

.section-heading p {
  max-width: 640px;
  color: var(--ink-soft);
}

.center {
  margin: 0 auto;
  text-align: center;
}

.center .section-title,
.center p {
  margin-left: auto;
  margin-right: auto;
}

.audience-grid,
.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 54px;
}

.audience-grid article,
.stack-grid article {
  min-height: 240px;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.audience-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--teal-tint);
  color: var(--teal-deep);
}

.audience-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.5;
}

.audience-grid h3,
.pipeline h3,
.stack-grid h3 {
  margin: 22px 0 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
}

.audience-grid p,
.pipeline p,
.stack-grid p {
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 56px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.pipeline article {
  min-height: 300px;
  padding: 32px 26px;
  border-right: 1px solid var(--line);
}

.pipeline article:last-child {
  border-right: 0;
}

.pipeline article > span {
  float: right;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.pipeline svg {
  width: 38px;
  height: 38px;
  padding: 9px;
  border-radius: 10px;
  background: var(--teal-tint);
  color: var(--teal-deep);
  stroke-width: 1.4;
}

.pipeline .mono {
  margin-top: 5px;
  color: var(--teal-deep);
  font-size: 12px;
}

.demo-section {
  position: relative;
  overflow: hidden;
  padding: 100px 0;
  background: var(--bg-deep);
  color: #f3efe7;
}

.demo-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}

.demo-section .wrap {
  position: relative;
}

.demo-section .eyebrow {
  color: rgba(255, 247, 232, 0.52);
}

.demo-section .section-title {
  color: #f3efe7;
}

.demo-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 56px;
}

.demo-heading p {
  max-width: 380px;
  margin: 0;
  color: rgba(243, 239, 231, 0.66);
}

.demo-panel {
  display: grid;
  grid-template-columns: minmax(320px, 0.94fr) minmax(0, 1.06fr);
  overflow: hidden;
  border: 1px solid rgba(255, 247, 232, 0.12);
  border-radius: 16px;
  background: #14171a;
}

.demo-phone-column {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 680px;
  padding: 56px 36px;
  border-right: 1px solid rgba(255, 247, 232, 0.1);
  background: radial-gradient(ellipse at center, #1c2024, #0e1112);
}

.demo-phone {
  transform: none;
}

.console-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.terminal-top,
.terminal-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 247, 232, 0.1);
  background: #1a1d20;
  color: rgba(243, 239, 231, 0.48);
  font-family: var(--font-mono);
  font-size: 11px;
}

.terminal-top span:last-child {
  margin-left: auto;
}

.window-dots {
  display: inline-flex;
  gap: 6px;
}

.window-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.window-dots i:nth-child(1) {
  background: #ff5f57;
}

.window-dots i:nth-child(2) {
  background: #febc2e;
}

.window-dots i:nth-child(3) {
  background: #28c840;
}

.terminal-body {
  flex: 1;
  min-height: 420px;
  padding: 24px 28px;
  background: #14171a;
  color: rgba(243, 239, 231, 0.76);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.85;
  overflow-x: auto;
}

.terminal-body p {
  margin: 0;
}

.terminal-muted {
  color: rgba(243, 239, 231, 0.42);
}

.log-line {
  animation: fade-in 0.28s ease;
}

.log-line.ok {
  color: #4cc4bd;
}

.log-line.inf {
  color: #f3efe7;
}

.log-line.err {
  color: #f08f6e;
}

.demo-error {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(224, 120, 86, 0.35);
  border-radius: var(--radius);
  background: var(--coral-soft);
  color: var(--coral-deep);
  font-size: 14px;
}

.demo-error[hidden] {
  display: none;
}

.result-probabilities {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.prob-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--ink-soft);
}

.prob-row strong {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
}

.result-label.label-tb {
  color: var(--coral-deep);
}

.result-label.label-healthy {
  color: var(--teal);
}

.result-label.label-other {
  color: #8a6a1d;
}

[data-stage="error"] .terminal-json,
[data-stage="result"] .terminal-json {
  display: block;
}

[data-stage="error"] .terminal-json {
  color: #f08f6e;
}

.terminal-cursor {
  display: none;
  width: 8px;
  height: 14px;
  margin-top: 6px;
  background: #4cc4bd;
  animation: blink 1s steps(1) infinite;
}

[data-stage="analyzing"] .terminal-cursor {
  display: inline-block;
}

.terminal-json {
  display: none;
  margin: 12px 0 0;
  color: #4cc4bd;
  font: inherit;
  white-space: pre;
}

[data-stage="result"] .terminal-json {
  display: block;
}

.terminal-controls {
  border-top: 1px solid rgba(255, 247, 232, 0.1);
  border-bottom: 0;
}

.run-state {
  margin-left: auto;
  color: rgba(243, 239, 231, 0.42);
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.notice {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 460px;
  margin-top: 32px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.4;
}

.notice svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: var(--coral-deep);
  stroke-width: 1.5;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.metric-grid article {
  min-height: 168px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.metric-grid span,
.footprint > span {
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
}

.metric-grid strong {
  display: block;
  margin-top: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 400;
  line-height: 1;
}

.metric-grid small {
  color: var(--ink-muted);
  font-size: 28px;
}

.metric-grid p {
  margin: 10px 0 0;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.footprint {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 14px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.footprint > span {
  grid-column: 1 / -1;
}

.footprint strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 400;
}

.footprint p {
  margin: 4px 0 0;
  color: var(--ink-muted);
  font-size: 12px;
}

.modal-card {
  margin-top: 14px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.modal-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.modal-card-head a {
  color: var(--ink);
  font-size: 11px;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
}

.modal-card-head a:hover {
  text-decoration: underline;
}

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

.modal-card-grid dt {
  margin: 0;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-card-grid dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.45;
  word-break: break-word;
}

.stack-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stack-grid article {
  min-height: 220px;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.stack-grid article:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.stack-grid article > span {
  display: block;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: linear-gradient(135deg, var(--teal-soft), var(--coral-soft));
}

.stack-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft, var(--teal-tint));
}

.stack-icon svg {
  width: 22px;
  height: 22px;
}

.stack-icon img {
  display: block;
  object-fit: contain;
}

.stack-icon-qwen,
.stack-icon-dataset,
.stack-icon-gradcam,
.stack-icon-vercel {
  padding: 0;
  overflow: hidden;
  border: none;
  background: transparent;
}

.stack-icon-qwen img,
.stack-icon-dataset img,
.stack-icon-gradcam img,
.stack-icon-vercel img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.stack-card-link a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.stack-card-link a:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 4px;
  border-radius: 4px;
}

.stack-icon-dataset {
  color: #2563eb;
}

.stack-icon-gradcam {
  color: #c2410c;
}

.deploy-brand {
  display: none;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 18px 30px 0;
  color: #f3efe7;
}

.deploy-brand.active {
  display: flex;
}

.deploy-brand img {
  flex-shrink: 0;
  width: 36px;
  height: 36;
  border-radius: 8px;
  object-fit: cover;
}

.deploy-brand strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.deploy-brand a {
  color: #9fd4c9;
  font-family: var(--font-mono);
  font-size: 12px;
  text-decoration: none;
}

.deploy-brand a:hover {
  text-decoration: underline;
}

.stack-grid h3 {
  margin-top: 18px;
}

.stack-grid small {
  display: block;
  margin-top: 6px;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.code-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #0e1112;
  color: #f3efe7;
}

.tabs {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid rgba(255, 247, 232, 0.1);
  background: #14171a;
}

.tabs button {
  min-height: 48px;
  padding: 14px 22px;
  border: 0;
  border-right: 1px solid rgba(255, 247, 232, 0.1);
  border-bottom: 2px solid transparent;
  background: transparent;
  color: rgba(243, 239, 231, 0.55);
  font-family: var(--font-mono);
  font-size: 12px;
}

.tabs button.active {
  border-bottom-color: var(--coral);
  background: #0e1112;
  color: #f3efe7;
}

.code-block {
  display: none;
  min-height: 286px;
  margin: 0;
  padding: 28px 30px;
  overflow-x: auto;
  color: #f3efe7;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.85;
  white-space: pre;
}

.code-block.active {
  display: block;
}

.site-footer {
  padding: 64px 0 40px;
  background: var(--bg-deep);
  color: #f3efe7;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand {
  color: #f3efe7;
}

.footer-brand .mark-cutout {
  fill: var(--bg-deep);
}

.site-footer p {
  margin: 16px 0 0;
  max-width: 360px;
  color: rgba(243, 239, 231, 0.58);
  font-size: 14px;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: rgba(243, 239, 231, 0.42);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}

.site-footer nav {
  display: flex;
  flex-direction: column;
}

.site-footer nav a {
  margin-top: 10px;
  color: rgba(243, 239, 231, 0.82);
  font-size: 14px;
}

.footer-note {
  color: rgba(243, 239, 231, 0.42);
  font-family: var(--font-mono);
  font-size: 11px;
}

[data-reveal],
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 1120px) {
  .hero-title {
    font-size: 68px;
  }

  .section-title {
    font-size: 46px;
  }

  .hero-grid,
  .split,
  .demo-panel {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    padding-top: 72px;
  }

  .hero-media img {
    right: -20%;
    width: 92%;
    opacity: 0.35;
  }

  .hero-media::after {
    background: linear-gradient(100deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 90%, transparent) 72%, transparent 100%);
  }

  .hero-phone-wrap {
    min-height: 600px;
  }

  .split {
    gap: 42px;
  }

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

  .pipeline article:nth-child(2) {
    border-right: 0;
  }

  .pipeline article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .demo-phone-column {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 247, 232, 0.1);
  }
}

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

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

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

@media (max-width: 700px) {
  .wrap {
    width: min(100% - 32px, 1180px);
  }

  .site-nav {
    position: sticky;
  }

  .nav-inner {
    min-height: 64px;
  }

  .brand {
    font-size: 21px;
  }

  .nav-cta {
    display: none;
  }

  .hero {
    min-height: auto;
  }

  .hero-grid {
    gap: 34px;
    padding: 54px 0 80px;
  }

  .hero-title {
    font-size: 48px;
  }

  .lead {
    font-size: 18px;
  }

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

  .hero-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .hero-phone-wrap {
    min-height: 520px;
  }

  .phone {
    width: min(280px, 78vw);
  }

  .hero-callout {
    display: none;
  }

  .section-title {
    font-size: 40px;
  }

  .split,
  .who-section,
  .how-section,
  .stack-section,
  .demo-section {
    padding-top: 78px;
    padding-bottom: 78px;
  }

  .stat-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .stat-row strong {
    font-size: 48px;
  }

  .pipeline,
  .metric-grid,
  .footprint,
  .modal-card-grid,
  .stack-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .pipeline article {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .pipeline article:last-child {
    border-bottom: 0;
  }

  .demo-heading {
    display: block;
  }

  .demo-heading p {
    margin-top: 18px;
  }

  .demo-phone-column {
    min-height: 590px;
    padding: 44px 20px;
  }

  .terminal-top {
    flex-wrap: wrap;
  }

  .terminal-top span:last-child {
    margin-left: 0;
  }

  .terminal-body {
    padding: 22px 20px;
    font-size: 12px;
  }

  .terminal-controls {
    flex-wrap: wrap;
  }

  .run-state {
    width: 100%;
    margin-left: 0;
  }

  .code-block {
    font-size: 12px;
  }
}

@media (max-width: 430px) {
  .hero-title {
    font-size: 42px;
  }

  .section-title {
    font-size: 35px;
  }

  .pill {
    align-items: flex-start;
    white-space: normal;
  }

  .metric-grid strong {
    font-size: 48px;
  }
}
