.space-welcome {
  position: relative;
  isolation: isolate;
  min-height: 620px;
  height: 100svh;
  overflow: hidden;
  background: #020308;
  background-image: url("assets/automintly-orbital-poster.jpg?v=8");
  background-position: center;
  background-size: cover;
  color: #fff;
}
.space-welcome::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(1,3,8,.66), rgba(1,3,8,.12) 34%, rgba(1,3,8,.12) 66%, rgba(1,3,8,.66));
  pointer-events: none;
}
.space-welcome[hidden] { display: none; }
.space-shooting-star {
  position: absolute;
  z-index: 4;
  top: 16%;
  left: -18%;
  width: clamp(100px, 13vw, 190px);
  height: 2px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(190,226,255,.42) 38%, #fff);
  filter: drop-shadow(0 0 6px rgba(177,224,255,.9));
  transform: rotate(13deg) translate3d(0,0,0);
  transform-origin: right center;
  animation: space-shooting-star 18s linear 3s infinite;
}
.space-shooting-star::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px 2px rgba(190,229,255,.95);
}
.space-welcome-backdrop {
  display: none;
  position: absolute;
  z-index: 0;
  inset: -28px;
  width: calc(100% + 56px);
  height: calc(100% + 56px);
  object-fit: cover;
  filter: blur(22px) brightness(.52) saturate(.82);
  transform: scale(1.035);
}
.space-video-frame {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  overflow: hidden;
  background: #020308;
}
.space-welcome-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.space-desktop-content {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(26px, 4vw, 68px) clamp(26px, 6vw, 112px) clamp(42px, 7vh, 82px);
  background: linear-gradient(180deg, rgba(1,3,8,.3), transparent 32%, rgba(1,3,8,.72));
  pointer-events: none;
}
.space-brand {
  width: fit-content;
  color: #fff;
  font-size: clamp(30px, 2.5vw, 52px);
  font-weight: 850;
  letter-spacing: -.06em;
  line-height: 1;
  text-decoration: none;
  text-shadow: 0 3px 18px rgba(0,0,0,.72);
  pointer-events: auto;
}
.space-brand span { color: #8fefcf; }
.space-desktop-copy {
  width: min(900px, 78vw);
  margin-inline: auto;
  text-align: center;
  text-shadow: 0 3px 22px rgba(0,0,0,.78);
}
.space-eyebrow {
  margin: 0 0 clamp(10px, 1.5vh, 18px);
  color: #fff;
  font-size: clamp(12px, .82vw, 16px);
  font-weight: 800;
  letter-spacing: .32em;
  text-transform: uppercase;
}
.space-headline {
  margin: 0;
  color: #fff;
  font-size: clamp(48px, 5.4vw, 102px);
  font-weight: 520;
  letter-spacing: -.055em;
  line-height: .94;
}
.space-subhead {
  margin: clamp(14px, 2vh, 24px) 0 0;
  color: rgba(255,255,255,.92);
  font-size: clamp(16px, 1.25vw, 24px);
  font-weight: 500;
}
.space-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: clamp(22px, 3vh, 34px);
}
.space-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 0 30px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 999px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 10px 34px rgba(0,0,0,.4);
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
  pointer-events: auto;
}
.space-action span { margin-left: 18px; font-size: 20px; }
.space-action:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(0,0,0,.48); }
.space-action-primary { border-color: #8fefcf; background: #8fefcf; color: #06221a; }
.space-action-primary:hover { background: #b2f8e0; }
.space-action-secondary { background: rgba(3,7,13,.78); backdrop-filter: blur(10px); }
.space-action-secondary:hover { background: rgba(15,22,29,.95); color: #fff; }
.space-video-hotspot {
  position: absolute;
  z-index: 2;
  display: none;
  border-radius: 999px;
  cursor: pointer;
  transition: box-shadow .18s ease, background-color .18s ease;
}
.space-video-hotspot:hover {
  box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 0 26px rgba(143,239,207,.72);
  background: rgba(255,255,255,.08);
}
.space-video-hotspot:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}
.space-video-build { left: 25.25%; top: 61.25%; width: 26.8%; height: 3.7%; }
.space-video-explore {
  left: 53.45%;
  top: 61.25%;
  width: 20.8%;
  height: 3.7%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.78);
  background: rgba(3,7,13,.78);
  color: #fff;
  box-shadow: 0 5px 18px rgba(0,0,0,.35);
  text-decoration: none;
}
.space-video-explore:hover {
  background: rgba(12,22,30,.92);
  color: #fff;
}
.space-video-label {
  font-size: 1.45cqw;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
  text-shadow: 0 1px 3px #000;
}
.space-video-frame > .space-video-hotspot { display: none; }
.space-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
#site:focus { outline: none; }
@keyframes space-shooting-star {
  0%, 64% { opacity: 0; transform: rotate(13deg) translate3d(0,0,0); }
  65% { opacity: 1; }
  69% { opacity: .9; }
  72%, 100% { opacity: 0; transform: rotate(13deg) translate3d(145vw,0,0); }
}
@keyframes space-shooting-star-desktop {
  /* A fixed-size object advances at constant speed through depth z=24-23*t.
     Position uses p=t/z; scale=.3*24/z. Dense near-camera samples preserve
     the straight projected path as its apparent speed and size rise sharply.
     The head stays fully lit until it has passed beyond the top-left edge. */
  0% { opacity: 0; transform: translate3d(84cqw,66cqh,0) rotate(var(--meteor-angle, -158.32deg)) scale(.3); }
  2.25% { opacity: 1; transform: translate3d(83.15328cqw,65.40146cqh,0) rotate(var(--meteor-angle, -158.32deg)) scale(.350365); }
  4.5% { opacity: 1; transform: translate3d(81.96491cqw,64.5614cqh,0) rotate(var(--meteor-angle, -158.32deg)) scale(.421053); }
  6.75% { opacity: 1; transform: translate3d(80.17582cqw,63.2967cqh,0) rotate(var(--meteor-angle, -158.32deg)) scale(.527473); }
  9% { opacity: 1; transform: translate3d(77.17647cqw,61.17647cqh,0) rotate(var(--meteor-angle, -158.32deg)) scale(.705882); }
  10.5% { opacity: 1; transform: translate3d(73.72152cqw,58.73418cqh,0) rotate(var(--meteor-angle, -158.32deg)) scale(.911392); }
  12% { opacity: 1; transform: translate3d(67.42857cqw,54.28571cqh,0) rotate(var(--meteor-angle, -158.32deg)) scale(1.285714); }
  12.75% { opacity: 1; transform: translate3d(61.8427cqw,50.33708cqh,0) rotate(var(--meteor-angle, -158.32deg)) scale(1.617978); }
  13.5% { opacity: 1; transform: translate3d(52.36364cqw,43.63636cqh,0) rotate(var(--meteor-angle, -158.32deg)) scale(2.181818); }
  13.875% { opacity: 1; transform: translate3d(44.62385cqw,38.16514cqh,0) rotate(var(--meteor-angle, -158.32deg)) scale(2.642202); }
  14.25% { opacity: 1; transform: translate3d(32.74419cqw,29.76744cqh,0) rotate(var(--meteor-angle, -158.32deg)) scale(3.348837); }
  14.475% { opacity: 1; transform: translate3d(21.98338cqw,22.16066cqh,0) rotate(var(--meteor-angle, -158.32deg)) scale(3.988920); }
  14.625% { opacity: 1; transform: translate3d(12.19048cqw,15.23810cqh,0) rotate(var(--meteor-angle, -158.32deg)) scale(4.571429); }
  14.7% { opacity: 1; transform: translate3d(6.13699cqw,10.95890cqh,0) rotate(var(--meteor-angle, -158.32deg)) scale(4.931507); }
  14.775% { opacity: 1; transform: translate3d(-.95167cqw,5.94796cqh,0) rotate(var(--meteor-angle, -158.32deg)) scale(5.353160); }
  14.85% { opacity: 1; transform: translate3d(-9.36585cqw,0cqh,0) rotate(var(--meteor-angle, -158.32deg)) scale(5.853659); }
  14.925% { opacity: .6; transform: translate3d(-19.51570cqw,-7.17489cqh,0) rotate(var(--meteor-angle, -158.32deg)) scale(6.457399); }
  15%, 100% { opacity: 0; transform: translate3d(-32cqw,-16cqh,0) rotate(var(--meteor-angle, -158.32deg)) scale(7.2); }
}
@media (min-width: 769px) {
  .space-welcome { container-type: size; }
  .space-desktop-content {
    --scene-width: max(100cqw, 177.777778cqh);
    --scene-height: max(100cqh, 56.25cqw);
    display: flex;
    justify-content: flex-start;
    padding: clamp(26px, 2.1vw, 42px);
    background: none;
  }
  .space-brand {
    font-size: clamp(34px, 2.1vw, 44px);
    text-shadow: none;
  }
  .space-desktop-copy {
    position: absolute;
    top: calc(50% - var(--scene-height) * .0278);
    left: 50%;
    width: min(calc(var(--scene-width) * .6), 90vw);
    margin: 0;
    transform: translateX(-50%);
    text-align: center;
    text-shadow: none;
  }
  .space-eyebrow {
    margin: 0 0 calc(var(--scene-height) * .015);
    font-size: clamp(11px, calc(var(--scene-width) * .0068), 22px);
    letter-spacing: .2em;
    line-height: 1.3;
    text-shadow: none;
  }
  .space-headline {
    margin: 0;
    font-size: clamp(36px, calc(var(--scene-width) * .032), 130px);
    font-weight: 500;
    line-height: 1.06;
    text-shadow: none;
  }
  .space-shooting-star {
    z-index: 2;
    top: -.3px;
    left: auto;
    right: 100%;
    filter: none;
    width: clamp(50px, 6vw, 100px);
    height: .6px;
    background: linear-gradient(90deg, transparent, rgba(169,216,255,.24) 35%, rgba(219,242,255,.85) 88%, #fff);
    will-change: transform, opacity;
    animation-name: space-shooting-star-desktop;
    animation-delay: 4s;
  }
  .space-shooting-star::before {
    content: "";
    position: absolute;
    right: -14px;
    top: 50%;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(236,248,255,.8), rgba(157,210,255,.28) 28%, rgba(127,194,255,.08) 48%, transparent 70%);
    transform: translateY(-50%);
    pointer-events: none;
  }
  .space-shooting-star::after {
    right: -5px;
    top: 50%;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, #fff 16%, #eaf7ff 34%, rgba(172,224,255,.8) 57%, transparent 74%);
    box-shadow: none;
    transform: translateY(-50%);
  }
  /* Disable only the desktop CSS fallback while its WAAPI track owns motion. */
  .space-welcome[data-meteor-renderer="compositor"] .space-shooting-star { animation: none; }
  .space-desktop-actions {
    position: absolute;
    top: calc(50% + var(--scene-height) * .174);
    left: 50%;
    z-index: 4;
    gap: 10px;
    margin: 0;
    transform: translate(-50%, -50%);
    pointer-events: auto;
  }
  .space-desktop-actions .space-action,
  .space-desktop-actions .space-action:hover {
    min-height: 46px;
    padding: 0 18px;
    font-size: 13px;
    text-shadow: none;
    box-shadow: none;
    backdrop-filter: none;
    white-space: nowrap;
  }
  .space-desktop-actions .space-action-primary {
    min-width: clamp(150px, 10.5vw, 190px);
  }
  .space-desktop-actions .space-action-secondary {
    min-width: clamp(140px, 9.5vw, 175px);
    background: rgba(3, 7, 13, .96);
  }
  .space-desktop-actions .space-action span {
    margin-left: 12px;
    font-size: 16px;
  }
  .space-welcome-video { object-fit: cover; }
  .space-video-frame > .space-video-hotspot {
    display: none;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
  }
  .space-video-frame > .space-video-hotspot .space-video-label { opacity: 0; }
  .space-video-build {
    left: 41.7%;
    top: 64.2%;
    width: 8.8%;
    height: 4.6%;
  }
  .space-video-explore {
    left: 50.8%;
    top: 64.2%;
    width: 7.2%;
    height: 4.6%;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
  }
  .space-video-frame > .space-video-hotspot:hover,
  .space-video-frame > .space-video-hotspot:focus-visible {
    background: transparent;
    box-shadow: none;
  }
}
@media (min-width: 769px) and (min-aspect-ratio: 21/9) {
  .space-desktop-copy { top: 44%; }
  .space-eyebrow { font-size: clamp(11px, 1.4cqh, 22px); margin-bottom: 1.5cqh; }
  .space-headline { font-size: clamp(36px, 6.4cqh, 100px); }
  .space-desktop-actions { top: auto; bottom: 18%; transform: translateX(-50%); }
}
@media (max-width: 768px) {
  .space-welcome {
    min-height: 560px;
    container-type: size;
    background-image: url("assets/automintly-mobile-type-v17c-poster.jpg");
  }
  .space-welcome-backdrop {
    display: block;
    filter: blur(14px) brightness(.82) saturate(.92);
  }
  .space-video-frame {
    width: 100%;
    height: 100svh;
    max-width: none;
    transform: translate(-50%, -50%);
    box-shadow: none;
  }
  /* The video has no baked logo, headline, eyebrow, subtitle or buttons. One native
     interface owns both the lettering and each button's hit area/border. */
  .space-desktop-content {
    --portrait-width: min(100cqw, 56.25cqh);
    --portrait-height: min(177.777778cqw, 100cqh);
    display: block;
    padding: 0;
    background: none;
  }
  .space-brand {
    position: absolute;
    top: calc(50% - var(--portrait-height) / 2 + var(--portrait-width) * .045);
    left: max(20px, calc(50% - var(--portrait-width) * .432));
    font-size: clamp(14px, 3.7cqw, 20px);
    text-decoration: none;
    text-shadow: none;
  }
  .space-desktop-copy {
    position: absolute;
    top: calc(50% - var(--portrait-height) * .095);
    left: 0;
    width: 100%;
    margin: 0;
    padding: 0 16px;
    text-shadow: none;
  }
  .space-eyebrow {
    margin: 0 0 calc(var(--portrait-height) * .023);
    font-size: clamp(7.5px, 2.45cqw, 14px);
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: .18em;
    text-shadow: none;
  }
  .space-headline {
    display: block;
    margin: 0;
    font-size: clamp(28px, 10.4cqw, 68px);
    font-weight: 500;
    line-height: 1.06;
    letter-spacing: -.055em;
    text-shadow: none;
  }
  .space-desktop-actions {
    position: absolute;
    top: calc(50% + var(--portrait-height) * .114);
    left: 50%;
    width: min(290px, 64%);
    margin: 0;
    display: grid;
    grid-template-columns: 1.08fr 1fr;
    gap: 8px;
    transform: translateX(-50%);
  }
  .space-desktop-actions .space-action,
  .space-desktop-actions .space-action:hover {
    min-width: 0;
    position: relative;
    min-height: 26px;
    padding: 6px 4px;
    border-width: 1px;
    font-size: clamp(7.5px, 2.15cqw, 11px);
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    text-shadow: none;
    box-shadow: none;
    backdrop-filter: none;
    transform: none;
    white-space: nowrap;
  }
  .space-desktop-actions .space-action span {
    display: inline-block;
    margin-left: 5px;
    font-size: 8px;
  }
  .space-desktop-actions .space-action::before {
    content: "";
    position: absolute;
    inset: -10px 0;
    border-radius: inherit;
  }
  .space-desktop-actions .space-action-secondary {
    border-color: #fff;
    background: #080d13;
  }
  .space-desktop-actions .space-action:focus-visible,
  .space-brand:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 4px;
  }
  .space-welcome-video { object-fit: contain; }
}
@media (prefers-reduced-motion: reduce) {
  .space-shooting-star { display: none; }
  .space-video-hotspot { transition: none; }
}
