:root {
  --ink: #0b1110;
  --panel: #101a18;
  --panel-2: #14211f;
  --paper: #f4efe4;
  --white: #fffaf0;
  --muted: #a9b4ad;
  --line: rgba(255, 250, 240, 0.14);
  --teal: #39c0b1;
  --amber: #e4b45a;
  --clay: #d66f45;
  --blue: #6da8ff;
  --max: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(255, 250, 240, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 250, 240, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 20% 10%, rgba(57, 192, 177, 0.12), transparent 34%),
    var(--ink);
  background-size: 46px 46px, 46px 46px, 100% 100%, auto;
  color: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body.is-decking {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

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

button {
  font: inherit;
}

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

.topbar {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(var(--max), calc(100% - 40px));
  min-height: 76px;
  transform: translateX(-50%);
  border-bottom: 1px solid var(--line);
  background: rgba(11, 17, 16, 0.72);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: fit-content;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 250, 240, 0.28);
  background: var(--white);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  line-height: 1.05;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.desktop-nav {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.desktop-nav a:hover {
  color: var(--white);
}

.topbar-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid rgba(255, 250, 240, 0.2);
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.topbar-cta {
  padding: 0 18px;
  background: var(--white);
  color: var(--ink);
  font-size: 0.88rem;
}

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

.deck-rail {
  position: fixed;
  right: 24px;
  top: 50%;
  z-index: 45;
  display: grid;
  gap: 12px;
  transform: translateY(-50%);
}

.rail-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 1px solid rgba(255, 250, 240, 0.46);
  background: transparent;
  cursor: pointer;
}

.rail-dot.is-active {
  height: 34px;
  background: var(--teal);
  border-color: var(--teal);
}

.deck {
  position: relative;
}

.deck-section {
  position: relative;
  display: grid;
  min-height: 100svh;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.deck-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 0 55%, rgba(255, 250, 240, 0.045) 55% 55.3%, transparent 55.3%),
    linear-gradient(245deg, transparent 0 68%, rgba(57, 192, 177, 0.08) 68% 68.2%, transparent 68.2%);
}

.section-inner {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 80px));
  margin: 0 auto;
  padding: 118px 0 54px;
}

.hero-grid,
.split-grid,
.systems-layout,
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.82fr);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  margin-bottom: 18px;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2 {
  max-width: 900px;
  margin-bottom: 24px;
  font-size: clamp(3rem, 6vw, 7.2rem);
  line-height: 0.9;
  letter-spacing: 0;
}

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

h3 {
  font-size: clamp(1.6rem, 2.4vw, 3rem);
  line-height: 1;
}

.lead,
.systems-copy p,
.contact-layout p {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.5vw, 1.25rem);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button-row.center {
  justify-content: center;
}

.button {
  min-height: 52px;
  padding: 0 22px;
}

.button.primary {
  background: var(--teal);
  border-color: var(--teal);
  color: #041311;
}

.button.ghost {
  background: rgba(255, 250, 240, 0.04);
  color: var(--white);
}

.hero-console,
.system-stage,
.case-panel,
.service-card,
.about-photo,
.credential-grid div {
  border: 1px solid var(--line);
  background: rgba(16, 26, 24, 0.82);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
}

.hero-console {
  padding: 18px;
}

.console-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 6px 0 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.console-top strong {
  color: var(--amber);
}

.founder-tile {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 18px;
  align-items: center;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.founder-tile img,
.about-photo img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.founder-tile p {
  margin-bottom: 6px;
  font-weight: 900;
}

.founder-tile span {
  color: var(--muted);
  font-size: 0.94rem;
}

.flow-stack {
  display: grid;
  gap: 10px;
  padding: 22px 0;
}

.flow-stack span,
.node-map span {
  position: relative;
  display: block;
  min-height: 48px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.04);
  color: var(--white);
  font-weight: 800;
}

.flow-stack span::before,
.node-map span::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  background: var(--teal);
}

.console-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.console-metrics div {
  padding: 16px;
  background: rgba(255, 250, 240, 0.06);
}

.console-metrics strong,
.console-metrics span {
  display: block;
}

.console-metrics span {
  color: var(--muted);
  font-size: 0.85rem;
}

.workflow-chaos {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  min-height: 540px;
  align-content: center;
}

.workflow-chaos::before,
.workflow-chaos::after,
.node-map::before {
  content: "";
  position: absolute;
  pointer-events: none;
  background: var(--line);
}

.workflow-chaos::before {
  left: 50%;
  top: 12%;
  bottom: 12%;
  width: 1px;
}

.workflow-chaos::after {
  left: 10%;
  right: 10%;
  top: 50%;
  height: 1px;
}

.chaos-card {
  z-index: 1;
  min-height: 90px;
  padding: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.055);
  color: var(--muted);
  font-weight: 800;
}

.chaos-core {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: min(260px, 72%);
  padding: 24px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--clay);
  background: #241512;
  text-align: center;
}

.chaos-core strong,
.chaos-core span {
  display: block;
}

.chaos-core span {
  color: var(--muted);
}

.systems-layout {
  grid-template-columns: minmax(320px, 0.48fr) 1fr;
}

.system-tabs {
  display: grid;
  gap: 10px;
  margin-top: 34px;
}

.system-tab {
  min-height: 56px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.04);
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
  text-align: left;
  padding: 0 18px;
}

.system-tab.is-active {
  border-color: var(--teal);
  background: var(--teal);
  color: #041311;
}

.system-stage {
  position: relative;
  min-height: 610px;
  padding: 34px;
}

.system-panel {
  animation: panelIn 260ms ease;
}

.system-panel small,
.case-panel span,
.service-card span {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--amber);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.system-panel h3 {
  max-width: 820px;
  margin-bottom: 34px;
}

.node-map {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 30px;
}

.node-map::before {
  left: 6%;
  right: 6%;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, var(--teal), var(--amber), var(--clay));
}

.node-map span {
  z-index: 1;
  min-height: 100px;
}

.node-map span:nth-child(3),
.node-map span:nth-child(6) {
  background: rgba(57, 192, 177, 0.14);
}

.tax-map span:nth-child(3),
.tax-map span:nth-child(6) {
  background: rgba(228, 180, 90, 0.15);
}

.email-map span:nth-child(3),
.email-map span:nth-child(6) {
  background: rgba(109, 168, 255, 0.15);
}

.ops-map span:nth-child(3),
.ops-map span:nth-child(6) {
  background: rgba(214, 111, 69, 0.15);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 34px;
}

.case-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.case-panel {
  min-height: 490px;
  padding: 34px;
}

.case-panel p,
.case-panel li,
.service-card p {
  color: var(--muted);
}

.case-panel ul {
  margin: 28px 0 0;
  padding-left: 18px;
}

.case-panel li + li {
  margin-top: 10px;
}

.services-layout {
  display: grid;
  grid-template-columns: 0.55fr 1fr;
  gap: 44px;
  align-items: center;
}

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

.service-card {
  min-height: 236px;
  padding: 26px;
}

.about-photo {
  padding: 16px;
}

.credential-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 34px;
}

.credential-grid div {
  padding: 22px;
}

.credential-grid strong,
.credential-grid span {
  display: block;
}

.credential-grid strong {
  margin-bottom: 8px;
}

.credential-grid span {
  color: var(--muted);
}

.contact-layout {
  display: grid;
  place-items: center;
  min-height: 100svh;
  text-align: center;
}

.contact-layout h2 {
  margin-inline: auto;
}

.contact-layout p {
  margin-inline: auto;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.deck-section.is-active .reveal {
  opacity: 1;
  transform: translateY(0);
}

.deck-section.is-active .reveal:nth-child(2),
.deck-section.is-active .service-card:nth-child(2),
.deck-section.is-active .case-panel:nth-child(2) {
  transition-delay: 90ms;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (min-width: 901px) {
  html,
  body {
    scroll-snap-type: y mandatory;
  }

  .deck-section {
    scroll-snap-align: start;
  }
}

@media (max-width: 980px) {
  body.is-decking {
    overflow: auto;
  }

  .topbar {
    position: sticky;
    left: auto;
    width: min(var(--max), calc(100% - 28px));
    transform: none;
  }

  .desktop-nav,
  .deck-rail {
    display: none;
  }

  .section-inner {
    width: min(var(--max), calc(100% - 28px));
    padding: 72px 0;
  }

  .deck-section {
    min-height: auto;
    overflow: visible;
  }

  .hero-grid,
  .split-grid,
  .systems-layout,
  .about-layout,
  .services-layout {
    grid-template-columns: 1fr;
  }

  .system-stage {
    min-height: auto;
  }

  .case-grid,
  .service-grid,
  .credential-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    gap: 12px;
  }

  .brand small {
    display: none;
  }

  .topbar-cta {
    min-height: 38px;
    padding: 0 12px;
    font-size: 0.8rem;
  }

  h1,
  h2 {
    font-size: clamp(2.65rem, 15vw, 4.6rem);
  }

  .button-row {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .console-metrics,
  .founder-tile,
  .node-map,
  .workflow-chaos {
    grid-template-columns: 1fr;
  }

  .workflow-chaos::before,
  .workflow-chaos::after,
  .node-map::before {
    display: none;
  }

  .system-stage,
  .case-panel,
  .service-card {
    padding: 22px;
  }
}
