/* ==========================================================================
   SI² - Soluções Imobiliárias Integradas
   Página Web Temporária Institucional
   Design System & Estilos Globais
   ========================================================================== */

/* --- Variáveis Globais de Design --- */
:root {
  --color-gold: #c69b50;
  --color-gold-light: #dfba78;
  --color-gold-dark: #9c732d;
  --color-gold-glow: rgba(218, 178, 98, 0.35);
  
  --color-bronze: #7c4c23;
  --color-dark-bg: #05080c;
  
  --ease-cinematic: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset e Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--color-dark-bg);
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

/* --- Container de Imagem em Background com Parallax --- */
.parallax-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

.bg-skyline {
  position: absolute;
  top: -6%;
  left: -6%;
  width: 112%;
  height: 112%;
  background-image: url('../assets/images/skyline_bg.jpg');
  background-position: center bottom;
  background-size: cover;
  background-repeat: no-repeat;
  filter: brightness(0.85) contrast(1.1);
  will-change: transform;
  transform: translate3d(0, 0, 0);
  transition: opacity 1.2s var(--ease-smooth);
}

/* Overlay Escuro com Vinheta Cinematográfica */
.skyline-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(7, 11, 16, 0.45) 0%,
    rgba(4, 7, 11, 0.76) 60%,
    rgba(2, 4, 6, 0.94) 100%
  );
  z-index: 2;
}

/* Brilho Ambiente Dinâmico */
.ambient-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 90vw;
  max-width: 850px;
  height: 90vw;
  max-height: 850px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(218, 178, 98, 0.12) 0%, rgba(218, 178, 98, 0.03) 40%, transparent 70%);
  z-index: 3;
  animation: ambientPulse 8s ease-in-out infinite alternate;
}

/* --- Palco Principal Hero --- */
.hero-stage {
  position: relative;
  z-index: 10;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  perspective: 1200px;
}

/* Wrapper do Logotipo (Suporte a Efeito 3D Tilt) */
.brand-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s var(--ease-smooth);
  will-change: transform;
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  animation: logoEntrance 1.4s var(--ease-cinematic) 0.2s forwards;
}

/* Box do Logotipo sem Fundo de Card */
.logo-box {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(280px, 75vw, 520px);
  filter: 
    drop-shadow(0 0 30px rgba(218, 178, 98, 0.32))
    drop-shadow(0 10px 30px rgba(0, 0, 0, 0.9));
  transition: filter 0.4s ease, transform 0.4s ease;
}

.logo-box:hover {
  filter: 
    drop-shadow(0 0 45px rgba(218, 178, 98, 0.5))
    drop-shadow(0 12px 35px rgba(0, 0, 0, 0.95));
}

/* Imagem Base do Logotipo (Transparente e Otimizada) */
.brand-logo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform 0.5s var(--ease-cinematic);
}

.logo-box:hover .brand-logo {
  transform: scale(1.02);
}

/* Camada de Luz Animada Mascarada EXCLUSIVAMENTE nas Letras e Linhas */
.letter-light-sweep {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-mask-image: url('../assets/images/logotipo_sem_fundo.png');
  mask-image: url('../assets/images/logotipo_sem_fundo.png');
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  overflow: hidden;
  z-index: 3;
}

.letter-light-sweep::after {
  content: '';
  position: absolute;
  top: -60%;
  left: -120%;
  width: 260%;
  height: 220%;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 38%,
    rgba(255, 235, 170, 0.6) 46%,
    rgba(255, 255, 255, 1) 50%,
    rgba(255, 220, 130, 0.9) 54%,
    transparent 62%,
    transparent 100%
  );
  transform: rotate(-8deg);
  animation: shimmerSweepLetters 4.5s ease-in-out infinite;
  mix-blend-mode: screen;
}

/* Halo de Luz Dourada Traseira Suave */
.logo-back-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 130%;
  height: 130%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    ellipse at center,
    rgba(218, 178, 98, 0.28) 0%,
    rgba(218, 178, 98, 0.08) 42%,
    transparent 68%
  );
  filter: blur(40px);
  z-index: 1;
  pointer-events: none;
  animation: haloBreath 6s ease-in-out infinite alternate;
}

/* --- Keyframes de Animações --- */
@keyframes logoEntrance {
  0% {
    opacity: 0;
    transform: translateY(26px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* O feixe de luz viaja periodicamente apenas pela superfície das letras */
@keyframes shimmerSweepLetters {
  0% {
    transform: translate(-50%, -50%) rotate(-8deg);
  }
  30% {
    transform: translate(50%, 50%) rotate(-8deg);
  }
  100% {
    transform: translate(50%, 50%) rotate(-8deg);
  }
}

@keyframes ambientPulse {
  0% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
  }
}

@keyframes haloBreath {
  0% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(0.96);
  }
  100% {
    opacity: 0.95;
    transform: translate(-50%, -50%) scale(1.05);
  }
}

/* --- Responsividade (Smartphones, Tablets e Telas Menores) --- */
@media (max-width: 768px) {
  .logo-box {
    width: clamp(260px, 85vw, 420px);
  }

  .logo-back-glow {
    filter: blur(28px);
  }
}

@media (max-width: 480px) {
  .logo-box {
    width: clamp(240px, 90vw, 340px);
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .logo-box {
    width: clamp(200px, 45vh, 280px);
  }
}
