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

:root {
  /* Paleta oficial Invicta Filmes (Manual da Marca):
     #0737e8 azul · #000000 preto · #2b2b2b · #5b5b5b · #ededed */
  --bg: #000000;
  --bg2: #121212;
  --bg3: #1c1c1c;
  --gray-dark: #2b2b2b;
  --gray-mid: #5b5b5b;
  --border: rgba(237,237,237,0.1);
  --text: #ededed;
  --muted: rgba(237,237,237,0.45);
  --accent: #0737e8;
  --accent-light: #4d70ff; /* tom clareado do azul da marca p/ textos pequenos sobre preto */
  --accent-hover: #2a55ff;
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Inter', sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); overflow-x: hidden; }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem 3rem;
  background: rgba(0,0,0,0.85);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.6rem; letter-spacing: 0.08em;
  color: var(--text); text-decoration: none;
  display: flex; align-items: center;
}
.nav-logo span { color: var(--accent-light); }
.nav-logo img { height: 48px; width: auto; display: block; }
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: #ededed; background: var(--accent);
  padding: 0.55rem 1.4rem; text-decoration: none; transition: background 0.2s;
}
.nav-cta:hover { background: var(--accent-hover); }

/* hamburger (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span {
  display: block; width: 100%; height: 2px;
  background: var(--text); transition: transform 0.25s, opacity 0.2s;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed; top: 0; left: 0; right: 0; z-index: 99;
  padding: 6rem 1.5rem 2rem;
  background: rgba(0,0,0,0.97);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: none; flex-direction: column; gap: 0;
}
.mobile-menu.active { display: flex; }
.mobile-menu a {
  padding: 1.1rem 0;
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text); text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu .mobile-menu-cta { color: var(--accent-light); }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  min-height: 100svh; /* mobile: ignora a barra de URL que some ao rolar */
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 8rem 2rem 5rem;
  position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 80%, rgba(7,55,232,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 20% 20%, rgba(7,55,232,0.07) 0%, transparent 50%);
  pointer-events: none;
}
.hero-line {
  display: block;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--accent-light);
  margin-bottom: 1.5rem;
  opacity: 0; animation: up 0.8s 0.1s forwards;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(5rem, 12vw, 10rem);
  line-height: 0.92; letter-spacing: 0.02em;
  color: var(--text);
  opacity: 0; animation: up 0.9s 0.3s forwards;
}
.hero h1 em { color: var(--accent-light); font-style: normal; }
.hero h1 .hero-logo {
  width: clamp(220px, 55vw, 640px); max-width: 100%; height: auto;
  display: block; margin: 0 auto;
}
/* Quando o admin escolhe uma foto no lugar da logo do hero */
.hero h1 .hero-logo.hero-photo {
  width: clamp(220px, 60vw, 720px); max-width: 100%;
  max-height: 55vh; object-fit: cover;
  border-radius: 6px;
}
.hero-sub {
  margin-top: 1.8rem;
  font-size: 0.9rem; font-weight: 300; line-height: 1.8;
  color: var(--muted); max-width: 460px;
  opacity: 0; animation: up 0.9s 0.5s forwards;
}
.hero-btns {
  display: flex; gap: 1rem; margin-top: 3rem; justify-content: center;
  opacity: 0; animation: up 0.9s 0.7s forwards;
}
.btn-primary {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; padding: 1rem 2.2rem;
  background: var(--accent); color: #ededed; text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); }
.btn-ghost {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; padding: 1rem 2.2rem;
  border: 1px solid rgba(237,237,237,0.2); color: rgba(237,237,237,0.7);
  text-decoration: none; transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-light); }
@keyframes up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── MARQUEE ── */
.marquee-wrap {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0; overflow: hidden;
  background: var(--bg2);
}
.marquee-track {
  display: flex; gap: 3rem; width: max-content;
  animation: marquee 22s linear infinite;
}
.marquee-wrap:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  font-family: var(--font-display);
  font-size: 1.1rem; letter-spacing: 0.15em; white-space: nowrap;
  color: var(--muted);
}
.marquee-item span { color: var(--accent-light); margin: 0 0.5rem; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── SECTION COMMON ── */
.sec-label {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--accent-light); margin-bottom: 1rem;
  display: block;
}
.sec-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  line-height: 0.95; letter-spacing: 0.04em;
  color: var(--text);
}

/* ── MOSAIC ── */
.mosaic-section { padding: 5rem 0; container-type: inline-size; }
.mosaic-header {
  padding: 0 3rem 3rem;
  display: flex; align-items: flex-end; justify-content: space-between;
}
.mosaic-desc {
  font-size: 0.85rem; color: var(--muted); max-width: 260px;
  line-height: 1.7; text-align: right;
}
/* Todos os tiles mantêm 16:9 (proporção nativa das thumbs do YouTube);
   a variedade do mosaico vem do tamanho: tiles destaque 2×2 + tiles 1×1.
   A linha tem a altura exata de um tile 1×1, calculada da largura do container. */
.mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-flow: row dense;
  grid-auto-rows: calc((100vw - 9px) / 4 * 9 / 16);
  grid-auto-rows: calc((100cqw - 9px) / 4 * 9 / 16);
  gap: 3px;
}
.mosaic-item {
  position: relative; overflow: hidden;
  background: var(--bg3); cursor: pointer;
  aspect-ratio: 16 / 9;
}
.mosaic-item--big {
  grid-column: span 2; grid-row: span 2;
  aspect-ratio: auto; /* 2 colunas + 2 linhas ≈ 16:9, definido pelo grid */
}

.mosaic-thumb {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.7s cubic-bezier(0.25,0.46,0.45,0.94), filter 0.5s;
  filter: brightness(0.65) saturate(0.8);
}
.mosaic-item:hover .mosaic-thumb {
  transform: scale(1.08);
  filter: brightness(0.85) saturate(1);
}
.mosaic-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, transparent 40%, rgba(0,0,0,0.82) 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0; transition: opacity 0.4s;
}
.mosaic-item:hover .mosaic-overlay { opacity: 1; }
.mosaic-tag {
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--accent-light); margin-bottom: 0.3rem;
}
.mosaic-title {
  font-family: var(--font-display);
  font-size: 1.3rem; letter-spacing: 0.04em; color: #fff;
}
.mosaic-play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(0.75);
  width: 60px; height: 60px; border-radius: 50%;
  background: rgba(7,55,232,0.3);
  border: 1.5px solid rgba(77,112,255,0.7);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s, transform 0.35s;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.mosaic-play svg { width: 22px; height: 22px; fill: #ededed; margin-left: 4px; }
.mosaic-item:hover .mosaic-play { opacity: 1; transform: translate(-50%,-50%) scale(1); }

/* foco por teclado */
.mosaic-item:focus-visible {
  outline: 2px solid var(--accent-light); outline-offset: 2px;
}
.mosaic-item:focus-visible .mosaic-overlay { opacity: 1; }
.mosaic-item:focus-visible .mosaic-play { opacity: 1; transform: translate(-50%,-50%) scale(1); }

/* number badge */
.mosaic-num {
  position: absolute; top: 1rem; left: 1rem;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.25);
}

/* tile CTA — mesma célula 16:9 dos demais; leva ao catálogo completo */
.mosaic-cta {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.6rem; text-decoration: none;
  background: var(--bg3);
  border: 1px solid var(--border);
  transition: background 0.4s, border-color 0.4s;
}
.mosaic-cta-label {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted);
  text-align: center; padding: 0 1rem;
  transition: color 0.4s;
}
.mosaic-cta-arrow {
  font-size: 1.3rem; color: var(--accent-light);
  transition: transform 0.35s;
}
.mosaic-cta:hover, .mosaic-cta:focus-visible {
  background: rgba(7,55,232,0.12);
  border-color: rgba(77,112,255,0.5);
}
.mosaic-cta:hover .mosaic-cta-label { color: #fff; }
.mosaic-cta:hover .mosaic-cta-arrow { transform: translateX(4px); }

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.96);
  display: none; align-items: center; justify-content: center; flex-direction: column;
  padding: 2rem;
}
.lightbox.active { display: flex; }
.lb-inner {
  width: 100%; max-width: 1060px; aspect-ratio: 16/9; position: relative;
  animation: lbin 0.3s ease;
}
@keyframes lbin { from { opacity:0; transform:scale(0.95); } to { opacity:1; transform:scale(1); } }
.lb-inner iframe { width:100%; height:100%; border:none; border-radius:2px; }
.lb-close {
  position: absolute; top: -3.2rem; right: 0;
  background: none; border: none; color: rgba(255,255,255,0.5);
  font-size: 1.8rem; cursor: pointer; transition: color 0.2s; line-height: 1;
}
.lb-close:hover { color: #fff; }
.lb-label {
  margin-top: 1.5rem;
  font-family: var(--font-display); font-size: 1.2rem;
  color: rgba(255,255,255,0.5); letter-spacing: 0.06em;
}

/* ── SERVICES ── */
.services-section {
  padding: 7rem 3rem;
  border-top: 1px solid var(--border);
  display: grid; grid-template-columns: 1fr 1fr; gap: 6rem;
  max-width: 1400px; margin: 0 auto;
}
.services-right { display: flex; flex-direction: column; gap: 2.5rem; }
.service-card {
  padding: 2rem;
  border: 1px solid var(--border);
  background: var(--bg2);
  transition: border-color 0.3s, background 0.3s;
}
.service-card:hover { border-color: var(--accent); background: rgba(7,55,232,0.08); }
.service-icon {
  font-size: 1.6rem; margin-bottom: 1rem;
  color: var(--accent-light);
}
.service-name {
  font-family: var(--font-display);
  font-size: 1.4rem; letter-spacing: 0.06em;
  color: var(--text); margin-bottom: 0.75rem;
}
.service-items {
  list-style: none;
  font-size: 0.82rem; color: var(--muted); line-height: 2;
}
.service-items li::before { content: '— '; color: var(--accent-light); }

/* ── CLIENTS ── */
.clients-section {
  padding: 5rem 3rem;
  border-top: 1px solid var(--border);
  background: var(--bg2);
}
.clients-grid {
  margin-top: 3rem;
  display: flex; flex-wrap: wrap; gap: 0;
}
.client-pill {
  padding: 1rem 2rem;
  border: 1px solid var(--border);
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.08em;
  color: var(--muted); text-transform: uppercase;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  cursor: default;
  margin: -1px 0 0 -1px;
}
.client-pill:hover { color: var(--text); border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.03); }
/* Cliente com logo em imagem no lugar do nome */
.client-pill.has-logo { display: flex; align-items: center; justify-content: center; min-width: 140px; }
.client-pill.has-logo img {
  height: 36px; max-width: 150px; object-fit: contain;
  filter: grayscale(1); opacity: 0.65;
  transition: filter 0.25s, opacity 0.25s;
}
.client-pill.has-logo:hover img { filter: none; opacity: 1; }

/* ── ABOUT ── */
.about-section {
  padding: 7rem 3rem;
  border-top: 1px solid var(--border);
  display: grid; grid-template-columns: 1fr 1fr; gap: 6rem;
  align-items: center; max-width: 1400px; margin: 0 auto;
}
.about-text p {
  font-size: 0.92rem; color: var(--muted); line-height: 1.9; margin-top: 1.5rem;
}
.about-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3rem;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 3.5rem; letter-spacing: 0.02em; color: var(--accent-light); line-height: 1;
}
.stat-lbl {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); margin-top: 0.3rem;
}
.about-visual {
  aspect-ratio: 4/5; background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); position: relative; overflow: hidden;
}
.about-visual::before {
  content: var(--about-watermark, 'INVICTA');
  font-family: var(--font-display);
  font-size: 5rem; letter-spacing: 0.6em;
  color: rgba(255,255,255,0.04);
  position: absolute;
}
/* Quando o admin escolhe uma foto para o quadro do "Sobre" */
.about-visual.has-photo { background-size: cover; background-position: center; }
.about-visual.has-photo::before { content: none; }
.about-visual.has-photo .about-visual-inner { display: none; }
.about-visual-inner {
  text-align: center; z-index: 1;
  font-family: var(--font-display); letter-spacing: 0.08em;
  color: rgba(255,255,255,0.12); font-size: 1.2rem;
}

/* ── CONTACT ── */
.contact-section {
  padding: 8rem 3rem;
  text-align: center;
  border-top: 1px solid var(--border);
  position: relative; overflow: hidden;
  background: var(--bg);
}
.contact-section::before {
  content: '';
  position: absolute; width: 700px; height: 700px; border-radius: 50%;
  background: radial-gradient(circle, rgba(7,55,232,0.14) 0%, transparent 70%);
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  pointer-events: none;
}
.contact-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 7rem); line-height: 0.9; letter-spacing: 0.04em;
  margin: 1rem 0 1.5rem;
}
.contact-title em { color: var(--accent-light); font-style: normal; }
.contact-sub { font-size: 0.9rem; color: var(--muted); margin-bottom: 3rem; }
.contact-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── FOOTER ── */
footer {
  padding: 2rem 3rem;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.footer-logo { font-family: var(--font-display); font-size: 1.1rem; letter-spacing: 0.12em; color: rgba(255,255,255,0.3); }
.footer-copy { font-size: 0.7rem; color: rgba(255,255,255,0.2); letter-spacing: 0.06em; }

/* ── RESPONSIVE ── */
@media(max-width:900px){
  nav { padding: 1.2rem 1.5rem; }
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .hero { padding: 7rem 1.5rem 4rem; }
  /* mobile: 2 colunas; destaques 2×2 viram largura total — tudo 16:9 */
  .mosaic {
    grid-template-columns: repeat(2,1fr);
    grid-auto-rows: calc((100vw - 3px) / 2 * 9 / 16);
    grid-auto-rows: calc((100cqw - 3px) / 2 * 9 / 16);
  }
  .mosaic-header { flex-direction:column; gap:1rem; padding:0 1.5rem 2rem; }
  .mosaic-desc { text-align:left; max-width:100%; }
  .services-section, .about-section { grid-template-columns:1fr; gap:3rem; padding:4rem 1.5rem; }
  .contact-section { padding:5rem 1.5rem; }
  footer { flex-direction:column; gap:0.5rem; padding:1.5rem; text-align:center; }
  .clients-section { padding:4rem 1.5rem; }
}

/* telas de celular */
@media(max-width:560px){
  .hero { padding: 6.5rem 1.25rem 3.5rem; }
  .hero-sub { font-size: 0.85rem; }
  .hero-btns {
    flex-direction: column; align-items: stretch;
    width: 100%; max-width: 320px; margin-left: auto; margin-right: auto;
  }
  .btn-primary, .btn-ghost { text-align: center; }
  .marquee-item { font-size: 0.95rem; }
  /* tiles pequenos (2 colunas): overlay e badge mais compactos */
  .mosaic-overlay { padding: 0.8rem; }
  .mosaic-title { font-size: 1rem; }
  .mosaic-tag { font-size: 0.55rem; }
  .mosaic-num { top: 0.6rem; left: 0.6rem; }
  .mosaic-play { width: 46px; height: 46px; }
  .mosaic-play svg { width: 17px; height: 17px; }
  .about-stats { gap: 1rem; }
  .stat-num { font-size: 2.6rem; }
  .about-visual::before { font-size: 3rem; }
  .client-pill { padding: 0.8rem 1.3rem; font-size: 0.72rem; }
  .contact-btns { flex-direction: column; align-items: center; }
  .contact-btns a { width: 100%; max-width: 320px; text-align: center; }
  .lightbox { padding: 1rem; }
  .lb-close { top: -2.8rem; }
  .lb-label { font-size: 1rem; margin-top: 1rem; padding: 0 0.5rem; text-align: center; }
}

/* ── TOUCH (sem hover) ── */
/* Sem mouse não existe :hover: as thumbs ficariam sempre escuras e o
   título/tag nunca apareceriam. No touch, mostramos tudo por padrão. */
@media (hover: none) {
  .mosaic-thumb { filter: brightness(0.85) saturate(1); }
  .mosaic-overlay {
    opacity: 1;
    background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.85) 100%);
  }
  .mosaic-cta {
    background: rgba(7,55,232,0.12);
    border-color: rgba(77,112,255,0.5);
  }
  .mosaic-cta-label { color: var(--text); }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; }
  .hero-line, .hero h1, .hero-sub, .hero-btns { animation: none; opacity: 1; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
