/* Medidas de referência: layout de 1920px */

/* EB Garamond hospedada no site (subconjunto latino), pré-carregada no <head> */
@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/eb-garamond-latin.woff2") format("woff2");
}

/* Transição entre páginas: a página atual escurece e a nova sobe como uma cortina */
@view-transition { navigation: auto; }

::view-transition-old(root) { animation: fade-out 0.6s var(--ease-in-out) both; }
::view-transition-new(root) { animation: curtain 1.1s var(--ease-in-out) both; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  .hero--home::before { display: none; }
}

:root {
  --bg: #000;
  --text: #e9e2de;
  --text-soft: #e5dad6;
  --white: #fff;

  --serif: "EB Garamond", Georgia, serif;
  --sans: Arial, Helvetica, sans-serif;

  --fs-display: clamp(34px, 3.3vw, 63px);
  --fs-lead: clamp(30px, 2.92vw, 56px);
  --fs-title: clamp(28px, 2.35vw, 45px);
  --fs-cta: clamp(24px, 2.3vw, 44px);
  --fs-nav: clamp(18px, 1.3vw, 25px);
  --fs-body: clamp(17px, 1.35vw, 26px);
  --fs-small: clamp(16px, 1.15vw, 22px);
  --fs-label: clamp(11px, 0.68vw, 13px);

  --gutter: clamp(20px, 7.3vw, 140px);
  --gutter-s: clamp(20px, 4.2vw, 80px);

  --space-s: clamp(48px, 5.5vw, 106px);
  --space-m: clamp(64px, 9vw, 170px);
  --space-l: clamp(80px, 13vw, 250px);
  --space-xl: clamp(100px, 17.5vw, 335px);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.87, 0, 0.13, 1);
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: var(--fs-body) / 1.385 var(--serif);
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, figure, ul { margin: 0; padding: 0; font-weight: 400; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }

img,
video {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

p + p { margin-top: 1.385em; }

.label {
  font-family: var(--sans);
  font-size: var(--fs-label);
  line-height: 1.4;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.mt-s { margin-top: var(--space-s); }
.mt-m { margin-top: var(--space-m); }
.mt-l { margin-top: var(--space-l); }
.mt-xl { margin-top: var(--space-xl); }


/* Header */

.header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: clamp(20px, 2.65vw, 51px) clamp(20px, 3.5vw, 68px) 0;
  animation: fade-in 1s 0.4s both;
}

.header__logo {
  grid-column: 2;
  width: clamp(56px, 4.2vw, 81px);
}

.nav {
  justify-self: end;
  display: flex;
  gap: 1.1em;
  font-size: var(--fs-nav);
  color: var(--text-soft);
}

.menu-toggle { display: none; }


/* Hero */

.hero {
  position: relative;
  display: grid;
  isolation: isolate;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  height: 100%;
  animation: zoom-out 2.4s var(--ease-out) both;
}

/* Parallax: a imagem desce mais devagar que a página (Chrome e Safari 26+) */
@supports (animation-timeline: scroll()) {
  .hero__media {
    animation: zoom-out 2.4s var(--ease-out) both, parallax linear both;
    animation-timeline: auto, scroll();
    animation-range: normal, 0 100vh;
  }
}

/* Home: uma camada clara some revelando o vídeo, e as palavras do título aparecem em ordem aleatória */
.hero--home::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--text);
  pointer-events: none;
  animation: fade-out 1.4s 0.2s var(--ease-out) both;
}

/* Até o JS separar as palavras, o título fica escondido (a classe .js é adicionada no <head>) */
.js .hero__text:not(.is-ready) { visibility: hidden; }

.hero__text .word {
  display: inline-block;
  animation: fade-in 2.5s var(--delay) var(--ease-out) both;
}

.hero__title { animation: rise 1.6s 0.5s var(--ease-out) both; }

.hero--home { align-items: end; }

.hero--home::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(transparent 28%, rgb(0 0 0 / 0.72) 78%, #000);
}

.hero__text {
  max-width: 22em;
  padding: 0 var(--gutter-s) clamp(60px, 23vh, 255px);
  font-size: var(--fs-display);
  line-height: 0.95;
  color: var(--text-soft);
}

.hero--series { place-items: center; }

.hero__title {
  font-family: var(--sans);
  font-size: clamp(14.4px, 1.25vw, 24px); /* 20% menor que o layout (30px), a pedido do cliente */
  letter-spacing: 0.3em;
  text-transform: uppercase;
}


/* Duas colunas: as colunas 1, 3 e 5 são espaços, o conteúdo fica na 2 e na 4 */

.split {
  display: grid;
  grid-template-columns: var(--cols);
  align-items: center;
}

.split > :first-child { grid-column: 2; }
.split > :last-child { grid-column: 4; }

.split--home { --cols: 149fr 626fr 137fr 800fr 208fr; }
.split--about { --cols: 77fr 1110fr 20fr 488fr 225fr; }
.split--video { --cols: 333fr 454fr 193fr 749fr 191fr; }
.split--pair { --cols: 119fr 688fr 153fr 784fr 176fr; }

.split--home img { aspect-ratio: 626 / 783; }
.split--about img { aspect-ratio: 488 / 732; }
.split--video video { aspect-ratio: 454 / 818; }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.07;
}

/* Sobre: texto de abertura 10% menor em tamanho e largura, a pedido do cliente */
.split--about .lead { max-width: 90%; font-size: calc(var(--fs-lead) * 0.9); }

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.pair img { aspect-ratio: 386 / 482; }


/* Imagem de largura total */

.full { aspect-ratio: 16 / 9; }

/* Efeito janela: a foto fica fixa na tela e a moldura passa por cima dela.
   O clip-path da moldura recorta a foto fixa; a moldura não pode ter transform */
.parallax { clip-path: inset(0); }

.parallax img {
  position: fixed;
  inset: 0;
  height: 100lvh; /* altura máxima da tela, para não sobrar faixa quando a barra do navegador some */
  pointer-events: none;
}


/* Séries (home) */

.series__title {
  margin-bottom: clamp(32px, 4.4vw, 85px);
  font-size: var(--fs-title);
  text-align: center;
}

.series__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-inline: var(--gutter);
}

.card { text-align: center; }
.card__media { overflow: hidden; }
.card img { aspect-ratio: 800 / 640; }

.card__title {
  margin-top: clamp(24px, 3.4vw, 65px);
  font-size: var(--fs-display);
  line-height: 0.95;
}

.card__text {
  max-width: 25em;
  margin: 1.4em auto 0;
  font-size: var(--fs-small);
  line-height: 1.36;
}


/* Faixa horizontal (exposição e Instagram) */

.strip { display: grid; }

.strip__label { padding-inline: var(--gutter); margin-bottom: 14px; }

.strip__list {
  --gap: 9px;
  grid-area: 2 / 1;
  display: flex;
  gap: var(--gap);
  overflow: auto hidden; /* só rola na horizontal; arrastar na vertical rola a página */
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding-inline: var(--gutter);
  scrollbar-width: none;
}

.strip__list::-webkit-scrollbar { display: none; }

.strip__list li {
  flex: 0 0 calc(var(--item, (100% - 4 * var(--gap)) / 5) * var(--scale, 1));
  scroll-snap-align: start;
}

.strip__list img { aspect-ratio: 314 / 377; }

/* Carrossel da Home: texto e fotos 20% menores que a faixa do Instagram */
.strip--small { --scale: 0.8; }
.strip--small .strip__label { font-size: calc(var(--fs-label) * 0.8); }

/* Degradê na borda dá contraste ao chevron sobre fotos claras.
   z-index mantém o botão acima das fotos, que ganham transform no hover e na entrada */
.strip .chevron {
  position: relative;
  z-index: 1;
  grid-area: 2 / 1;
  width: clamp(96px, 10vw, 200px);
  height: auto;
  background: linear-gradient(to right, rgb(0 0 0 / 0.8), transparent);
}

.strip .chevron--next {
  justify-self: end;
  background: linear-gradient(to left, rgb(0 0 0 / 0.8), transparent);
}

.strip .chevron::before { filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.6)); }


/* Chevron */

.chevron {
  height: 64px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  cursor: pointer;
}

.chevron::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  border-top: 1px solid;
  border-left: 1px solid;
  transform: translateX(25%) rotate(-45deg);
}

.chevron--next::before { transform: translateX(-25%) rotate(135deg); }

.chevron[hidden] { display: none; }


/* Página de série */

.series-text {
  max-width: calc(32.8em + 2 * var(--gutter-s));
  margin-top: clamp(32px, 3.2vw, 61px);
  padding-inline: var(--gutter-s);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 61px 10px;
  padding-inline: clamp(20px, 10.7vw, 206px);
}

.grid img { aspect-ratio: 496 / 620; }

.grid figcaption {
  margin-top: 10px;
  font-family: var(--sans);
  font-size: calc(var(--fs-label) * 0.8);
  line-height: 1.54;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}


/* Rodapé */

.footer {
  display: grid;
  justify-items: center;
  padding: 0 var(--gutter) clamp(20px, 1.6vw, 32px);
  text-align: center;
  color: var(--white);
}

.footer__logo { width: clamp(120px, 9.6vw, 185px); }
.footer--cta .footer__logo { width: clamp(110px, 8.5vw, 164px); }

.footer__cta {
  max-width: 31em;
  margin-top: clamp(40px, 3.9vw, 75px);
  font-size: var(--fs-cta);
  line-height: 1.11;
  color: var(--text);
}

.footer__info {
  margin-top: clamp(32px, 3.3vw, 64px);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.footer--cta .footer__info { margin-top: clamp(32px, 2.4vw, 46px); }

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5em 2.4em;
  margin-top: 1.4em;
  font-family: var(--sans);
  font-size: clamp(13px, 0.83vw, 16px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}


/* Assinatura: copyright à esquerda, créditos à direita */
.footer__bar {
  justify-self: stretch;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: clamp(48px, 4.2vw, 80px);
  padding-top: 20px;
  border-top: 1px solid rgb(255 255 255 / 0.2);
  font: 10px / 1.5 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgb(233 226 222 / 0.6);
}

.footer__bar p { margin: 0; }
.footer__bar a { color: var(--white); white-space: nowrap; }


/* Página "Em breve" (antes do lançamento) */
.coming-soon {
  display: grid;
  place-content: center;
  justify-items: center;
  min-height: 100svh;
  padding: var(--gutter-s);
  text-align: center;
  color: var(--white);
}

.coming-soon__title {
  margin-top: clamp(40px, 3.5vw, 64px);
  font-size: var(--fs-display);
  line-height: 1;
  color: var(--text-soft);
}


/* Newsletter (Brevo) */

.newsletter {
  width: min(100%, 563px);
  margin-top: clamp(40px, 3.5vw, 64px);
}

.newsletter__label {
  display: block;
  margin-bottom: clamp(16px, 1.4vw, 26px);
  font-size: clamp(12px, 0.73vw, 14px);
  letter-spacing: 0.12em;
}

/* Linha de 0,28pt no layout: 1px com transparência para ficar igualmente fina */
.newsletter__field {
  display: flex;
  border-bottom: 1px solid rgb(255 255 255 / 0.5);
  transition: border-color 0.3s;
}

.newsletter__field:focus-within { border-color: var(--white); }

.newsletter input,
.newsletter button {
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--white);
  font: 11px / 1.4 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.newsletter input {
  flex: 1;
  min-width: 0;
  outline: none;
}

.newsletter input::placeholder { color: var(--white); opacity: 1; }

.newsletter button {
  padding-left: 16px;
  cursor: pointer;
  transition: opacity 0.3s;
}

.newsletter button:hover { opacity: 0.6; }

.newsletter__trap { position: absolute; left: -9999px; }

.newsletter__note {
  margin-top: 18px;
  font: 8px / 1.5 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.newsletter__status { margin-top: 16px; font-size: var(--fs-small); }
.newsletter__status:empty { display: none; }

.newsletter.is-sending button { opacity: 0.4; pointer-events: none; }

.newsletter.is-done .newsletter__field,
.newsletter.is-done .newsletter__note { display: none; }


/* Lightbox */

.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  padding: var(--gutter-s) max(56px, var(--gutter-s));
  border: 0;
  background: rgb(0 0 0 / 0.94);
  cursor: zoom-out;
}

.lightbox[open] { animation: fade-in 0.5s var(--ease-out); }
.lightbox:focus { outline: none; }
.lightbox::backdrop { background: transparent; }
.lightbox img {
  height: 100%;
  object-fit: contain;
  animation: zoom-in 0.8s var(--ease-out);
}

.lightbox .chevron {
  position: absolute;
  top: 50%;
  width: max(56px, var(--gutter-s));
  translate: 0 -50%;
}

.lightbox .chevron--prev { left: 0; }
.lightbox .chevron--next { right: 0; }
.lightbox .chevron::before { width: 10px; height: 10px; }

.lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.lightbox__close::before,
.lightbox__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 1px;
  background: var(--text);
  transform: translate(-50%, -50%) rotate(45deg);
}

.lightbox__close::after { transform: translate(-50%, -50%) rotate(-45deg); }


/* Voltar ao topo */

.to-top {
  position: fixed;
  right: clamp(16px, 2vw, 32px);
  bottom: clamp(16px, 2vw, 32px);
  z-index: 20;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  /* Círculo em SVG: a borda fica mais suave do que com border-radius */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Ccircle cx='24' cy='24' r='23.5' fill='rgba(0,0,0,0.6)' stroke='rgba(233,226,222,0.35)'/%3E%3C/svg%3E") center / 100% no-repeat;
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  translate: 0 10px;
  transition: opacity 0.5s, translate 0.5s var(--ease-out), visibility 0s 0.5s;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  translate: none;
  transition: opacity 0.5s, translate 0.5s var(--ease-out);
}

.menu-open .to-top { opacity: 0; visibility: hidden; }

.to-top::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-top: 1px solid;
  border-left: 1px solid;
  transform: translateY(25%) rotate(45deg);
}


/* Animações */

/* Classes adicionadas pelo JS: .reveal esconde, .is-visible mostra ao entrar na tela */
.reveal {
  opacity: 0;
  translate: 0 40px;
  transition: opacity 1.2s var(--ease-out), translate 1.2s var(--ease-out);
  transition-delay: var(--delay, 0s);
}

.reveal.is-visible { opacity: 1; translate: none; }

/* Imagens de largura total abrem a partir das bordas */
.full.reveal {
  opacity: 1;
  translate: none;
  clip-path: inset(8%);
  transition: clip-path 1.8s var(--ease-out);
}

.full.reveal.is-visible { clip-path: inset(0); }

/* Zoom suave nas fotos clicáveis */
.card img,
.grid img,
.strip__list img { transition: scale 1.2s var(--ease-out); }

.grid a,
.strip__list a { display: block; overflow: hidden; }

@media (hover: hover) {
  .card:hover img,
  .grid a:hover img,
  .strip__list a:hover img { scale: 1.04; }

  /* Traço fino que se desenha embaixo do link */
  .nav a,
  .footer__links a,
  .footer__bar a {
    background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px;
    transition: background-size 0.6s var(--ease-out);
  }

  .nav a:hover,
  .footer__links a:hover,
  .footer__bar a:hover { background-size: 100% 1px; }
}

/* Letras da frase do rodapé (separadas pelo JS) */
.footer__info .letter {
  opacity: 0;
  transition: opacity 1.5s var(--delay) var(--ease-out);
}

.footer.is-visible .footer__info .letter { opacity: 1; }

@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes curtain { from { clip-path: inset(100% 0 0 0); } }
@keyframes rise { from { opacity: 0; translate: 0 40px; } }
@keyframes zoom-out { from { scale: 1.1; } }
@keyframes zoom-in { from { scale: 0.96; opacity: 0; } }
@keyframes parallax { to { translate: 0 30vh; } }


/* Tablet */

@media (max-width: 1024px) {
  /* Traço do meio é o fundo do botão; os de cima e de baixo são ::before e ::after */
  .menu-toggle {
    position: relative;
    display: block;
    justify-self: end;
    grid-column: 3;
    width: 32px;
    height: 21px;
    padding: 0;
    border: 0;
    background: linear-gradient(var(--text-soft), var(--text-soft)) center / 100% 1px no-repeat;
    cursor: pointer;
    transition: background-size 0.3s;
  }

  .menu-toggle::before,
  .menu-toggle::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--text-soft);
    transition: transform 0.3s;
  }

  .menu-toggle::before { top: 0; }
  .menu-toggle::after { bottom: 0; }

  .menu-open .menu-toggle { background-size: 0 1px; }
  .menu-open .menu-toggle::before { transform: translateY(10px) rotate(45deg); }
  .menu-open .menu-toggle::after { transform: translateY(-10px) rotate(-45deg); }

  .nav {
    position: fixed;
    inset: 0;
    z-index: -1;
    justify-self: stretch;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.6em;
    background: var(--bg);
    font-size: var(--fs-lead);
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path 0.6s var(--ease-in-out), visibility 0s 0.6s;
  }

  .nav a {
    --i: 0;
    opacity: 0;
    translate: 0 20px;
    transition: opacity 0.3s, translate 0.3s;
  }

  .menu-open { overflow: hidden; }

  /* Menu desce como uma cortina e os links entram um depois do outro */
  .menu-open .nav {
    clip-path: inset(0);
    visibility: visible;
    transition: clip-path 0.9s var(--ease-in-out);
  }

  .menu-open .nav a {
    opacity: 1;
    translate: none;
    transition: opacity 0.8s var(--ease-out), translate 0.8s var(--ease-out);
    transition-delay: calc(0.4s + var(--i) * 0.07s);
  }

  .nav a:nth-child(2) { --i: 1; }
  .nav a:nth-child(3) { --i: 2; }
  .nav a:nth-child(4) { --i: 3; }
  .nav a:nth-child(5) { --i: 4; }

  .strip__list li { --item: (100% - 2 * var(--gap)) / 3; }

  .grid { grid-template-columns: repeat(2, 1fr); }
}


/* Tablet retrato */

@media (max-width: 768px) {
  .split {
    grid-template-columns: 1fr;
    gap: var(--space-s);
    padding-inline: var(--gutter);
  }

  .split > :first-child,
  .split > :last-child { grid-column: auto; }

  .series__list { grid-template-columns: 1fr; gap: var(--space-s); }
}


/* Celular */

@media (max-width: 560px) {
  .footer__bar { justify-content: center; text-align: center; }
  .footer { padding-bottom: 88px; } /* espaço para o botão de voltar ao topo */

  .strip__list li { --item: 75%; }

  .grid { grid-template-columns: 1fr; }
}
