:root {
  color-scheme: dark;
  --tilt-x: 6deg;
  --tilt-y: -8deg;
  --parallax-x: 0px;
  --parallax-y: 0px;
  --accent-cyan: rgba(120, 220, 255, 1);
  --accent-red: rgba(255, 70, 70, 1);
  --spin-x: 0deg;
  --spin-y: 0deg;
}

html,
body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  background: #000;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: rgba(255, 255, 255, 0.92);
}

@media (pointer: fine) {
  .stage {
    cursor: none;
  }
}

.demo {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  padding: max(18px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  display: grid;
  place-items: center;
}

.stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
}

.stage.stage--live {
  /* Keeps the stage “alive” even in bright daylight */
  background: #000;
}

/* Film/scan texture only after splash (main stage). */
.stage.stage--main .stage__title::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.00) 0%,
      rgba(255, 255, 255, 0.018) 35%,
      rgba(255, 255, 255, 0.00) 70%
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.018) 0px,
      rgba(255, 255, 255, 0.018) 1px,
      rgba(0, 0, 0, 0) 4px,
      rgba(0, 0, 0, 0) 7px
    );
  opacity: 0.10;
  mix-blend-mode: screen;
  pointer-events: none;
  animation: scanDrift 6s linear infinite;
}

.stage__rotator {
  pointer-events: auto;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  display: grid;
  gap: 18px;
  place-items: center;
  transform-style: preserve-3d;
  filter: drop-shadow(0 30px 80px rgba(0, 0, 0, 0.8));
}

.stage__url {
  font-family: Orbitron, Montserrat, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 800;
  font-size: clamp(12px, 2.6vw, 18px);
  letter-spacing: 0.18em;
  text-transform: none;
  color: rgba(210, 245, 255, 0.88);
  text-shadow:
    0 0 18px rgba(120, 220, 255, 0.16),
    0 0 48px rgba(120, 220, 255, 0.10);
}

.stage__url-tld {
  color: var(--accent-red);
  text-shadow:
    0 0 16px rgba(255, 70, 70, 0.22),
    0 0 44px rgba(255, 70, 70, 0.14);
}

.stage__tagline {
  font-family: Orbitron, Montserrat, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 900;
  font-size: clamp(20px, 5.8vw, 64px);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-align: center;

  /* Dark Glass text face + cyan rim */
  background:
    linear-gradient(115deg,
      rgba(0, 0, 0, 0.60) 0%,
      rgba(16, 26, 36, 0.40) 25%,
      rgba(0, 0, 0, 0.68) 55%,
      rgba(12, 30, 44, 0.38) 78%,
      rgba(0, 0, 0, 0.74) 100%
    );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 1.8px rgba(120, 220, 255, 0.68);
  text-shadow:
    0 0 18px rgba(120, 220, 255, 0.18),
    0 0 60px rgba(120, 220, 255, 0.12),
    0 40px 160px rgba(0, 0, 0, 0.90);

  position: relative;
}

.stage.stage--live .stage__rotator {
  animation: stageBreath 6.2s ease-in-out infinite;
}

.stage.stage--live .stage__shock {
  animation: shockwave 900ms ease-out 650ms forwards;
}

.stage.stage--main::before {
  content: "";
  position: absolute;
  inset: -12vmax;
  background:
    radial-gradient(closest-side at 45% 55%, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0) 62%),
    radial-gradient(closest-side at 50% 50%, rgba(120, 200, 255, 0.07), rgba(0, 0, 0, 0) 68%),
    radial-gradient(closest-side at 60% 35%, rgba(160, 180, 255, 0.05), rgba(0, 0, 0, 0) 72%);
  filter: blur(22px);
  opacity: 0.75;
  transform: translate3d(0, 0, 0);
  animation: fogDrift 9s ease-in-out infinite;
  pointer-events: none;
}

.stage.stage--main::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 40%, rgba(120, 200, 255, 0.06), rgba(0, 0, 0, 0) 38%),
    radial-gradient(circle at 80% 35%, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0) 36%),
    radial-gradient(circle at 55% 85%, rgba(120, 140, 255, 0.06), rgba(0, 0, 0, 0) 40%),
    repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.012) 0 2px, rgba(0, 0, 0, 0) 2px 10px);
  mix-blend-mode: screen;
  opacity: 0.28;
  filter: blur(0.4px);
  animation: particlesFloat 8.5s linear infinite;
  pointer-events: none;
}

.stage__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.stage__floor {
  position: absolute;
  left: -8vw;
  right: -8vw;
  bottom: -18vh;
  height: 70vh;
  transform-origin: 50% 100%;
  transform: perspective(900px) rotateX(64deg) translate3d(0, 0, 0);
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.98) 0%, rgba(0, 0, 0, 0.45) 35%, rgba(0, 0, 0, 0) 65%),
    repeating-linear-gradient(to right, rgba(120, 220, 255, 0.10) 0 1px, rgba(0, 0, 0, 0) 1px 64px),
    repeating-linear-gradient(to top, rgba(120, 220, 255, 0.10) 0 1px, rgba(0, 0, 0, 0) 1px 64px);
  filter: blur(0.2px);
  opacity: 0.55;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(closest-side at 50% 100%, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 78%);
  mask-image: radial-gradient(closest-side at 50% 100%, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 78%);
}

/* Hide the floor grid during splash */
.stage:not(.stage--main) .stage__floor {
  opacity: 0;
}

/* Splash overlay (pure black + minimal UI) */
.stage__splash {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  pointer-events: none;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 520ms ease, transform 520ms ease;
}

.stage__splash-link {
  font-family: Orbitron, Montserrat, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 800;
  font-size: clamp(12px, 2.6vw, 18px);
  letter-spacing: 0.18em;
  color: rgba(210, 245, 255, 0.92);
  text-shadow:
    0 0 22px rgba(120, 220, 255, 0.18),
    0 0 60px rgba(120, 220, 255, 0.10);
  min-height: 1.4em;
}

.stage__splash-link .tld {
  color: var(--accent-red);
  text-shadow:
    0 0 16px rgba(255, 70, 70, 0.22),
    0 0 44px rgba(255, 70, 70, 0.14);
}

.stage__splash-btn {
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  font-family: Orbitron, Montserrat, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 900;
  font-size: clamp(12px, 2.8vw, 16px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(120, 220, 255, 0.35);
  color: rgba(220, 250, 255, 0.90);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 36px rgba(120, 220, 255, 0.14);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 380ms ease, transform 380ms ease, border-color 380ms ease;
}

.stage__splash-btn.is-near {
  border-color: rgba(120, 220, 255, 0.75);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 0 42px rgba(120, 220, 255, 0.28),
    0 0 90px rgba(120, 220, 255, 0.18);
  transform: translateY(0) scale(1.02);
}

.stage__splash-btn:hover {
  border-color: rgba(120, 220, 255, 0.70);
}

.stage__splash-btn.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.stage__splash-btn:focus-visible {
  outline: 2px solid rgba(120, 220, 255, 0.55);
  outline-offset: 3px;
}

.stage__splash-btn:active {
  transform: translateY(1px);
}

.stage__splash.is-fadeout {
  opacity: 0;
  transform: translateY(-14px);
}

.stage__title {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

/* Keep the 4D rotator hidden until user clicks Agent TOBO */
.stage__rotator {
  opacity: 0;
  transform: translateY(8px) perspective(1200px)
    rotateX(calc(var(--spin-x) + var(--tilt-x)))
    rotateY(calc(var(--spin-y) + var(--tilt-y)))
    translate3d(var(--parallax-x), var(--parallax-y), 0);
  transition: opacity 520ms ease, transform 520ms ease;
}

.stage.stage--main .stage__rotator {
  opacity: 1;
  transform: perspective(1200px)
    rotateX(calc(var(--spin-x) + var(--tilt-x)))
    rotateY(calc(var(--spin-y) + var(--tilt-y)))
    translate3d(var(--parallax-x), var(--parallax-y), 0);
}

.stage.stage--lion .stage__rotator {
  opacity: 0;
  transform: translateY(10px) perspective(1200px)
    rotateX(calc(var(--spin-x) + var(--tilt-x)))
    rotateY(calc(var(--spin-y) + var(--tilt-y)))
    translate3d(var(--parallax-x), var(--parallax-y), 0);
}

/* In lion mode, fully hide the title layer (prevents the shock ring from showing). */
.stage.stage--lion .stage__title {
  opacity: 0;
}

.stage.stage--lion .stage__shock {
  display: none;
}

/* Lion stage (3D viewer + greeting) */
.lion {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 6;
}

.lion__viewer {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: #000;
  overflow: hidden;
  pointer-events: auto;
}

.lion__canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.lion__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
  opacity: 0;
  transition: opacity 420ms ease;
  /* Soft blend for edges */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
}

.lion__video.is-active {
  opacity: 1;
}

.lion__video-fade {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  transition: opacity 520ms ease;
  pointer-events: none;
}

.lion__video-fade.is-on {
  opacity: 1;
}

/* Form overlay - smaller and appears in final second */
.lion__form {
  position: absolute;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 10;
  background: rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(120, 220, 255, 0.3);
  border-radius: 16px;
  padding: 1.5rem;
  max-width: 380px;
  width: 85%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 600ms ease, transform 600ms ease;
  pointer-events: none;
}

.lion__form.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.lion__form h2 {
  color: #78dcff;
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  text-align: center;
}

.lion__form p {
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 1.25rem 0;
  font-size: 0.9rem;
  text-align: center;
  line-height: 1.4;
}

.lion__form-group {
  width: 100%;
  margin-bottom: 1rem;
}

.lion__select {
  width: 100%;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(120, 220, 255, 0.3);
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 300ms ease;
}

.lion__select:hover {
  border-color: rgba(120, 220, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

.lion__select:focus {
  outline: none;
  border-color: #78dcff;
  box-shadow: 0 0 0 3px rgba(120, 220, 255, 0.1);
}

.lion__button {
  width: 100%;
  padding: 0.8rem 1.5rem;
  background: linear-gradient(135deg, #78dcff 0%, #4facfe 100%);
  border: none;
  border-radius: 8px;
  color: #000;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 300ms ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lion__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(120, 220, 255, 0.3);
}

.lion__button:active {
  transform: translateY(0);
}

/* 3D/4D Enhancement Effects */
.lion__3d-effects {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 600ms ease;
}

.lion__viewer.is-video .lion__3d-effects {
  opacity: 1;
}

.lion__particles {
  position: absolute;
  inset: 0;
  background: radial-gradient(1px 1px at 20% 30%, rgba(120, 220, 255, 0.3), transparent),
              radial-gradient(1px 1px at 40% 70%, rgba(255, 255, 255, 0.2), transparent),
              radial-gradient(2px 2px at 60% 20%, rgba(120, 220, 255, 0.1), transparent),
              radial-gradient(1px 1px at 80% 80%, rgba(255, 255, 255, 0.15), transparent),
              radial-gradient(2px 2px at 15% 90%, rgba(120, 220, 255, 0.2), transparent);
  background-size: 200px 200px, 300px 300px, 250px 250px, 400px 400px, 350px 350px;
  animation: particleFloat 12s infinite linear;
}

@keyframes particleFloat {
  0% { transform: translateY(0px) translateX(0px); }
  25% { transform: translateY(-10px) translateX(5px); }
  50% { transform: translateY(-5px) translateX(-3px); }
  75% { transform: translateY(-12px) translateX(8px); }
  100% { transform: translateY(0px) translateX(0px); }
}

.lion__depth-layers {
  position: absolute;
  inset: 0;
}

.lion__depth-layer {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, 
    rgba(120, 220, 255, 0.02) 0%, 
    rgba(120, 220, 255, 0.05) 40%, 
    transparent 70%);
  transform-style: preserve-3d;
  transition: transform 150ms ease-out;
}

.lion__hologram-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(120, 220, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 220, 255, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  animation: gridPulse 4s infinite ease-in-out;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.1; }
  50% { opacity: 0.3; }
}

.lion__ambient-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle at 50% 50%, 
    rgba(120, 220, 255, 0.15) 0%, 
    rgba(120, 220, 255, 0.08) 30%, 
    rgba(120, 220, 255, 0.02) 60%, 
    transparent 100%);
  animation: ambientPulse 6s infinite ease-in-out;
  filter: blur(15px);
}

@keyframes ambientPulse {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.3; }
  33% { transform: scale(1.05) rotate(1deg); opacity: 0.5; }
  66% { transform: scale(0.98) rotate(-0.5deg); opacity: 0.4; }
}

/* Mobile Optimizations for 3D Effects */
@media (max-width: 768px) {
  .lion__form {
    bottom: 6%;
    padding: 1.25rem;
    max-width: 320px;
    width: 90%;
  }
  
  .lion__form h2 {
    font-size: 1.2rem;
  }
  
  .lion__form p {
    font-size: 0.85rem;
  }
  
  .lion__select, .lion__button {
    padding: 0.7rem;
    font-size: 0.85rem;
  }
  
  .lion__3d-effects {
    opacity: 0.7; /* Reduce intensity on mobile */
  }
  
  .lion__particles {
    background-size: 150px 150px, 200px 200px, 180px 180px, 250px 250px, 220px 220px;
    animation-duration: 8s; /* Faster animation for mobile */
  }
  
  .lion__ambient-glow {
    filter: blur(10px); /* Less blur for better performance */
    inset: -10px;
  }
  
  .lion__hologram-grid {
    background-size: 15px 15px; /* Smaller grid on mobile */
  }
}

/* High contrast mode adjustments */
@media (prefers-reduced-motion: reduce) {
  .lion__particles,
  .lion__ambient-glow,
  .lion__hologram-grid {
    animation: none;
  }
  
  .lion__depth-layer {
    transition: none;
  }
}

.lion__viewer.is-video .lion__canvas {
  opacity: 0;
  pointer-events: none;
}

.lion__video-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  background: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.70));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.lion__sectors {
  width: min(420px, 95%);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
  justify-items: center;
}

.lion__sector-btn {
  appearance: none;
  border: 1px solid rgba(120, 220, 255, 0.26);
  background: rgba(0, 0, 0, 0.42);
  color: rgba(220, 250, 255, 0.92);
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  min-width: 80px;
  text-align: center;
}

.lion__sector-btn:active {
  transform: translateY(1px);
}

.lion__sector-btn.is-selected {
  border-color: rgba(120, 220, 255, 0.75);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 0 34px rgba(120, 220, 255, 0.22);
}

.lion__panel {
  grid-row: 3;
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  width: min(720px, calc(100vw - 28px));
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.56);
  border: 1px solid rgba(120, 220, 255, 0.18);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 0 70px rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  pointer-events: auto;
}


.lion__greeting {
  font-family: Orbitron, Montserrat, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 900;
  letter-spacing: 0.10em;
  font-size: clamp(12px, 2.4vw, 16px);
  color: rgba(220, 250, 255, 0.92);
}

.lion__prompt {
  margin-top: 6px;
  font-size: clamp(12px, 2.6vw, 15px);
  color: rgba(255, 255, 255, 0.84);
}

.lion__form {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.lion__field {
  width: 100%;
  max-width: 420px;
}

.lion__btn {
  width: auto;
  min-width: 140px;
}

@media (max-height: 560px) {
  /* Short screens: keep the panel comfortably spaced */
  .lion {
    row-gap: 12px;
  }
}

/*
  Extra mobile hardening:
  - The demo is a fixed, non-scrolling viewport.
  - On small phones in landscape, or when the keyboard is open, the viewer + panel
    can exceed the viewport height and get clipped.
  - We adapt by reducing the viewer height and letting the panel scroll.
*/

@media (max-height: 560px) {
  .lion {
    grid-template-rows: auto auto;
    align-content: center;
    padding-top: max(10px, env(safe-area-inset-top));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .lion__viewer {
    grid-row: 1;
    width: min(380px, calc(100vw - 32px));
    height: min(240px, 40dvh, calc(100vw - 32px));
  }

  .lion__panel {
    grid-row: 2;
    max-height: min(320px, 52dvh);
    overflow: auto;
  }
}

@media (max-height: 420px) and (orientation: landscape) {
  .lion {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: 1fr;
    column-gap: 12px;
    row-gap: 0;
    padding-left: max(10px, env(safe-area-inset-left));
    padding-right: max(10px, env(safe-area-inset-right));
  }

  .lion__viewer {
    grid-column: 1;
    grid-row: 1;
    width: min(260px, calc(50vw - 18px));
    height: min(260px, calc(100dvh - 26px));
  }

  .lion__panel {
    grid-column: 2;
    grid-row: 1;
    width: min(720px, calc(50vw - 18px));
    max-height: calc(100dvh - 26px);
    overflow: auto;
  }
}

@media (max-width: 520px) {
  /* Mobile portrait: avoid clipped controls by letting the viewer shrink first. */
  .lion {
    grid-template-rows: minmax(180px, 1fr) auto;
    align-content: stretch;
    row-gap: 12px;
  }

  .lion__viewer {
    grid-row: 1;
    width: min(420px, calc(100vw - 28px));
    height: min(360px, 42dvh, calc(100vw - 28px));
  }

  .lion__panel {
    grid-row: 2;
    max-height: calc(100dvh - 18px);
    overflow: auto;
  }

  .lion__voice {
    flex-wrap: wrap;
  }

  .lion__voice-status {
    flex: 1 1 100%;
  }
}

.lion__field {
  width: 100%;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(120, 220, 255, 0.16);
  color: rgba(255, 255, 255, 0.88);
  padding: 0 12px;
  outline: none;
}

.lion__field:focus {
  border-color: rgba(120, 220, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(120, 220, 255, 0.12);
}

.lion__btn {
  height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  background: rgba(120, 220, 255, 0.10);
  border: 1px solid rgba(120, 220, 255, 0.26);
  color: rgba(220, 250, 255, 0.92);
  font-family: Orbitron, Montserrat, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.lion__btn--ghost {
  background: rgba(255, 255, 255, 0.03);
}

.lion__voice {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.lion__voice-status {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.70);
  min-height: 1em;
}

/* Custom claw cursor */
.claw-cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 38px;
  height: 38px;
  transform: translate3d(-999px, -999px, 0);
  will-change: transform;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  filter: drop-shadow(0 0 18px rgba(120, 220, 255, 0.22)) drop-shadow(0 0 40px rgba(120, 220, 255, 0.12));
}

@media (pointer: fine) {
  .claw-cursor {
    opacity: 1;
  }
}

.claw-cursor__nail {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 3px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.80),
    rgba(120, 220, 255, 0.55),
    rgba(0, 0, 0, 0.0)
  );
  box-shadow:
    0 0 10px rgba(120, 220, 255, 0.22),
    0 0 18px rgba(120, 220, 255, 0.12);
  transform-origin: 50% 100%;
}

.claw-cursor__nail:nth-child(1) {
  transform: translateX(-12px) rotate(18deg);
}

.claw-cursor__nail:nth-child(2) {
  transform: translateX(-2px) rotate(8deg);
}

.claw-cursor__nail:nth-child(3) {
  transform: translateX(8px) rotate(-2deg);
}

.stage__kicker {
  margin-bottom: 10px;
  font-size: clamp(11px, 2.4vw, 14px);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  text-shadow:
    0 0 22px rgba(120, 220, 255, 0.10),
    0 0 48px rgba(120, 220, 255, 0.08);
  font-family: Orbitron, Montserrat, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.stage__sub {
  margin-top: 12px;
  font-size: clamp(12px, 2.8vw, 18px);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(220, 250, 255, 0.70);
  text-shadow:
    0 0 18px rgba(120, 220, 255, 0.16),
    0 0 44px rgba(120, 220, 255, 0.14);
  font-family: Orbitron, Montserrat, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.stage__brand {
  position: relative;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
  transform-style: preserve-3d;
  transform: perspective(1000px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translate3d(var(--parallax-x), var(--parallax-y), 0);
}

.stage__brand::before {
  content: "";
  position: absolute;
  inset: -60px;
  background:
    radial-gradient(circle at 50% 50%, rgba(120, 220, 255, 0.14), rgba(0, 0, 0, 0) 60%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0) 62%);
  filter: blur(22px);
  opacity: 0.70;
  pointer-events: none;
}

.stage__brand-outline,
.stage__brand-fill {
  grid-area: 1 / 1;
  font-size: clamp(56px, 14vw, 140px);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.05;
  text-align: center;
  white-space: nowrap;
  font-family: Orbitron, Montserrat, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Wireframe/outline (assembly start) */
.stage__brand-outline {
  color: transparent;
  -webkit-text-stroke: 2px rgba(120, 220, 255, 0.75);
  text-shadow:
    0 0 18px rgba(120, 220, 255, 0.22),
    0 0 60px rgba(120, 220, 255, 0.16),
    0 0 120px rgba(120, 220, 255, 0.10);
  opacity: 0;
}

/* Reflective fill (assembly end) */
.stage__brand-fill {
  /* Dark Glass: black face with subtle cyan internal reflections */
  background:
    linear-gradient(115deg,
      rgba(0, 0, 0, 0.62) 0%,
      rgba(18, 24, 32, 0.44) 18%,
      rgba(0, 0, 0, 0.66) 40%,
      rgba(10, 26, 38, 0.42) 62%,
      rgba(0, 0, 0, 0.70) 100%
    );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow:
    0 0 14px rgba(120, 220, 255, 0.12),
    0 0 42px rgba(120, 220, 255, 0.10),
    0 30px 120px rgba(0, 0, 0, 0.85);
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  position: relative;
}

.stage__brand-fill::after {
  content: "";
  position: absolute;
  inset: -40% -30%;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.22) 45%, rgba(120, 200, 255, 0.10) 55%, rgba(255, 255, 255, 0) 100%);
  transform: translateX(-120%);
  mix-blend-mode: screen;
  opacity: 0.65;
  pointer-events: none;
}

.stage__brand-fill::before {
  content: "";
  position: absolute;
  inset: -20px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 35%, rgba(120, 220, 255, 0.12), rgba(0, 0, 0, 0) 58%),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0) 64%);
  opacity: 0.60;
  filter: blur(16px);
  pointer-events: none;
}

/* Shockwave ring */
.stage__shock {
  position: absolute;
  inset: -30vmax;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.0);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 0 120px rgba(120, 200, 255, 0.16);
  opacity: 0;
  transform: scale(0.72);
  mix-blend-mode: screen;
  pointer-events: none;
}

/* Run the cinematic sequence only after the stage is shown */
.stage.stage--live .stage__brand {
  animation: stageBreath 6.2s ease-in-out infinite;
}

.stage.stage--live .stage__brand-outline {
  animation: outlineIn 850ms ease-out 80ms forwards;
}

.stage.stage--live .stage__brand-fill {
  animation: fillSweep 1150ms cubic-bezier(0.22, 0.9, 0.2, 1) 420ms forwards;
}

.stage.stage--live .stage__brand-fill::after {
  animation: chromeSweep 2600ms ease-in-out 1200ms infinite;
}

.stage.stage--live .stage__shock {
  animation: shockwave 900ms ease-out 950ms forwards;
}

@keyframes outlineIn {
  0% {
    opacity: 0;
    transform: translate3d(0, 10px, 0) scale(0.985);
    filter: blur(0.8px);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes fillSweep {
  0% {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    transform: translate3d(0, 8px, 0) scale(0.992);
    filter: blur(1px);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@keyframes shockwave {
  0% {
    opacity: 0;
    transform: scale(0.70);
    border-color: rgba(255, 255, 255, 0.0);
  }
  20% {
    opacity: 0.9;
    border-color: rgba(255, 255, 255, 0.12);
  }
  100% {
    opacity: 0;
    transform: scale(1.05);
    border-color: rgba(120, 200, 255, 0.0);
  }
}

@keyframes stageBreath {
  0% {
    transform: perspective(1000px) rotateX(calc(var(--tilt-x) + 1.6deg)) rotateY(calc(var(--tilt-y) - 1.6deg)) translate3d(var(--parallax-x), var(--parallax-y), 0);
  }
  50% {
    transform: perspective(1000px) rotateX(calc(var(--tilt-x) - 1.6deg)) rotateY(calc(var(--tilt-y) + 1.6deg)) translate3d(var(--parallax-x), calc(var(--parallax-y) - 7px), 0);
  }
  100% {
    transform: perspective(1000px) rotateX(calc(var(--tilt-x) + 1.6deg)) rotateY(calc(var(--tilt-y) - 1.6deg)) translate3d(var(--parallax-x), var(--parallax-y), 0);
  }
}

@keyframes chromeSweep {
  0% {
    transform: translateX(-120%) rotate(8deg);
    opacity: 0.0;
  }
  18% {
    opacity: 0.55;
  }
  45% {
    transform: translateX(120%) rotate(8deg);
    opacity: 0.35;
  }
  100% {
    transform: translateX(120%) rotate(8deg);
    opacity: 0;
  }
}

@keyframes scanDrift {
  0% { transform: translateY(0); }
  100% { transform: translateY(-40px); }
}

@keyframes fogDrift {
  0% {
    transform: translate3d(-10px, 10px, 0) scale(1);
    opacity: 0.65;
  }
  50% {
    transform: translate3d(12px, -8px, 0) scale(1.03);
    opacity: 0.82;
  }
  100% {
    transform: translate3d(-10px, 10px, 0) scale(1);
    opacity: 0.65;
  }
}

@keyframes particlesFloat {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(0, -90px, 0);
  }
}

.stage__note {
  position: absolute;
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(12, 12, 14, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 18px 40px rgba(0, 0, 0, 0.7);
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  line-height: 1.45;
}

.bg {
  position: absolute;
  inset: -20vmax;
  background:
    radial-gradient(closest-side at 20% 25%, rgba(120, 220, 255, 0.10), rgba(0, 0, 0, 0) 60%),
    radial-gradient(closest-side at 80% 30%, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0) 65%),
    radial-gradient(closest-side at 50% 85%, rgba(120, 140, 255, 0.10), rgba(0, 0, 0, 0) 70%),
    radial-gradient(closest-side at 50% 50%, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0) 55%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.98), rgba(0, 0, 0, 1));
  filter: saturate(115%);
}

.bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 35%, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0) 55%),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0) 60%);
  filter: blur(10px);
  opacity: 0.8;
}

.panel {
  position: relative;
  width: min(560px, 100%);
  border-radius: 18px;
  background: rgba(12, 12, 14, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 24px 60px rgba(0, 0, 0, 0.65),
    0 0 50px rgba(120, 200, 255, 0.09);
  overflow: hidden;
}

.panel__header {
  padding: 18px 18px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0));
}

.panel__title {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.3px;
}

.panel__subtitle {
  margin: 8px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.70);
}

.panel__content {
  padding: 16px 18px 18px;
}

.perm__text {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  line-height: 1.45;
}

.perm__list {
  margin: 0 0 14px 18px;
  padding: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.6;
}

.perm__actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: 2px solid rgba(120, 200, 255, 0.55);
  outline-offset: 2px;
}

.perm__hint {
  margin: 12px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.45;
}

.status {
  display: grid;
  gap: 10px;
  padding: 10px 0 0;
}

.status__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.status__label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
}

.status__value {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

@media (max-width: 420px) {
  .panel {
    width: 100%;
    border-radius: 16px;
  }

  .panel__content {
    padding: 14px 14px 16px;
  }

  .panel__header {
    padding: 16px 14px 10px;
  }
}
