/* ===== RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  background: #000;
  overflow: hidden;
  font-family: system-ui, sans-serif;
}

/* ===== STAGE ===== */
.stage-wrapper {
  position: fixed;
  inset: 0;
  background: #000;
  overflow: hidden;
}

.stage-outline,
.stage-color {
  position: absolute;
  inset: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.stage-outline {
  background-image: url("./assets/Outline_Stage.png");
  z-index: 1;
}

.stage-color {
  background-image: url("./assets/Normal_Stage.png");
  z-index: 2;
  transition: opacity 0.25s ease;
}

/* ===== CENTER ASSET ===== */

/* Nudge the whole center piece DOWN a bit */
.center-anchor {
  position: absolute;
  top: calc(50% + 40px); /* adjust to taste */
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  pointer-events: none;
}

/* keep your float on this wrapper */
.center-float {
  width: min(280px, 40vw);
  animation: float 4.5s ease-in-out infinite;
}

/* 3D perspective wrapper */
.center-revolve {
  perspective: 900px;              /* lower = stronger 3D, higher = subtler */
  perspective-origin: 50% 50%;
}

/* Make Analytics center asset smaller */
.center-revolve img.is-analytics {
  width: 72%;        /* adjust if needed: 70–75% is the sweet spot */
  margin: 0 auto;
}

/* Swivel (no full flip), with shadow pumping at extremes */
.center-revolve img {
  width: 100%;
  height: auto;
  display: block;

  transform-style: preserve-3d;
  backface-visibility: hidden;

  /* IMPORTANT: only this animation (no spin / no full revolve) */
  animation: swivel 3.6s ease-in-out infinite;

  transition: opacity 0.25s ease;

  /* baseline glow/shadow */
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.45));
}

/* Float up/down */
@keyframes float {
  0%,
  100% {
    transform: translateY(-12px);
  }
  50% {
    transform: translateY(12px);
  }
}

/* Small “revolving door” motion (never shows the back) */
@keyframes swivel {
  0% {
    transform: rotateX(8deg) rotateY(-18deg);
    filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.65));
  }
  50% {
    transform: rotateX(8deg) rotateY(18deg);
    filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.65));
  }
  100% {
    transform: rotateX(8deg) rotateY(-18deg);
    filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.65));
  }
}

/* ===== SWITCHBOARD ===== */
.switchboard {
  position: absolute;
  left: 50%;
  bottom: 0; /* anchor at the bottom edge */
  transform: translateX(-50%) translateY(30px); /* push DOWN */
  z-index: 5;

  width: min(1600px, 100vw);
  aspect-ratio: 5 / 1;
  background: url("./assets/board_default.png") center / contain no-repeat;
}


/* Invisible clickable switches */
.switch {
  position: absolute;
  background: transparent;
  border: none;
  cursor: pointer;
}



/* Analytics */
.switch.analytics {
  left: 37%;
  top: 31%;
  width: 4%;
  height: 40%;
}

/* Strategy */
.switch.strategy {
  left: 44%;
  top: 31%;
  width: 4%;
  height: 40%;
}

/* Portfolio */
.switch.portfolio {
  left: 52%;
  top: 31%;
  width: 4%;
  height: 40%;
}

/* About */
.switch.about {
  left: 59%;
  top: 31%;
  width: 4%;
  height: 40%;
}



.blackout {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  transition: opacity 420ms ease-out;
}

.blackout.is-on {
  opacity: 0.95;
}

.center-click {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  pointer-events: auto;
}

.center-click:focus {
  outline: 2px solid rgba(255,255,255,0.35);
  outline-offset: 6px;
}

/* ===== TOP-RIGHT MINI NAV ===== */
.mini-nav {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 20;

  display: flex;
  gap: 14px;
  align-items: center;

  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
}

.mini-nav a,
.mini-nav-btn {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.2px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 999px;
}

.mini-nav a:hover,
.mini-nav-btn:hover {
  background: rgba(255,255,255,0.08);
}

/* ===== WELCOME PANEL ===== */
.welcome {
  position: absolute;
  inset: 0;
  z-index: 30;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(6px);
}

.welcome-card {
  width: min(720px, 92vw);
  border-radius: 18px;
  padding: 22px 22px 18px;

  background: rgba(20,20,20,0.92);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 30px 80px rgba(0,0,0,0.65);
  position: relative;
}

.welcome-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 999px;

  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.35);
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.welcome-close:hover {
  background: rgba(255,255,255,0.08);
}


.welcome-hint {
  margin-top: 10px;
  color: rgba(255,255,255,0.55);
  font-size: 13px;
}

/* ===== WELCOME CHOICE LAYOUT ===== */
.welcome-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 16px 0 12px;
}

.welcome-option {
  position: relative;
  border-radius: 16px;
  padding: 18px 18px 16px;
  text-align: left;
  cursor: pointer;
  text-decoration: none;

  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.35);
  color: rgba(255,255,255,0.9);

  transition: transform 160ms ease, background 160ms ease;
}

.welcome-option:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.06);
}

/* Primary (stage) option */
.welcome-option.primary {
  background: rgba(255,255,255,0.06);
}

.option-title {
  display: block;
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
}

.option-sub {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}

/* Arrow hint for stage */
.option-arrow {
  position: absolute;
  right: 16px;
  bottom: 14px;
  font-size: 22px;
  opacity: 0.7;
}

@media (max-width: 768px) {
  .switchboard {
    width: 150vw;                           /* bigger than the screen */
    transform: translateX(-50%) translateY(18px);
    aspect-ratio: 4.2 / 1;                    /* match your desktop ratio */
    background-size: cover;                     /* key change */
    background-position: center bottom;
  }

  .switch.analytics { left: 34%; }
  .switch.strategy,
  .switch.portfolio,
  .switch.about {
    width: 7%;
  }
}


/* ===== MOBILE NAV FIX ===== */
@media (max-width: 768px) {
  .mini-nav {
    top: 10px;
    right: 10px;
    left: 10px;                 /* allow it to span the screen */
    width: auto;

    justify-content: space-between;
    gap: 10px;

    padding: 10px;
    border-radius: 16px;

    overflow-x: auto;           /* if needed, allow scroll instead of bleed */
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  .mini-nav a,
  .mini-nav-btn {
    font-size: 13px;
    padding: 6px 10px;
    flex: 0 0 auto;
  }
}
