/**
 * ESTILOS GLOBAIS E ESTRUTURA DO CANVAS
 * Projeto: Mumu Store (Método "O COPY" v13)
 */

@import url('./tokens.css');

/* Resets e Configurações Globais */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  color-scheme: dark;
  background-color: var(--bg-deep);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-deep);
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Acessibilidade: Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-gold);
  color: #000000;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  z-index: 9999;
  text-decoration: none;
  box-shadow: var(--shadow-elevation);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 16px;
  outline: 3px solid #FFFFFF;
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   BACKDROP CINEMÁTICO v13 (Camada Fixa de 4 Níveis)
   ═══════════════════════════════════════════════════════════════ */
.ambient-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background-color: var(--bg-deep);
}

/* Camada 1: Poster Estático Inicial (Anti-piscada e LQIP) */
.ambient-poster {
  position: absolute;
  inset: -10px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(28px) brightness(0.45) saturate(1.2);
  transform: scale(1.08);
  transition: opacity 0.8s ease;
  z-index: 1;
}

/* Camada 2: Vídeo de Fundo Cinemático */
.ambient-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: blur(24px) brightness(0.40) saturate(1.2);
  transform: scale(1.08);
  opacity: 0;
  transition: opacity 1.2s ease;
  z-index: 2;
}

.ambient-video.is-loaded {
  opacity: 1;
}

/* Camada 3: Overlay Escuro e Gradiente Radial */
.ambient-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(6, 6, 9, 0.65) 0%, rgba(6, 6, 9, 0.92) 80%, #060609 100%);
  z-index: 3;
}

/* Camada 4: Orbes de Glow Dourado (Topo e Base) */
.ambient-glow-top {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, rgba(224, 179, 69, 0.08) 50%, transparent 70%);
  filter: blur(80px);
  z-index: 4;
}

.ambient-glow-bottom {
  position: absolute;
  bottom: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224, 179, 69, 0.15) 0%, transparent 70%);
  filter: blur(90px);
  z-index: 4;
}

/* ═══════════════════════════════════════════════════════════════
   CANVAS PRINCIPAL (Mobile-First & Cartão Flutuante Desktop)
   ═══════════════════════════════════════════════════════════════ */
.experience-canvas {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: var(--canvas-max-width);
  margin: 0 auto;
  padding: 24px 18px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* No Desktop (≥ 600px): Vira Cartão Flutuante Sofisticado */
@media (min-width: 600px) {
  body {
    padding: 40px 16px;
  }

  .experience-canvas {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-floating);
    padding: 36px 24px 44px;
  }
}

/* Acessibilidade: Focus Ring Global */
:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 3px;
}
