:root {
  --ec-ink: #f4f6f9;
  --ec-blue: #2970FF;
  --ec-paper: #07090D;
  --ec-paper-2: #0B0E14;
  --ec-cyan: #162C4C;
  --ec-signal: #FF5500;
  --ec-line: rgba(244, 246, 249, 0.12);
  --ec-line-strong: rgba(244, 246, 249, 0.28);
  --ec-shadow: 0 28px 72px rgba(0, 0, 0, 0.6);
  --ec-font-head: "Oxanium", sans-serif;
  --ec-font-mono: "PT Mono", monospace;
  --ec-gutter: clamp(18px, 3.6vw, 40px);
  --ec-transition: 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  background: var(--ec-paper);
}

body.ec-body {
  overflow: hidden;
  background: transparent;
  color: var(--ec-ink);
  font-family: var(--ec-font-head);
}

.ec-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(41, 112, 255, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(255, 85, 0, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, var(--ec-paper) 0%, var(--ec-paper-2) 100%);
}

.ec-posterize {
  filter: url(#ec-posterize);
}

a,
button {
  color: inherit;
}

button {
  font: inherit;
}

a {
  text-decoration: none;
}

.ec-grid-canvas,
.ec-scene {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.ec-grid-canvas {
  z-index: 0;
  opacity: 0.58;
}

.ec-scene {
  z-index: 1;
  overflow: hidden;
}

.ec-plane {
  position: absolute;
  clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%);
}

.ec-plane-a {
  left: -6%;
  bottom: 0;
  width: 52vw;
  height: 32vh;
  background: rgba(244, 246, 249, 0.03);
}

.ec-plane-b {
  right: 1%;
  top: 0;
  width: 24vw;
  height: 42vh;
  background: rgba(93, 215, 255, 0.15);
}

.ec-plane-c {
  right: 4%;
  bottom: 10%;
  width: 20vw;
  height: 16vh;
  background: rgba(255, 106, 31, 0.11);
}

.ec-header {
  position: fixed;
  inset: 0 0 auto 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px var(--ec-gutter);
  z-index: 40;
}

.ec-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.ec-brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  filter: invert(1) hue-rotate(180deg) brightness(1.2);
}

.ec-brand-lockup {
  display: flex;
  flex-direction: column;
}

.ec-brand-name,
.ec-brand-tag,
.ec-kicker,
.ec-menu-word,
.ec-floorband,
.ec-figure-label {
  font-family: var(--ec-font-mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.ec-brand-name {
  font-size: 0.92rem;
  font-weight: 700;
}

.ec-brand-tag {
  font-size: 0.72rem;
  color: rgba(244, 246, 249, 0.62);
}

.ec-menu {
  position: relative;
  z-index: 60;
}

.ec-menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 18px;
  border: 1px solid var(--ec-line-strong);
  background: var(--ec-paper-2);
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
  transition: transform var(--ec-transition), border-color var(--ec-transition), background var(--ec-transition);
}

.ec-menu.is-open .ec-menu-toggle,
.ec-menu-toggle:hover {
  transform: translateY(-1px);
  background: var(--ec-paper);
  border-color: rgba(244, 246, 249, 0.42);
}

.ec-menu-word {
  font-size: 0.88rem;
}

.ec-menu-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  background: var(--ec-ink);
  clip-path: polygon(24% 0, 100% 0, 76% 100%, 0 100%);
}

.ec-menu-icon span {
  position: absolute;
  width: 10px;
  height: 1.5px;
  background: var(--ec-paper);
  transition: transform var(--ec-transition);
}

.ec-menu-icon span:first-child {
  transform: translateY(-3px);
}

.ec-menu-icon span:last-child {
  transform: translateY(3px);
}

.ec-menu.is-open .ec-menu-icon span:first-child {
  transform: rotate(45deg);
}

.ec-menu.is-open .ec-menu-icon span:last-child {
  transform: rotate(-45deg);
}

.ec-menu-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  z-index: 61;
  width: min(460px, calc(100vw - 22px));
  padding: 18px 0 10px;
  background: rgba(11, 14, 20, 0.96);
  border: 1px solid var(--ec-line-strong);
  clip-path: polygon(60px 0, 100% 0, calc(100% - 60px) 100%, 0 100%);
  box-shadow: var(--ec-shadow);
  backdrop-filter: blur(12px);
}

.ec-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
  padding: 0 18px 0 62px;
}

.ec-menu-close {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: rgba(8, 17, 29, 0.62);
}

.ec-menu-link {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  border-top: 1px solid var(--ec-line);
  position: relative;
  transition: background var(--ec-transition);
}

.ec-menu-link:first-of-type {
  margin: 0 10px 0 34px;
}

.ec-menu-link:nth-of-type(2) {
  margin: 0 34px 0 10px;
}

.ec-menu-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--ec-signal);
  transform: skewX(-15deg) scaleY(0);
  transform-origin: center;
  transition: transform var(--ec-transition);
}

.ec-menu-link:hover {
  background: rgba(244, 246, 249, 0.03);
}

.ec-menu-link:hover::before {
  transform: skewX(-15deg) scaleY(1);
}

.ec-menu-link-id {
  font-family: var(--ec-font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  color: var(--ec-signal);
  transition: color var(--ec-transition);
}

.ec-menu-link:hover .ec-menu-link-id {
  color: var(--ec-ink);
}

.ec-menu-link-copy {
  display: grid;
  gap: 6px;
  transition: transform var(--ec-transition);
}

.ec-menu-link:hover .ec-menu-link-copy {
  transform: translateX(6px);
}

.ec-menu-link-copy strong {
  font-size: 1.08rem;
}

.ec-menu-link-copy span {
  color: rgba(244, 246, 249, 0.62);
  line-height: 1.45;
}

.ec-hero {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: clamp(22px, 4vw, 58px);
  padding: 88px var(--ec-gutter) 20px;
}

.ec-copy {
  max-width: 720px;
}

.ec-kicker {
  display: inline-block;
  font-size: 0.76rem;
  color: rgba(244, 246, 249, 0.62);
}

.ec-title {
  display: grid;
  margin: 18px 0 28px;
  font-size: clamp(4.5rem, 12vw, 9.6rem);
  line-height: 0.84;
  letter-spacing: -0.06em;
  text-transform: uppercase;
}

.ec-title span:first-child {
  color: var(--ec-ink);
}

.ec-title span:last-child {
  color: var(--ec-blue);
}

.ec-lead {
  margin: 0;
  font-size: clamp(1.26rem, 2vw, 1.95rem);
  line-height: 1.08;
  color: rgba(244, 246, 249, 0.88);
}

.ec-lead-prefix {
  display: inline;
}

.ec-rotator-shell {
  display: inline-block;
  min-width: 13.5ch;
  margin-left: 0.22em;
  white-space: nowrap;
  vertical-align: baseline;
}

.ec-rotator {
  display: inline-block;
  color: var(--ec-signal);
}

.ec-sublead {
  max-width: 35ch;
  margin: 18px 0 0;
  font-size: 1.02rem;
  line-height: 1.45;
  color: rgba(244, 246, 249, 0.58);
}

.ec-figure {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.ec-figure-svg {
  width: min(100%, 620px);
  height: auto;
  overflow: visible;
}

.ec-figure-corridor,
.ec-figure-corridor-inner,
.ec-figure-tag-shell,
.ec-figure-gate {
  fill: rgba(244, 246, 239, 0.96);
  stroke: rgba(8, 17, 29, 0.28);
  stroke-width: 2;
  stroke-linejoin: round;
}

.ec-figure-corridor-inner {
  fill: rgba(255, 255, 255, 0.18);
  stroke-width: 1.4;
}

.ec-figure-guide {
  fill: none;
  stroke: rgba(8, 17, 29, 0.12);
  stroke-width: 1.2;
}

.ec-figure-tag-shell,
.ec-figure-gate,
.ec-figure-gate-field {
  transform-box: fill-box;
  transform-origin: center;
}

.ec-figure-tag-left .ec-figure-tag-shell {
  fill: rgba(255, 106, 31, 0.1);
  stroke: rgba(255, 106, 31, 0.28);
}

.ec-figure-tag-right .ec-figure-tag-shell {
  fill: rgba(33, 79, 137, 0.1);
  stroke: rgba(33, 79, 137, 0.3);
}

.ec-figure-tag-mark,
.ec-figure-gate-mark {
  fill: none;
  stroke-width: 5.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ec-figure-tag-mark-left {
  stroke: rgba(8, 17, 29, 0.9);
  animation: ecStressBlink 4.2s steps(2, end) infinite;
}

.ec-figure-tag-mark-right {
  stroke: rgba(33, 79, 137, 0.92);
}

.ec-figure-gate {
  fill: rgba(244, 246, 239, 0.99);
  stroke-width: 2.4;
}

.ec-figure-gate-field {
  fill: rgba(33, 79, 137, 0.1);
  stroke: rgba(33, 79, 137, 0.3);
  stroke-width: 1.3;
}

.ec-figure-flow-path {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.ec-figure-flow-path-in {
  stroke: rgba(255, 106, 31, 0.5);
  stroke-dasharray: 8 12;
  animation: ecDash 8s linear infinite;
}

.ec-figure-flow-path-out {
  stroke: rgba(33, 79, 137, 0.56);
  stroke-dasharray: 8 12;
  animation: ecDash 7s linear infinite reverse;
}

.ec-figure-core {
  animation: ecCoreFloat 6s ease-in-out infinite;
}

.ec-figure-gate-scan {
  fill: rgba(255, 106, 31, 0.12);
  animation: ecCoreScan 3s ease-in-out infinite;
}

.ec-figure-tag-left {
  animation: ecTagFloat 5.4s ease-in-out infinite;
}

.ec-figure-tag-right {
  animation: ecTagFloat 5.4s ease-in-out infinite -0.4s;
}

.ec-figure-tag-b {
  animation-delay: -1.1s;
}

.ec-figure-tag-c {
  animation-delay: -2.2s;
}

.ec-flow-dot {
  fill: var(--ec-signal);
  stroke: var(--ec-paper);
  stroke-width: 2;
  filter: drop-shadow(0 0 8px rgba(255, 106, 31, 0.18));
}

.ec-flow-dot-output {
  fill: var(--ec-blue);
  filter: drop-shadow(0 0 8px rgba(33, 79, 137, 0.18));
}

.ec-floorband {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 0 0;
  font-size: 0.72rem;
  color: rgba(244, 246, 249, 0.62);
}

.ec-floorband-title {
  white-space: nowrap;
  font-weight: 700;
  color: var(--ec-ink);
}

.ec-floorband-lines {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 16px;
}

.ec-floorband-lines span {
  white-space: nowrap;
}

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

  .ec-hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    align-items: start;
    gap: 20px;
    padding-bottom: 24px;
  }

  .ec-figure {
    justify-content: flex-start;
  }

  .ec-figure-svg {
    width: min(100%, 500px);
  }

  .ec-floorband {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .ec-floorband-lines {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .ec-header {
    gap: 12px;
    padding-top: 14px;
  }

  .ec-menu-word {
    display: none;
  }

  .ec-brand-tag {
    font-size: 0.62rem;
    white-space: nowrap;
    line-height: 1.25;
  }

  .ec-menu-toggle {
    padding: 11px 12px;
  }

  .ec-menu-popover {
    width: min(360px, calc(100vw - 24px));
  }

  .ec-title {
    font-size: clamp(3rem, 15vw, 4.6rem);
    margin: 12px 0 18px;
  }

  .ec-lead {
    font-size: 1.15rem;
  }

  .ec-rotator-shell {
    display: inline-block;
    min-width: 0;
    margin-left: 0.22em;
    margin-top: 0;
  }

  .ec-sublead {
    max-width: 100%;
    font-size: 1rem;
    margin-top: 12px;
  }

  .ec-figure {
    margin-top: 24px;
  }

  .ec-figure-svg {
    width: 100%;
    max-width: 500px;
  }

  .ec-floorband {
    font-size: 0.66rem;
  }

  .ec-floorband-lines {
    gap: 8px 14px;
  }

  .ec-plane-a {
    width: 140vw;
    height: 40vh;
  }

  .ec-plane-b {
    width: 80vw;
    height: 50vh;
  }

  .ec-plane-c {
    width: 60vw;
    height: 20vh;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

@keyframes ecDash {
  from {
    stroke-dashoffset: 0;
  }

  to {
    stroke-dashoffset: -120;
  }
}

@keyframes ecCoreScan {

  0%,
  100% {
    transform: translateY(0);
    opacity: 0.1;
  }

  50% {
    transform: translateY(118px);
    opacity: 0.34;
  }
}

@keyframes ecCoreFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

@keyframes ecTagFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(4px);
  }
}

@keyframes ecStressBlink {

  0%,
  100% {
    opacity: 0.88;
    stroke: rgba(8, 17, 29, 0.86);
  }

  45%,
  55% {
    opacity: 1;
    stroke: rgba(255, 106, 31, 0.98);
  }
}

@keyframes ecSentryBlink {

  0%,
  100% {
    fill: rgba(244, 246, 239, 0.84);
  }

  50% {
    fill: rgba(33, 79, 137, 0.28);
  }
}
