:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #111111;
  --panel-2: #171717;
  --text: #f7f2ea;
  --muted: #b6afa5;
  --line: rgba(255, 255, 255, 0.14);
  --orange: #ff6a00;
  --orange-2: #ff9f1c;
  --graphite: #555b63;
  --steel: #8d99ae;
  --green: #8fd694;
  --red: #ff5c5c;
  --shadow: rgba(0, 0, 0, 0.45);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  /* Temporary visual polish: keep this background direction, then review intensity in Monday audit. */
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 106, 0, 0.25), transparent 28rem),
    radial-gradient(circle at 78% 42%, rgba(255, 159, 28, 0.11), transparent 24rem),
    linear-gradient(135deg, #050505 0%, #0b0b0b 36%, #19120c 100%);
  color: var(--text);
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

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

.topbar {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 3vw, 2.5rem);
  background: rgba(5, 5, 5, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.brand span {
  font-size: 1.18rem;
}

.brand b {
  color: var(--orange);
}

.brand .brand-x {
  color: var(--graphite);
}

.brand img {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 0 18px rgba(255, 106, 0, 0.5));
}

.nav {
  display: flex;
  gap: 0.35rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.nav a,
.top-cta,
.button,
.form-tools button,
.form-tools select {
  min-height: 2.5rem;
  border: 1px solid transparent;
  font: inherit;
}

.nav a {
  display: inline-flex;
  align-items: center;
  padding: 0 0.8rem;
  color: var(--muted);
}

.nav a[aria-current="true"],
.nav a:hover {
  color: var(--text);
  background: rgba(255, 106, 0, 0.14);
  border-color: rgba(255, 106, 0, 0.35);
}

.top-cta {
  display: inline-flex;
  align-items: center;
  padding: 0 1rem;
  background: var(--orange);
  color: #140801;
  font-weight: 800;
}

.deck {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--orange) #171717;
}

.slide {
  position: relative;
  flex: 0 0 100vw;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(20rem, 0.95fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: 7rem clamp(1.25rem, 5vw, 5rem) 4.5rem;
  scroll-snap-align: start;
  isolation: isolate;
}

.slide::after {
  content: "";
  position: absolute;
  inset: auto clamp(1.25rem, 5vw, 5rem) 3.75rem;
  height: 1px;
  background: linear-gradient(90deg, var(--orange), transparent);
  opacity: 0.55;
}

.slide-copy {
  max-width: 58rem;
}

.eyebrow {
  margin: 0 0 1.1rem;
  color: var(--orange-2);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  max-width: 15ch;
  font-size: clamp(3rem, 6vw, 7.2rem);
  line-height: 0.92;
  font-weight: 900;
  letter-spacing: 0;
}

h2 {
  font-size: clamp(2.7rem, 5vw, 6.1rem);
}

.lead {
  max-width: 48rem;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  line-height: 1.55;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.1rem;
  font-weight: 800;
}

.button-primary {
  background: var(--orange);
  color: #140801;
}

.button-ghost {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.visual-panel,
.system-map,
.change-form,
.contract-stack {
  min-height: min(33rem, 58vh);
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(255, 106, 0, 0.13), transparent 38%),
    rgba(255, 255, 255, 0.045);
  box-shadow: 0 2rem 5rem var(--shadow);
}

.visual-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.orbit {
  position: relative;
  width: min(27rem, 75vw);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 106, 0, 0.42);
  border-radius: 50%;
}

.orbit::before,
.orbit::after {
  content: "";
  position: absolute;
  inset: 15%;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
}

.orbit::after {
  inset: 32%;
  background: radial-gradient(circle, rgba(255, 106, 0, 0.36), transparent 62%);
}

.node {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5.8rem;
  height: 5.8rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #090909;
  color: var(--muted);
  font-weight: 800;
}

.node-active {
  color: #140801;
  background: var(--orange);
}

.node:nth-child(1) { top: -1rem; left: calc(50% - 2.9rem); }
.node:nth-child(2) { right: -1rem; top: calc(50% - 2.9rem); }
.node:nth-child(3) { bottom: -1rem; left: calc(50% - 2.9rem); }
.node:nth-child(4) { left: -1rem; top: calc(50% - 2.9rem); }

.signal-card {
  position: absolute;
  z-index: 2;
  right: 1.5rem;
  bottom: 1.5rem;
  max-width: 17rem;
  padding: 1rem;
  background: rgba(5, 5, 5, 0.86);
  border: 1px solid rgba(255, 106, 0, 0.36);
}

.signal-card span,
.contract-stack span {
  color: var(--orange-2);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.signal-card strong {
  display: block;
  margin-top: 0.35rem;
  font-size: 1.2rem;
}

.signal-card p,
.contract-stack p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.metric-grid article {
  min-height: 8rem;
  padding: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
}

.metric-grid span {
  color: var(--orange-2);
  font-weight: 900;
}

.metric-grid strong {
  display: block;
  margin-top: 1.4rem;
  font-size: 1.08rem;
}

.system-map {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: var(--line);
}

.system-map div {
  display: grid;
  place-items: center;
  min-height: 10rem;
  padding: 1rem;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(255, 106, 0, 0.16), transparent),
    var(--panel);
  font-weight: 900;
  text-align: center;
}

.change-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.change-form label {
  font-size: clamp(1.4rem, 2vw, 2rem);
  font-weight: 900;
}

.change-form textarea,
.form-tools select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.72);
  color: var(--text);
  font: inherit;
}

.change-form textarea {
  flex: 1;
  resize: none;
  min-height: 12rem;
  padding: 1rem;
  line-height: 1.5;
}

.change-form textarea:focus,
.form-tools select:focus {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.form-tools {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.8rem;
}

.form-tools select {
  padding: 0 0.75rem;
}

.form-tools button {
  padding: 0 1rem;
  border: 0;
  background: var(--orange);
  color: #140801;
  font-weight: 900;
  cursor: pointer;
}

.form-output {
  min-height: 3.25rem;
  padding: 0.9rem;
  border: 1px solid rgba(255, 106, 0, 0.28);
  color: var(--muted);
  background: rgba(255, 106, 0, 0.08);
}

.contract-stack {
  display: grid;
  align-content: center;
  gap: 0.75rem;
  padding: clamp(1rem, 2vw, 1.4rem);
}

.contract-stack article {
  padding: 1rem;
  border-left: 3px solid var(--orange);
  background: rgba(5, 5, 5, 0.54);
}

.deck-footer {
  position: fixed;
  left: clamp(1rem, 3vw, 2.5rem);
  right: clamp(1rem, 3vw, 2.5rem);
  bottom: 1rem;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.86rem;
  pointer-events: none;
}

.progress {
  display: flex;
  gap: 0.4rem;
}

.progress i {
  width: 2rem;
  height: 0.22rem;
  background: rgba(255, 255, 255, 0.2);
}

.progress i.active {
  background: var(--orange);
}

@media (max-width: 860px) {
  body {
    overflow: hidden;
  }

  .topbar {
    align-items: flex-start;
  }

  .nav {
    display: none;
  }

  .top-cta {
    min-width: 6.5rem;
    justify-content: center;
  }

  .deck {
    display: flex;
    height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
  }

  .slide {
    min-height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    grid-template-columns: 1fr;
    padding-top: 6.25rem;
    padding-bottom: 4rem;
    scroll-snap-align: start;
  }

  h1,
  h2 {
    max-width: 11ch;
    font-size: clamp(2.55rem, 14vw, 4.4rem);
  }

  .metric-grid,
  .form-tools {
    grid-template-columns: 1fr;
  }

  .visual-panel,
  .system-map,
  .change-form,
  .contract-stack {
    min-height: 26rem;
  }

  .system-map {
    grid-template-columns: 1fr;
  }

  .system-map div {
    min-height: 5rem;
  }

  .deck-footer {
    display: none;
  }
}
