:root {
  --creme: #f5f0e6;
  --papel: #fffaf1;
  --verde: #283d34;
  --dourado: #b59a67;
  --texto: #33352f;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--creme);
  color: var(--texto);
  font-family: "Montserrat", sans-serif;
  overflow-x: hidden;
}

body.bloqueado {
  overflow: hidden;
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

/* INTRODUÇÃO */

.intro {
  position: fixed;
  inset: 0;
  z-index: 100;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;

  background: radial-gradient(circle, #fffaf1 0%, #e8dfce 100%);

  perspective: 1400px;

  transition:
    opacity 800ms ease,
    visibility 800ms ease;
}

.intro.finalizada {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.ambiente {
  position: relative;

  width: 100%;
  height: 70vh;

  display: flex;
  align-items: center;
  justify-content: center;

  perspective: 1400px;
}

/* LIVRO */

.livro {
  position: relative;

  width: min(65vw, 280px);
  aspect-ratio: 0.72;

  transform-style: preserve-3d;

  filter: drop-shadow(12px 18px 14px rgba(0, 0, 0, 0.23));

  transition:
    transform 9000ms cubic-bezier(0.2, 0.7, 0.2, 1),
    filter 3000ms ease;

  cursor: pointer;
}

.livro-interior {
  position: absolute;
  inset: 0;

  background: var(--papel);

  border: 5px solid #e2d7c5;
  border-radius: 3px 8px 8px 3px;

  overflow: hidden;
}

.livro-interior img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* CAPA */

.capa {
  position: absolute;
  inset: 0;
  z-index: 2;

  border-radius: 3px 9px 9px 3px;

  transform-origin: left center;
  transform-style: preserve-3d;
  backface-visibility: hidden;

  transition: transform 3500ms cubic-bezier(0.3, 0.1, 0.2, 1);
}

/* Superfície verde da capa */
.capa::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;

  background: linear-gradient(90deg, #192c24 0%, #304b3d 8%, #283d34 100%);

  border: 2px solid #b59a67;
  border-radius: 3px 9px 9px 3px;

  box-shadow:
    inset 5px 0 10px rgba(0, 0, 0, 0.3),
    5px 5px 12px rgba(0, 0, 0, 0.15);

  -webkit-mask: var(--mascara-capa);
  mask: var(--mascara-capa);
}

/* Conteúdo da capa */
.capa-conteudo {
  position: absolute;
  inset: 10px;
  z-index: 1;

  border: 1px solid var(--dourado);

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;

  padding: 20px 8px;
  text-align: center;

  color: #f5e9d2;
}

/* Janela transparente */
.capa-janela {
  position: relative;

  width: 68%;
  aspect-ratio: 0.85;

  flex-shrink: 0;

  border: 5px solid var(--dourado);
  border-radius: 100px 100px 8px 8px;

  background: transparent;

  box-shadow:
    inset 0 0 15px rgba(0, 0, 0, 0.5),
    0 0 0 4px rgba(181, 154, 103, 0.15);
}

.capa-subtitulo {
  font-size: 8px;
  letter-spacing: 3px;
}

.capa h1 {
  font-size: clamp(32px, 8vw, 44px);
}

.capa-data {
  font-size: 10px;
  letter-spacing: 3px;
}

/* ABERTURA */

.livro.abrindo .capa {
  transform: rotateY(-165deg);
}

.livro.expandindo {
  transform: scale(4.5);
  filter: none;
}

.abrir-convite {
  position: absolute;
  bottom: 9%;

  border: none;
  background: transparent;

  color: var(--verde);

  font-family: "Montserrat", sans-serif;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;

  cursor: pointer;

  animation: pulsar 2s infinite;
}

@keyframes pulsar {
  0%,
  100% {
    opacity: 0.45;
  }

  50% {
    opacity: 1;
  }
}

/* CONVITE */

.convite {
  opacity: 0;
  visibility: hidden;

  transition: opacity 900ms ease;
}

.convite.visivel {
  opacity: 1;
  visibility: visible;
}

/* HERO */

.hero {
  position: relative;

  min-height: 100svh;

  display: flex;
  align-items: center;
  justify-content: center;

  overflow: hidden;

  color: white;
  text-align: center;
}

.hero-imagem {
  position: absolute;
  inset: 0;

  background:
    linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.55)),
    url("../assets/destaque.jpg");

  background-size: cover;
  background-position: center;
}

.hero-conteudo {
  position: relative;
  z-index: 1;

  padding: 35px 25px;
}

.subtitulo {
  display: block;

  font-size: 10px;
  font-weight: 500;
  letter-spacing: 3px;
  line-height: 1.8;

  color: var(--dourado);
}

.hero .subtitulo {
  color: #e6d4b2;
}

.hero h1 {
  margin: 22px 0;

  font-size: clamp(55px, 14vw, 100px);
  line-height: 0.95;
}

.hero h1 em {
  font-weight: 400;
}

.hero p {
  max-width: 360px;

  margin: 25px auto;

  font-size: 13px;
  line-height: 2;
}

.hero-data {
  display: block;

  margin-top: 45px;

  font-size: 11px;
  letter-spacing: 3px;
}

/* SEÇÕES */

.secao {
  padding: 100px 25px;
  text-align: center;
}

.secao h2 {
  margin: 18px auto 35px;

  font-size: clamp(42px, 10vw, 64px);
  line-height: 1;
}

.secao p {
  max-width: 520px;

  margin: 18px auto;

  font-size: 13px;
  line-height: 2.2;
}

.mensagem {
  background: var(--papel);
}

.ornamento {
  margin-top: 35px;

  color: var(--dourado);
  font-size: 26px;
}

/* GALERIA */

.galeria {
  background: var(--creme);
  overflow: hidden;
}

.galeria h2 {
  margin-bottom: 35px;
}

.foto-destaque {
  position: relative;
  width: min(100%, 380px);
  margin: 0 auto;
  padding: 8px;
  background: var(--papel);
  border: 1px solid var(--dourado);
  border-radius: 190px 190px 12px 12px;
  box-shadow: 0 12px 35px rgba(40, 61, 52, 0.15);
}

.foto-destaque img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center;
  border-radius: 180px 180px 6px 6px;
}

.galeria-legenda {
  max-width: 330px;
  margin: 28px auto 0;
  color: var(--texto);
  font-family: "Cormorant Garamond", serif;
  font-size: 22px;
  font-style: italic;
  line-height: 1.5;
}

.galeria .ornamento {
  margin-top: 25px;
  color: var(--dourado);
}

/* CONTADOR */

.contagem {
  background: var(--verde);
  color: white;
}

.contador {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: clamp(12px, 4vw, 35px);

  margin-top: 45px;
}

.contador div {
  display: flex;
  flex-direction: column;
  align-items: center;

  min-width: 55px;
}

.contador strong {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(35px, 9vw, 65px);
  font-weight: 400;
}

.contador span {
  margin-top: 8px;

  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* LOCALIZAÇÃO */

.local {
  background: var(--papel);
}

.local-nome {
  font-family: "Cormorant Garamond", serif;
  font-size: 30px !important;
}

.botao-maps {
  display: inline-block;

  margin-top: 35px;
  padding: 18px 35px;

  background: var(--verde);
  color: white;

  text-decoration: none;

  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;

  transition:
    background 0.3s ease,
    transform 0.3s ease;
}

.botao-maps:hover {
  background: #405b4d;
  transform: translateY(-3px);
}

/* RODAPÉ */

footer {
  padding: 75px 25px;

  background: var(--creme);
  text-align: center;
}

footer h2 {
  margin: 15px 0;
  font-size: 40px;
}

footer p {
  font-size: 11px;
  letter-spacing: 2px;
}

.rodape {
  color: var(--dourado);
  font-size: 14px;
}

/* CONTROLE DE ÁUDIO */

.controle-musica {
  position: fixed;

  right: 20px;
  bottom: 25px;

  z-index: 200;

  width: 48px;
  height: 48px;

  border: 1px solid var(--dourado);
  border-radius: 50%;

  background: var(--verde);
  color: white;

  font-size: 24px;

  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);

  cursor: pointer;
}

.controle-musica[hidden] {
  display: none;
}

.controle-musica.tocando {
  animation: pulsarMusica 2s infinite;
}

@keyframes pulsarMusica {
  50% {
    box-shadow: 0 0 0 9px rgba(181, 154, 103, 0.12);
  }
}

/* MOBILE */

@media (max-width: 480px) {
  .livro {
    width: 64vw;
  }

  .galeria-grid {
    gap: 8px;
  }

  .galeria-grid img {
    height: 210px;
  }

  .secao {
    padding: 85px 22px;
  }

  .hero-conteudo {
    padding: 30px 20px;
  }
}

/* ACESSIBILIDADE */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .livro,
  .capa,
  .intro,
  .convite {
    transition-duration: 0.01ms;
  }

  .abrir-convite,
  .controle-musica {
    animation: none;
  }
}
.nomes-noivos {
  display: flex;
  flex-direction: column;
  align-items: center;

  margin: 35px 0;

  font-family: "Cormorant Garamond", serif;
  font-size: clamp(42px, 11vw, 64px);
  font-weight: 500;
  line-height: 0.95;

  color: #f5e9d2;
}

.separador-noivos {
  margin: 8px 0;

  font-size: 28px;
  font-style: italic;
  font-weight: 400;

  color: var(--dourado);
}

/* ============================
   DISSOLUÇÃO DA FOTOGRAFIA
   ============================ */

.livro-interior {
  position: absolute;
  overflow: hidden;
}

.livro-interior img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;

  opacity: 1;
  transform: scale(1);
  filter: blur(0);

  will-change: opacity, transform, filter;
}

/* Inicia a dissolução */
.livro.efeito-imagem .livro-interior img {
  animation: dissolverImagem 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes dissolverImagem {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }

  35% {
    opacity: 0.85;
    transform: scale(1.04);
    filter: blur(1px);
  }

  70% {
    opacity: 0.35;
    transform: scale(1.1);
    filter: blur(4px);
  }

  100% {
    opacity: 0;
    transform: scale(1.15);
    filter: blur(8px);
  }
}
