body { background: var(--theme-bg); }

.grain {
  opacity: .115;
  background-size: 150px 150px;
  animation: film-grain-shift .8s steps(8, end) infinite;
  will-change: background-position;
}

@keyframes film-grain-shift {
  0% { background-position: 0 0; }
  20% { background-position: -37px 21px; }
  40% { background-position: 18px -31px; }
  60% { background-position: 42px 13px; }
  80% { background-position: -16px -26px; }
  100% { background-position: 29px 38px; }
}

.hero {
  position: relative;
  isolation: isolate;
  height: 100vh;
  height: 100dvh;
  min-height: 620px;
  overflow: hidden;
  padding: 26px 34px 28px;
  background: #050506;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, transparent 0 49.9%, rgba(255,255,255,.055) 50%, transparent 50.1%), linear-gradient(transparent 0 49.9%, rgba(255,255,255,.04) 50%, transparent 50.1%);
  background-size: 25vw 25vh;
  pointer-events: none;
}

.micro-nav { position: relative; z-index: 6; }
.mark { display: flex; align-items: center; gap: 13px; color: var(--paper); white-space: nowrap; }
.mark__orb { position: relative; width: 29px; aspect-ratio: 1; border: 1px solid; border-radius: 50%; }
.mark__orb::before { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(238,238,233,.24); border-radius: 50%; }
.mark__orb::after { content: ""; position: absolute; left: -5px; right: -5px; top: 50%; height: 1px; background: currentColor; transform: rotate(-18deg); }
.mark__orb i { position: absolute; z-index: 1; right: 2px; top: 8px; width: 3px; aspect-ratio: 1; border-radius: 50%; background: currentColor; box-shadow: 0 0 7px rgba(238,238,233,.65); }
.header-status { display: grid; justify-items: end; gap: 5px; }
.signal-control { padding: 0; border: 0; background: none; color: var(--silver); cursor: pointer; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.signal-control:hover, .signal-control:focus-visible { color: var(--paper); outline: none; }

.backdrop {
  --video-stage-width: 60vw;
  --video-stage-height: 100vh;
  --video-stage-offset: 74.4375px;
  --right-mask-progress: 0;
  --right-mask-clear: 72%;
  --right-mask-faint: 78%;
  --right-mask-mid: 86%;
  --right-mask-high: 93%;
  --right-mask-solid: 98%;
  position: absolute;
  inset: 0;
  z-index: -3;
  display: flex;
  justify-content: flex-start;
  overflow: hidden;
  background: #000;
}

.video-stage { position: relative; top: var(--video-stage-offset); flex: 0 0 auto; width: var(--video-stage-width); height: var(--video-stage-height); }
.backdrop video { position: relative; z-index: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; filter: grayscale(1) contrast(1.13); -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%, black 100%); mask-image: linear-gradient(to right, transparent 0%, black 15%, black 100%); }
.dog-vignette { position: absolute; z-index: 2; inset: 0; background: radial-gradient(ellipse 56% 58% at var(--dog-focus-x, 62%) var(--dog-focus-y, 46%), transparent 0%, transparent 44%, rgba(0,0,0,.045) 68%, rgba(0,0,0,.15) 100%); pointer-events: none; will-change: background; }
.right-mask { position: absolute; z-index: 3; inset-block: 0; right: -2px; width: calc(40% + 2px); background: linear-gradient(90deg, transparent 0%, transparent var(--right-mask-clear), rgba(0,0,0,.18) var(--right-mask-faint), rgba(0,0,0,.62) var(--right-mask-mid), rgba(0,0,0,.92) var(--right-mask-high), #000 var(--right-mask-solid), #000 100%); transform: scaleX(var(--right-mask-progress)); transform-origin: right center; pointer-events: none; will-change: transform; }
.backdrop::after { content: ""; position: absolute; z-index: 1; inset: 0; background: radial-gradient(circle at 30% 46%, transparent 0 34%, rgba(0,0,0,.4) 68%, #000 100%), linear-gradient(0deg, #000 0%, transparent 25%); pointer-events: none; }

.hero-stage { position: relative; min-height: calc(100vh - 96px); min-height: calc(100dvh - 96px); display: grid; grid-template-columns: minmax(390px, .8fr) minmax(350px, 1fr); align-items: center; }
.hero-copy { position: relative; z-index: 4; grid-column: 2; display: flex; flex-direction: column; align-items: flex-end; padding: 7vh 5vw 4vh 2vw; text-align: right; }
.hero h1 { margin: 0; font-size: clamp(72px, 11vw, 178px); line-height: .75; text-transform: uppercase; }
.hero h1 span { display: block; }
.hero h1 span:last-child { color: transparent; -webkit-text-stroke: 2px var(--paper); }
.lede { width: min(400px, 72%); margin: 50px 0 34px; color: var(--silver); text-align: left; }
.hero-actions { display: flex; align-items: center; justify-content: flex-end; gap: 24px; }
.text-link { padding-block: 12px; color: var(--silver); letter-spacing: .1em; text-transform: uppercase; }
.text-link:hover, .text-link:focus-visible { color: var(--paper); outline: none; }
.has-js .hero-copy[data-reveal-on-video] { visibility: hidden; opacity: 0; transition: opacity 800ms ease, visibility 0s linear 800ms; }
.has-js .hero-copy[data-reveal-on-video].is-revealed { visibility: visible; opacity: 1; transition-delay: 0s; }

.reticle { position: absolute; z-index: 3; left: 10%; top: 78%; width: clamp(240px, 32vw, 520px); aspect-ratio: 1; transform: translate(-50%, -50%); border: 1px solid rgba(255,255,255,.32); border-radius: 50%; }
.reticle::before, .reticle::after { content: ""; position: absolute; background: rgba(255,255,255,.5); }
.reticle::before { width: calc(100% + 80px); height: 1px; left: -40px; top: 50%; }
.reticle::after { width: 1px; height: calc(100% + 80px); top: -40px; left: 50%; }
.coordinates { position: absolute; z-index: 5; left: 1vw; bottom: 2vh; width: 190px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--silver); }
.coordinates b { color: var(--paper); font-weight: 400; }
.side-code { position: absolute; z-index: 5; right: 0; top: 50%; transform: translate(42%, -50%) rotate(90deg); color: var(--silver); letter-spacing: .24em; }
.scroll-cue { position: absolute; z-index: 6; right: 34px; bottom: 20px; display: flex; align-items: center; gap: 16px; color: var(--silver); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }
.scroll-cue:hover, .scroll-cue:focus-visible { color: var(--paper); }

.micrographic { position: absolute; z-index: 5; color: var(--silver); opacity: .58; pointer-events: none; }
.micrographic__label { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 6px; font-size: 8px; line-height: 1; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }
.micrographic svg { display: block; width: 100%; height: auto; overflow: visible; }
.micrographic svg * { vector-effect: non-scaling-stroke; }
.phase-strip { top: 17vh; right: 6vw; width: clamp(180px, 15vw, 238px); }
.relay-map { left: 63vw; bottom: 5vh; width: clamp(132px, 11vw, 176px); }

.content-section { position: relative; display: grid; grid-template-columns: minmax(150px, .28fr) minmax(0, 1fr); gap: clamp(40px, 8vw, 140px); padding: clamp(86px, 12vw, 180px) clamp(24px, 6vw, 110px); border-top: 1px solid var(--line); background: var(--theme-bg); }
.content-section::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 0 49.95%, rgba(var(--theme-fg-rgb),.055) 50%, transparent 50.05%); background-size: 25vw 100%; pointer-events: none; }
.section-marker { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 8px; color: var(--silver); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; }
.section-marker span:first-child { color: var(--paper); font-family: var(--display); font-size: 42px; font-weight: 300; }
.systems-heading, .system-grid { position: relative; z-index: 1; }
.system-card__index { color: var(--silver); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; }
.systems-heading > p:last-child, .system-card p { color: var(--silver); }

.systems { background: var(--space); background: color-mix(in srgb, var(--theme-bg) 94%, var(--theme-fg) 6%); }
.systems-heading h2 { margin: 14px 0 30px; font-size: clamp(58px, 7vw, 116px); font-weight: 300; letter-spacing: .025em; line-height: .83; text-transform: uppercase; }
.systems-heading > p:last-child { max-width: 520px; }
.system-grid { grid-column: 2; display: grid; grid-template-columns: 1.25fr .75fr; gap: 1px; margin-top: clamp(60px, 8vw, 110px); background: var(--line); border: 1px solid var(--line); }
.system-card { min-width: 0; min-height: 430px; container-type: inline-size; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(26px, 3vw, 48px); overflow: hidden; background: var(--theme-bg); transition: background 180ms ease, color 180ms ease; }
.system-card > div { min-width: 0; }
.system-card:hover, .system-card:focus-visible { background: var(--theme-fg); color: var(--theme-bg); outline: none; }
.system-card:hover p, .system-card:hover .system-card__status, .system-card:hover .system-card__index, .system-card:focus-visible p, .system-card:focus-visible .system-card__status, .system-card:focus-visible .system-card__index { color: currentColor; }
.system-card__status { display: flex; align-items: center; gap: 10px; color: var(--silver); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; }
.status-dot { width: 5px; aspect-ratio: 1; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.system-card h3 { max-width: 100%; margin: 14px 0 22px; font-size: clamp(44px, 12cqw, 86px); font-weight: 300; line-height: .9; white-space: nowrap; text-transform: uppercase; }
.system-card:not(.system-card--primary) .system-card__index { position: relative; top: -3px; }
.system-card:not(.system-card--primary) h3 { font-size: clamp(34px, 10cqw, 64px); }
.system-card p { max-width: 540px; margin: 0; overflow-wrap: break-word; }
.system-card__action { align-self: flex-end; font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }

.site-footer { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 36px; padding: clamp(48px, 6vw, 96px) clamp(24px, 6vw, 110px) 32px; border-top: 1px solid var(--line); background: var(--theme-bg); }
.site-footer > p { justify-self: end; margin: 4px 0 0; color: var(--silver); }
.site-footer nav { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 14px clamp(24px, 4vw, 64px); margin-top: clamp(36px, 5vw, 70px); padding-block: 22px; border-block: 1px solid var(--line); color: var(--silver); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--paper); outline: none; }
.footer-code { grid-column: 1 / -1; justify-self: end; color: var(--silver); font-size: 8px; letter-spacing: .18em; }

@media (min-width: 881px) and (max-width: 1280px), (min-width: 881px) and (max-aspect-ratio: 7 / 5) {
  .hero-stage { grid-template-columns: 1fr 1fr; }
  .hero-copy { padding: 7vh 4vw 4vh 0; }
  .hero h1 { font-size: clamp(72px, 8vw, 112px); }
  .lede { width: min(400px, 88%); }
  .phase-strip { top: 15vh; right: 4vw; width: 176px; }
  .relay-map { display: none; }
  .hero-actions { align-items: flex-end; flex-direction: column; gap: 8px; }
}

@media (max-width: 1400px) and (min-width: 881px) {
  .system-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1100px) and (min-width: 881px) {
  .content-section { grid-template-columns: 110px minmax(0, 1fr); gap: 32px; }
  .system-grid { grid-column: 1 / -1; }
}

@media (min-width: 881px) and (max-aspect-ratio: 7 / 5) {
  .backdrop { --video-stage-width: min(58vw, calc(70.423dvh - 52.42px)); --video-stage-height: calc(100dvh - 74.4375px); }
  .backdrop video { object-fit: contain; object-position: left center; }
}

@media (max-width: 880px) {
  .hero { min-height: 560px; padding: 20px; }
  .micro-nav__links { display: none; }
  .backdrop { --video-stage-width: min(92vw, calc(70.423dvh - 46.48px)); --video-stage-height: calc(100dvh - 66px); --video-stage-offset: 66px; }
  .backdrop video { object-fit: contain; object-position: left center; }
  .hero-stage { display: block; padding-top: 100px; }
  .hero-copy { align-items: flex-end; padding: 0; text-align: right; }
  .hero h1 { font-size: clamp(66px, 19vw, 120px); }
  .lede { width: min(62vw, 360px); margin: 40px 0 32px auto; color: var(--paper); text-shadow: 0 1px 12px #000; }
  .hero-actions { align-items: flex-end; flex-direction: column; gap: 7px; }
  .reticle { left: 12%; top: 74%; width: 68vw; opacity: .7; }
  .coordinates { left: 0; bottom: 3vh; }
  .side-code, .micrographic, .scroll-cue span:first-child { display: none; }
  .content-section { grid-template-columns: 90px minmax(0, 1fr); gap: 24px; }
  .system-grid { grid-column: 1 / -1; }
  .system-grid { grid-template-columns: 1fr; }
  .system-card { min-height: 370px; }
}

@media (max-width: 600px) {
  .hero { padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  .mark { gap: 9px; font-size: 10px; }
  .mark__orb { width: 25px; }
  .header-status .eyebrow { display: none; }
  .hero-stage { min-height: calc(100dvh - 58px); padding-top: clamp(64px, 10vh, 90px); }
  .hero h1 { font-size: clamp(58px, 18vw, 76px); }
  .lede { width: min(76vw, 330px); margin: 30px 0 24px auto; }
  .backdrop { --video-stage-width: min(92vw, calc(70.423dvh - 40.85px)); --video-stage-height: calc(100dvh - 58px); --video-stage-offset: calc(58px + clamp(28px, 4dvh, 38px)); }
  .reticle { left: 9%; top: 73%; width: 76vw; }
  .coordinates { left: 0; bottom: 2.5vh; width: 176px; font-size: 10px; }
  .scroll-cue { right: 18px; bottom: 18px; }
  .content-section { display: block; padding: 72px 20px; }
  .section-marker { margin-bottom: 60px; }
  .section-marker span:first-child { font-size: 34px; }
  .systems-heading h2 { font-size: clamp(52px, 16vw, 76px); }
  .system-grid { margin-top: 64px; }
  .system-card { min-height: 340px; padding: 24px; }
  .system-card h3 { font-size: clamp(40px, 12vw, 54px); }
  .system-card:not(.system-card--primary) h3 { font-size: clamp(36px, 10.5vw, 46px); }
  .site-footer { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 54px 20px 28px; }
  .site-footer > .mark { align-self: flex-start; width: fit-content; }
  .site-footer > p { align-self: flex-start; margin: 28px 0 0; text-align: left; }
  .site-footer nav { display: grid; gap: 18px; }
  .footer-code { align-self: flex-end; margin-top: 26px; text-align: right; }
}

@media (max-width: 360px) {
  .system-card:not(.system-card--primary) h3 { font-size: clamp(31px, 10vw, 36px); }
}

@media (orientation: landscape) and (max-height: 600px) and (min-width: 600px) {
  .hero { min-height: 0; padding: max(14px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); }
  .micro-nav__links { display: none; }
  .backdrop { --video-stage-width: min(58vw, calc(70.423dvh - 39.44px)); --video-stage-height: calc(100dvh - 56px); --video-stage-offset: 56px; }
  .hero-stage { min-height: calc(100dvh - 46px); display: block; padding-top: 6vh; }
  .hero-copy { width: 48vw; margin-left: auto; padding: 0 3vw 0 0; text-align: right; }
  .hero h1 { font-size: clamp(52px, 8vw, 74px); }
  .lede { width: min(43vw, 340px); margin: 18px 0 14px; font-size: 10px; text-align: left; }
  .hero-actions { display: block; }
  .hero-actions .text-link { display: none; }
  .hairline-button { min-height: 38px; padding-block: 8px; }
  .reticle { left: 16%; top: 72%; width: 34vw; }
  .coordinates { left: 0; bottom: 1vh; width: 170px; font-size: 9px; }
  .scroll-cue { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .scroll-cue { display: none; }
}
