/* ============================================================
   PHG Imóveis — Landing Page Stylesheet
   Autor: Desenvolvedor Front-end Sênior
   Descrição: Estilos modernos, responsivos (mobile-first) e
              prontos para integração futura com PHP.
   ============================================================ */

/* ============================================================
   1. IMPORTS & VARIÁVEIS GLOBAIS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700;800&display=swap');

/* Reset completo */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Paleta de cores */
  --color-whatsapp:      #25D366;
  --color-whatsapp-dark: #1ebe57;
  --color-overlay-top:   rgba(10, 12, 20, 0.45);
  --color-overlay-bot:   rgba(5, 7, 14, 0.85);
  --color-white:         #ffffff;
  --color-white-muted:   rgba(255, 255, 255, 0.70);
  --color-gold:          #c9a84c;
  --color-gold-light:    #f0d080;

  /* Tipografia */
  --font-main: 'Montserrat', sans-serif;

  /* Transições */
  --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background: #0a0c14;
  color: var(--color-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   2. HERO SECTION — Vídeo em tela cheia (100vh)
   ============================================================ */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ---------- Vídeo de fundo ---------- */
.hero__video {
  position: absolute;
  inset: 0;               /* top/right/bottom/left = 0 */
  width: 100%;
  height: 100%;
  object-fit: cover;      /* Cobre todo o container sem distorcer */
  object-position: center;
  pointer-events: none;   /* Impede qualquer interação do usuário com o vídeo */
  z-index: 0;
}

/* ---------- Overlay escuro semi-transparente ---------- */
.hero__overlay {
  position: absolute;
  inset: 0;
  /* Gradiente sutil de baixo para cima para dar profundidade */
  background: linear-gradient(
    to top,
    var(--color-overlay-bot) 0%,
    rgba(10, 12, 20, 0.60) 50%,
    var(--color-overlay-top) 100%
  );
  z-index: 1;
}

/* ---------- Conteúdo centralizado sobre o vídeo ---------- */
.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.8rem;
  padding: 1.5rem;
  text-align: center;
  /* Sem animation aqui — visibilidade controlada via JS (classes abaixo) */
}

/* Oculto enquanto o vídeo ainda está tocando */
.hero__content--hidden {
  opacity: 0;
  pointer-events: none;         /* Não é clicável enquanto invisível */
  transform: translateY(24px);
}

/* Aparece com fade-in suave após o evento 'ended' do vídeo */
.hero__content--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 1.2s ease, transform 1.2s ease;
}

/* ============================================================
   3. LOGOMARCA
   ============================================================ */
.hero__logo-wrapper {
  /* Brilho dourado suave ao redor da logo */
  filter: drop-shadow(0 0 30px rgba(201, 168, 76, 0.38));
  transition: var(--transition-smooth);
}

.hero__logo-wrapper:hover {
  filter: drop-shadow(0 0 50px rgba(201, 168, 76, 0.60));
  transform: scale(1.03);
}

.hero__logo {
  /*
     clamp(valor-min, valor-preferido, valor-max)
     Mobile:  ~240px | Tablet: ~50vw | Desktop: max 400px
  */
  width: clamp(200px, 55vw, 400px);
  height: auto;
  display: block;
}

/* ============================================================
   4. LINHA DECORATIVA DOURADA
   ============================================================ */
.hero__divider {
  width: clamp(60px, 18vw, 120px);
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
  border: none;
}

/* ============================================================
   5. TAGLINE — Subtítulo (bom para SEO e branding)
   ============================================================ */
.hero__tagline {
  font-size: clamp(0.65rem, 2.2vw, 0.9rem);
  font-weight: 300;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-gold-light);
}

/* ============================================================
   5b. INTRO OVERLAY — Tela de entrada click-to-play
   ============================================================ */

/* Camada de fundo escura que cobre tudo antes do vídeo tocar */
.hero__intro {
  position: absolute;
  inset: 0;
  z-index: 10;                    /* Acima de tudo */
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    160deg,
    #0a0c18 0%,
    #111624 50%,
    #0d1020 100%
  );
  cursor: pointer;
  transition: opacity 0.8s ease;
  user-select: none;
}

/* Fade-out quando o usuário clica */
.hero__intro--hidden {
  opacity: 0;
  pointer-events: none;
}

/* Container interno centralizado */
.hero__intro-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
  padding: 2rem;
  text-align: center;
  animation: fadeInUp 0.9s ease both;
}

/* Logo no intro */
.hero__intro-logo {
  width: clamp(180px, 50vw, 360px);
  height: auto;
  display: block;
  filter: drop-shadow(0 0 28px rgba(201, 168, 76, 0.35));
}

/* Botão de play (círculo com triângulo) */
.hero__play-btn {
  width: clamp(64px, 14vw, 88px);
  height: clamp(64px, 14vw, 88px);
  position: relative;
  animation: playPulse 2s ease-in-out infinite;
}

.hero__play-btn svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.30));
  transition: filter 0.3s ease, transform 0.3s ease;
}

.hero__intro:hover .hero__play-btn svg {
  filter: drop-shadow(0 0 22px rgba(201, 168, 76, 0.70));
  transform: scale(1.08);
}

/* Texto "Clique para assistir" */
.hero__intro-label {
  font-size: clamp(0.7rem, 2.2vw, 0.9rem);
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.60);
}

/* ============================================================
   6. BOTÃO WHATSAPP — CTA Principal com animação de pulso
   ============================================================ */
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;

  /* Aparência */
  background: linear-gradient(135deg, #25D366 0%, #1da851 100%);
  color: var(--color-white);
  font-family: var(--font-main);
  font-size: clamp(0.85rem, 2.5vw, 1.05rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;

  /* Dimensões responsivas */
  padding: clamp(0.85rem, 2.5vw, 1.1rem) clamp(1.8rem, 5vw, 3rem);
  border-radius: 60px;
  border: none;
  cursor: pointer;

  /* Sombra colorida no verde WhatsApp */
  box-shadow:
    0 8px 30px rgba(37, 211, 102, 0.45),
    0 2px 8px rgba(0, 0, 0, 0.30);

  /* Animação de pulso infinita */
  animation: pulse 2s ease-in-out infinite;

  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  will-change: transform, box-shadow;
}

.btn-whatsapp:hover,
.btn-whatsapp:focus-visible {
  animation-play-state: paused; /* Pausa o pulso no hover — feedback mais limpo */
  background: linear-gradient(135deg, var(--color-whatsapp-dark) 0%, #178a42 100%);
  transform: translateY(-3px) scale(1.04);
  box-shadow:
    0 14px 42px rgba(37, 211, 102, 0.65),
    0 4px 12px rgba(0, 0, 0, 0.35);
  outline: none;
}

.btn-whatsapp:active {
  transform: translateY(0) scale(0.97);
}

/* Ícone do WhatsApp (SVG inline no HTML) */
.btn-whatsapp__icon {
  width: 1.35em;
  height: 1.35em;
  fill: currentColor;
  flex-shrink: 0;
}

/* ============================================================
   7. INDICADOR DE SCROLL — Seta animada no rodapé do hero
   ============================================================ */
.hero__scroll-indicator {
  position: absolute;
  bottom: 1.8rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  opacity: 0;
  animation: fadeIn 1s ease 1.3s both;
  cursor: pointer;
}

.hero__scroll-indicator span {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-white-muted);
  user-select: none;
}

.hero__scroll-indicator .scroll-arrow {
  width: 18px;
  height: 18px;
  border-right: 2px solid var(--color-white-muted);
  border-bottom: 2px solid var(--color-white-muted);
  transform: rotate(45deg);
  animation: bounce 1.6s ease-in-out infinite;
}

/* ============================================================
   8. SEÇÕES EXTRAS — Estrutura base pronta para PHP
   ============================================================ */
.section {
  padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 5vw, 2rem);
}

.section--dark {
  background: #0d0f1a;
}

.section--light {
  background: #111420;
}

.section__title {
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--color-white), var(--color-gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section__subtitle {
  text-align: center;
  color: var(--color-white-muted);
  font-size: clamp(0.85rem, 2vw, 1rem);
  font-weight: 300;
  margin-bottom: 2.5rem;
  line-height: 1.75;
}

/* ============================================================
   9. KEYFRAMES — Todas as animações
   ============================================================ */

/* Pulso suave no botão de play do intro */
@keyframes playPulse {
  0%, 100% { transform: scale(1);    opacity: 1;    }
  50%       { transform: scale(1.07); opacity: 0.85; }
}

/* Pulso — botão WhatsApp */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      0 8px 30px rgba(37, 211, 102, 0.45),
      0 2px 8px rgba(0, 0, 0, 0.30);
  }
  50% {
    transform: scale(1.055);
    box-shadow:
      0 10px 42px rgba(37, 211, 102, 0.72),
      0 4px 14px rgba(0, 0, 0, 0.35);
  }
}

/* Fade + slide de baixo para cima (entrada do hero__content) */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade simples */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Seta de scroll — bounce vertical */
@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); }
  50%       { transform: rotate(45deg) translate(4px, 4px); }
}

/* ============================================================
   10. RESPONSIVIDADE — Breakpoints (mobile-first)
   ============================================================ */

/* Tablet (>= 768px) */
@media (min-width: 768px) {
  .hero__content {
    gap: 2.2rem;
  }
}

/* Desktop (>= 1200px) */
@media (min-width: 1200px) {
  .hero__content {
    gap: 2.8rem;
  }
}

/* ============================================================
   11. ACESSIBILIDADE — Respeita preferência de movimento reduzido
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
