/**
 * ESTILOS GLOBAIS E ESTRUTURA DO CANVAS
 * Projeto: Modéstia Joias (Método "COPY" v13 PRO MAX ULTRA)
 */

@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: var(--font-body);
  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 (Oculto no normal, revelado estritamente por Tab via :focus-visible) */
.skip-link {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translate(-50%, -250%);
  background: var(--accent-gold);
  color: #060609;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  z-index: 9999;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--transition-fast), opacity var(--transition-fast) ease;
}

.skip-link:focus-visible {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
  outline: 3px solid #FFFFFF;
  outline-offset: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   BACKDROP CINEMÁTICO v13 (Camadas Ambientais)
   ═══════════════════════════════════════════════════════════════ */
.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: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: opacity 0.8s ease;
  z-index: 1;
  transform: scale(1.05);
}

/* Camada 2: Vídeo em Loop (Carregamento assíncrono pós-LCP) */
.ambient-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 2;
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none;
}

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

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

/* Camada 4: Orbes de Glow Ouro Nobre */
.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(248, 248, 124, 0.05) 55%, transparent 75%);
  filter: blur(80px);
  z-index: 4;
  opacity: 0.65;
}

.ambient-glow-bottom {
  position: absolute;
  bottom: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 217, 107, 0.20) 0%, rgba(248, 248, 124, 0.03) 50%, transparent 75%);
  filter: blur(95px);
  z-index: 4;
  opacity: 0.50;
}

/* ═══════════════════════════════════════════════════════════════
   CANVAS PRINCIPAL (Mobile-First 440px / 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 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Transformação para Cartão Flutuante no Desktop (≥600px) */
@media (min-width: 600px) {
  body {
    padding: 40px 16px 60px 16px;
    align-items: center;
  }

  .experience-canvas {
    background: var(--bg-surface);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-floating);
    padding: 36px 24px 44px 24px;
  }
}

/* Toast de Notificação */
.toast-box {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: rgba(14, 14, 20, 0.95);
  border: 1px solid var(--border-gold-subtle);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text-primary);
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.8);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.toast-box.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.toast-box svg {
  color: var(--accent-gold);
}
