:root {
  --bg: #000000;
  --text: #f5f7f8;
  --muted: #8f9aaa;
  --dim: #303947;
  --accent: #d6a20b;
  --red: #c94848;
  --red-soft: rgba(201, 72, 72, 0.14);
  --line: rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.055);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Arial, Helvetica, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

body {
  overflow-x: hidden;
}

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 50;
  transform: translateY(-180%);
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  background: var(--accent);
  color: #111;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-title {
  position: fixed;
  left: clamp(24px, 4vw, 72px);
  top: clamp(48px, 14vh, 118px);
  z-index: 20;
  display: block;
  color: var(--text);
  font-size: clamp(5.2rem, 15vw, 14rem);
  font-weight: 850;
  line-height: 0.82;
  letter-spacing: -0.09em;
  transform-origin: left top;
  transition:
    top 700ms cubic-bezier(.2,.8,.2,1),
    font-size 700ms cubic-bezier(.2,.8,.2,1),
    letter-spacing 700ms cubic-bezier(.2,.8,.2,1),
    opacity 500ms ease;
}

.has-scrolled .site-title {
  top: 32px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.055em;
}

.snap-section {
  min-height: 100svh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 0 clamp(24px, 4vw, 72px) clamp(52px, 10vh, 96px);
}

.hero-content {
  width: min(1180px, 100%);
}

.pretitle {
  position: absolute;
  top: clamp(26px, 5vh, 54px);
  left: 50%;
  margin: 0;
  color: var(--dim);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.domain-label {
  position: absolute;
  top: clamp(82px, 15vh, 152px);
  left: clamp(24px, 4vw, 72px);
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.hero-copy {
  display: grid;
  max-width: 760px;
  gap: 18px;
  margin-left: min(8vw, 120px);
  padding-top: 42vh;
}

.hero-statement {
  margin-bottom: 0;
  color: #b4bfcc;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  font-weight: 560;
  line-height: 1.36;
  letter-spacing: -0.045em;
}

.hero-support {
  max-width: 680px;
  margin-bottom: 0;
  color: #4e5a6a;
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  line-height: 1.55;
}

.scroll-cue {
  display: inline-flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 64px;
  margin-left: min(8vw, 120px);
  color: #465261;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.36em;
  text-transform: uppercase;
}

.scroll-line {
  position: relative;
  display: block;
  width: 1px;
  height: 62px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.scroll-line::after {
  content: "";
  position: absolute;
  top: -22px;
  left: 0;
  width: 1px;
  height: 22px;
  background: var(--accent);
  animation: scrollCue 1.8s ease-in-out infinite;
}

.gap-page {
  display: grid;
  align-items: center;
  padding: 72px clamp(24px, 4vw, 72px) 48px;
}

.page-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.section-index {
  width: 100%;
  margin: 0 0 48px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  color: #344050;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.36em;
  text-transform: uppercase;
}

.gap-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(520px, 1.18fr);
  gap: clamp(42px, 6vw, 86px);
  align-items: center;
}

.gap-copy h2 {
  max-width: 520px;
  margin-bottom: 28px;
  font-size: clamp(3.3rem, 6.8vw, 7rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.088em;
}

.gap-copy h2 span {
  display: block;
  color: #586477;
}

.gap-copy p {
  max-width: 560px;
  margin-bottom: 52px;
  color: #708094;
  font-size: clamp(1rem, 1.35vw, 1.18rem);
  line-height: 1.55;
}

.check-list {
  display: grid;
  gap: 22px;
  margin-bottom: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  display: grid;
  grid-template-columns: 34px 1fr;
  column-gap: 18px;
  align-items: start;
}

.check-list li > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(214, 162, 11, 0.45);
}

.check-list li > span::before {
  content: "✓";
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 900;
}

.check-list li.fail > span {
  border-color: rgba(201, 72, 72, 0.6);
}

.check-list li.fail > span::before {
  content: "×";
  color: var(--red);
  font-size: 1rem;
}

.check-list strong {
  display: block;
  margin-bottom: 5px;
  color: #c9d2de;
  font-size: 1rem;
}

.check-list small {
  display: block;
  color: #465466;
  font-size: 0.92rem;
  line-height: 1.42;
}

.check-list .fail strong,
.check-list .fail small {
  color: var(--red);
}

.pipeline-area {
  min-width: 0;
}

.pipeline-label {
  margin: 0 0 32px;
  color: #26313f;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.36em;
  text-align: center;
  text-transform: uppercase;
}

.pipeline {
  display: grid;
  grid-template-columns: 92px minmax(24px, 1fr) 92px minmax(24px, 1fr) 92px minmax(24px, 1fr) 92px minmax(24px, 1fr) 92px;
  align-items: start;
  margin-bottom: 24px;
}

.pipe-node {
  display: grid;
  justify-items: center;
  text-align: center;
}

.node-circle {
  position: relative;
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border: 1px solid rgba(214, 162, 11, 0.44);
  border-radius: 999px;
  background: rgba(214, 162, 11, 0.035);
}

.ok-node .node-circle::after {
  content: "✓";
  position: absolute;
  right: -2px;
  top: -2px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid rgba(214, 162, 11, 0.5);
  border-radius: 999px;
  color: var(--accent);
  background: #000;
  font-size: 0.7rem;
  font-weight: 900;
}

.fail-node .node-circle {
  border-color: rgba(201, 72, 72, 0.38);
  background: rgba(201, 72, 72, 0.04);
}

.fail-node .node-circle::after {
  content: "?";
  position: absolute;
  right: -2px;
  top: -2px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid rgba(201, 72, 72, 0.45);
  border-radius: 999px;
  color: var(--red);
  background: #000;
  font-size: 0.7rem;
  font-weight: 900;
}

.pipe-node strong {
  margin-top: 16px;
  color: #c9d2de;
  font-size: 0.92rem;
}

.pipe-node small {
  margin-top: 7px;
  color: #344050;
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.fail-node strong {
  color: var(--red);
}

.pipe-link {
  height: 1px;
  margin-top: 43px;
  background: linear-gradient(90deg, rgba(214,162,11,0.12), rgba(214,162,11,0.8), rgba(214,162,11,0.12));
  transform-origin: left;
  animation: pipeFlow 2.8s ease-in-out infinite;
}

.pipe-link.broken {
  background: linear-gradient(90deg, rgba(214,162,11,0.45), rgba(201,72,72,0.55));
  border-top: 1px dashed rgba(201,72,72,0.36);
}

.operator-icon::before,
.hmi-icon::before,
.command-icon::before,
.plc-icon::before,
.asset-icon::before {
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 900;
}

.operator-icon::before { content: "◎"; }
.hmi-icon::before { content: "▣"; }
.command-icon::before { content: "➜"; }
.plc-icon::before { content: "▤"; }
.asset-icon::before { content: "▢"; color: var(--red); }

.verified-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin: 0 auto 54px;
  color: #526070;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.verified-row span::before {
  content: "•";
  color: var(--accent);
  margin-right: 6px;
}

.alert-box {
  display: flex;
  gap: 14px;
  width: min(360px, 100%);
  margin: 0 0 64px;
  border: 1px solid rgba(201, 72, 72, 0.5);
  border-radius: 4px;
  background: var(--red-soft);
  padding: 16px 18px;
}

.alert-box > span {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--red);
}

.alert-box strong {
  display: block;
  margin-bottom: 5px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.alert-box p {
  margin: 0;
  color: var(--red);
  font-size: 0.88rem;
}

.missing-layer {
  border-left: 2px solid rgba(201, 72, 72, 0.62);
  background: rgba(255,255,255,0.015);
  box-shadow: inset 0 0 0 1px var(--line-soft);
  padding: 28px 34px;
}

.missing-layer p {
  margin: 0 0 18px;
  color: rgba(201, 72, 72, 0.7);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.missing-layer strong {
  display: block;
  max-width: 560px;
  color: rgba(201, 72, 72, 0.52);
  font-size: 1rem;
  font-weight: 560;
  line-height: 1.55;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@keyframes scrollCue {
  to {
    transform: translateY(84px);
  }
}

@keyframes pipeFlow {
  0%, 100% {
    opacity: 0.45;
    transform: scaleX(0.76);
  }
  50% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@media (max-width: 1080px) {
  .gap-layout {
    grid-template-columns: 1fr;
  }

  .pipeline-area {
    overflow-x: auto;
    padding-bottom: 12px;
  }

  .pipeline,
  .verified-row {
    min-width: 720px;
  }
}

@media (max-width: 760px) {
  .site-title {
    left: 20px;
    top: 92px;
    font-size: clamp(4.4rem, 23vw, 6.8rem);
  }

  .has-scrolled .site-title {
    top: 24px;
    font-size: 1rem;
  }

  .pretitle {
    left: 20px;
    transform: none;
    letter-spacing: 0.24em;
  }

  .domain-label {
    left: 20px;
    top: 72px;
    font-size: 0.68rem;
    letter-spacing: 0.2em;
  }

  .hero,
  .gap-page {
    padding-inline: 20px;
  }

  .hero-copy,
  .scroll-cue {
    margin-left: 0;
  }

  .hero-copy {
    padding-top: 45vh;
  }

  .section-index {
    margin-bottom: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
