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

:root {
  --header-height: 73px;
  --building-offset: clamp(-93px, -12vh, -30px);
  --building-offset-mobile: clamp(-251px, -32vh, -120px);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at top, #ffffff 0, #f0f0f0 50%, #dcdcdc 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: var(--header-height); /* mantém o conteúdo logo abaixo do header fixo */
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 23px;
  z-index: 50; /* mantém o header acima de todas as camadas, incluindo o prédio */
}

.site-logo {
  max-height: 35px;
  width: auto;
  object-fit: contain;
}

.advent-banner {
  width: 100%;
  height: 73vh;
  background: linear-gradient(
    to bottom,
    #FFEED9 0%,
    #FFEED9 35%,
    rgba(255, 238, 217, 0.92) 55%,
    rgba(255, 238, 217, 0.7) 72%,
    rgba(255, 238, 217, 0.4) 85%,
    rgba(255, 238, 217, 0.12) 93%,
    rgba(255, 238, 217, 0) 100%
  );
  background-color: rgba(255, 238, 217, 0.7);
  backdrop-filter: blur(16px) saturate(1.05);
  -webkit-backdrop-filter: blur(16px) saturate(1.05);
  color: #FFEED9;
  display: flex;
  justify-content: center;
  padding: 3px 13px 13px;
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 55%,
    rgba(0, 0, 0, 0.75) 70%,
    rgba(0, 0, 0, 0.35) 82%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 55%,
    rgba(0, 0, 0, 0.75) 70%,
    rgba(0, 0, 0, 0.35) 82%,
    rgba(0, 0, 0, 0) 100%
  );
  z-index: 4;
}

.advent-banner::before {
  content: "";
  position: absolute;
  inset: -2%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.32) 0%,
    rgba(255, 255, 255, 0.18) 38%,
    rgba(255, 255, 255, 0.08) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow:
    0 16px 45px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);
  filter: blur(0.3px);
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}

.advent-banner::after {
  content: "";
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: -18%;
  height: 55vh;
  background: linear-gradient(
    to bottom,
    rgba(255, 238, 217, 0.55) 0%,
    rgba(255, 238, 217, 0.38) 38%,
    rgba(255, 238, 217, 0.16) 70%,
    rgba(255, 238, 217, 0) 100%
  );
  filter: blur(22px);
  opacity: 0.85;
  pointer-events: none;
  z-index: 0;
}

.advent-banner__content {
  width: min(960px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.advent-banner__arc {
  width: min(960px, 100%);
  height: auto;
  display: block;
  transform: translateY(-37px); /* aproxima o texto do topo */
}

.advent-banner__arc text:not(.advent-banner__subtitle) {
  font-family: "Montserrat", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 33px;
  font-weight: 800;
  letter-spacing: 0.03em;
  fill: #0099cc;
}

.advent-banner__subtitle {
  font-family: "Montserrat", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 27px;
  font-weight: 300;
  letter-spacing: 0.01em;
  fill: #0099cc;
  transform: translateY(2px);
}

@media (max-width: 640px) {
  .advent-banner__subtitle {
    transform: translateY(10px);
  }
}

.advent-banner__logo {
  width: min(270px, 53vw);
  max-width: 100%;
  height: auto;
  margin-top: clamp(-173px, -11vw, -40px);
  margin-bottom: 9px;
  object-fit: contain;
}

.advent-banner__blurb {
  margin: 13px 0 0;
  max-width: 840px;
  color: #000000;
  font-family: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.4;
  padding: 0 14px;
}

.scroll-indicator {
  margin-top: 13px;
  display: flex;
  justify-content: center;
  width: 100%;
}

.scroll-indicator__arrow {
  width: 70px;
  height: 34px;
  stroke: #808080;
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: scrollFloat 2.2s ease-in-out infinite;
  opacity: 0.8;
}

@keyframes scrollFloat {
  0% {
    transform: translateY(0);
    opacity: 0.65;
  }
  50% {
    transform: translateY(8px);
    opacity: 1;
  }
  100% {
    transform: translateY(0);
    opacity: 0.65;
  }
}

.page {
  position: relative;
  z-index: 7; /* eleva todo o conteúdo (prédio) acima do banner desfocado */
}

#snow-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

#parallax-layers {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.parallax-layer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-repeat: no-repeat;
  background-position: left top;
  background-size: cover;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.parallax-layer.layer-bg { background-image: url("img/bg.jpg"); }
.parallax-layer.layer-1 {
  background-image: url("img/bg_01.png");
  filter: drop-shadow(0 -1px 3px rgba(0, 0, 0, 0.071));
  background-position: left calc(100% 3px);
}
.parallax-layer.layer-2 {
  background-image: url("img/bg_02.png");
  filter: drop-shadow(0 -3px 9px rgba(0, 0, 0, 0.34));
}
.parallax-layer.layer-3 {
  background-image: url("img/bg_03.png");
  filter: drop-shadow(0 -14px 22px rgba(0, 0, 0, 0.36));
}
.parallax-layer.layer-carousel {
  background-image: url("img/pinheiro.png");
  background-position: right bottom;
  background-size: 28vw auto;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.3));
}

.parallax-layer.layer-bg {
  transform: none !important;
  will-change: auto;
}

.page {
  width: 100%;
  padding: 1px;
}

.panel {
  margin: 0 auto;
  max-width: 900px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.20);
  padding: 24px 18px 28px;
}

.header {
  text-align: center;
  margin-bottom: 23px;
}

/* Prédio */
.building-wrapper {
  position: relative;
  width: min(680px, 100%);
  margin: var(--building-offset) auto 5px; /* deslocamento controlado por variável para ajuste em alturas baixas */
  z-index: 4; /* garante que o prédio fica à frente do banner desfocado */
  --building-max-width: 620px;
}

.roof-svg {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, calc(-100% + 10px)); /* encosta o telhado ao topo do prédio com pequena sobreposição */
  width: calc(min(100%, var(--building-max-width)) + 20px);
  height: 150px;
  max-height: 150px;
  pointer-events: none;
  z-index: 6;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.25));
}

.roof-shape {
  fill: url(#roof-gradient);
  /* usa o mesmo fade laranja dos vasos */
  stroke: none;
}

.garland {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  display: block;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 10px 13px rgba(0, 0, 0, 0.16));
  z-index: 4;
}

.building {
  position: relative;
  overflow: hidden;
  margin: 0 auto 5px;
  width: min(100%, var(--building-max-width));
  max-width: var(--building-max-width);
  aspect-ratio: 3 / 6;
  background: linear-gradient(to bottom, #f8f8f8 0%, #ffffff 40%, #ffffff 100%);
  border-radius: 1px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.7),
    0 13px 33px rgba(0, 0, 0, 0.4);
  padding: 93px 23px 39px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(123px, 1fr);
  gap: 17px 17px;
}

/* Cada janela */
.window {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  appearance: none;
  outline: none;
  perspective: 900px;
  cursor: pointer;
}

.window:focus-visible {
  outline: none;
}

/* Entrada do hotel */
.door-area {
  grid-column: 1 / -1;
  width: min(300px, 100%);
  justify-self: center;
  display: grid;
  grid-template-columns: 0.7fr 1.15fr 0.7fr;
  align-items: end;
  gap: 10px;
  padding: 1px 2px 0;
  min-height: 150px;
}

.door-body {
  position: relative;
  height: 190px;
  border-radius: 6px 6px 10px 10px;
  background: linear-gradient(180deg, #6a3516 0%, #4b200c 60%, #3a1607 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.08),
    inset 0 0 20px rgba(0, 0, 0, 0.35),
    0 10px 22px rgba(0, 0, 0, 0.35);
}

.door-body::before {
  content: "";
  position: absolute;
  inset: 12px 18px;
  border-radius: 4px 4px 8px 8px;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.08),
    inset 0 0 12px rgba(0, 0, 0, 0.45);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 60%);
}

.door-body::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), transparent 30%, transparent 70%, rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

.door-handle {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 9px;
  height: 23px;
  border-radius: 12px;
  background: linear-gradient(180deg, #f7d679 0%, #e6b742 70%, #c5881d 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 1px 4px rgba(0, 0, 0, 0.4);
}

.planter {
  position: relative;
  height: 110px;
  width: min(120px, 95%);
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 6px;
}

.planter .plant {
  position: relative;
  width: 78%;
  height: 125%;
  background: url("img/planter-tree.svg") center bottom / contain no-repeat;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.35));
  z-index: 1;
}

.planter .pot {
  position: absolute;
  bottom: 0;
  width: 85%;
  height: 38%;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(180deg, #EC8200 0%, #de7b02 60%, #b76501 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    0 6px 12px rgba(0, 0, 0, 0.35);
  z-index: 2;
}

.planter .pot::before {
  content: "";
  position: absolute;
  top: -6px;
  left: -6%;
  width: 112%;
  height: 10px;
  border-radius: 8px;
  background: linear-gradient(180deg, #c98a46 0%, #EC8200 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.window-inner {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 120px;
  border-radius: 3px;
  background: #ea3345;
  box-shadow:
    0 0 0 1px #007096,
    0 1px 5px rgba(0, 0, 0, 0.35),
    inset 0 0 8px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  transform-style: preserve-3d;
}

/* As folhas da janela */
.wing {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background-image:
    linear-gradient(to bottom, #0099CC 0%, #0380a9 50%, #01546f 100%),
    linear-gradient(to right, rgba(255,255,255,0.3) 0, transparent 20%, transparent 80%, rgba(0,0,0,0.3) 100%);
  background-blend-mode: overlay;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.25),
    0 0 10px rgba(0, 0, 0, 0.45);
  transform-origin: left center;
  transform: rotateY(0deg);
  transition: transform 0.6s ease;
  backface-visibility: hidden;
}

/* Vidros simples (linhas) */
.wing::before,
.wing::after {
  content: "";
  position: absolute;
  inset: 8% 14%;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.wing::after {
  inset: 8% 47%;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    inset -1px 0 0 rgba(0, 0, 0, 0.2);
}

.wing.left {
  left: 0;
  transform-origin: left center;
}

.wing.right {
  right: 0;
  transform-origin: right center;
}

.window::after {
  content: attr(data-number);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-weight: 800;
  font-size: clamp(2.9rem, 5.8vw, 4.4rem);
  color: #f7fbffb2;
  text-shadow:
    0 3px 9px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(0, 0, 0, 0.08);
  letter-spacing: 0.02em;
  pointer-events: none;
  z-index: 5;
  opacity: 0.98;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.window.open::after {
  opacity: 0;
  transform: scale(0.9);
}

.window:hover::after,
.window:focus-visible::after,
.window:focus-within::after,
.window:active::after {
  opacity: 0;
  transform: scale(0.9);
}

/* Conteúdo dentro da janela */
.window-content {
  position: absolute;
  inset: 1%;
  border-radius: 4px;
  background: radial-gradient(circle at top, #ec4556 0, #ea3345 45%, #881420 100%);
  box-shadow:
    inset 0 0 14px rgba(255, 255, 255, 0.9),
    0 0 20px rgba(255, 120, 120, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5px 3px;
  color: #460303;
  opacity: 0;
  transform: scale(0.9);
  transition:
    opacity 0.35s ease 0.18s,
    transform 0.35s ease 0.18s;
  z-index: -1; /* começa atrás das folhas */
}

.window-number {
  position: absolute;
  inset: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 6.3rem;
  color: #450202;
  opacity: 0.1;
  pointer-events: none;
  line-height: 1;
}

.window-text {
  font-size: 0.8rem;
  line-height: 0.9rem;
  margin-bottom: 9px;
  color: #fff;
  padding: 7px 4px;
  position: relative;
  z-index: 1;
}

.window-cta {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #ffffff;
  background: #0B9D4D;
  padding: 3px 9px;
  border-radius: 999px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  position: relative;
  z-index: 1;
}

.window-cta:hover,
.window-cta:focus-visible {
  background: #04843e;
  transform: translateY(-1px);
  box-shadow: 0 4px 9px rgba(0, 0, 0, 0.45);
}

/* Estado aberto */
.window.open .wing.left {
  transform: rotateY(-110deg);
}

.window.open .wing.right {
  transform: rotateY(110deg);
}

.window.open .window-content {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

/* Hover em desktop: pequeno preview se ainda não estiver aberta */
@media (hover: hover) and (pointer: fine) {
  .window:not(.open):hover .wing.left {
    transform: rotateY(-40deg);
  }
  .window:not(.open):hover .wing.right {
    transform: rotateY(40deg);
  }
}

/* Rodapé */
.footer-note {
  position: relative;
  margin-top: -5px;
  padding: 23px 3px 33px;
  font-size: 0.8rem;
  text-align: center;
  color: #f5f5f5;
  background: #01121e;
  overflow: hidden;
}

/* Rodapé legal */
.footer-legal {
  position: relative;
  margin-bottom: -33px;
  padding: 23px 13px 23px;
  font-size: 0.8rem;
  text-align: center;
  color: #cfcfcf;
  background: #000000;
  overflow: hidden;
}

/* Acessibilidade */
.window:focus-within .wing.left,
.window:focus-within .wing.right {
  transform: rotateY(-110deg);
}

.window:focus-within .window-content {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

/* Alturas reduzidas: baixa o prédio para não cobrir o banner */
@media (max-height: 860px) {
  :root {
    --building-offset: -40px;
  }
}

@media (max-height: 760px) {
  :root {
    --building-offset: 10px;
  }
}

@media (max-height: 680px) {
  :root {
    --building-offset: 40px;
  }
}
  
/* Mobile: duas colunas e espaçamentos mais justos */
@media (max-width: 550px) {
  :root {
    --header-height: 53px;
  }
  .site-logo {
    max-height: 25px;
  }
  .advent-banner {
  height: 77vh;
  }
  .advent-banner__arc {
    padding: 0 6px;
    box-sizing: border-box;
    transform: translateY(-7px);
  }
  .advent-banner__arc text:not(.advent-banner__subtitle) {
    font-size: 33px;
    letter-spacing: 0.09em;
  }
  .advent-banner__subtitle {
    font-size: 33px;
  }
  .advent-banner__logo {
    margin-top: -13px;
    margin-bottom: 3px;
  }
  .building {
    width: min(100%, var(--building-max-width));
    margin: 0 auto;
    grid-template-columns: repeat(2, 1fr);
    gap: 13px;
    padding: 43px 13px 13px;
    aspect-ratio: auto;
    height: auto;
    grid-auto-rows: minmax(123px, 1fr);
  }

  .roof-svg {
    top: 0;
    transform: translate(-50%, calc(-100% + 8px));
    width: calc(min(100%, var(--building-max-width)) + 20px);
    height: 93px;
  }

  .door-area {
    width: 100%;
    grid-template-columns: 0.85fr 1.2fr 0.85fr;
    gap: 8px;
    padding: 13px 0 0;
    min-height: 110px;
  }

  .building-wrapper {
    position: relative;
    width: min(680px, 100%);
    margin: var(--building-offset-mobile) auto 5px;
    z-index: 6; /* garante que o prédio fica à frente do banner desfocado */
    --building-max-width: 290px;
  }

  .garland {
    width: calc(100%  20px);
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.14));
  }

  .door-body {
    height: 150px;
  }

  .planter {
    height: 113px;
  }

  .parallax-layer {
    width: 100vw;
    height: 100vh;
  }

  .parallax-layer.layer-carousel {
    display: none;
  }
}

/* Mobile com altura reduzida: ainda mais espaço para o banner */
@media (max-width: 550px) and (max-height: 760px) {
  :root {
    --building-offset-mobile: -80px;
  }
}

@media (max-width: 550px) and (max-height: 660px) {
  :root {
    --building-offset-mobile: -30px;
  }
}

@media (max-width: 550px) and (max-height: 600px) {
  :root {
    --building-offset-mobile: 20px;
  }
}
