@font-face {
  font-family: "SLB Sans";
  src: url("./public/fonts/SLBSans-Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: "SLB Sans";
  src: url("./public/fonts/SLBSans-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "SLB Sans";
  src: url("./public/fonts/SLBSans-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
}

:root {
  --bg: #070d2a;
  --panel: #0b0b0b;
  --text: rgba(255, 255, 255, 0.9);
  --muted: rgba(255, 255, 255, 0.48);
  --border: rgba(255, 255, 255, 0.14);
  --shadow: 0 30px 60px rgba(0, 0, 0, 0.32);
  --button-text: #162326;
  --active-ring-dark: rgba(0, 0, 0, 0.9);
  --active-ring-light: rgba(255, 255, 255, 0.94);
  --active-wash: rgba(255, 255, 255, 0.08);
  --transition-ms: 1000ms;
  --content-width: min(1500px, calc(100vw - 48px));
  --gap-pipe-to-interface: clamp(70px, 6.4vw, 112px);
  --gap-interface-to-copy: clamp(74px, 6.4vw, 120px);
  --gap-copy-to-logo: clamp(77px, 6.4vw, 125px);
  --font-ui: "SLB Sans", "Avenir Next", "Helvetica Neue", "Segoe UI", sans-serif;
  --font-display: "SLB Sans", "Avenir Next", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top, rgba(78, 104, 214, 0.08), transparent 34%),
    linear-gradient(180deg, #0d1747 0%, var(--bg) 100%);
  color: var(--text);
  font-family: var(--font-ui);
}

body.intro-active {
  overflow: hidden;
}

button,
video {
  font: inherit;
}

.app-shell {
  width: 100%;
  padding: 48px 0 36px;
  transition: opacity 500ms ease, transform 500ms ease;
}

body.intro-active .app-shell {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #000;
  color: #fff;
  display: grid;
  place-items: center;
  transition: opacity 500ms ease, visibility 500ms ease;
}

.intro-overlay.is-dismissed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.password-card {
  width: min(400px, calc(100vw - 48px));
  padding: 0;
  display: grid;
  gap: 14px;
  text-align: center;
}

.password-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.password-input {
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1rem;
}

.password-input:focus-visible {
  outline: 2px solid rgba(120, 148, 255, 0.9);
  outline-offset: 2px;
}

.password-button {
  height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(45, 68, 255, 0.55);
  border-radius: 999px;
  background: rgba(45, 68, 255, 0.16);
  color: #fff;
  font-size: 0.94rem;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.password-button:hover,
.password-button:focus-visible {
  background: rgba(45, 68, 255, 0.28);
  border-color: rgba(120, 148, 255, 0.9);
}

.password-error {
  margin: 0;
  min-height: 1.4em;
  color: rgba(255, 168, 168, 0.92);
  font-size: 0.9rem;
}

.boot-screen,
.password-screen,
.about-screen,
.splash-screen {
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.boot-logo {
  width: min(280px, 34vw);
  max-width: 80vw;
  opacity: 0;
  animation: boot-logo-fade 2.6s ease forwards;
}

@keyframes boot-logo-fade {
  0% { opacity: 0; transform: scale(0.98); }
  18% { opacity: 1; transform: scale(1); }
  72% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.02); }
}

.splash-screen {
  background:
    linear-gradient(180deg, rgba(5, 8, 24, 0.88), rgba(5, 8, 24, 0.96)),
    #08102d;
}

.password-screen {
  background: #000;
  animation: intro-section-fade 420ms ease both;
}

.about-screen,
.splash-screen {
  animation: intro-section-fade 520ms ease both;
}

.about-screen {
  background:
    linear-gradient(180deg, rgba(5, 8, 24, 0.88), rgba(5, 8, 24, 0.96)),
    #08102d;
}

@keyframes intro-section-fade {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

.splash-card {
  width: min(1040px, calc(100vw - 48px));
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  align-items: stretch;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.about-card {
  width: min(1120px, calc(100vw - 48px));
  display: grid;
  grid-template-columns: 1.18fr 0.92fr;
  align-items: stretch;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.splash-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-slideshow {
  position: relative;
  min-height: 100%;
  background: rgba(255, 255, 255, 0.02);
}

.about-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 700ms ease;
}

.about-slide.is-active {
  opacity: 1;
}

.about-dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
  z-index: 2;
}

.about-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  transition: background 180ms ease, transform 180ms ease;
}

.about-dot.is-active {
  background: rgba(255, 255, 255, 0.88);
  transform: scale(1.08);
}

.splash-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 40px 42px;
}

.about-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 40px 42px;
}

.splash-kicker {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.84rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.splash-copy h2 {
  margin: 0;
  font-size: clamp(1.8rem, 2.6vw, 2.7rem);
  font-weight: 400;
  line-height: 1.02;
}

.about-copy h2 {
  margin: 0;
  font-size: clamp(1.8rem, 2.6vw, 2.7rem);
  font-weight: 400;
  line-height: 1.02;
}

.splash-text {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
  line-height: 1.5;
}

.start-button {
  align-self: flex-start;
  padding: 12px 20px;
  border: 1px solid rgba(45, 68, 255, 0.55);
  border-radius: 999px;
  background: rgba(45, 68, 255, 0.16);
  color: #fff;
  font-size: 0.94rem;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.start-button:hover,
.start-button:focus-visible {
  background: rgba(45, 68, 255, 0.28);
  border-color: rgba(120, 148, 255, 0.9);
}

.secondary-button {
  align-self: flex-start;
  padding: 12px 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.94rem;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.secondary-button:hover,
.secondary-button:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.36);
}

.splash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.player-panel {
  width: 100%;
  margin-bottom: 0;
}

.frame-stage {
  position: relative;
  width: 100vw;
  max-width: 100%;
  margin: 0 auto;
  aspect-ratio: 2370 / 476;
}

.video-stage {
  position: absolute;
  left: 10%;
  top: 9.24%;
  width: 80.76%;
  height: 68.7%;
  overflow: hidden;
  background: #000;
  z-index: 1;
}

.idle-screen,
.stage-video,
.video-fallback {
  position: absolute;
  inset: 0;
}

.idle-screen {
  inset: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  object-fit: fill;
  z-index: 0;
  opacity: 1;
  transition: opacity var(--transition-ms) ease;
}

.idle-screen.is-hidden {
  opacity: 0;
}

.stage-video {
  inset: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  object-fit: fill;
  opacity: 0;
  z-index: 1;
  transition: opacity var(--transition-ms) ease;
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: opacity;
}

.stage-video.is-no-transition {
  transition: none !important;
}

.stage-video.is-visible {
  opacity: 1;
}

.stage-video.is-front {
  z-index: 2;
}

.stage-video.is-back {
  z-index: 1;
}

.video-fallback p {
  margin: 0;
}

.video-fallback {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  background: rgba(0, 0, 0, 0.64);
  color: rgba(255, 255, 255, 0.82);
  z-index: 4;
}

.pipe-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  user-select: none;
  z-index: 3;
}

.controls-panel {
  width: min(calc(var(--content-width) * 0.72), calc(100vw - 48px));
  margin: var(--gap-pipe-to-interface) auto 0;
}

.speed-toggle {
  position: absolute;
  right: clamp(6px, 1.1vw, 16px);
  bottom: clamp(6px, 1.1vw, 16px);
  z-index: 4;
  min-width: clamp(28px, 3vw, 40px);
  height: clamp(18px, 2vw, 24px);
  padding: 0 clamp(6px, 0.7vw, 10px);
  border: 1px solid rgba(45, 68, 255, 0.35);
  border-radius: 999px;
  background: rgba(247, 246, 243, 0.9);
  color: rgba(45, 68, 255, 0.95);
  font-size: clamp(0.5rem, 0.7vw, 0.72rem);
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.speed-toggle:hover,
.speed-toggle:focus-visible {
  border-color: rgba(45, 68, 255, 0.7);
  background: rgba(255, 255, 255, 0.98);
}

.speed-toggle:focus-visible,
.launcher-tile:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.52);
  outline-offset: 3px;
}

.speed-toggle[aria-pressed="true"] {
  background: rgba(45, 68, 255, 0.12);
  border-color: rgba(45, 68, 255, 0.95);
}

.launcher-grid {
  display: grid;
  grid-template-columns: 267fr repeat(6, 203fr);
  aspect-ratio: 1485 / 320;
  width: 100%;
  overflow: hidden;
}

.brand-panel,
.launcher-tile {
  min-height: 0;
  height: 100%;
}

.brand-panel {
  position: relative;
  background-color: #f7f6f3;
  background-image: url("./public/images/interface/0.jpg?v=20260319b");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
}

.launcher-tile {
  position: relative;
  width: 100%;
  padding: 0;
  border: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.launcher-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 0 solid transparent;
  box-shadow: inset 0 0 0 0 transparent;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
  pointer-events: none;
}

.launcher-tile:hover {
  filter: brightness(1.05);
}

.launcher-tile:active {
  transform: translateY(1px);
}

.launcher-tile.is-active::after {
  box-shadow: inset 0 0 0 4px var(--active-ring-light);
}

.launcher-tile[data-index="0"].is-active::after,
.launcher-tile[data-index="1"].is-active::after,
.launcher-tile[data-index="2"].is-active::after {
  box-shadow: inset 0 0 0 4px var(--active-ring-dark);
}

.page-footer {
  width: var(--content-width);
  margin: var(--gap-interface-to-copy) auto 0;
  text-align: center;
}

.page-footer-title {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-display);
  font-size: clamp(1.02rem, 1.25vw, 1.22rem);
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.page-instructions {
  margin: 0 0 var(--gap-copy-to-logo);
  color: rgba(255, 255, 255, 0.68);
  font-size: clamp(0.88rem, 0.95vw, 0.96rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.page-footer-logo {
  display: block;
  width: min(220px, 16vw);
  max-width: 100%;
  height: auto;
  margin: 0 auto 104px;
}

.page-footer-logo-link {
  display: inline-block;
}

@media (max-width: 1200px) {
  .controls-panel {
    width: min(calc(var(--content-width) * 0.76), calc(100vw - 40px));
  }
}

@media (max-width: 720px) {
  :root {
    --content-width: min(100vw - 24px, 100%);
  }

  .app-shell {
    padding-top: 24px;
  }

  .player-panel {
    margin-bottom: 0;
  }

  .frame-stage {
    width: 100%;
  }

  .boot-logo {
    width: min(210px, 54vw);
  }

  .splash-card {
    width: min(100vw - 24px, 760px);
    grid-template-columns: 1fr;
  }

  .about-card {
    width: min(100vw - 24px, 760px);
    grid-template-columns: 1fr;
  }

  .password-card {
    width: min(100vw - 24px, 400px);
  }

  .password-form {
    grid-template-columns: 1fr;
  }

  .splash-image {
    aspect-ratio: 4 / 3;
  }

  .about-slideshow {
    aspect-ratio: 4 / 3;
  }

  .splash-copy {
    padding: 24px 22px 28px;
  }

  .about-copy {
    padding: 24px 22px 28px;
  }

  .splash-text {
    font-size: 0.92rem;
  }

  .controls-panel {
    width: min(calc(var(--content-width) * 0.9), calc(100vw - 20px));
    margin-top: 56px;
  }

  .page-footer {
    margin-top: 72px;
  }

  .page-footer-title {
    margin-bottom: 10px;
    font-size: clamp(0.98rem, 4.2vw, 1.18rem);
    letter-spacing: 0.1em;
  }

  .page-instructions {
    margin-bottom: 72px;
    font-size: 0.82rem;
    line-height: 1.4;
    padding-inline: 14px;
  }

  .page-footer-logo {
    width: min(150px, 36vw);
    margin-bottom: 64px;
  }
}
