/* ============================================================
   hero.css  ·  AGENTE 2  —  Header fixo + Hero + Marquee
   Usa SOMENTE tokens do design system (css/base.css).
   Mobile-first · breakpoints 640 / 900 / 1024
   ============================================================ */

/* ---------- HEADER FIXO ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(10, 10, 11, 0.7);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
  transition: background var(--duration) var(--ease-out),
              border-color var(--duration) var(--ease-out);
}

.site-header.scrolled {
  background: rgba(10, 10, 11, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.site-header__logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.site-header__logo img {
  height: 36px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-inline: auto;
}

.site-nav__link {
  position: relative;
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 999px;
  transition: color var(--duration) var(--ease-out);
}

.site-nav__link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration) var(--ease-out);
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  color: var(--text);
}

.site-nav__link:hover::after,
.site-nav__link:focus-visible::after {
  transform: scaleX(1);
}

.site-header__cta {
  flex-shrink: 0;
  padding: 12px 22px;
  min-height: 44px;
  font-size: 15px;
}

/* Screen-reader only (H1 oculto — logo é o elemento visual principal) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding-top: calc(72px + clamp(48px, 9vw, 96px));
  padding-bottom: 0;
  isolation: isolate;
}

/* Vídeo de fundo cinematográfico — acima do fallback, abaixo do overlay */
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: -2;
  pointer-events: none;
}

/* Overlay de contraste sobre o vídeo (garante AA + transição para --bg) */
.hero__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 11, 0.35) 0%,
    rgba(10, 10, 11, 0.15) 35%,
    rgba(10, 10, 11, 0.78) 78%,
    var(--bg) 100%
  );
}

/* Marca (topo da composição central) */
.hero__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: none;
}

.hero__logo-mark {
  width: clamp(150px, 17vw, 230px);
  max-width: none;
  filter: drop-shadow(0 0 24px rgba(243, 146, 0, 0.35));
  animation: hero-logo-in 1.2s var(--ease-out);
}

/* Headline principal — a estrela do hero */
.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 6.6vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  background: linear-gradient(180deg, #ffffff 20%, rgba(247, 247, 245, 0.68) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 2px 18px rgba(10, 10, 11, 0.6));
}

.hero__title .accent {
  background: linear-gradient(180deg, var(--accent-hover) 10%, var(--accent) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Subtítulo: consequência da dor + promessa */
.hero__sub {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 560px;
  margin: -6px 0 0;
  text-shadow: 0 1px 12px rgba(10, 10, 11, 0.8);
}

@keyframes hero-logo-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Fundo decorativo (fallback do vídeo) */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  pointer-events: none;
}

/* Sol atrás da montanha — gradiente radial laranja sutil no topo-centro */
.hero__sun {
  position: absolute;
  top: -18%;
  left: 50%;
  width: min(1100px, 130vw);
  height: min(900px, 100vw);
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at 50% 40%,
    rgba(243, 146, 0, 0.10) 0%,
    rgba(243, 146, 0, 0.05) 34%,
    transparent 64%
  );
}

/* Grid fino de linhas com mask radial */
.hero__grid {
  position: absolute;
  inset: -10% -10% 0 -10%;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 24%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 24%, #000 0%, transparent 78%);
  opacity: 0.6;
}

/* Orbes de brilho sutis */
.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}

.hero__orb--a {
  top: 12%;
  left: -6%;
  width: 320px;
  height: 320px;
  background: var(--accent-glow);
}

.hero__orb--b {
  bottom: 8%;
  right: -8%;
  width: 380px;
  height: 380px;
  background: rgba(243, 146, 0, 0.10);
}

/* Conteúdo — composição central única (marca → headline → CTAs → scroll) */
.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 26px;
  width: 100%;
  max-width: 920px;
  flex: 1 0 auto;
  justify-content: center;
  padding-top: clamp(76px, 10svh, 120px);
  padding-bottom: clamp(16px, 3vh, 36px);
}

/* CTAs */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 2px;
}

/* Indicador "role para baixo" */
.hero__scroll {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  min-height: 44px;
  color: var(--text-muted);
  text-align: center;
  transition: color var(--duration) var(--ease-out);
}

.hero__scroll:hover,
.hero__scroll:focus-visible {
  color: var(--text);
}

/* Seta para baixo — sobe e desce apontando para a próxima seção */
.hero__scroll-arrow {
  color: var(--accent);
  filter: drop-shadow(0 0 14px rgba(243, 146, 0, 0.45));
  animation: hero-arrow-bob 1.5s ease-in-out infinite;
}

.hero__scroll-copy {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.4;
  text-shadow: 0 1px 12px rgba(10, 10, 11, 0.8);
}

/* Sobe e desce (bounce vertical) */
@keyframes hero-arrow-bob {
  0%, 100% { transform: translateY(-4px); }
  50%      { transform: translateY(6px); }
}

/* ---------- MARQUEE ---------- */
.hero__marquee {
  width: 100%;
  margin-top: clamp(40px, 7vw, 80px);
  padding: 22px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(16, 16, 20, 0.4);
  flex-shrink: 0;
  /* fade nas bordas */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.marquee-item {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color var(--duration) var(--ease-out);
  cursor: default;
}

.marquee-item:hover {
  color: var(--accent);
}

.marquee-star {
  display: inline-flex;
  align-items: center;
  color: var(--accent);
  opacity: 0.75;
}

.marquee-star svg {
  display: block;
}

/* ---------- RESPONSIVO ---------- */

/* ≤900px: some a nav, ficam logo + CTA */
@media (max-width: 900px) {
  .site-nav {
    display: none;
  }

  .site-header__inner {
    min-height: 64px;
  }

  .hero {
    padding-top: calc(64px + clamp(40px, 12vw, 72px));
  }
}

/* ≤640px: hero mais compacto */
@media (max-width: 640px) {
  .hero__inner {
    gap: 22px;
    max-width: 100%;
  }

  .hero__actions {
    width: 100%;
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .hero__logo-mark {
    width: clamp(150px, 44vw, 200px);
  }

  .site-header__cta {
    padding: 11px 18px;
  }

  .hero__marquee {
    padding: 18px 0;
  }
}

/* ---------- ACESSIBILIDADE / MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero__logo-mark {
    opacity: 1;
    animation: none;
  }
  /* Exceção: a seta de scroll continua pulsando mesmo com movimento reduzido
     (o cliente quer a sinalização sempre viva). Vence o reset universal do
     base.css por especificidade + !important. */
  .hero__scroll-arrow {
    animation: hero-arrow-bob 1.5s ease-in-out infinite !important;
  }
}
