/* Boot intro — Preloader Collection inspired (digits + sphere scan) */

.boot-intro {
  --boot-fg: #f2f2f2;
  --boot-muted: rgba(242, 242, 242, 0.55);
  --boot-faint: rgba(242, 242, 242, 0.22);
  --boot-accent: #ff5a1f;
  --boot-bg: #050505;
  --boot-border: rgba(242, 242, 242, 0.12);
  --boot-digit-h: 220px;

  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--boot-bg);
  color: var(--boot-fg);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  -webkit-font-smoothing: antialiased;
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.42s step-end;
}

.boot-intro[hidden] {
  display: none !important;
}

.boot-intro.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.42s;
}

.boot-intro__skip {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 3;
  margin: 0;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--boot-border);
  border-radius: 0;
  background: transparent;
  color: var(--boot-muted);
  font: inherit;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.boot-intro__skip:hover,
.boot-intro__skip:focus-visible {
  color: var(--boot-accent);
  border-color: rgba(255, 90, 31, 0.45);
  outline: none;
}

.boot-intro__timer {
  color: var(--boot-faint);
}

/* Background percent rollers */
.boot-intro__digits {
  position: fixed;
  top: 18%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  opacity: 0.45;
  pointer-events: none;
  user-select: none;
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000 18%,
    #000 82%,
    transparent 100%
  );
}

.boot-intro__digit-col {
  position: relative;
  width: 140px;
  height: var(--boot-digit-h);
  overflow: hidden;
}

.boot-intro__digit-strip {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  will-change: transform;
  transition: transform 0.55s cubic-bezier(0.86, 0, 0.07, 1);
}

.boot-intro__digit {
  width: 100%;
  height: var(--boot-digit-h);
  display: flex;
  align-items: center;
  justify-content: center;
}

.boot-intro__digit span {
  font-size: var(--boot-digit-h);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--boot-fg);
  opacity: 0.12;
}

.boot-intro__stage {
  position: relative;
  z-index: 1;
  width: min(92vw, 420px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem 1rem 2rem;
}

.boot-intro__mark {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 0 1.1rem;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateY(12px) scale(0.92);
}

.boot-intro__mark-ring {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 90, 31, 0.28);
  box-shadow:
    0 0 0 1px rgba(255, 90, 31, 0.08),
    0 0 28px rgba(255, 90, 31, 0.18);
  pointer-events: none;
}

.boot-intro__logo {
  position: relative;
  z-index: 1;
  width: 96px;
  height: 96px;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.55));
}

.boot-intro__eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: var(--boot-muted);
  opacity: 0;
  transform: translateY(8px);
}

.boot-intro__brand {
  margin: 0;
  font-family: "Bricolage Grotesque", "IBM Plex Sans KR", sans-serif;
  font-size: clamp(2.2rem, 7vw, 3.1rem);
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1;
  color: var(--boot-fg);
  opacity: 0;
  transform: translateY(14px) scale(0.97);
}

.boot-intro__brand-ko {
  margin: 0.4rem 0 0;
  font-family: "IBM Plex Sans KR", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: rgba(242, 242, 242, 0.45);
  opacity: 0;
  transform: translateY(8px);
}

.boot-intro__copy {
  margin: 0.7rem 0 0;
  max-width: 18em;
  font-family: "IBM Plex Sans KR", sans-serif;
  font-size: clamp(0.92rem, 2.6vw, 1.05rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-transform: none;
  line-height: 1.45;
  color: rgba(242, 242, 242, 0.78);
  opacity: 0;
  transform: translateY(10px);
}

.boot-intro__viz {
  margin-top: 1.35rem;
  opacity: 0;
  transform: scale(0.94);
}

.boot-intro__viz-frame {
  position: relative;
  width: 180px;
  height: 180px;
  background: #050505;
  border: 1px solid var(--boot-border);
  display: grid;
  place-items: center;
}

.boot-intro__canvas {
  display: block;
  width: 180px;
  height: 180px;
}

.boot-intro__corner {
  position: absolute;
  width: 10px;
  height: 10px;
  color: rgba(242, 242, 242, 0.2);
  pointer-events: none;
}

.boot-intro__corner::before,
.boot-intro__corner::after {
  content: "";
  position: absolute;
  background: currentColor;
}

.boot-intro__corner::before {
  width: 10px;
  height: 1px;
}

.boot-intro__corner::after {
  width: 1px;
  height: 10px;
}

.boot-intro__corner--tl {
  top: -5px;
  left: -5px;
}
.boot-intro__corner--tr {
  top: -5px;
  right: -5px;
  transform: rotate(90deg);
}
.boot-intro__corner--bl {
  bottom: -5px;
  left: -5px;
  transform: rotate(-90deg);
}
.boot-intro__corner--br {
  bottom: -5px;
  right: -5px;
  transform: rotate(180deg);
}

.boot-intro__platforms {
  margin-top: 1.15rem;
  opacity: 0;
  transform: translateY(8px);
}

.boot-intro__plat-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem 0.7rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
}

.boot-intro__plat {
  color: var(--boot-faint);
  opacity: 0;
  transform: translateY(6px);
}

.boot-intro__plat.is-live {
  color: rgba(242, 242, 242, 0.82);
}

.boot-intro__plat.is-soon {
  color: rgba(242, 242, 242, 0.28);
}

.boot-intro__plat.is-sep {
  color: rgba(242, 242, 242, 0.2);
}

.boot-intro__plat-meta {
  margin-top: 0.4rem;
  display: flex;
  justify-content: center;
  gap: 1.4rem;
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  color: var(--boot-faint);
}

.boot-intro__init {
  margin-top: 1.25rem;
  opacity: 0;
}

.boot-intro__init-line {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 11rem;
  height: 1.05rem;
}

.boot-intro__init-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--boot-accent);
  z-index: 0;
}

.boot-intro__init-label {
  position: relative;
  z-index: 1;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  color: var(--boot-fg);
  mix-blend-mode: difference;
  line-height: 1;
}

.boot-intro__status {
  margin: 0.85rem 0 0;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--boot-accent);
  opacity: 0;
  transform: translateY(6px);
}

/* Return / reduced: keep content visible without staged delay */
.boot-intro[data-boot-state="return"] .boot-intro__mark,
.boot-intro[data-boot-state="return"] .boot-intro__eyebrow,
.boot-intro[data-boot-state="return"] .boot-intro__brand,
.boot-intro[data-boot-state="return"] .boot-intro__brand-ko,
.boot-intro[data-boot-state="return"] .boot-intro__copy,
.boot-intro[data-boot-state="return"] .boot-intro__viz,
.boot-intro[data-boot-state="return"] .boot-intro__platforms,
.boot-intro[data-boot-state="return"] .boot-intro__plat,
.boot-intro[data-boot-state="return"] .boot-intro__init,
.boot-intro[data-boot-state="return"] .boot-intro__status {
  opacity: 1;
  transform: none;
}

.boot-intro[data-boot-state="return"] .boot-intro__init-bar {
  width: 100%;
}

/* Timeline */
.boot-intro[data-boot-state="first"] .boot-intro__mark,
.boot-intro[data-boot-state="first"] .boot-intro__eyebrow,
.boot-intro[data-boot-state="first"] .boot-intro__brand,
.boot-intro[data-boot-state="first"] .boot-intro__brand-ko,
.boot-intro[data-boot-state="first"] .boot-intro__copy,
.boot-intro[data-boot-state="first"] .boot-intro__viz,
.boot-intro[data-boot-state="first"] .boot-intro__platforms,
.boot-intro[data-boot-state="first"] .boot-intro__plat,
.boot-intro[data-boot-state="first"] .boot-intro__init,
.boot-intro[data-boot-state="first"] .boot-intro__status {
  animation: boot-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.boot-intro[data-boot-state="first"] .boot-intro__mark {
  animation-delay: 0.02s;
}
.boot-intro[data-boot-state="first"] .boot-intro__mark-ring {
  animation: boot-ring-breathe 2.4s ease-in-out 0.35s infinite;
}
.boot-intro[data-boot-state="first"] .boot-intro__logo {
  animation: boot-logo-settle 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}
.boot-intro[data-boot-state="first"] .boot-intro__eyebrow {
  animation-delay: 0.18s;
}
.boot-intro[data-boot-state="first"] .boot-intro__brand {
  animation-delay: 0.26s;
}
.boot-intro[data-boot-state="first"] .boot-intro__brand-ko {
  animation-delay: 0.34s;
}
.boot-intro[data-boot-state="first"] .boot-intro__copy {
  animation-delay: 0.42s;
}
.boot-intro[data-boot-state="first"] .boot-intro__viz {
  animation-delay: 0.52s;
}
.boot-intro[data-boot-state="first"] .boot-intro__platforms {
  animation-delay: 0.7s;
}
.boot-intro[data-boot-state="first"] .boot-intro__plat[data-i="0"] {
  animation-delay: 0.78s;
}
.boot-intro[data-boot-state="first"] .boot-intro__plat[data-i="1"] {
  animation-delay: 0.86s;
}
.boot-intro[data-boot-state="first"] .boot-intro__plat[data-i="2"] {
  animation-delay: 0.94s;
}
.boot-intro[data-boot-state="first"] .boot-intro__plat[data-i="3"] {
  animation-delay: 1.02s;
}
.boot-intro[data-boot-state="first"] .boot-intro__plat[data-i="4"] {
  animation-delay: 1.1s;
}
.boot-intro[data-boot-state="first"] .boot-intro__plat[data-i="5"] {
  animation-delay: 1.18s;
}
.boot-intro[data-boot-state="first"] .boot-intro__init {
  animation-delay: 0.55s;
}
.boot-intro[data-boot-state="first"] .boot-intro__init-bar {
  animation: boot-init-fill 2.2s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both;
}
.boot-intro[data-boot-state="first"] .boot-intro__status {
  animation-delay: 2.15s;
}

@keyframes boot-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes boot-logo-settle {
  from {
    transform: scale(0.9);
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
  }
  to {
    transform: scale(1);
    filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.55));
  }
}

@keyframes boot-ring-breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

@keyframes boot-init-fill {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .boot-intro {
    --boot-digit-h: 120px;
  }

  .boot-intro__digit-col {
    width: 72px;
  }

  .boot-intro__digits {
    top: 14%;
  }

  .boot-intro__mark,
  .boot-intro__logo {
    width: 80px;
    height: 80px;
  }

  .boot-intro__viz-frame,
  .boot-intro__canvas {
    width: 150px;
    height: 150px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .boot-intro,
  .boot-intro.is-leaving,
  .boot-intro__digit-strip,
  .boot-intro__skip {
    transition: none !important;
  }

  .boot-intro[data-boot-state="first"] .boot-intro__mark,
  .boot-intro[data-boot-state="first"] .boot-intro__mark-ring,
  .boot-intro[data-boot-state="first"] .boot-intro__logo,
  .boot-intro[data-boot-state="first"] .boot-intro__eyebrow,
  .boot-intro[data-boot-state="first"] .boot-intro__brand,
  .boot-intro[data-boot-state="first"] .boot-intro__brand-ko,
  .boot-intro[data-boot-state="first"] .boot-intro__copy,
  .boot-intro[data-boot-state="first"] .boot-intro__viz,
  .boot-intro[data-boot-state="first"] .boot-intro__platforms,
  .boot-intro[data-boot-state="first"] .boot-intro__plat,
  .boot-intro[data-boot-state="first"] .boot-intro__init,
  .boot-intro[data-boot-state="first"] .boot-intro__init-bar,
  .boot-intro[data-boot-state="first"] .boot-intro__status {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    width: auto;
  }

  .boot-intro[data-boot-state="first"] .boot-intro__mark,
  .boot-intro[data-boot-state="first"] .boot-intro__logo {
    width: 96px;
    height: 96px;
  }

  .boot-intro[data-boot-state="first"] .boot-intro__init-bar {
    width: 100%;
  }
}
