:root {
  --bg: #0F172A;
  --bg-alt: #1E293B;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-border: rgba(46, 91, 255, 0.16);
  --text: #F1F5F9;
  --muted: #94A3B8;
  --accent: #2E5BFF;
  --accent-strong: #1A44E0;
  --accent-cyan: #22D3EE;
  --accent-amber: #FBBF24;
  --success: #34D399;
  --warn: #FBBF24;
  --danger: #dc2626;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

.panel-error {
  color: var(--danger, #dc2626);
  margin: 0.5rem 0;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(46, 91, 255, 0.22), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0F172A 55%, #1E293B 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Inter", sans-serif, system-ui, -apple-system, sans-serif;
}

body {
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
}

.backdrop {
  position: fixed;
  inset: auto;
  border-radius: 999px;
  opacity: 0.5;
  pointer-events: none;
  z-index: -1;
  transform: translateZ(0);
  contain: strict;
}

.backdrop-a {
  top: 3rem;
  right: -8rem;
  width: 22rem;
  height: 22rem;
  background: rgba(46, 91, 255, 0.22);
}

.backdrop-b {
  bottom: -6rem;
  left: -8rem;
  width: 28rem;
  height: 28rem;
  background: rgba(6, 182, 212, 0.18);
}

.shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
  position: relative;
  z-index: 1;
  contain: layout;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  transform: translateZ(0);
  contain: layout style;
}

.hero {
  padding: 2rem;
}

.eyebrow,
.metric-label,
.status-label,
dt {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  align-items: end;
}

h1,
h2,
p,
ul,
dl {
  margin: 0;
}

h1 {
  font-size: clamp(3rem, 7vw, 5.8rem);
  line-height: 0.92;
  margin: 0.55rem 0 1rem;
}

.lede {
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

.lede-secondary {
  max-width: 38rem;
  margin-top: 0.9rem;
  font-size: 0.98rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition:
    transform 140ms ease,
    background 140ms ease,
    color 140ms ease;
}

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

.button-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #5C82FF 100%);
  color: #FFFFFF;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-aside {
  display: grid;
  gap: 1rem;
}

.status-tile {
  padding: 1.1rem 1.15rem;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-tile strong {
  display: block;
  margin: 0.35rem 0 0.2rem;
  font-size: 1.2rem;
}

.status-tile span:last-child {
  color: var(--muted);
  line-height: 1.5;
}

.strip {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 1rem;
  margin-top: 1.25rem;
}

.strip article {
  padding: 1rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
}

.strip strong {
  display: block;
  margin: 0.45rem 0;
  font-size: 1.3rem;
}

.strip span:last-child,
.card p,
.action-list span,
dd {
  color: var(--muted);
  line-height: 1.55;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

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

.card {
  padding: 1.4rem;
}

.card h2 {
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.status-page .shell {
  max-width: 1180px;
}

.status-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.status-brand,
.status-links {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.status-brand,
.status-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.status-brand img {
  display: block;
}

.status-links a {
  color: var(--muted);
  font-size: 0.9rem;
}

.status-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
  gap: 1.5rem;
  padding: 1.6rem;
}

.status-overview h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 0.98;
}

.status-overview-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.status-kpi,
.status-side-panel,
.component-group,
.incident-row {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
}

.status-kpi {
  min-height: 6.4rem;
  padding: 1rem;
  border-radius: 16px;
  display: grid;
  align-content: space-between;
}

.status-kpi strong {
  font-size: 1.1rem;
}

.status-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr);
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.section-heading {
  margin-bottom: 0.85rem;
}

.section-heading h2,
.status-side-panel h2 {
  margin-top: 0.2rem;
}

.component-groups,
.component-list,
.incident-list {
  display: grid;
  gap: 0.85rem;
}

.component-group,
.status-side-panel {
  border-radius: 20px;
  padding: 1rem;
}

.component-group-header,
.component-row,
.incident-title-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.component-group-header {
  margin-bottom: 0.8rem;
}

.component-row {
  padding: 0.95rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.component-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.component-row:last-child {
  padding-bottom: 0;
}

.component-main {
  min-width: 0;
}

.component-main h3,
.incident-row h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.component-main p,
.status-side-panel p,
.incident-row p,
.muted-copy {
  color: var(--muted);
  line-height: 1.55;
}

.component-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.55rem;
}

.component-state {
  display: grid;
  justify-items: end;
  gap: 0.45rem;
  min-width: 10rem;
}

.component-deps {
  max-width: 14rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: right;
}

.status-side-section {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.incident-row {
  border-radius: 16px;
  padding: 1rem;
}

.incident-update {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.8rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-ok {
  color: #052E16;
  background: rgba(52, 211, 153, 0.92);
}

.status-warn {
  color: #422006;
  background: rgba(251, 191, 36, 0.92);
}

.status-danger {
  color: #FEF2F2;
  background: rgba(220, 38, 38, 0.92);
}

.status-pending {
  color: var(--text);
  background: rgba(148, 163, 184, 0.22);
  border: 1px solid rgba(148, 163, 184, 0.36);
}

.action-list {
  display: grid;
  gap: 1rem;
  padding: 0;
  list-style: none;
}

.action-list a,
.route-list a {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.action-list a:hover,
.route-list a:hover {
  color: var(--accent);
}

.action-list li {
  display: grid;
  gap: 0.35rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.action-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.route-list {
  display: grid;
  gap: 1rem;
}

.route-list div {
  display: grid;
  gap: 0.35rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.chip {
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.25);
  background: rgba(34, 211, 238, 0.08);
  color: #CFFAFE;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@media (max-width: 920px) {
  .hero-grid,
  .strip,
  .grid,
  .grid-2x2 {
    grid-template-columns: 1fr;
  }

  .status-overview,
  .status-layout {
    grid-template-columns: 1fr;
  }

  .status-side-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 1rem, 1120px);
    padding-top: 1rem;
  }

  .hero,
  .card {
    padding: 1.1rem;
  }

  h1 {
    font-size: 2.8rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .status-topbar,
  .component-row,
  .incident-title-row {
    flex-direction: column;
    align-items: stretch;
  }

  .status-links {
    justify-content: flex-start;
  }

  .status-overview {
    padding: 1.1rem;
  }

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

  .component-state {
    justify-items: start;
    min-width: 0;
  }

  .component-deps {
    max-width: none;
    text-align: left;
  }
}

/* ============================================================
   Cost calculator widget
   ============================================================ */

.calc-section {
  margin-top: 1.25rem;
}

.calc-widget {
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 1fr);
  align-items: start;
}

.calc-slider-row {
  display: grid;
  gap: 0.5rem;
}

.calc-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 500;
  font-size: 0.95rem;
}

.calc-value-display {
  font-family: "JetBrains Mono", monospace;
  color: var(--accent);
  font-size: 1rem;
}

.calc-slider {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 6px;
  border-radius: 999px;
  background: rgba(46, 91, 255, 0.2);
  outline: none;
  cursor: pointer;
}

.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid #0D1A47;
  box-shadow: 0 2px 8px rgba(46, 91, 255, 0.4);
}

.calc-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid #0D1A47;
  box-shadow: 0 2px 8px rgba(46, 91, 255, 0.4);
}

.calc-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
}

.calc-output {
  display: grid;
  gap: 1rem;
}

.calc-output-item {
  display: grid;
  gap: 0.2rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.calc-output-savings {
  border-color: rgba(251, 191, 36, 0.2);
  background: rgba(251, 191, 36, 0.05);
}

.calc-output-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.calc-output-value {
  font-size: 1.6rem;
  line-height: 1.1;
}

.calc-output-value.accent {
  color: var(--accent-amber);
}

@media (max-width: 720px) {
  .calc-widget {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Waitlist form
   ============================================================ */

.waitlist-section {
  margin-top: 1.25rem;
}

.waitlist-header {
  margin-bottom: 1.5rem;
}

.social-proof {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.waitlist-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-field {
  display: grid;
  gap: 0.4rem;
}

.form-field-full {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.required-mark {
  color: var(--accent);
}

.optional-mark {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.82rem;
}

.waitlist-form input,
.waitlist-form textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: var(--text);
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color 140ms ease;
  width: 100%;
}

.waitlist-form input::placeholder,
.waitlist-form textarea::placeholder {
  color: var(--muted);
  opacity: 0.65;
}

.waitlist-form input:focus,
.waitlist-form textarea:focus {
  border-color: rgba(46, 91, 255, 0.45);
  background: rgba(46, 91, 255, 0.04);
}

.waitlist-form textarea {
  resize: vertical;
  min-height: 80px;
}

.waitlist-submit {
  width: 100%;
  font-size: 1rem;
}

.waitlist-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-note {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
}

.waitlist-success {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}

.waitlist-success-inner {
  text-align: center;
  max-width: 440px;
}

.waitlist-success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.15);
  border: 1.5px solid var(--success);
  color: var(--success);
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.waitlist-success-inner h3 {
  font-size: 1.4rem;
  margin: 0 0 0.5rem;
  color: var(--success);
}

.waitlist-success-inner p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
}

@media (max-width: 640px) {
  .waitlist-form {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Design partner section
   ============================================================ */

.design-partner-section {
  margin-top: 1.25rem;
}

.design-partner-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(200px, 1fr);
  gap: 2rem;
  align-items: start;
}

.design-partner-logos {
  display: grid;
  gap: 0.75rem;
}

.logo-placeholder-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.logo-placeholder {
  width: 64px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

@media (max-width: 720px) {
  .design-partner-inner {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Operator — waitlist table
   ============================================================ */

.waitlist-table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
  contain: content;
}

.waitlist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.waitlist-table th {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.waitlist-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text);
  vertical-align: top;
  line-height: 1.45;
}

.waitlist-table tr:last-child td {
  border-bottom: none;
}

.waitlist-table .cell-email {
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
}

.waitlist-table .cell-muted {
  color: var(--muted);
  font-size: 0.82rem;
}

.waitlist-table .cell-pain {
  max-width: 280px;
  white-space: normal;
  color: var(--muted);
  font-size: 0.82rem;
}

/* ============================================================
   Scroll-reveal animation (replaces static CSS animation delays)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Hidden utility — panels that must contribute zero vertical space
   ============================================================ */
.hidden {
  display: none !important;
}

/* ============================================================
   Sticky sidebar navigation
   ============================================================ */

.page-layout {
  display: flex;
  align-items: flex-start;
  gap: 0;
  width: 100%;
  max-width: 100%;
}

.sidebar-nav {
  position: sticky;
  top: 1.5rem;
  width: 200px;
  flex-shrink: 0;
  padding: 1.25rem 0;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(46, 91, 255, 0.12);
  border-radius: 16px;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  z-index: 100;
  margin-top: 0;
  align-self: flex-start;
  transform: translateZ(0);
  contain: layout style;
}

.sidebar-nav::-webkit-scrollbar {
  display: none;
}

.sidebar-nav-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 1rem 0.6rem;
  display: block;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 0.5rem;
}

.sidebar-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.sidebar-nav-list a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 1rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.35;
  border-radius: 0;
  transition:
    color 120ms ease,
    background 120ms ease;
  border-left: 2px solid transparent;
}

.sidebar-nav-list a::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
  flex-shrink: 0;
  transition: opacity 120ms ease;
}

.sidebar-nav-list a:hover {
  color: var(--text);
  background: rgba(46, 91, 255, 0.06);
}

.sidebar-nav-list a.active {
  color: var(--accent-cyan);
  border-left-color: var(--accent-cyan);
  background: rgba(34, 211, 238, 0.06);
}

.sidebar-nav-list a.active::before {
  opacity: 1;
}

.shell-with-sidebar {
  flex: 1;
  min-width: 0;
  padding-left: 1.5rem;
}

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

  .shell-with-sidebar {
    padding-left: 0;
  }
}

/* ============================================================
   Mobile sticky nav pill (shown only on ≤768px)
   ============================================================ */

.mobile-nav {
  display: none;
}

/* Ensure section headings clear any sticky top elements on all viewports */
.panel.card,
.hero.panel,
section.panel {
  scroll-margin-top: 72px;
}

@media (max-width: 768px) {
  /* Offset scroll targets so section headings aren't hidden under the sticky bar.
     The mobile nav bar is ~56px tall (0.45rem padding × 2 + pill height + border). */
  .panel.card,
  .hero.panel,
  section.panel {
    scroll-margin-top: 60px;
  }

  .mobile-nav {
    display: block;
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(15, 23, 42, 0.96);
    border-bottom: 1px solid rgba(46, 91, 255, 0.14);
    margin: 0 calc(-0.5rem) 0.75rem;
    padding: 0.45rem 0;
    transform: translateZ(0);
    contain: layout style;
  }

  .mobile-nav-track {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    padding: 0 0.75rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    contain: content;
  }

  .mobile-nav-track::-webkit-scrollbar {
    display: none;
  }

  .mobile-nav-item {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    transition:
      color 120ms ease,
      background 120ms ease,
      border-color 120ms ease;
  }

  .mobile-nav-item:hover {
    color: var(--text);
    background: rgba(46, 91, 255, 0.1);
    border-color: rgba(46, 91, 255, 0.3);
  }

  .mobile-nav-item.active {
    color: var(--accent-cyan);
    background: rgba(34, 211, 238, 0.1);
    border-color: rgba(34, 211, 238, 0.35);
  }
}
