:root {
  color-scheme: dark;
  --ink: #080a09;
  --paper: #ece9df;
  --muted: #8f918c;
  --line: rgba(236, 233, 223, 0.16);
  --ember: #e1a75b;
  --frame: clamp(18px, 2.4vw, 42px);
  --display: "Arial Narrow", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
}

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: #0d100e;
  content: "";
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  padding: 12px 16px;
  transform: translateY(-160%);
  border: 1px solid var(--paper);
  background: var(--ink);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

#signal-field,
.grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#signal-field {
  z-index: 0;
}

.grain {
  z-index: 1;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.frame {
  position: fixed;
  inset: var(--frame);
  z-index: 3;
  pointer-events: none;
}

.frame i {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: var(--line);
  border-style: solid;
}

.frame i:nth-child(1) {
  top: 0;
  left: 0;
  border-width: 1px 0 0 1px;
}

.frame i:nth-child(2) {
  top: 0;
  right: 0;
  border-width: 1px 1px 0 0;
}

.frame i:nth-child(3) {
  right: 0;
  bottom: 0;
  border-width: 0 1px 1px 0;
}

.frame i:nth-child(4) {
  bottom: 0;
  left: 0;
  border-width: 0 0 1px 1px;
}

.masthead,
footer {
  position: fixed;
  right: calc(var(--frame) + 22px);
  left: calc(var(--frame) + 22px);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.masthead {
  top: calc(var(--frame) + 18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand span {
  display: grid;
  gap: 3px;
}

.brand strong {
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand small,
.transmission,
footer,
.coordinate,
.status,
.patch-wrap p {
  color: var(--muted);
  font-size: 0.61rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.transmission {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.transmission span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 18px rgba(225, 167, 91, 0.8);
  animation: breathe 3.2s ease-in-out infinite;
}

main,
.cinematic-hero {
  min-height: 100svh;
}

.cinematic-hero {
  position: relative;
  z-index: 2;
  display: grid;
  align-items: center;
  padding: clamp(110px, 14vh, 170px) max(7vw, 70px) clamp(94px, 12vh, 132px);
}

.identity-lockup {
  position: relative;
  width: min(880px, 68vw);
  margin-left: clamp(0px, 4vw, 70px);
}

.eyebrow {
  margin: 0 0 clamp(22px, 3vh, 38px);
  color: var(--ember);
  font-size: clamp(0.65rem, 0.65vw, 0.78rem);
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

h1 {
  display: grid;
  width: max-content;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(5rem, 12.8vw, 12.5rem);
  font-stretch: condensed;
  font-weight: 700;
  letter-spacing: -0.085em;
  line-height: 0.72;
  text-transform: uppercase;
}

.word {
  display: flex;
  overflow: hidden;
  padding-right: 0.08em;
}

.word-labs {
  margin-left: 0.31em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(236, 233, 223, 0.62);
}

.word i {
  display: block;
  font-style: normal;
  opacity: 1;
}

.js .word i {
  opacity: 0;
  transform: translateY(110%) rotate(4deg);
  transition:
    opacity 0.8s ease,
    transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(0.44s + var(--letter) * 0.09s);
}

.js.ready .word i {
  opacity: 1;
  transform: none;
}

.word-asv i:nth-child(1) { --letter: 0; }
.word-asv i:nth-child(2) { --letter: 1; }
.word-asv i:nth-child(3) { --letter: 2; }
.word-labs i:nth-child(1) { --letter: 3; }
.word-labs i:nth-child(2) { --letter: 4; }
.word-labs i:nth-child(3) { --letter: 5; }
.word-labs i:nth-child(4) { --letter: 6; }
.word-labs i:nth-child(5) { --letter: 7; }

.voice {
  margin: clamp(28px, 4vh, 48px) 0 0 0.45em;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 2.2vw, 2.35rem);
  font-style: italic;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.manifesto {
  max-width: 560px;
  margin: clamp(18px, 2.5vh, 30px) 0 0 0.9em;
  color: #b9b8b1;
  font-size: clamp(0.82rem, 0.9vw, 1rem);
  line-height: 1.75;
}

.reveal {
  opacity: 1;
}

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 1s ease,
    transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(0.35s + var(--order) * 0.08s);
}

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

.status {
  position: absolute;
  right: clamp(60px, 8vw, 130px);
  bottom: clamp(104px, 13vh, 150px);
  display: grid;
  grid-template-columns: auto auto;
  gap: 9px 16px;
  align-items: center;
  min-width: 230px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.status strong {
  color: var(--paper);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.status i {
  grid-column: 1 / -1;
  width: 36%;
  height: 1px;
  background: var(--ember);
  box-shadow: 0 0 12px rgba(225, 167, 91, 0.55);
}

.patch-wrap {
  position: absolute;
  top: clamp(120px, 17vh, 190px);
  right: clamp(64px, 7vw, 118px);
  display: grid;
  justify-items: center;
  opacity: 0.34;
  filter: saturate(0.7) sepia(0.12);
}

.patch-wrap img {
  width: clamp(120px, 13vw, 210px);
  height: auto;
  filter: drop-shadow(0 20px 35px rgba(0, 0, 0, 0.5));
}

.patch-wrap p {
  margin: -8px 0 0;
}

.patch-wrap p span {
  margin: 0 0.45em;
  color: var(--ember);
}

.coordinate {
  position: absolute;
  display: grid;
  gap: 5px;
  line-height: 1;
}

.coordinate-a {
  top: 50%;
  left: calc(var(--frame) + 18px);
  transform: rotate(-90deg) translateX(-50%);
  transform-origin: left top;
}

.coordinate-b {
  right: calc(var(--frame) + 18px);
  top: 49%;
  justify-items: end;
  transform: rotate(90deg) translateX(50%);
  transform-origin: right top;
}

footer {
  bottom: calc(var(--frame) + 17px);
}

footer p {
  margin: 0;
}

@keyframes breathe {
  0%, 100% { opacity: 0.4; transform: scale(0.86); }
  50% { opacity: 1; transform: scale(1.18); }
}

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

  .masthead,
  footer {
    right: calc(var(--frame) + 14px);
    left: calc(var(--frame) + 14px);
  }

  .transmission {
    display: none;
  }

  .cinematic-hero {
    display: flex;
    min-height: 100svh;
    align-items: center;
    padding: 118px calc(var(--frame) + 14px) 128px;
  }

  .identity-lockup {
    width: 100%;
    margin: 5vh 0 0;
  }

  h1 {
    font-size: clamp(4.3rem, 23vw, 8.3rem);
    line-height: 0.76;
  }

  .word-labs {
    margin-left: 0.1em;
  }

  .voice {
    margin-left: 0;
  }

  .manifesto {
    max-width: 40rem;
    margin-left: 0;
    padding-right: 6vw;
  }

  .patch-wrap {
    top: 106px;
    right: calc(var(--frame) + 12px);
    justify-items: end;
    opacity: 0.28;
  }

  .patch-wrap img {
    width: 90px;
  }

  .patch-wrap p {
    display: none;
  }

  .status {
    right: calc(var(--frame) + 14px);
    bottom: 82px;
    left: calc(var(--frame) + 14px);
    min-width: 0;
  }

  .coordinate {
    display: none;
  }
}

@media (max-width: 480px) {
  :root {
    --frame: 14px;
  }

  .brand img {
    width: 36px;
    height: 36px;
  }

  .brand small {
    display: none;
  }

  .cinematic-hero {
    align-items: flex-start;
    padding-top: 29svh;
  }

  .identity-lockup {
    margin: 0;
  }

  .eyebrow {
    margin-bottom: 17px;
    font-size: 0.58rem;
  }

  h1 {
    font-size: clamp(4.15rem, 24vw, 6.1rem);
  }

  .voice {
    margin-top: 24px;
    font-size: clamp(1.35rem, 7vw, 1.8rem);
  }

  .manifesto {
    margin-top: 16px;
    padding-right: 0;
    font-size: 0.8rem;
    line-height: 1.62;
  }

  .patch-wrap {
    top: 78px;
  }

  .patch-wrap img {
    width: 76px;
  }

  .status {
    bottom: 70px;
  }

  footer {
    bottom: calc(var(--frame) + 10px);
  }

  footer p:last-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }

  #signal-field {
    display: none;
  }

  .js .reveal,
  .js .word i {
    opacity: 1;
    transform: none;
  }
}
