:root {
  --bg: #0b0c10;
  --bg-alt: #101219;
  --surface: #141720;
  --surface-elevated: #191d28;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f2ee;
  --text-muted: #a1a6b4;
  --text-dim: #737888;
  --copper: #f06d38;
  --copper-bright: #ff945e;
  --violet: #8b7cf8;
  --emerald: #3dd68c;
  --amber: #f5b942;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.55);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* Subtle architectural grid and ambient copper/violet glows */
.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 85% 65% at 50% 0%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 85% 65% at 50% 0%, #000 35%, transparent 100%);
}

.bg-glow {
  position: fixed;
  width: 680px;
  height: 680px;
  border-radius: 50%;
  filter: blur(130px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.22;
}

.bg-glow-copper {
  top: -260px;
  left: -140px;
  background: radial-gradient(circle, #f06d38 0%, transparent 70%);
}

.bg-glow-violet {
  top: -180px;
  right: -180px;
  background: radial-gradient(circle, #7c6cf6 0%, transparent 70%);
}

.container {
  position: relative;
  z-index: 1;
  width: min(1160px, 100% - 40px);
  margin: 0 auto;
}

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

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

p code,
h3 code {
  font-size: 0.88em;
  padding: 0.14em 0.42em;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--copper-bright);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(11, 12, 16, 0.78);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: inline-flex;
}

.brand-tld {
  color: var(--copper);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.18s ease;
}

.site-nav a:hover {
  color: var(--text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}

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

.btn-sm {
  font-size: 0.86rem;
  padding: 8px 16px;
}

.btn-lg {
  font-size: 0.96rem;
  padding: 13px 24px;
}

.btn-primary {
  color: #0e1016;
  background: linear-gradient(135deg, var(--copper-bright) 0%, var(--copper) 100%);
  box-shadow: 0 8px 28px rgba(240, 109, 56, 0.28);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 34px rgba(240, 109, 56, 0.42);
}

.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-strong);
  padding: 10px 18px;
  font-size: 0.9rem;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
}

/* Hero */
.hero {
  padding: 76px 0 88px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.08fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  margin-bottom: 22px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 4px rgba(61, 214, 140, 0.18);
  display: inline-block;
}

h1 {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 3.85vw, 3.2rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.gradient-text {
  background: linear-gradient(105deg, var(--copper-bright) 0%, var(--copper) 48%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin: 0 0 30px;
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.hero-metrics dt {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.hero-metrics dd {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text);
}

/* Hero interactive OS stage */
.hero-stage {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.os-switcher {
  display: inline-flex;
  align-self: flex-start;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.os-pill {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.os-pill:hover {
  color: var(--text);
}

.os-pill.is-active {
  background: var(--surface-elevated);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.browser-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(240, 109, 56, 0.08);
  transition: border-color 0.25s ease;
}

.browser-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  background: #171a24;
  border-bottom: 1px solid var(--border);
}

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

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.browser-frame[data-os="macos"] .window-dots span:nth-child(1) { background: #ff5f57; }
.browser-frame[data-os="macos"] .window-dots span:nth-child(2) { background: #febc2e; }
.browser-frame[data-os="macos"] .window-dots span:nth-child(3) { background: #28c840; }

.browser-frame[data-os="linux"] .window-dots span:nth-child(1) { background: #e95420; }
.browser-frame[data-os="chromeos"] .window-dots span:nth-child(1) { background: #8ab4f8; }

.address-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.lock-icon {
  font-size: 0.72rem;
  opacity: 0.75;
}

.url-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.url-text strong {
  color: var(--text);
  font-weight: 600;
}

.wasm-chip {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--violet);
  background: rgba(139, 124, 248, 0.14);
  border: 1px solid rgba(139, 124, 248, 0.3);
}

.os-badge {
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.browser-viewport {
  background: #ffffff;
  line-height: 0;
}

.browser-viewport img {
  width: 100%;
  height: auto;
  display: block;
}

.browser-telemetry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: #12151e;
  border-top: 1px solid var(--border);
}

.browser-telemetry code {
  color: var(--copper-bright);
}

.telemetry-ok {
  color: var(--emerald);
  font-weight: 600;
}

/* Sections */
.section {
  padding: 96px 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015) 0%, rgba(255, 255, 255, 0.025) 50%, rgba(255, 255, 255, 0.01) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 680px;
  margin-bottom: 44px;
}

.section-kicker {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--copper-bright);
}

h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.2vw, 2.65rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.03rem;
}

/* Bento grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.card {
  grid-column: span 5;
  padding: 28px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card-wide {
  grid-column: span 7;
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.icon-copper {
  color: var(--copper-bright);
  background: rgba(240, 109, 56, 0.14);
  border: 1px solid rgba(240, 109, 56, 0.28);
}

.icon-violet {
  color: var(--violet);
  background: rgba(139, 124, 248, 0.14);
  border: 1px solid rgba(139, 124, 248, 0.28);
}

.icon-emerald {
  color: var(--emerald);
  background: rgba(61, 214, 140, 0.14);
  border: 1px solid rgba(61, 214, 140, 0.28);
}

.icon-amber {
  color: var(--amber);
  background: rgba(245, 185, 66, 0.14);
  border: 1px solid rgba(245, 185, 66, 0.28);
}

.card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.24rem;
  letter-spacing: -0.02em;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.platform-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.platform-strip span {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
}

/* Interactive Architecture Pipeline */
.pipeline {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.stage {
  text-align: left;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.18s ease;
}

.stage:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.stage.is-active {
  background: linear-gradient(180deg, rgba(240, 109, 56, 0.12) 0%, rgba(139, 124, 248, 0.08) 100%);
  border-color: rgba(240, 109, 56, 0.55);
}

.stage-num {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--copper-bright);
}

.stage-title {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 700;
}

.stage-tag {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
}

.pipeline-arrow {
  color: var(--text-dim);
  font-size: 1.2rem;
  user-select: none;
}

.stage-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 28px;
  align-items: center;
  padding: 30px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border-strong);
}

.detail-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--violet);
  background: rgba(139, 124, 248, 0.14);
  border: 1px solid rgba(139, 124, 248, 0.28);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.stage-detail h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.stage-detail p {
  margin: 0;
  color: var(--text-muted);
}

.code-panel {
  margin: 0;
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: #0b0d13;
  border: 1px solid var(--border);
  overflow-x: auto;
  font-size: 0.84rem;
  line-height: 1.65;
  color: #dfe4f2;
}

/* Featured App Showcase */
.featured-app {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  padding: 34px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 65% 80% at 100% 0%, rgba(240, 109, 56, 0.12), transparent 65%),
    var(--surface);
  border: 1px solid var(--border-strong);
  margin-bottom: 22px;
}

.app-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.status-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--emerald);
  background: rgba(61, 214, 140, 0.12);
  border: 1px solid rgba(61, 214, 140, 0.28);
  padding: 3px 10px;
  border-radius: 999px;
}

.app-domain {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.featured-app h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: -0.03em;
}

.featured-desc {
  margin: 0 0 18px;
  color: var(--text-muted);
}

.feature-list {
  margin: 0 0 26px;
  padding-left: 18px;
  color: var(--text);
  font-size: 0.94rem;
}

.feature-list li {
  margin-bottom: 8px;
}

.feature-list li::marker {
  color: var(--copper);
}

.featured-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.license-note {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
}

.featured-media .media-link {
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.featured-media .media-link:hover {
  transform: translateY(-3px);
  border-color: rgba(240, 109, 56, 0.55);
}

.featured-media img {
  display: block;
  width: 100%;
  height: auto;
}

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

.mini-card {
  padding: 24px;
  border-radius: var(--radius-md);
  background: rgba(20, 23, 32, 0.65);
  border: 1px dashed var(--border-strong);
}

.mini-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 2px 9px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.mini-card h4 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.08rem;
}

.mini-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Live WASM Probe */
.probe-card {
  padding: 34px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border-strong);
}

.probe-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.probe-sub {
  margin: 0;
  color: var(--text-muted);
  max-width: 58ch;
}

.probe-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.probe-stat {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: #0e1017;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.probe-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.probe-value {
  font-size: 0.98rem;
  color: var(--text);
}

.probe-value.is-ok {
  color: var(--emerald);
}

.probe-value.is-warn {
  color: var(--amber);
}

.probe-log {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: #090b10;
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: #b7f5d5;
  overflow-x: auto;
}

/* Footer */
.site-footer {
  padding: 44px 0 56px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-brand p {
  margin: 6px 0 0;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text);
}

/* Responsive */
@media (max-width: 980px) {
  .hero-grid,
  .stage-detail,
  .featured-app {
    grid-template-columns: 1fr;
  }

  .card,
  .card-wide {
    grid-column: span 12;
  }

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

  .pipeline-arrow {
    display: none;
  }

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

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

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

  .hero {
    padding: 48px 0 64px;
  }

  .section {
    padding: 68px 0;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .os-badge {
    display: none;
  }

  .featured-app,
  .stage-detail,
  .probe-card {
    padding: 22px;
  }

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