/* ==========================================================================
   VERSA — Agência de comunicação
   Folha de estilo única para a Home e as 9 páginas de case.
   Paleta e tipografia oficiais da marca.
   ========================================================================== */

/* ---------- Fontes ---------- */
@font-face {
  font-family: 'Wildgar';
  src: url('../fonts/Wildgar.woff') format('woff');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Wildgar';
  src: url('../fonts/Wildgar-Italic.woff') format('woff');
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins-ExtraLight.ttf') format('truetype');
  font-weight: 200; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins-Light.ttf') format('truetype');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins-Medium.ttf') format('truetype');
  font-weight: 500; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --preto:      #010101;
  --grafite:    #151515;
  --offwhite:   #FEFDF5;
  --terracota:  #C45231;
  --coral:      #DB6E4A;
  --ouro:       #F5C945;

  --linha:      rgba(254, 253, 245, 0.10);
  --linha-forte: rgba(254, 253, 245, 0.15);

  --gut:        clamp(20px, 5vw, 64px);   /* respiro lateral */
  --raio:       22px;
  --raio-media: 18px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--preto);
  color: var(--offwhite);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--terracota); color: var(--offwhite); }

/* Foco visível para navegação por teclado (acessibilidade) */
:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Link "pular para o conteúdo" */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--terracota);
  color: var(--offwhite);
  padding: 12px 20px;
  font-size: 14px;
}
.skip-link:focus { left: 0; }

/* ==========================================================================
   HEADER
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 20px var(--gut);
  background: rgba(1, 1, 1, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(254, 253, 245, 0.08);
}

.header__link {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}
.header__link:hover { color: var(--terracota); }
.header__link--esq { justify-self: start; }
.header__link--dir { justify-self: end; }

.header__logo {
  justify-self: center;
  display: flex;
  align-items: center;
  color: var(--offwhite);
  transition: color 0.3s ease;
}
.header__logo:hover { color: var(--terracota); }
.header__logo svg {
  height: 26px;
  width: auto;
  fill: currentColor;
}

/* ==========================================================================
   HERO (home)
   ========================================================================== */
.hero {
  position: relative;
  min-height: calc(100vh - 82px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px clamp(20px, 6vw, 80px) 96px;
  overflow: hidden;
}

.hero__titulo {
  position: relative;
  z-index: 1;
  font-family: 'Wildgar', Georgia, serif;
  font-weight: 400;
  font-style: normal;
  font-size: clamp(38px, 7.2vw, 108px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  max-width: 15ch;
  text-wrap: balance;
}
.hero__titulo em {
  font-style: italic;
  color: var(--terracota);
}

.hero__apoio {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  font-weight: 300;
  font-size: clamp(16px, 1.5vw, 21px);
  line-height: 1.6;
}

.hero__scroll {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.45;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: opacity 0.3s ease;
}
.hero__scroll:hover { opacity: 0.9; }
.hero__scroll::after {
  content: '';
  width: 1px;
  height: 34px;
  background: currentColor;
  animation: scroll-pulse 2.2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes scroll-pulse {
  0%, 100% { transform: scaleY(0.35); opacity: 0.4; }
  50%      { transform: scaleY(1);    opacity: 1; }
}

/* ==========================================================================
   SEÇÕES GENÉRICAS
   ========================================================================== */
.secao { padding: clamp(48px, 8vw, 120px) var(--gut); }

.secao__cabecalho {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.secao__titulo {
  font-family: 'Poppins', sans-serif;
  font-weight: 200;
  font-size: clamp(30px, 4.4vw, 62px);
  line-height: 1;
  letter-spacing: -0.01em;
}

.secao__apoio {
  font-weight: 300;
  font-size: 15px;
  max-width: 30ch;
  opacity: 0.6;
}

.rotulo {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--terracota);
  font-weight: 500;
}

/* ==========================================================================
   GRID DE CASES (home)
   ========================================================================== */
.cases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.4vw, 40px);
}

.case-card { display: flex; flex-direction: column; gap: 20px; }

.case-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 4.4;
  border-radius: var(--raio);
  overflow: hidden;
  background: var(--grafite);
}

.case-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.case-card:hover .case-card__media img { transform: scale(1.05); }

/* Véu que escurece no hover, dando destaque ao número */
.case-card__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(1, 1, 1, 0.45), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.case-card:hover .case-card__media::after { opacity: 1; }

.case-card__num {
  position: absolute;
  right: 18px;
  top: 16px;
  z-index: 2;
  font-size: 12px;
  letter-spacing: 0.12em;
  font-weight: 500;
  color: rgba(254, 253, 245, 0.9);
  text-shadow: 0 1px 8px rgba(1, 1, 1, 0.5);
}

.case-card__rodape {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
}

.case-card__nome {
  font-weight: 400;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.1;
  transition: color 0.3s ease;
}
.case-card:hover .case-card__nome { color: var(--terracota); }

.case-card__tipo {
  font-weight: 300;
  font-size: 13px;
  opacity: 0.55;
  text-align: right;
  max-width: 45%;
}

/* ==========================================================================
   QUEM SOMOS
   ========================================================================== */
.quem {
  padding: clamp(48px, 7vw, 110px) var(--gut) clamp(56px, 8vw, 120px);
}

.quem__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
  margin-bottom: clamp(44px, 6vw, 84px);
}

.quem__titulo {
  font-weight: 200;
  font-size: clamp(44px, 8vw, 128px);
  line-height: 0.92;
  letter-spacing: 0.01em;
}

.quem__texto { max-width: 56ch; }
.quem__texto p {
  font-weight: 300;
  font-size: clamp(17px, 1.7vw, 24px);
  line-height: 1.6;
}
.quem__texto p + p { margin-top: 22px; }
.quem__texto em {
  font-family: 'Wildgar', Georgia, serif;
  font-style: italic;
  font-weight: 400;
}
.quem__texto em.destaque { color: var(--terracota); }

/* ---------- Carrossel de logos de clientes ---------- */
.marquee {
  position: relative;
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
}

.marquee__trilha {
  display: flex;
  align-items: center;
  gap: clamp(40px, 5vw, 88px);
  width: max-content;
  /* Gira infinitamente, sem pausar no hover. */
  animation: marquee 40s linear infinite;
}

@keyframes marquee {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

.marquee__item {
  flex: 0 0 auto;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.marquee__item img {
  max-height: 120px;
  max-width: 180px;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}
.marquee__item img:hover { opacity: 1; }

/* ==========================================================================
   CTA
   ========================================================================== */
.cta {
  background: var(--preto);
  padding: clamp(80px, 14vw, 200px) clamp(20px, 6vw, 80px);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta__rotulo {
  position: relative; z-index: 1;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 500;
  opacity: 0.7;
  margin-bottom: 28px;
}

.cta__titulo {
  position: relative; z-index: 1;
  font-family: 'Wildgar', Georgia, serif;
  font-weight: 400;
  font-size: clamp(40px, 7.5vw, 116px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  max-width: 16ch;
  margin: 0 auto;
  text-wrap: balance;
}
.cta__titulo em { font-style: italic; color: var(--terracota); }

.cta__apoio {
  position: relative; z-index: 1;
  margin-top: 32px;
  font-weight: 300;
  font-size: clamp(16px, 1.6vw, 21px);
  line-height: 1.6;
  opacity: 0.85;
}

.botao {
  position: relative; z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 44px;
  padding: 18px 36px;
  border-radius: 999px;
  background: var(--terracota);
  color: var(--offwhite);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.04em;
  transition: background 0.25s ease, transform 0.25s ease;
}
.botao:hover {
  background: var(--coral);
  color: var(--offwhite);
  transform: translateY(-2px);
}
.botao span { font-size: 18px; line-height: 1; transition: transform 0.25s ease; }
.botao:hover span { transform: translateX(4px); }

/* ==========================================================================
   RODAPÉ
   ========================================================================== */
.rodape {
  background: var(--preto);
  padding: clamp(48px, 6vw, 88px) var(--gut) 40px;
}

.rodape__topo {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  flex-wrap: wrap;
  border-top: 1px solid var(--linha-forte);
  padding-top: clamp(40px, 5vw, 64px);
}

.rodape__marca { max-width: 30ch; }

.rodape__logo {
  display: inline-block;
  color: var(--offwhite);
  margin-bottom: 22px;
  transition: color 0.3s ease;
}
.rodape__logo:hover { color: var(--terracota); }
.rodape__logo svg { height: 34px; width: auto; fill: currentColor; }

.rodape__tagline {
  font-family: 'Wildgar', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.2;
}

.rodape__cols {
  display: flex;
  gap: clamp(40px, 6vw, 96px);
  flex-wrap: wrap;
}

.rodape__col { display: flex; flex-direction: column; gap: 12px; }

.rodape__col-titulo {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.45;
}

.rodape__col a {
  font-weight: 300;
  font-size: 15px;
  transition: color 0.3s ease;
}
.rodape__col a:hover { color: var(--terracota); }

.rodape__base {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 40px;
  font-size: 12px;
  opacity: 0.4;
}

/* ==========================================================================
   PÁGINA DE CASE
   ========================================================================== */
.case-abertura {
  padding: clamp(56px, 10vw, 130px) var(--gut) clamp(36px, 5vw, 64px);
}

.case-abertura .rotulo {
  letter-spacing: 0.28em;
  display: block;
  margin-bottom: 28px;
}

.case-abertura__nome {
  font-family: 'Wildgar', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(46px, 9vw, 148px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  max-width: 16ch;
  text-wrap: balance;
}

.case-abertura__categoria {
  margin-top: 28px;
  font-weight: 300;
  font-size: clamp(16px, 1.9vw, 24px);
  line-height: 1.5;
  color: var(--coral);
  max-width: 46ch;
}

/* ---------- Overview + Escopo ---------- */
.case-info {
  padding: clamp(24px, 4vw, 56px) var(--gut) clamp(48px, 7vw, 100px);
  border-top: 1px solid var(--linha);
}

.case-info__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 100px);
  align-items: start;
  padding-top: clamp(36px, 5vw, 64px);
}

.case-info .rotulo { display: block; margin-bottom: 28px; }

.case-overview { display: flex; flex-direction: column; gap: 22px; max-width: 62ch; }
.case-overview p {
  font-weight: 300;
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.72;
}

/* Nota editorial em destaque */
.case-nota {
  margin-top: 34px;
  max-width: 62ch;
  border-left: 2px solid var(--terracota);
  background: var(--grafite);
  padding: 26px 30px;
  border-radius: 0 14px 14px 0;
}
.case-nota p {
  font-family: 'Wildgar', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.5;
}

.case-escopo { position: sticky; top: 96px; }
.case-escopo ul { list-style: none; }
.case-escopo li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(254, 253, 245, 0.08);
  font-weight: 300;
  font-size: clamp(14px, 1.15vw, 16px);
  line-height: 1.45;
}
.case-escopo li::before {
  content: '';
  flex: 0 0 auto;
  width: 16px;
  height: 1px;
  background: var(--terracota);
  transform: translateY(-5px);
}

/* ---------- Galeria ---------- */
.case-galeria {
  padding: 0 var(--gut) clamp(56px, 8vw, 120px);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(14px, 1.6vw, 24px);
}

.galeria__item {
  border-radius: var(--raio-media);
  overflow: hidden;
  background: var(--grafite);
  cursor: zoom-in;
  border: 0;
  padding: 0;
  display: block;
  width: 100%;
}
.galeria__item--full { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.galeria__item--half { aspect-ratio: 4 / 5; }

.galeria__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.galeria__item:hover img { transform: scale(1.04); }

/* ---------- Próximo projeto ---------- */
.proximo {
  padding: clamp(40px, 6vw, 80px) var(--gut);
  border-top: 1px solid var(--linha);
}
.proximo__link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  transition: color 0.3s ease;
}
.proximo__link:hover { color: var(--terracota); }
.proximo__rotulo {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--terracota);
  font-weight: 500;
}
.proximo__nome {
  font-family: 'Wildgar', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(30px, 5vw, 68px);
  line-height: 1;
}
.proximo__nome span { display: inline-block; transition: transform 0.3s ease; }
.proximo__link:hover .proximo__nome span { transform: translateX(8px); }

/* ==========================================================================
   LIGHTBOX
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(1, 1, 1, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 5vw, 60px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox.aberto { opacity: 1; visibility: visible; }

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  transform: scale(0.96);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.lightbox.aberto img { transform: scale(1); }

.lightbox__fechar,
.lightbox__nav {
  position: absolute;
  background: none;
  border: 1px solid var(--linha-forte);
  color: var(--offwhite);
  width: 46px; height: 46px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.lightbox__fechar:hover,
.lightbox__nav:hover { background: var(--terracota); border-color: var(--terracota); }

.lightbox__fechar { top: 24px; right: 24px; }
.lightbox__nav--ant { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--prox { right: 24px; top: 50%; transform: translateY(-50%); }

/* ==========================================================================
   ANIMAÇÃO DE ENTRADA (revelar no scroll)
   ========================================================================== */
.revelar {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.revelar.visivel { opacity: 1; transform: none; }

/* atrasos em cascata para grids */
.revelar[data-atraso="1"] { transition-delay: 0.08s; }
.revelar[data-atraso="2"] { transition-delay: 0.16s; }
.revelar[data-atraso="3"] { transition-delay: 0.24s; }

/* ==========================================================================
   RESPONSIVO
   ========================================================================== */
@media (max-width: 900px) {
  .cases { grid-template-columns: repeat(2, 1fr); }
  .quem__grid { grid-template-columns: 1fr; gap: 32px; }
  .case-info__grid { grid-template-columns: 1fr; gap: 48px; }
  .case-escopo { position: static; }
}

@media (max-width: 620px) {
  .header { grid-template-columns: auto 1fr; row-gap: 14px; }
  .header__logo { justify-self: start; grid-row: 1; grid-column: 1; }
  .header__link--esq { grid-row: 2; grid-column: 1; }
  .header__link--dir { grid-row: 2; grid-column: 2; }

  .cases { grid-template-columns: 1fr; }
  .case-card__rodape { flex-direction: column; align-items: flex-start; gap: 4px; }
  .case-card__tipo { text-align: left; max-width: 100%; }

  .case-galeria { grid-template-columns: 1fr; }
  .galeria__item--full { aspect-ratio: 4 / 3; }
  .galeria__item--half { aspect-ratio: 4 / 5; }

  .marquee__trilha { animation-duration: 24s; }
  .marquee__item, .marquee__item img { height: 80px; max-height: 80px; }

  .rodape__topo { flex-direction: column; align-items: flex-start; }

  .lightbox__nav { width: 40px; height: 40px; }
  .lightbox__nav--ant { left: 10px; }
  .lightbox__nav--prox { right: 10px; }
}

/* ---------- Respeita quem prefere menos movimento ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .revelar { opacity: 1; transform: none; }
  .marquee__trilha { animation: none; }
}

/* ---------- Impressão ---------- */
@media print {
  .header, .cta, .marquee, .hero__scroll, .lightbox { display: none; }
  body { background: #fff; color: #000; }
}
