:root {
  color-scheme: dark;
  --bg: #080d16;
  --panel: #111823;
  --panel-strong: #151f2f;
  --line: #223148;
  --text: #f4f8ff;
  --muted: #9fb0c7;
  --blue: #3b82f6;
  --blue-2: #60a5fa;
  --cyan: #22d3ee;
  --green: #34d399;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: radial-gradient(circle at 70% 5%, rgba(59, 130, 246, 0.18), transparent 30%), var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.modal-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(8, 13, 22, 0.86);
  backdrop-filter: blur(16px);
}

.brand,
.nav-actions,
.hero-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
}

.brand span span {
  color: var(--blue);
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: var(--blue);
  color: #06101f;
}

.nav-actions {
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.nav-actions > a:not(.button) {
  padding: 8px 10px;
}

.button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: var(--blue);
  color: #06101f;
  font-size: 14px;
  font-weight: 800;
  padding: 0 16px;
  cursor: pointer;
}

.button.ghost {
  border-color: rgba(148, 163, 184, 0.48);
  background: transparent;
  color: var(--text);
}

.button.large {
  min-height: 46px;
  padding: 0 20px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
  min-height: calc(100vh - 68px);
  padding: clamp(56px, 8vw, 110px) clamp(20px, 5vw, 72px);
}

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

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(54px, 8vw, 104px);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.lead,
.section p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

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

.login-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(2, 6, 14, 0.78);
  backdrop-filter: blur(12px);
  cursor: default;
}

.login-dialog {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, #121a27, #0c121d);
  color: var(--text);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  padding: 28px;
}

.login-dialog h2 {
  margin-bottom: 8px;
  font-size: 30px;
  line-height: 1.1;
}

.icon-button {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: #080d16;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
}

.access-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.access-card {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 10px;
  min-height: 148px;
  width: 100%;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  background: #0b1220;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}

.access-card:hover,
.access-card:focus {
  border-color: var(--blue);
  background: rgba(59, 130, 246, 0.14);
  outline: none;
}

.access-card span {
  color: var(--blue-2);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.access-card strong {
  font-size: 18px;
  line-height: 1.25;
}

.access-card small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.login-step {
  display: grid;
  gap: 12px;
}

.login-step.is-hidden {
  display: none;
}

.login-step label {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.login-step input,
.login-step select {
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: #080d16;
  color: var(--text);
  padding: 0 14px;
  outline: none;
}

.login-step input:focus,
.login-step select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.back-button {
  justify-self: start;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}

.back-button:hover {
  color: var(--text);
}

.product-visual {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(17, 24, 35, 0.96), rgba(10, 17, 29, 0.96));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

.visual-topbar {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.visual-topbar span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #334155;
}

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

.metric,
.signal-panel,
.source-panel,
.feature-grid article,
.architecture-list,
.architecture-list div {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.68);
}

.metric {
  padding: 16px;
}

.metric small,
.architecture-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.signal-panel,
.source-panel {
  grid-column: span 3;
  padding: 18px;
}

.panel-title {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.line-chart {
  display: flex;
  align-items: end;
  gap: 12px;
  height: 180px;
  padding: 18px;
  border-radius: 8px;
  background:
    linear-gradient(rgba(59, 130, 246, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.08) 1px, transparent 1px);
  background-size: 56px 56px;
}

.line-chart i {
  flex: 1;
  min-width: 18px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--blue), var(--cyan));
}

.source-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  color: var(--muted);
}

.source-row b {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), rgba(59, 130, 246, 0.08));
}

.source-row:nth-child(3) b {
  width: 72%;
}

.source-row:nth-child(4) b {
  width: 46%;
}

.section {
  padding: clamp(56px, 8vw, 88px) clamp(20px, 5vw, 72px);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.section-header {
  max-width: 760px;
  margin-bottom: 28px;
}

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

.feature-grid article {
  padding: 22px;
}

.feature-grid p,
.split p {
  font-size: 15px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.6fr);
  gap: 28px;
  align-items: start;
}

.architecture-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.architecture-list div {
  padding: 16px;
}

.architecture-list strong {
  display: block;
  margin-top: 4px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(20px, 5vw, 72px);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 900px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-actions {
    flex-wrap: wrap;
  }

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

  .product-visual {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .access-grid {
    grid-template-columns: 1fr;
  }

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

  .metric,
  .signal-panel,
  .source-panel {
    grid-column: auto;
  }

  .line-chart {
    height: 140px;
  }
}
