:root {
  --surface-0: #050506;
  --surface-1: #09080c;
  --surface-2: #15121a;
  --text-1: #efedea;
  --text-2: #98919c;
  --violet-muted: #765889;
  --border-subtle: #302a35;
  --display: "Anton", sans-serif;
  --sans: "Inter", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --gutter: clamp(1.25rem, 4vw, 4.5rem);
  --content: 90rem;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  background: var(--surface-0);
}

body {
  min-width: 20rem;
  margin: 0;
  overflow-x: hidden;
  background: var(--surface-0);
  color: var(--text-1);
  font-family: var(--mono);
  font-size: 0.9375rem;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--violet-muted);
  outline-offset: 4px;
}

::selection {
  background: var(--violet-muted);
  color: var(--text-1);
}

.initial-loader {
  display: none;
}

.js.loader-active {
  overflow: hidden;
}

.js.loader-active .initial-loader {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgb(27 16 38 / 0.8), transparent 32%),
    var(--surface-0);
  opacity: 1;
  visibility: visible;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.js.loader-hidden .initial-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-meta,
.loader-footer {
  position: absolute;
  right: var(--gutter);
  left: var(--gutter);
  display: flex;
  justify-content: space-between;
  color: #716a75;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
}

.loader-meta {
  top: 2rem;
}

.loader-footer {
  bottom: 2rem;
}

.loader-core {
  width: min(74vw, 22rem);
  text-align: center;
}

.loader-core img {
  width: 9.75rem;
  height: 9.75rem;
  object-fit: contain;
  opacity: 0.74;
  filter: saturate(0.72) brightness(0.88) drop-shadow(0 0 1.5rem rgb(117 71 141 / 0.25));
}

.loader-core p {
  margin: 1.35rem 0 0.4rem;
  color: #b2aab5;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
}

.loader-core small {
  color: #736b77;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
}

.loader-progress {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.3rem;
  margin-top: 1.5rem;
}

.loader-progress i {
  height: 2px;
  background: #28222d;
  animation: loader-segment 780ms ease-in-out both;
}

.loader-progress i:nth-child(2) { animation-delay: 70ms; }
.loader-progress i:nth-child(3) { animation-delay: 140ms; }
.loader-progress i:nth-child(4) { animation-delay: 210ms; }
.loader-progress i:nth-child(5) { animation-delay: 280ms; }
.loader-progress i:nth-child(6) { animation-delay: 350ms; }
.loader-progress i:nth-child(7) { animation-delay: 420ms; }
.loader-progress i:nth-child(8) { animation-delay: 490ms; }

@keyframes loader-segment {
  to {
    background: var(--violet-muted);
  }
}

.site-header {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 50%;
  display: flex;
  width: min(100%, var(--content));
  min-height: 5rem;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  transform: translateX(-50%);
}

.wordmark {
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.24em;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: clamp(1.1rem, 3vw, 2.25rem);
}

.site-header nav a {
  color: var(--text-2);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
}

.site-header nav a:hover,
.site-header .channel-link {
  color: #b29abc;
}

main {
  overflow: clip;
}

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
  background:
    radial-gradient(circle at 82% 42%, rgb(35 21 48 / 0.52), transparent 31%),
    var(--surface-0);
}

.hero::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(90deg, transparent 48%, rgb(5 5 6 / 0.2) 72%, rgb(5 5 6 / 0.82));
  content: "";
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 3;
  width: min(100%, var(--content));
  margin: 0 auto;
  padding: clamp(9rem, 16vh, 13rem) var(--gutter) 5rem;
}

.eyebrow {
  margin: 0 0 1.25rem;
  color: #837a88;
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 10ch;
  margin: 0;
  font: 400 clamp(4rem, 8.7vw, 8.75rem) / 0.86 var(--display);
  letter-spacing: -0.025em;
}

.hero-descriptor {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: clamp(2.25rem, 5vh, 4rem) 0 0;
  color: var(--text-2);
  font-size: clamp(0.65rem, 1vw, 0.78rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-descriptor::before {
  width: 2.25rem;
  height: 1px;
  background: var(--violet-muted);
  content: "";
}

.hero-sigil {
  position: absolute;
  z-index: 2;
  top: -4%;
  right: max(-7rem, calc((100vw - var(--content)) / 2 - 7rem));
  width: min(52vw, 48rem);
  height: 108%;
  object-fit: contain;
  opacity: 0.14;
  filter: saturate(0.6) brightness(0.72);
  mask-image: linear-gradient(90deg, transparent, #000 32%, #000 86%);
}

.availability {
  position: absolute;
  z-index: 4;
  top: 6.25rem;
  right: max(var(--gutter), calc((100vw - var(--content)) / 2 + var(--gutter)));
  margin: 0;
  color: var(--text-2);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
}

.mobile-field-index {
  display: none;
}

.section {
  width: min(100%, var(--content));
  margin: 0 auto;
  padding: clamp(6rem, 11vw, 10rem) var(--gutter);
  border-top: 1px solid var(--border-subtle);
}

.systems-section {
  position: relative;
  border-top: 0;
  background: radial-gradient(circle at 50% 0%, rgb(27 19 35 / 0.8), transparent 40%);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.7fr);
  align-items: end;
  gap: 3rem;
  margin-bottom: 3.25rem;
}

.section h2,
.section-heading h2 {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(2.25rem, 4.4vw, 4.5rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.section-heading > p {
  max-width: 34rem;
  margin: 0 0 0.25rem;
  color: var(--text-2);
  font-size: 0.75rem;
}

.systems-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.875rem;
}

.system-card {
  position: relative;
  min-height: 17rem;
  overflow: hidden;
  padding: 1.125rem;
  border: 1px solid var(--border-subtle);
  border-radius: 1.1rem;
  background: linear-gradient(145deg, var(--surface-2), var(--surface-1) 52%, var(--surface-0));
  box-shadow: inset 0 1px rgb(255 255 255 / 0.05), 0 1.4rem 2.8rem rgb(0 0 0 / 0.55);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.system-card::before {
  position: absolute;
  top: -4rem;
  right: -4rem;
  width: 10rem;
  height: 10rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(135 85 161 / 0.17), transparent 68%);
  content: "";
}

.system-card::after {
  position: absolute;
  z-index: 0;
  top: -0.5rem;
  right: -6rem;
  width: 12rem;
  height: 12rem;
  background: url("artworks/kdos-sigil.png") center / contain no-repeat;
  content: "";
  opacity: 0.105;
  filter: saturate(0.55) brightness(0.72);
  mask-image: linear-gradient(90deg, transparent, #000 22%);
  pointer-events: none;
}

.system-card > * {
  position: relative;
  z-index: 2;
}

.system-card:hover {
  border-color: #5b4965;
  box-shadow: inset 0 1px rgb(255 255 255 / 0.09), 0 1.8rem 3.2rem rgb(0 0 0 / 0.65);
  transform: translateY(-0.35rem);
}

.card-index {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: #68606c;
  font-size: 0.55rem;
}

.product-icon {
  display: grid;
  width: 4.75rem;
  margin-bottom: 2.25rem;
  overflow: hidden;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid #594563;
  border-radius: 1.2rem;
  background: linear-gradient(145deg, #35263e, #141117 44%, #070708);
  box-shadow: inset 0 1px 1px rgb(255 255 255 / 0.18), inset 0 -15px 27px rgb(0 0 0 / 0.7), 0 17px 28px rgb(0 0 0 / 0.7);
  color: #d8cadf;
}

.product-icon img {
  width: 3.7rem;
  height: 3.7rem;
  object-fit: contain;
  filter: saturate(0.72) brightness(1.12);
}

.product-icon svg {
  width: 2.4rem;
  height: 2.4rem;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.35;
}

.system-card h3 {
  margin: 0 0 0.45rem;
  font-family: var(--sans);
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.system-card > p {
  max-width: 70%;
  margin: 0;
  color: #847d88;
  font-size: 0.625rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.system-card footer {
  position: absolute;
  right: 1.125rem;
  bottom: 1rem;
  left: 1.125rem;
  display: flex;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid #2c2730;
  color: #7f7583;
  font-size: 0.52rem;
}

.system-card footer strong {
  color: #9e80ad;
  font-weight: 400;
}

#archive {
  display: grid;
  grid-template-columns: minmax(15rem, 0.7fr) minmax(0, 1.3fr);
  grid-template-rows: auto 1fr;
  gap: clamp(2rem, 7vw, 7rem);
}

#archive > .eyebrow {
  grid-area: 1 / 1;
}

#archive > h2 {
  grid-area: 2 / 1;
}

.archive-list {
  grid-area: 1 / 2 / 3;
  align-self: end;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.archive-list li {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 1.25rem;
  align-items: baseline;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.archive-list strong {
  font-family: var(--sans);
  font-size: 1.1rem;
}

.archive-list span,
.archive-list em {
  color: var(--text-2);
  font-size: 0.625rem;
  font-style: normal;
  letter-spacing: 0.08em;
}

.archive-list em {
  color: #9e80ad;
  text-align: right;
}

.operator-profile {
  position: relative;
  width: calc(min(100%, var(--content)) - (var(--gutter) * 2));
  min-height: 28rem;
  margin: clamp(4rem, 8vw, 7rem) auto;
  overflow: hidden;
  padding: clamp(3rem, 6vw, 5.5rem);
  border: 1px solid #44384b;
  border-radius: 1.25rem;
  background:
    radial-gradient(circle at 88% 48%, rgb(44 24 58 / 0.48), transparent 36%),
    linear-gradient(145deg, #121016, #070708 55%);
  box-shadow: inset 0 1px rgb(255 255 255 / 0.05), 0 1.4rem 3.8rem rgb(0 0 0 / 0.45);
}

.operator-profile::after {
  position: absolute;
  z-index: 0;
  top: -15%;
  right: -18%;
  width: 56%;
  height: 130%;
  background: url("artworks/kdos-sigil.png") center / contain no-repeat;
  content: "";
  opacity: 0.105;
  filter: saturate(0.55) brightness(0.76);
  mask-image: linear-gradient(90deg, transparent, #000 34%, #000 88%);
  pointer-events: none;
}

.profile-index {
  position: absolute;
  z-index: 2;
  top: 1.25rem;
  right: 1.4rem;
  color: #665d6a;
  font-size: 0.55rem;
  letter-spacing: 0.1em;
}

.profile-copy {
  position: relative;
  z-index: 2;
  max-width: 60%;
}

.profile-copy > p:not(.eyebrow) {
  max-width: 46rem;
  margin: 1.75rem 0 0;
  color: var(--text-2);
  font-size: 0.78rem;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
}

.profile-tags li {
  padding: 0.5rem 0.7rem;
  border: 1px solid #332c38;
  color: #95889b;
  font-size: 0.55rem;
  letter-spacing: 0.1em;
}

.contact {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: center;
  width: min(100%, var(--content));
  min-height: auto;
  margin: 0 auto;
  padding: 1.5rem var(--gutter);
  border-top: 1px solid var(--border-subtle);
}

.contact a {
  text-decoration: none;
}

.footer-brand {
  gap: 0.7rem;
  justify-self: start;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.footer-sigil {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
  opacity: 0.58;
  filter: saturate(0.62) brightness(0.82);
}

.contact > p {
  margin: 0;
  color: var(--text-2);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
}

.footer-github {
  gap: 0.55rem;
  justify-self: end;
  color: #b295bf;
  font-size: 0.625rem;
  letter-spacing: 0.1em;
}

.github-icon {
  width: 1.125rem;
  fill: currentcolor;
}

.js .reveal {
  opacity: 0;
  transform: translateY(0.75rem);
  transition: opacity 700ms ease, transform 700ms ease;
}

.js .reveal.visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 980px) {
  .section-heading,
  #archive {
    grid-template-columns: 1fr;
  }

  #archive > .eyebrow,
  #archive > h2,
  .archive-list {
    grid-column: 1;
  }

  #archive > .eyebrow {
    grid-row: 1;
  }

  #archive > h2 {
    grid-row: 2;
  }

  .archive-list {
    grid-row: 3;
    margin-top: 0;
  }

  .section-heading > p {
    max-width: 42rem;
  }

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

@media (max-width: 720px) {
  :root {
    --gutter: 1.25rem;
  }

  .site-header {
    min-height: 4.5rem;
  }

  .site-header nav {
    display: none;
  }

  .hero-copy {
    min-height: 100svh;
    padding-top: clamp(9.25rem, 22vh, 11rem);
    padding-bottom: 2rem;
  }

  .hero .eyebrow {
    display: none;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(3rem, 12.8vw, 4.25rem);
  }

  .hero-sigil {
    top: 8%;
    right: -54%;
    width: 92vw;
    height: 58%;
  }

  .availability {
    top: 1.75rem;
    right: var(--gutter);
    font-size: 0.55rem;
  }

  .hero-descriptor {
    max-width: 26rem;
    margin-top: 2.35rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.66rem;
    line-height: 1.65;
  }

  .hero-descriptor::before {
    display: none;
  }

  .mobile-field-index {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.45rem 1rem;
    width: 100%;
    max-width: 30rem;
    margin-top: 2rem;
    padding: 0.95rem 0;
    border-block: 1px solid var(--border-subtle);
    color: var(--text-2);
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    text-decoration: none;
  }

  .mobile-field-index small {
    grid-column: 1;
    color: #716a75;
    font-size: 0.56rem;
  }

  .mobile-field-index strong {
    grid-row: 1 / span 2;
    grid-column: 2;
    align-self: center;
    color: #a88abe;
    font-weight: 400;
  }

  .section {
    padding-block: 6rem;
  }

  .section-heading {
    gap: 1.5rem;
    margin-bottom: 2.25rem;
  }

  .section h2,
  .section-heading h2 {
    font-size: clamp(2.25rem, 11vw, 3.4rem);
  }

  .systems-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .system-card {
    min-height: 15rem;
  }

  .archive-list li {
    grid-template-columns: 1fr auto;
  }

  .archive-list li span {
    grid-row: 2;
    grid-column: 1 / -1;
  }

  .operator-profile {
    width: calc(100% - (var(--gutter) * 2));
    min-height: 23rem;
    margin-block: 4rem;
    padding: 2.25rem 2rem;
  }

  .profile-copy {
    max-width: 100%;
  }

  .profile-copy h2 {
    max-width: 9ch;
  }

  .profile-copy > p:not(.eyebrow) {
    max-width: 72%;
    font-size: 0.68rem;
  }

  .operator-profile::after {
    top: 18%;
    right: -48%;
    width: 115%;
    height: 95%;
    opacity: 0.08;
  }

  .contact {
    grid-template-columns: 1fr auto;
    gap: 0.65rem 1rem;
    padding-block: 1.25rem;
  }

  .contact > p {
    grid-row: 2;
    grid-column: 1 / -1;
  }

  .footer-github {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
