@font-face {
  font-family: "Bodoni Moda Topo";
  src: url("../fonts/topo/bodoni-moda-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Lora Topo";
  src: url("../fonts/topo/lora.woff2") format("woff2");
  font-weight: 500 600;
  font-display: swap;
}

@font-face {
  font-family: "Lora Topo";
  src: url("../fonts/topo/lora-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Allura";
  src: url("../fonts/topo/allura.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Manrope Topo";
  src: url("../fonts/topo/manrope.woff2") format("woff2");
  font-weight: 500 800;
  font-display: swap;
}

.topo-garcia {
  container-type: inline-size;
  --topo-dourado: #cb914c;
  --topo-serifa: "Lora Topo", Georgia, serif;
  --topo-script: "Allura", cursive;
}

.topo-palco {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 76% 0%, color-mix(in srgb, var(--verde) 22%, transparent), transparent 46%),
    radial-gradient(ellipse at 24% 32%, #fffaf487, transparent 46%),
    linear-gradient(64deg, #fcf0e2 0%, var(--cor-pergaminho) 25%, var(--verde2) 36%, var(--verde) 46%,
      var(--roxo-luz) 58%, var(--azul) 73%, var(--roxo-escuro) 100%);
}

.topo-palco::before,
.topo-palco::after {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
  pointer-events: none;
}

.topo-palco::before {
  background: var(--textura-pergaminho) left center / 700px 300px repeat-x;
  mask-image: linear-gradient(64deg, #000 0 28%, #000b 37%, transparent 52%);
}

.topo-palco::after {
  background: var(--textura-papel-roxo);
  mask-image: linear-gradient(64deg, transparent 33%, #0009 49%, #000 68%);
  mix-blend-mode: overlay;
  opacity: .78;
}

.topo-ramos-defs {
  position: absolute;
  overflow: hidden;
}

.topo-ramo {
  --topo-ramo-tinta: var(--azul);
  position: absolute;
  overflow: visible;
  z-index: -1;
  pointer-events: none;
}

.topo-ramo-superior,
.topo-ramo-cartao {
  width: min(23%, 260px);
}

.topo-ramo-superior {
  left: -8px;
  top: 1.4%;
}

.topo-ramo-inferior {
  left: 2.5%;
  bottom: 2.7%;
  width: min(22%, 260px);
}

.topo-ramo-cartao {
  --topo-ramo-tinta: #f2d5b5;
  right: -8px;
  bottom: 1.4%;
  transform: rotate(180deg);
}

.topo-folha-violeta { color: var(--topo-ramo-tinta); }
.topo-folha-cobre { color: #b86d6d; }
.topo-folha-ouro { color: #d19d5d; }
.topo-ramo-cartao .topo-folha-cobre { color: #e6bda3; }

.topo-ramo-vivo {
  transform-box: view-box;
  transform-origin: 0 331px;
  animation: topo-brisa-ramo 7s ease-in-out infinite;
}

.topo-ramo-inferior .topo-ramo-vivo {
  transform-origin: 1px 52px;
  animation-duration: 8.6s;
  animation-delay: -3.1s;
}

.topo-ramo-cartao .topo-ramo-vivo {
  animation-duration: 7.9s;
  animation-delay: -1.8s;
}

.topo-folha {
  transform-box: view-box;
  transform-origin: 0 0;
  animation: topo-brisa-folha 5.8s ease-in-out infinite;
}

.topo-ramo-vivo > g:nth-of-type(3n) > .topo-folha {
  animation-duration: 6.7s;
  animation-delay: -1.6s;
}

.topo-ramo-vivo > g:nth-of-type(3n + 1) > .topo-folha {
  animation-duration: 5.1s;
  animation-delay: -3.2s;
}

@keyframes topo-brisa-ramo {
  0%, 100% { transform: rotate(-.8deg); }
  36% { transform: rotate(2.2deg); }
  58% { transform: rotate(.25deg); }
  81% { transform: rotate(1.3deg); }
}

@keyframes topo-brisa-folha {
  0%, 100% { transform: rotate(-4deg) scaleY(.92); }
  30% { transform: rotate(7deg) scaleY(1.05); }
  53% { transform: rotate(1deg) scaleY(.96); }
  72% { transform: rotate(5deg) scaleY(1.02); }
}

.topo-miolo {
  display: grid;
  grid-template-areas: "aniversario logotipo contato";
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  column-gap: var(--bs-gutter-x, 1.5rem);
}

.topo-aniversario {
  grid-area: aniversario;
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.3cqw, 20px);
  justify-self: center;
  color: var(--azul);
}

.topo-aniversario-idade {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.topo-numero {
  display: block;
  width: clamp(67px, 6.6cqw, 97px);
  height: auto;
  fill: url("#topo-tinta-idade");
}

.topo-numero text {
  font: italic 600 206px "Bodoni Moda Topo", "Times New Roman", serif;
  font-variant-numeric: lining-nums;
  stroke: url("#topo-tinta-idade");
  stroke-width: 1.15px;
  stroke-linejoin: round;
}

.topo-anos {
  position: relative;
  margin: 0 0 3px -5px;
  color: var(--topo-dourado);
  font: clamp(24px, 2.75cqw, 38px)/.85 var(--topo-script);
  white-space: nowrap;
}

.topo-anos svg {
  position: absolute;
  width: 1.05em;
  height: .4em;
  left: calc(100% - .1em);
  bottom: .05em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.topo-aniversario-legenda {
  display: block;
  margin-top: .4em;
  font: 600 clamp(9px, .91cqw, 13px)/1.2 var(--topo-serifa);
  letter-spacing: .11em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.topo-mensagem {
  position: relative;
  margin: 0;
  padding-left: clamp(10px, 1.05cqw, 16px);
  font: 500 clamp(12px, 1.14cqw, 17px)/1.42 var(--topo-serifa);
  letter-spacing: -.035em;
  white-space: nowrap;
}

.topo-mensagem::before {
  position: absolute;
  top: 1.5em;
  bottom: 1.1em;
  left: 0;
  width: 1px;
  background: var(--topo-dourado);
  content: "";
}

.topo-mensagem > span {
  display: block;
}

.topo-mensagem em {
  font-weight: 600;
}

.topo-mensagem .topo-memorias {
  font: clamp(26px, 2.3cqw, 34px)/.95 var(--topo-script);
  letter-spacing: .025em;
}

.topo-mensagem .topo-linha-coracao {
  display: flex;
  align-items: center;
  gap: .5em;
  width: 85%;
  height: .84em;
  margin-bottom: .35em;
  color: var(--topo-dourado);
}

.topo-linha-coracao::before,
.topo-linha-coracao::after {
  flex: 1;
  height: 1px;
  background: currentColor;
  content: "";
}

.topo-linha-coracao svg {
  width: .82em;
  height: .82em;
  fill: currentColor;
}

.topo-logotipo,
.topo-logotipo img {
  display: block;
  margin-inline: auto;
  max-width: 100%;
}

.topo-logotipo {
  grid-area: logotipo;
}

.topo-miolo > .topo-cartao {
  grid-area: contato;
}

.topo-logotipo img {
  filter: drop-shadow(0 3px 7px color-mix(in srgb, var(--azul) 30%, transparent));
}

.topo-cartao {
  width: min(calc(100% - 12px), 370px);
  margin: 0 0 0 auto;
  padding: clamp(13px, 1.45cqw, 21px) clamp(9px, 1.35cqw, 19px)
    clamp(13px, 1.45cqw, 21px) clamp(42px, 4.1cqw, 59px);
}

.topo-lacre {
  left: -35px;
  top: -18px;
  width: clamp(61px, 6.75cqw, 98px);
}

.topo-cartao-texto {
  display: grid;
  gap: 4px;
}

.topo-cartao-texto > * {
  display: flex;
  align-items: center;
  gap: .48em;
  margin: 0;
  color: inherit;
  text-decoration: none;
}

.topo-cartao-texto > a:hover span {
  text-decoration: underline;
  text-underline-offset: .15em;
}

.topo-cartao-texto svg {
  flex: 0 0 auto;
  width: 1.06em;
  height: 1.06em;
  fill: currentColor;
}

.topo-cartao-texto .topo-agendamento {
  font-size: clamp(12px, 1.1cqw, 16px);
  font-weight: 700;
}

.topo-cartao-texto .topo-telefone {
  gap: .29em;
  font: italic 800 clamp(23px, 2.2cqw, 32px)/1.2 var(--fonte-pergaminho);
  letter-spacing: -.025em;
  white-space: nowrap;
}

.topo-cartao-texto .topo-telefone svg {
  width: .72em;
  height: .72em;
}

.topo-cartao-texto .topo-email {
  font-size: clamp(12px, 1.14cqw, 16px);
  font-weight: 650;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}

@media (max-width: 991.98px) {
  .topo-palco {
    background: var(--cor-pergaminho);
  }

  .topo-palco::before {
    background-position: center;
    background-repeat: repeat;
    mask-image: none;
  }

  .topo-palco::after {
    display: none;
  }

  .topo-miolo {
    --largura-lacre: clamp(76px, 22vw, 96px);
    --subida-lacre: 20px;
    --descida-papel-cartao: calc(var(--largura-lacre) / 2 - var(--subida-lacre));
    grid-template-areas:
      "aniversario"
      "contato";
    grid-template-columns: minmax(0, 1fr);
    row-gap: clamp(93px, 26vw, 124px);
    max-width: 32rem;
    padding: clamp(21px, 5.6vw, 31px) clamp(12px, 4.6vw, 25px) calc(32px + var(--descida-papel-cartao));
  }

  .topo-miolo .topo-logotipo {
    display: none;
  }

  .topo-aniversario {
    --topo-dourado: #ae7839;
    max-width: 100%;
    gap: clamp(22px, 6vw, 26px);
  }

  .topo-numero {
    width: clamp(72px, 23vw, 98px);
  }

  .topo-anos {
    font-size: clamp(27px, 8vw, 36px);
  }

  .topo-anos svg {
    width: .9em;
  }

  .topo-aniversario-legenda {
    font-size: clamp(8.5px, 2.42vw, 11px);
  }

  .topo-mensagem {
    padding-left: clamp(12px, 3.5vw, 16px);
    font-size: clamp(12.5px, 3.7vw, 16px);
    white-space: normal;
  }

  .topo-mensagem .topo-memorias {
    font-size: clamp(25px, 7.4vw, 34px);
  }

  .topo-miolo > .topo-cartao {
    justify-self: center;
    width: min(calc(100% - 14px), 325px);
    margin: 0;
    padding: calc(var(--largura-lacre) - var(--subida-lacre) + 13px) 14px 19px;
    color: #fff;
  }

  .topo-miolo > .topo-cartao::before,
  .topo-miolo > .topo-cartao::after {
    translate: 0 var(--descida-papel-cartao);
  }

  .topo-miolo > .topo-cartao::before {
    background: var(--azul);
    border-color: var(--verde);
  }

  .topo-miolo > .topo-cartao::after {
    background: var(--textura-papel-roxo);
    mix-blend-mode: overlay;
    opacity: .85;
  }

  .topo-miolo .topo-lacre {
    top: calc(-1 * var(--subida-lacre));
    left: 50%;
    width: var(--largura-lacre);
    transform: translateX(-50%);
  }

  .topo-miolo .topo-cartao-texto > * {
    justify-content: center;
    text-align: center;
  }

  .topo-miolo .topo-agendamento,
  .topo-miolo .topo-email {
    font-size: clamp(12px, 3.3vw, 14px);
  }

  .topo-miolo .topo-telefone {
    font-size: clamp(23px, 6.55vw, 29px);
  }

  .topo-ramo-superior {
    top: clamp(104px, 31vw, 148px);
    left: -3%;
    width: 106%;
    opacity: .58;
  }

  .topo-ramo-inferior,
  .topo-ramo-cartao {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .topo-ramo-vivo,
  .topo-folha { animation: none; }
}
