:root {
  --startup-ink: #030910;
  --startup-teal: #26e6d5;
  --startup-cyan: #3dbef5;
  --startup-violet: #8d5cf6;
  --startup-exit: cubic-bezier(.76, 0, .18, 1);
}

body.startup-locked {
  overflow: hidden;
}

.startup-screen {
  position: fixed;
  z-index: 99999;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 100svh;
  pointer-events: auto;
  isolation: isolate;
  visibility: visible;
  transition: visibility 0s linear 1.05s;
}

.startup-slice {
  position: absolute;
  z-index: 1;
  inset: -2px;
  overflow: hidden;
  will-change: transform;
  background:
    radial-gradient(circle at 50% 44%, rgba(33, 220, 210, .11), transparent 26%),
    linear-gradient(145deg, rgba(2,7,13,.1), rgba(4,5,18,.22)),
    url("startup-paint-jdm.webp"),
    linear-gradient(145deg, #02070d 0%, #06131f 52%, #090719 100%);
  background-size: cover, cover, cover, cover;
  background-position: center, center, center, center;
  background-repeat: no-repeat;
  transition: transform 1s var(--startup-exit);
}

.startup-slice::after {
  content: "";
  position: absolute;
  z-index: 5;
  inset: -20%;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,.11) 49%, transparent 56%);
  transform: translateX(-55%);
  animation: startup-scan 1.45s ease-in-out .08s both;
}

.startup-slice--upper {
  clip-path: polygon(0 0, 100% 0, 100% 42%, 0 63%);
}

.startup-slice--lower {
  clip-path: polygon(0 60%, 100% 39%, 100% 100%, 0 100%);
}

.startup-screen.is-leaving {
  pointer-events: none;
  visibility: hidden;
}

.startup-screen.is-leaving .startup-slice--upper {
  transform: translate3d(-112%, -8%, 0);
}

.startup-screen.is-leaving .startup-slice--lower {
  transform: translate3d(112%, 8%, 0);
}

.startup-type {
  position: absolute;
  inset: -12vh -8vw;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: rotate(-7deg) scale(1.08);
  opacity: .94;
  animation: startup-paint-drift 2.6s cubic-bezier(.2,.7,.2,1) both;
}

.startup-type__line {
  display: block;
  width: max-content;
  margin: -.13em 0;
  font: 950 clamp(9rem, 24vw, 29rem)/.72 Arial Black, Impact, sans-serif;
  letter-spacing: -.095em;
  text-transform: uppercase;
  color: transparent;
  background-image:
    radial-gradient(circle at 25% 35%, rgba(3,9,16,.24) 0 1px, transparent 1.6px),
    radial-gradient(circle at 70% 60%, rgba(3,9,16,.2) 0 1.2px, transparent 1.9px),
    linear-gradient(100deg, var(--startup-teal) 3%, #71dfff 52%, var(--startup-violet) 97%);
  background-size: 13px 17px, 19px 15px, 100% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 30px rgba(38, 230, 213, .12));
  animation: startup-drift-a 2.3s cubic-bezier(.2,.7,.2,1) both;
}

.startup-type__line:nth-child(2) {
  align-self: flex-end;
  animation-name: startup-drift-b;
}

.startup-type__line:nth-child(3) {
  margin-left: -8vw;
  animation-name: startup-drift-c;
}

.startup-logo {
  position: relative;
  z-index: 4;
  display: grid;
  place-items: center;
  width: min(820px, 92vw);
  opacity: 0;
  transform: translateY(18px) scale(.965);
  filter: drop-shadow(0 22px 55px rgba(0,0,0,.5));
  animation: startup-logo-in .58s cubic-bezier(.2,.82,.2,1) .12s forwards;
  will-change: transform, opacity;
}

.startup-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.startup-screen.is-leaving .startup-logo {
  opacity: 0;
  transform: scale(.93);
  transition: opacity .2s ease, transform .28s ease;
}

/* The supplied connected logo has transparent space above and below it.
   These values preserve the current visible header-logo height without
   stretching the artwork. */
.topbar .brand {
  width: 221px;
  flex: 0 0 221px;
}

.topbar .brand img {
  width: auto;
  height: 76px;
  max-width: none;
  filter: none;
}

@keyframes startup-scan {
  0% { transform: translateX(-55%); }
  100% { transform: translateX(58%); }
}

@keyframes startup-logo-in {
  0% { opacity: 0; transform: translateY(18px) scale(.965); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes startup-paint-drift {
  0% { transform: rotate(-7deg) scale(1.05) translate3d(-1.2%, .8%, 0); filter: saturate(.88); }
  100% { transform: rotate(-7deg) scale(1.12) translate3d(1.4%, -1%, 0); filter: saturate(1.18); }
}

@keyframes startup-drift-a {
  0% { transform: translateX(-5vw); }
  100% { transform: translateX(4vw); }
}

@keyframes startup-drift-b {
  0% { transform: translateX(5vw); }
  100% { transform: translateX(-4vw); }
}

@keyframes startup-drift-c {
  0% { transform: translateX(-3vw); }
  100% { transform: translateX(5vw); }
}

@media (max-width: 680px) {
  .startup-type {
    inset: -5vh -48vw;
    transform: rotate(-8deg) scale(1.16);
  }

  .startup-type__line {
    font-size: clamp(10rem, 53vw, 17rem);
  }

  .startup-logo {
    width: min(620px, 96vw);
  }

  .topbar .brand img {
    height: 62px;
  }

  .topbar .brand {
    width: 180px;
    flex-basis: 180px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .startup-slice,
  .startup-slice::after,
  .startup-type,
  .startup-type__line,
  .startup-logo {
    animation: none !important;
  }

  .startup-logo {
    opacity: 1;
    transform: none;
  }

  .startup-screen {
    background: #030910;
    transition: opacity .2s ease, visibility 0s linear .22s;
  }

  .startup-screen.is-leaving {
    opacity: 0;
  }
}

/* 2026-11-06: enlarge the connected artwork by another 20%. */
@media(min-width:681px){.topbar .brand{width:265px;flex:0 0 265px}.topbar .brand img{height:91.2px}}
@media(max-width:680px){.topbar .brand{width:216px;flex:0 0 216px}.topbar .brand img{height:74.4px}}

/* 2026-11-06: size the visible header artwork, not the transparent PNG canvas. */
.topbar .brand{position:relative;width:284px;height:88px;flex:0 0 284px;overflow:hidden}
.topbar .brand img{position:absolute;top:-42px;left:-12px;width:298px;height:auto;max-width:none;filter:none}
@media(max-width:680px){.topbar .brand{width:212px;height:66px;flex:0 0 212px}.topbar .brand img{top:-29px;left:-9px;width:218px;height:auto;max-width:none}}
