@font-face { font-family: "Great Vibes"; src: url("/fonts/gv.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("/fonts/cg.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("/fonts/cgi.woff2") format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Jost"; src: url("/fonts/jost.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --paper: #F3E6D2;
  --paper-deep: #EADBC3;
  --bronze: #946654;      /* bronze-rosé do nome e do XV */
  --sepia: #664A3B;       /* dados */
  --ink-soft: rgba(102, 74, 59, .78);
  --script: "Great Vibes", cursive;
  --serif: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --sans: "Jost", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { overflow-x: clip; }
body {
  background: var(--paper);
  color: var(--sepia);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.is-act1 { overflow: hidden; height: 100svh; }
img { display: block; max-width: 100%; }
h1, h2, p { margin: 0; font-weight: inherit; }
a { color: inherit; }

/* ───────── Palco (vídeo e quadros fixos) ───────── */

.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--paper-deep);
}
/* geometria comum: tela cheia no celular, coluna 9:16 em telas largas */
.stage__frame, .act1 {
  position: fixed;
  inset: 0;
}
.stage__frame > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
}
.stage__video { opacity: 0; }
.stage__still--end { opacity: 0; transition: opacity .8s ease; }
body.is-playing .stage__video { opacity: 1; }
body.is-playing .stage__still--start { opacity: 0; }
body.is-ended .stage__still--end { opacity: 1; }
.stage__blur { display: none; }

@media (min-aspect-ratio: 3/4) {
  .stage__frame, .act1 {
    left: 50%;
    right: auto;
    width: calc(100vh * 9 / 16);
    translate: -50% 0;
  }
  .stage__blur {
    display: block;
    position: absolute;
    inset: -60px;
    background: url("/img/inicio.webp") center / cover;
    filter: blur(40px) saturate(.85);
    opacity: .45;
    transition: background-image .8s ease;
  }
  body.is-ended .stage__blur, body.is-act2 .stage__blur { background-image: url("/img/jardim-v3.webp"); }
}

/* ───────── Primeiro Ato ───────── */

.act1 {
  z-index: 2;
  overflow: hidden;
  container-type: size;
  pointer-events: none;
}
.act1 > * { pointer-events: auto; }
.act1.is-gone { display: none; }

.lockup {
  position: absolute;
  left: 0;
  right: 0;
  /* o nome fica na faixa mais larga do céu (41 a 50% da altura), longe das copas */
  top: 35.4%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--bronze);
  pointer-events: none;
  transition: opacity .9s cubic-bezier(.4, 0, .6, 1), transform .9s cubic-bezier(.4, 0, .6, 1), filter .9s ease;
}
.lockup__xv {
  font-weight: 500;
  font-size: 4.6cqh;
  line-height: 1;
  letter-spacing: .18em;
  padding-left: .18em;
}
.lockup__name {
  font-family: var(--script);
  font-size: min(4.7cqh, 10.5cqw);
  line-height: 1.25;
  margin-top: .5cqh;
  white-space: nowrap;
}
.lockup__date {
  font-family: var(--sans);
  font-size: max(11px, 1.6cqh);
  letter-spacing: .34em;
  padding-left: .34em;
  color: var(--sepia);
  margin-top: .9cqh;
}
body.is-opening .lockup { opacity: 0; transform: translateY(-2.5cqh); filter: blur(6px); }

.enter {
  position: absolute;
  left: 50%;
  top: 70.9%;
  translate: -50% -50%;
  width: 0;
  height: 0;
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  cursor: pointer;
  transition: opacity .4s ease;
}
.enter:disabled { cursor: default; }
.enter > * { position: absolute; left: 50%; top: 50%; translate: -50% -50%; }
.enter__ring {
  width: 70px;
  height: 70px;
  rotate: -90deg;
  filter: drop-shadow(0 4px 14px rgba(52, 34, 24, .35));
  transition: opacity .5s ease, scale .5s ease;
}
.enter__track, .enter__progress { stroke-width: 4.5; }
.enter__track { fill: rgba(246, 236, 220, .94); stroke: rgba(148, 102, 84, .2); }
.enter__progress {
  fill: none;
  stroke: var(--bronze);
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--p, 0) * 100);
  transition: stroke-dashoffset .3s ease;
}
.enter__pct {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--sepia);
  font-variant-numeric: tabular-nums;
  transition: opacity .4s ease;
}
.enter__wait {
  top: calc(50% + 56px);
  white-space: nowrap;
  padding: .45em 1.1em .5em;
  border-radius: 999px;
  background: rgba(246, 236, 220, .9);
  box-shadow: 0 4px 14px rgba(52, 34, 24, .25);
  font-style: italic;
  font-size: 15px;
  line-height: 1;
  color: var(--sepia);
  transition: opacity .4s ease;
}
.enter__label {
  display: block;
  white-space: nowrap;
  padding: 1.05em 2.1em 1em 2.4em;
  font-family: var(--serif);
  font-weight: 600;
  font-size: max(15px, 2.1cqh);
  letter-spacing: .3em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--paper);
  border-radius: 999px;
  background: rgba(124, 84, 68, .92);
  box-shadow: inset 0 0 0 1px rgba(243, 230, 210, .55),
              inset 0 0 0 4px rgba(124, 84, 68, .92),
              inset 0 0 0 5px rgba(243, 230, 210, .3),
              0 6px 22px rgba(52, 34, 24, .35);
  transition: opacity .6s ease, scale .6s cubic-bezier(.2, .8, .2, 1), background-color .25s ease;
}
.enter__label::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: inherit;
  border: 1px solid rgba(243, 230, 210, .8);
  animation: breathe 2.6s ease-in-out infinite;
}
.enter.is-loading .enter__label { opacity: 0; scale: .85; }
.enter:not(.is-loading) .enter__ring { opacity: 0; scale: 1.3; }
.enter:not(.is-loading) .enter__wait, .enter:not(.is-loading) .enter__pct { opacity: 0; }
.enter:hover .enter__label { background-color: rgba(110, 72, 58, .95); }
.enter:active .enter__label { scale: .96; }
.enter:focus-visible { outline: none; }
.enter:focus-visible .enter__label { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--bronze); }
body.is-opening .enter { opacity: 0; pointer-events: none; }
@keyframes breathe {
  0%, 100% { opacity: 0; transform: scale(.94); }
  50% { opacity: 1; transform: scale(1.04); }
}

/* ───────── Segundo Ato ───────── */

.act2 {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: none;
}
body.is-act2 .act2 { display: block; }

/* névoa atrás dos textos: textura irregular em duas camadas que derivam devagar,
   concentrada no céu (título) e no caminho (dados e botões) */
.mist {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 2.8s cubic-bezier(.3, 0, .2, 1);
  -webkit-mask-image:
    radial-gradient(ellipse 80% 14% at 50% 12%, #000 0%, rgba(0, 0, 0, .8) 50%, transparent 100%),
    radial-gradient(ellipse 105% 19% at 50% 51%, #000 0%, #000 50%, rgba(0, 0, 0, .75) 72%, transparent 100%),
    radial-gradient(ellipse 90% 12% at 50% 89%, rgba(0, 0, 0, .7) 0%, rgba(0, 0, 0, .45) 55%, transparent 100%);
  mask-image:
    radial-gradient(ellipse 80% 14% at 50% 12%, #000 0%, rgba(0, 0, 0, .8) 50%, transparent 100%),
    radial-gradient(ellipse 105% 19% at 50% 51%, #000 0%, #000 50%, rgba(0, 0, 0, .75) 72%, transparent 100%),
    radial-gradient(ellipse 90% 12% at 50% 89%, rgba(0, 0, 0, .7) 0%, rgba(0, 0, 0, .45) 55%, transparent 100%);
}
.mist__layer {
  position: absolute;
  inset: 0;
  background: url("/img/nevoa.webp") 0 0 / 150vmax auto repeat;
  animation: mist-drift 70s linear infinite;
}
.mist__layer--b {
  background-size: 95vmax auto;
  opacity: .85;
  animation-duration: 48s;
  animation-direction: reverse;
}
@keyframes mist-drift {
  from { background-position: 0 0; }
  to { background-position: 150vmax 18vmax; }
}
body.is-act2.is-in .mist { opacity: 1; }

.act2__body {
  --w: min(88vw, 400px);
  position: relative;
  width: var(--w);
  min-height: 100svh;
  margin: 0 auto;
  padding: max(5.5svh, calc(env(safe-area-inset-top) + 18px)) 0 max(3svh, calc(env(safe-area-inset-bottom) + 10px));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  container-type: inline-size;
  /* halo cor de papel: separa as letras do cenário sem caixa nenhuma */
  text-shadow: 0 0 12px rgba(252, 247, 238, .95), 0 0 4px rgba(252, 247, 238, .9);
}
.act2__body .btn { text-shadow: none; }
@media (min-aspect-ratio: 3/4) {
  .mist { left: 50%; right: auto; width: calc(100vh * 9 / 16); translate: -50% 0; }
  .act2__body { --w: min(calc(100vh * 9 / 16 * .86), 400px); }
}

.a2__crown { width: 11cqw; height: auto; }
.a2__intro {
  margin-top: 2.4cqw;
  font-style: italic;
  font-size: 4.6cqw;
  line-height: 1.28;
  color: var(--sepia);
}
.a2__xv {
  margin-top: 2.6cqw;
  font-weight: 500;
  font-size: 10.5cqw;
  line-height: 1;
  letter-spacing: .18em;
  padding-left: .18em;
  color: var(--bronze);
}
.a2__name {
  font-family: var(--script);
  font-size: 13cqw;
  line-height: 1.2;
  color: var(--bronze);
  white-space: nowrap;
}
.a2__heart { width: 14cqw; height: auto; }
/* dados do evento no centro da tela, entre o título e os botões */
.info {
  margin: auto 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.info .facts { margin-top: 0; }

.facts {
  list-style: none;
  margin: 4.6cqw 0 0;
  padding: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.fact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2cqw;
  padding: 0 1cqw;
}
.fact + .fact { border-left: 1px solid rgba(148, 102, 84, .45); }
.fact__icons { display: flex; gap: 1cqw; }
.fact__icon { height: 6.6cqw; width: auto; }
.fact__big {
  font-weight: 500;
  font-size: 6.6cqw;
  line-height: 1;
  color: var(--sepia);
}
.fact__big--word {
  font-size: 4.6cqw;
  letter-spacing: .14em;
  padding-left: .14em;
  text-transform: uppercase;
  line-height: 1.43;
}
.fact__small {
  font-family: var(--sans);
  font-weight: 500;
  font-size: max(10px, 2.8cqw);
  line-height: 1.5;
  letter-spacing: .18em;
  padding-left: .18em;
  text-transform: uppercase;
  color: var(--sepia);
}

.address {
  margin-top: 4.6cqw;
  font-style: italic;
  font-size: 4.4cqw;
  line-height: 1.3;
  text-decoration: none;
  color: var(--sepia);
}
.address__map {
  display: block;
  margin-top: 1.2cqw;
  font-family: var(--sans);
  font-style: normal;
  font-size: 2.5cqw;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--bronze);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .5em;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: max(44px, 10.6cqw);
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: max(12px, 3cqw);
  letter-spacing: .2em;
  padding-left: .2em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color .25s ease, color .25s ease, transform .2s ease;
}
.btn:active { transform: scale(.97); }
.btn--primary {
  background: var(--bronze);
  color: #FBF5EA;
  box-shadow: inset 0 0 0 1px rgba(251, 245, 234, .35), 0 4px 14px rgba(102, 74, 59, .22);
}
.btn--primary:hover { background: #7E5545; }
.btn--ghost {
  color: var(--bronze);
  background: rgba(252, 247, 238, .72);
  box-shadow: inset 0 0 0 1px rgba(148, 102, 84, .7);
}
.btn--ghost:hover { background: rgba(252, 247, 238, .9); }
.btn:focus-visible, .address:focus-visible, .replay:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 3px;
}

.actions {
  margin-top: 0;
  width: 84%;
  display: flex;
  flex-direction: column;
  gap: 2.4cqw;
}
.replay {
  margin-top: 2.6cqw;
  appearance: none;
  border: 0;
  background: none;
  padding: 8px 14px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* entrada dos elementos: começa enquanto a câmera ainda desacelera */
.act2 .r { opacity: 0; }
body.is-in .act2 .r { animation: rise 1.1s cubic-bezier(.2, .7, .2, 1) calc(var(--i, 0) * .12s) both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); filter: blur(3px); }
  to { opacity: 1; transform: none; filter: none; }
}

.petals {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .enter__label::before { animation: none; }
  body.is-in .act2 .r { animation: fade .6s ease both; }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
}
