@import url('https://fonts.googleapis.com/css2?family=Michroma&display=swap');

:root {
  --astrix-future: "Sratome", "Michroma", "Eurostile Extended", "Bank Gothic", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2147483645;
  background: #010510;
  pointer-events: none;
  animation: astrix-boot-cover 1.35s .15s forwards;
}

@keyframes astrix-boot-cover {
  0%, 82% { opacity: 1; visibility: visible; }
  100% { opacity: 0; visibility: hidden; }
}

.v3,
.v3 button,
.v3 input,
.v3 select,
.v3 textarea {
  --font-body: var(--astrix-future);
  --font-display: var(--astrix-future);
  font-family: var(--astrix-future) !important;
}

.v3 h1,
.v3 h2,
.v3 h3,
.v3 h4,
.v3 h5,
.v3 h6,
.v3 strong,
.v3 b,
.v3 em,
.v3 i,
.v3 span,
.v3 a,
.v3 p,
.v3 small,
.v3 label {
  font-family: inherit;
}

.cosmic-planets .planet-number,
.cosmic-planets > b,
.cosmic-universe .universe-one,
.universe-o > span,
.cosmic-stars > b,
.hero3 h1.cosmic-lockup .cosmic-stars > em {
  font-family: var(--astrix-future) !important;
  font-style: normal !important;
}

.hero3 h1.cosmic-lockup .cosmic-stars > em {
  font-size: clamp(2.4rem, 3.75vw, 4.35rem);
  letter-spacing: -.045em;
}

.staff-constellation {
  display: none !important;
}

.brand3::before {
  background: rgba(2, 7, 20, .72) url('/astrix-a-mark-transparent-v17.png?v=17') center / 72% auto no-repeat !important;
}

/* The upper injected duplicate is never shown; the original hero image remains. */
.hero3 > .astrix-static-logo {
  display: none !important;
}

/* Never allow a legacy hero artwork to sit behind or below the transparent A. */
.hero3 > img:not(.astrix-hero-logo) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

.hero3 > picture:not(.astrix-hero-logo-wrap) {
  display: none !important;
}

.hero3 {
  isolation: isolate;
  background: #010510;
}

.hero3::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: #010510 url('/astrix-hero-background-v17.jpeg?v=17') center bottom / cover no-repeat;
  opacity: 1;
  filter: none;
  transform: none;
}

.hero3::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(1, 5, 14, .50) 0%, rgba(2, 8, 20, .18) 48%, transparent 78%);
}

.hero3-shade {
  z-index: 0;
  background: transparent !important;
}

.hero3-copy,
.hero3-dock {
  z-index: 2;
}

/* The supplied transparent Astrix A is the hero logo on every screen size. */
.astrix-hero-logo {
  position: absolute !important;
  left: 90% !important;
  right: auto !important;
  top: 40% !important;
  z-index: 2;
  display: block;
  width: 280px !important;
  height: auto !important;
  background: transparent !important;
  background-color: transparent !important;
  transform: translate(-50%, -50%) !important;
  object-fit: contain;
  filter:
    drop-shadow(0 24px 34px rgba(0, 0, 0, .48))
    drop-shadow(0 0 24px rgba(226, 189, 115, .22));
}

/* The supplied formation video is a temporary opening layer only. */
html.astrix-intro-active,
html.astrix-intro-active body {
  overflow: hidden !important;
}

.astrix-intro {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: grid;
  place-items: center;
  background: #010510;
  opacity: 1;
  visibility: visible;
  transition: opacity .42s ease, visibility .42s step-end;
}

.astrix-intro.is-finished {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.astrix-intro video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #010510;
}

/* Phone intro: the clean master is screened over the already-rendered hero,
   making its near-black field behave like transparency without a black box. */
@media (max-width: 800px) {
  .astrix-intro.is-mobile {
    background: #020819 url('/astrix-hero-portrait-v1.png?v=1') center / cover no-repeat;
    isolation: auto;
  }

  .astrix-intro.is-mobile video {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: transparent;
    mix-blend-mode: screen;
    filter: saturate(1.04) contrast(1.04);
  }
}

.astrix-intro-skip {
  position: absolute;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid rgba(240, 202, 125, .52);
  border-radius: 999px;
  background: rgba(4, 12, 30, .72);
  color: #f0ca7d;
  font: 600 11px/1 var(--astrix-future);
  letter-spacing: .06em;
  cursor: pointer;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.astrix-intro-skip:focus-visible {
  outline: 2px solid #f0ca7d;
  outline-offset: 3px;
}

/* Preserve the original v9 world-section layout and artwork. */
.world-intro {
  position: relative;
  isolation: isolate;
  min-height: 58vh;
  overflow: hidden;
}

.world-intro::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url('/astrix-worlds-overview.webp') center / cover no-repeat;
  opacity: .24;
  filter: saturate(.8);
}

.world-intro::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, #07090cf2, #07090cb8 48%, #07090c70), linear-gradient(0deg, #07090c, transparent 48%);
}

.world-coming-soon .world-sticky {
  background-image: linear-gradient(90deg, rgba(7, 9, 12, .92), rgba(7, 9, 12, .34)), url('/astrix-future-orbit.webp');
  background-position: center;
  background-size: cover;
}

.world-coming-soon .world-sticky > picture {
  opacity: 0 !important;
}

#coming-soon .mystery-reveal {
  display: none !important;
}

/* Garage film: full-bleed on desktop, complete portrait composition on phones. */
.world-garage .garage-world-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  background: #020611;
  pointer-events: none;
}

@media (max-width: 800px) {
  .hero3,
  .hero3:not(.previewing) {
    display: flex;
    flex-direction: column;
    height: auto !important;
    min-height: max(900px, 100svh);
    max-height: none;
    padding: 92px 18px 48px;
  }

  .hero3::before {
    background-position: center center;
    background-size: 100% 100%;
    opacity: 1;
  }

  .hero3::after {
    background: transparent !important;
  }

  .hero3-shade {
    background: transparent !important;
  }

  .hero3:not(.previewing) .hero3-copy {
    position: relative !important;
    inset: auto !important;
    order: 1;
    width: 100% !important;
    margin: 0 !important;
  }

  .astrix-hero-logo {
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    order: 0;
    width: 170px !important;
    max-width: 42vw !important;
    height: auto !important;
    margin: 0 auto 18px !important;
    transform: none !important;
  }

  /* Images remain complete and appear before their related text on phones. */
  .layout-3 .world-sticky > picture,
  .world-sticky > picture {
    order: 0;
    overflow: hidden;
  }

  .layout-1 .world-copy,
  .layout-2 .world-copy,
  .layout-3 .world-copy,
  .world-copy {
    order: 1;
  }

  .layout-1 .world-metric,
  .layout-2 .world-metric,
  .layout-3 .world-metric,
  .world-metric {
    order: 2;
  }

  .world-sticky > picture > img {
    max-width: 100%;
  }

  #corporate .world-count,
  #digital .world-count {
    left: auto !important;
    right: 14px !important;
  }

  .world-garage .garage-world-video {
    position: relative;
    inset: auto;
    order: 0;
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    aspect-ratio: 610 / 968;
    object-fit: cover;
    object-position: center;
  }

  .system-numbers {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .system-numbers > div {
    min-width: 0;
    padding-inline: 0 !important;
  }

  .world-intro::before {
    background-position: center;
    opacity: .18;
  }

  .astrix-intro-skip {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
  }
}

/* Final layout anchor for the animated division planets. */
.world:not(.coming-soon) .world-count {
  overflow: visible;
  isolation: isolate;
}

.world:not(.coming-soon) .world-count::after {
  content: "";
  position: absolute;
  left: calc(100% + clamp(14px, 1.4vw, 26px));
  top: 50%;
  width: clamp(92px, 8.6vw, 150px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .38)) drop-shadow(0 0 15px rgba(226, 189, 115, .18));
  pointer-events: none;
}

@media (min-width: 801px) {
  .world:not(.coming-soon) .world-count {
    left: 4vw !important;
    right: auto !important;
  }
}

@media (min-width: 801px) and (max-height: 760px) {
  .world:not(.coming-soon) .world-count::after {
    width: clamp(82px, 7.2vw, 108px);
  }
}

@media (max-width: 800px) {
  .world:not(.coming-soon) .world-count,
  #corporate .world-count,
  #digital .world-count,
  #travel .world-count,
  #rave .world-count {
    left: 14px !important;
    right: auto !important;
  }

  .world:not(.coming-soon) .world-count::after {
    left: calc(100% + 10px);
    top: 0;
    width: clamp(66px, 20vw, 86px);
    transform: none;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .40)) drop-shadow(0 0 10px rgba(226, 189, 115, .16));
  }
}

@media (prefers-reduced-motion: reduce) {
  .astrix-intro {
    transition-duration: .18s;
  }
}

/* v19 annotated content and presentation updates. */
.world-copy > .overline {
  display: none !important;
}

.world-copy h2 {
  margin-top: 0 !important;
}

/* Let UNIVERSE visibly project beyond the orbit instead of sitting flat inside it. */
.universe-o {
  overflow: visible !important;
  perspective: 180px;
}

.universe-o > span {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: calc(100% + clamp(18px, 1.8vw, 30px));
  padding: 6px 11px 5px 13px !important;
  border: 1px solid rgba(255, 231, 169, .92);
  border-radius: 999px;
  background: linear-gradient(180deg, #f8e2aa 0%, #d5aa5c 100%) !important;
  color: #061127 !important;
  font-size: clamp(8px, .72vw, 11px) !important;
  line-height: 1 !important;
  letter-spacing: .18em !important;
  white-space: nowrap;
  transform: translateZ(10px) scale(1.04);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, .42),
    0 0 20px rgba(226, 189, 115, .30),
    inset 0 1px 0 rgba(255, 255, 255, .70);
}

.cosmic-universe {
  margin-right: clamp(10px, 1.35vw, 22px);
}

@media (min-width: 801px) {
  /* Legal artwork is intentionally full-bleed; shade only its text side on desktop. */
  #legal .world-shade {
    background:
      linear-gradient(90deg,
        rgba(3, 10, 27, .99) 0%,
        rgba(4, 13, 32, .97) 38%,
        rgba(5, 15, 36, .82) 55%,
        rgba(5, 15, 36, .28) 76%,
        transparent 100%),
      linear-gradient(0deg, rgba(3, 9, 23, .78), transparent 40%) !important;
  }
}

@media (max-width: 800px) {
  .universe-o > span {
    min-width: calc(100% + 16px);
    padding: 5px 8px 4px 10px !important;
    font-size: 6px !important;
    letter-spacing: .14em !important;
    transform: translateZ(8px) scale(1.03);
  }

  .cosmic-universe {
    margin-right: 9px;
  }
}
