﻿/* ============================================================
   NRC IA — CENA 01 · HERO PREMIUM
   Vídeo cinematográfico · Imóveis de luxo + Produção audiovisual
   Escopo isolado: .hero-premium, .hbtn
   ============================================================ */

/* ---------- SHELL ---------- */
.hero-premium {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 100vh;
  background: #070A10;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
}

/* ---------- VIDEO BG ---------- */
.hero-premium__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-premium__vid {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}
/* Fallback cor caso vídeo não carregue */
.hero-premium__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #0B1120;
  z-index: -1;
}

/* Overlay em gradiente — profundidade cinematográfica */
.hero-premium__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(9, 18, 28, 0.96) 0%,
    rgba(9, 18, 28, 0.75) 30%,
    rgba(9, 18, 28, 0.25) 55%,
    rgba(9, 18, 28, 0.05) 100%
  );
}

/* ---------- INNER ---------- */
.hero-premium__inner {
  position: absolute;
  bottom: 12svh;
  left: 40px;
  right: 40px;
  z-index: 2;
}

/* ---------- TÍTULO WORD-REVEAL ---------- */
.hero-title {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: clamp(42px, 9.5vw, 92px);
  font-weight: 300;
  line-height: 1.06;
  color: #C5D5E8;
  letter-spacing: -0.03em;
  max-width: 90vw;
  margin: 0;
  font-optical-sizing: auto;
  font-variation-settings: 'opsz' 9, 'wght' 300;
  text-shadow:
    0 0 120px rgba(9, 18, 28, 0.9),
    0 2px 8px rgba(9, 18, 28, 0.6);
}

.hero-word {
  display: inline-block;
  overflow: hidden;
  line-height: 1.15;
  vertical-align: bottom;
  margin-right: 0.24em;
}

.hero-word span {
  display: inline-block;
  padding-bottom: 0.05em;
}

/* ---------- LABEL ---------- */
.hero-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: #8B97A8;
  letter-spacing: 0.22em;
  margin-top: 22px;
  display: block;
  text-transform: uppercase;
  opacity: 0.8;
}

/* ---------- DEPTH ELEMENTS ---------- */
.hero-depth-tr {
  position: absolute;
  top: 80px;
  right: 24px;
  z-index: 3;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: #8B97A8;
  letter-spacing: 0.15em;
  opacity: 0;
  pointer-events: none;
}
.hero-depth-br {
  position: absolute;
  bottom: 40px;
  right: 24px;
  z-index: 3;
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  color: #8B97A8;
  letter-spacing: 0.1em;
  opacity: 0;
  pointer-events: none;
}

/* ---------- SCROLL INDICATOR ---------- */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.scroll-indicator span {
  display: none;
}

.scroll-line {
  width: 1px;
  height: 0;
  background: #8B97A8;
  opacity: 0.5;
  margin: 0 auto;
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%   { height: 0;    opacity: 1; }
  70%  { height: 28px; opacity: 1; }
  100% { height: 28px; opacity: 0; }
}

/* ---------- KICKER ---------- */
.hero-premium__kicker {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(245, 241, 234, 0.45);
  text-transform: uppercase;
  margin-bottom: 18px;
  display: block;
}

/* ---------- TÍTULO ---------- */
.hero-premium__title {
  font-family: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(38px, 12vw, 100px);
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -0.025em;
  color: var(--branco-filme, #F5F1EA);
  margin-bottom: 14px;
}
.hero-premium__title em {
  font-style: italic;
  font-weight: 400;
  color: #5BC0EB;
}

/* ---------- SUBHEADLINE ---------- */
.hero-premium__sub {
  font-family: var(--mono);
  font-size: clamp(12px, 3.2vw, 16px);
  letter-spacing: 0.03em;
  color: rgba(245, 241, 234, 0.72);
  margin-bottom: 10px;
}

/* ---------- BODY (visível só no desktop) ---------- */
.hero-premium__body {
  font-family: var(--sans, 'Inter', sans-serif);
  font-size: 14px;
  line-height: 1.65;
  color: rgba(245, 241, 234, 0.5);
  max-width: 480px;
  margin-bottom: 36px;
  display: none;
}

/* ---------- CTAs ---------- */
.hero-premium__ctas {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.hbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 2px;
  transition:
    background 220ms ease,
    color 220ms ease,
    border-color 220ms ease,
    transform 100ms ease;
  white-space: nowrap;
}
.hbtn:active { transform: scale(0.97); }

.hbtn--primary {
  background: #5BC0EB;
  color: #07111F;
  border: 1px solid #5BC0EB;
  font-weight: 500;
}
.hbtn--primary:hover {
  background: #3AAED8;
  border-color: #3AAED8;
  color: #07111F;
}

.hbtn--secondary {
  background: transparent;
  color: var(--branco-filme, #F5F1EA);
  border: 1px solid rgba(91, 192, 235, 0.35);
}
.hbtn--secondary:hover {
  border-color: #5BC0EB;
  color: #5BC0EB;
}

/* ---------- TABLET ---------- */
@media (min-width: 768px) {
  .hero-premium__inner { left: 56px; right: 56px; }
  .hero-premium__kicker { font-size: 11px; margin-bottom: 22px; }
  .hbtn { padding: 16px 34px; font-size: 12px; }
}

/* ---------- DESKTOP ---------- */
@media (min-width: 1024px) {
  .hero-premium__inner { left: 64px; right: 64px; }
}

/* ---------- MOBILE ---------- */
@media (max-width: 768px) {
  .hero-premium__inner { left: 24px; right: 24px; bottom: 18svh; }
  .hero-title { font-size: clamp(40px, 10vw, 58px); }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  .hbtn { transition: none; }
  .scroll-line { animation: none; height: 28px; }
}


/* ---------- HERO SHELL ---------- */
.cena-01 {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh; /* iOS Safari */
  background: var(--bg-dominante);
  color: var(--texto-primario);
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  font-family: var(--font-ui);
}

/* ---------- TOGGLE MODO (sticky) ---------- */
.toggle-modo {
  position: sticky;
  /* Fica abaixo da topbar fixa existente (~64px) */
  top: calc(var(--topbar-h, 64px) + 12px);
  z-index: 90;
  align-self: center;
  display: inline-grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 220px;
  height: 38px;
  padding: 0 6px;
  margin-top: 12px;
  background: rgba(11, 31, 58, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(91, 192, 235, 0.2);
  border-radius: 999px;
  transition: background var(--duration-toggle) var(--ease-cinema),
              border-color var(--duration-toggle) var(--ease-cinema);
}
[data-modo="filme"] .toggle-modo {
  background: rgba(10, 20, 38, 0.6);
  border-color: rgba(212, 165, 116, 0.25);
}

.toggle-modo button {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--cinza-1);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 6px 10px;
  transition: color var(--duration-micro) var(--ease-cinema);
}
.toggle-modo button[aria-selected="true"] {
  color: var(--texto-primario);
}

/* Trilho com bolinha que desliza */
.toggle-trilho {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-dominante);
  box-shadow: 0 0 12px var(--accent-dominante);
  transform: translateX(0);
  transition: transform var(--duration-toggle) var(--ease-cinema),
              background var(--duration-toggle) var(--ease-cinema),
              box-shadow var(--duration-toggle) var(--ease-cinema);
}
[data-modo="filme"] .toggle-trilho {
  transform: translateX(0); /* o trilho fica fixo ao centro do grid; o efeito visual de slide vem por translateX adicional via JS */
}
/* Slide horizontal real: aplicado pelo JS adicionando classe */
.toggle-modo.is-filme .toggle-trilho { transform: translateX(8px); }
.toggle-modo.is-planta .toggle-trilho { transform: translateX(-8px); }

@media (max-width: 767px) {
  .toggle-modo { width: 180px; height: 34px; }
  .toggle-modo button { font-size: 10px; padding: 5px 8px; }
}

/* ---------- CANVAS 3D ---------- */
#hero-3d-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
#hero-3d-canvas canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* ---------- CONTEÚDO EDITORIAL ---------- */
.hero-conteudo {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: var(--space-9) var(--space-9);
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

.hero-titulo {
  font-family: var(--font-editorial);
  font-size: clamp(36px, 8vw, 88px);
  line-height: 1.05;
  font-weight: 600;
  color: var(--texto-primario);
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 14ch;
  transition: color var(--duration-toggle) var(--ease-cinema);
}
.hero-titulo em {
  font-style: italic;
  font-weight: 600;
  color: var(--accent-dominante);
  transition: color var(--duration-toggle) var(--ease-cinema);
}

.hero-mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--cinza-1);
  margin-top: var(--space-5);
  margin-bottom: 0;
  text-transform: uppercase;
}

.hero-ctas {
  display: flex;
  gap: var(--space-5);
  flex-wrap: wrap;
  margin-top: var(--space-7);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: 1px solid var(--accent-dominante);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--texto-primario);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--duration-micro) var(--ease-cinema),
              color var(--duration-micro) var(--ease-cinema),
              transform 100ms var(--ease-cinema),
              border-color var(--duration-micro) var(--ease-cinema);
}
.cta-imovel { border-color: var(--azul-linha); }
.cta-imovel:hover {
  background: var(--azul-linha);
  color: var(--azul-cianotipia);
}
.cta-filme { border-color: var(--dourado-lampada); }
.cta-filme:hover {
  background: var(--dourado-lampada);
  color: var(--azul-cinema);
}
.cta:active { transform: scale(0.97); }

/* ---------- RESPONSIVO ---------- */
@media (min-width: 1024px) {
  .hero-conteudo {
    padding-left: var(--space-9);
    padding-right: 50%;
    align-items: flex-start;
  }
  #hero-3d-canvas { left: 50%; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hero-conteudo {
    align-items: center;
    text-align: center;
    padding: var(--space-8) var(--space-6);
  }
  .hero-titulo { max-width: none; }
  #hero-3d-canvas { opacity: 0.5; }
}

@media (max-width: 767px) {
  .hero-conteudo {
    align-items: center;
    text-align: center;
    padding: var(--space-7) var(--space-5);
  }
  .hero-titulo {
    max-width: none;
    font-size: clamp(32px, 11vw, 56px);
  }
  .hero-mono { font-size: 11px; }
  #hero-3d-canvas { opacity: 0.4; }
  .hero-ctas {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
    gap: var(--space-3);
  }
  .cta { width: 100%; }
}

/* ---------- EASTER EGG (REC) ---------- */
.hero-rec-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 3;
  pointer-events: none;
  transition: background 400ms var(--ease-cinema);
}
.hero-rec-overlay.is-active {
  background: rgba(0, 0, 0, 0.08);
}

.hero-rec-chip {
  position: absolute;
  top: calc(var(--topbar-h, 64px) + 16px);
  right: 20px;
  z-index: 91;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--vermelho-rec);
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 400ms var(--ease-cinema);
  pointer-events: none;
}
.hero-rec-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--vermelho-rec);
  animation: hero-rec-blink 2s infinite var(--ease-cinema);
}
.hero-rec-chip.is-visible { opacity: 1; }

@keyframes hero-rec-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .toggle-trilho,
  .cta,
  .hero-titulo,
  .hero-titulo em { transition: none !important; }
  .hero-rec-chip::before { animation: none; }
}
