* { box-sizing: border-box; }
@font-face { font-family: "Gabriela Serif"; src: url("assets/cormorant-garamond-latin-400-normal.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "Gabriela Serif"; src: url("assets/cormorant-garamond-latin-500-normal.woff2") format("woff2"); font-style: normal; font-weight: 500; font-display: swap; }
@font-face { font-family: "Gabriela Serif"; src: url("assets/cormorant-garamond-latin-400-italic.woff2") format("woff2"); font-style: italic; font-weight: 400; font-display: swap; }
:root {
  color-scheme: light;
  font-family: "Gabriela Serif", Georgia, "Times New Roman", serif;
  font-weight: 500;
  color: #625e59;
  background: #fafaf9;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  --ink: #625e59;
  --secondary: #706d68;
  --motion: cubic-bezier(.22,.7,.18,1);
}
body { margin: 0; min-width: 280px; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
button, a { touch-action: manipulation; }
button:focus-visible, a:focus-visible { outline: 2px solid #726f69; outline-offset: 5px; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.experience {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: max(22px, calc((100svh - 700px) / 2), env(safe-area-inset-top)) 12px max(18px, env(safe-area-inset-bottom));
  overflow: clip;
}
.welcome {
  margin-bottom: 16px;
  display: flex;
  gap: 6px;
  color: var(--secondary);
  font-size: .9375rem;
  font-style: italic;
  text-align: center;
  line-height: 1.4;
  transition: opacity 500ms ease;
}
.stage {
  position: relative;
  width: min(100%, 454px);
  aspect-ratio: 2 / 3;
  flex: 0 0 auto;
  perspective: 1600px;
  isolation: isolate;
  box-shadow: 0 18px 50px -30px #807c7580;
}
.inner {
  position: absolute;
  inset: 0;
  background: #fbfbfa;
  text-align: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 800ms ease;
}
.inner-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.story-canvas { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 1100ms ease; overflow: hidden; }
.story-scene { position: absolute; inset: 0; margin: 0; text-align: center; }
.scene-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.story-copy { position: absolute; left: 12%; width: 76%; }
.story-kicker { font-size: .75rem; letter-spacing: .1em; line-height: 1.6; }
.story-copy h2 { font-weight: 400; font-size: 2rem; line-height: 1.2; margin: 0; }
.story-name .story-copy { top: 28%; }
.story-name h2 { font-size: 3.8rem; line-height: 1.25; margin: 10px 0 14px; }
.story-verse { font-size: 1.125rem; font-style: italic; font-weight: 400; line-height: 1.45; margin-top: 20px; }
.story-signature { font-size: .9375rem; font-style: italic; margin-top: 25px; line-height: 1.5; }
.story-water .story-copy { top: 12%; }
.story-steps .story-copy { top: 13%; left: 9%; width: 82%; }
.story-steps .story-signature { margin-top: 22px; }
.stage[data-state="opening"] .story-canvas, .stage[data-state="story"] .story-canvas { opacity: 1; visibility: visible; }
.stage[data-scene="invite"] .story-canvas { visibility: hidden; opacity: 0; }
.stage[data-state="opening"] .inner, .stage[data-state="story"] .inner { visibility: hidden; opacity: 0; }
.stage[data-scene="invite"] .inner { visibility: visible; opacity: 1; }
.stage[data-scene="invite"] .name-block, .stage[data-scene="invite"] .date-block, .stage[data-scene="invite"] .place-block { opacity: 1; transform: none; }
.stage[data-state="story"] .story-scene:not([hidden]) { animation: reveal-scene 1200ms ease both; }
.stage[data-state="story"] .story-scene:not([hidden]) .scene-art { animation: scene-drift 12s ease-out both; transform-origin: center; }
.stage.is-paused * { animation-play-state: paused !important; }
.story-controls { width: 100%; max-width: 320px; margin: 0 auto; }
.scene-label { font-size: .875rem; font-style: italic; min-height: 22px; }
.story-progress { height: 1px; margin: 7px 20px 0; background: #dedbd6; overflow: hidden; }
.story-progress span { display: block; height: 100%; width: 100%; background: #8c8780; transform-origin: left; transform: scaleX(0); }
.story-buttons { display: flex; justify-content: space-between; }
.story-buttons button { min-height: 44px; padding: 10px 12px; border: 0; background: transparent; font-size: .875rem; }
@keyframes reveal-scene { from { opacity: 0; } to { opacity: 1; } }
@keyframes scene-drift { from { transform: scale(1); } to { transform: scale(1.025); } }
.name-block, .date-block, .place-block {
  position: absolute;
  left: 12%;
  width: 76%;
  opacity: 0;
  transform: translateY(7px);
  transition: opacity 750ms ease, transform 1000ms var(--motion);
}
p { margin: 0; }
.name-block { top: 26.5%; }
.eyebrow { font-size: .9375rem; line-height: 1.4; }
h1 { font-weight: 400; font-size: 3.7rem; line-height: 1.1; margin: 4px 0 8px; letter-spacing: 0; }
h1:focus { outline: none; }
.tender { font-size: 1.0625rem; font-style: italic; font-weight:400; line-height: 1.4; color: var(--secondary); }
.date-block { top: 65.5%; }
.inviting { font-size: .9375rem; line-height: 1.4; margin-bottom: 10px; }
.date { font-size: 1.375rem; line-height: 1.4; white-space: nowrap; }
.date-divider { margin: 0 5px; color: #8f8b85; font-size: 1rem; }
.place-block { top: 78.5%; left: 34%; width: 60%; }
.chapel { font-size: 1.125rem; line-height: 1.35; }
.city { font-size: .9375rem; line-height: 1.5; margin-top: 8px; }
.doors { position: absolute; inset: 0; pointer-events: none; transform-style: preserve-3d; }
.door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.08%;
  background-image: url("assets/capa.webp");
  background-size: 200% 100%;
  background-repeat: no-repeat;
  backface-visibility: hidden;
  transition: transform 1800ms var(--motion), filter 1000ms ease, opacity 600ms ease 1250ms;
  will-change: transform;
}
.door-left { left: 0; transform-origin: left center; background-position: left center; }
.door-right { right: 0; transform-origin: right center; background-position: right center; }
.door::after { content: ""; position: absolute; inset: 0; background-image: url("assets/capa-iluminada.webp"); background-size: 200% 100%; background-repeat: no-repeat; opacity: 1; animation: pearl-light 2400ms ease both; }
.door-left::after { background-position: left center; }
.door-right::after { background-position: right center; }
.stage[data-state="illuminating"] .door::after { animation: pearl-light 1800ms ease both; }
@keyframes pearl-light { from { opacity: .1; } to { opacity: 1; } }
.ribbon-layer {
  position: absolute;
  top: 47.5%;
  left: -2%;
  width: 104%;
  aspect-ratio: 3;
  pointer-events: none;
}
.ribbon-tied { position: absolute; width: 100%; height: 100%; object-fit: contain; transition: opacity 600ms ease, transform 1000ms var(--motion); }
.loose { position: absolute; top: 0; width: 50%; height: 100%; background-image: url("assets/laco-solto.webp"); background-size: 200% 100%; background-repeat: no-repeat; opacity: 0; }
.loose-left { left: 0; background-position: left center; }
.loose-right { right: 0; background-position: right center; }
.open-target { position: absolute; inset: 0; width: 100%; border: 0; background: transparent; }
.open-target:focus-visible { outline-offset: 7px; }
.under-card { min-height: 44px; width: min(100%, 500px); text-align: center; margin-top: 12px; }
.open-caption { min-height: 44px; border: 0; background: transparent; font-size: .9375rem; font-style: italic; padding: 8px 10px; transition: opacity 350ms; }
.brand { color: #77736e; font-size: .75rem; line-height: 1.5; padding: 6px 0 0; }
.open-content { animation: arrive 650ms ease both; }
.blessing { padding: 6px 12px 16px; font-size: 1rem; font-style: italic; line-height: 1.55; color: var(--secondary); }
.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 24px; }
.primary-action { border: 1px solid #d1ceca; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; min-height: 44px; font-size: .9375rem; border-radius: 3px; background: #ffffff; text-decoration: none; }
.primary-action:hover { border-color: #8f8b85; }
.primary-action svg { width: 17px; height: 17px; }
.secondary-action { min-height: 44px; display: inline-flex; align-items: center; font-size: .9375rem; }
.replay { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: transparent; padding: 12px; margin-top: 6px; min-height: 44px; color: var(--secondary); font-size: .875rem; }
.replay svg { width: 14px; height: 14px; }
.stage[data-state="releasing"] .ribbon-tied { transform: scaleX(1.045) translateY(-2px); opacity: 0; }
.stage[data-state="releasing"] .loose { animation: loosen 1100ms var(--motion) both; }
.stage[data-state="releasing"] .loose-right { animation-name: loosen-right; }
.stage[data-state="opening"] .inner, .stage[data-state="open"] .inner { visibility: visible; opacity: 1; }
.stage[data-state="opening"] .door-left, .stage[data-state="open"] .door-left { transform: rotateY(-109deg); filter: brightness(.97); opacity: 0; }
.stage[data-state="opening"] .door-right, .stage[data-state="open"] .door-right { transform: rotateY(109deg); filter: brightness(.97); opacity: 0; }
.stage[data-state="opening"] .ribbon-layer, .stage[data-state="open"] .ribbon-layer { opacity: 0; visibility: hidden; }
.stage[data-state="opening"] .name-block, .stage[data-state="open"] .name-block { opacity: 1; transform: none; transition-delay: 350ms; }
.stage[data-state="opening"] .date-block, .stage[data-state="open"] .date-block { opacity: 1; transform: none; transition-delay: 650ms; }
.stage[data-state="opening"] .place-block, .stage[data-state="open"] .place-block { opacity: 1; transform: none; transition-delay: 850ms; }
.stage[data-state="open"] .open-target { display: none; }
.stage[data-state="story"] .door-left { transform: rotateY(-109deg); opacity: 0; }
.stage[data-state="story"] .door-right { transform: rotateY(109deg); opacity: 0; }
.stage[data-state="story"] .doors, .stage[data-state="story"] .ribbon-layer, .stage[data-state="story"] .open-target { visibility: hidden; }
.stage[data-state="opening"]:not([data-scene="invite"]) .inner { visibility: hidden; opacity: 0; }
.experience.is-open .welcome { opacity: 0; }
.stage.resetting *, .stage.resetting *::before, .stage.resetting *::after { transition: none !important; animation: none !important; }
.stage.readable { aspect-ratio: auto; }
.stage.readable .inner { position: relative; padding: 3.5rem 1rem 2rem; min-height: 35rem; }
.stage.readable .inner-art { opacity: .14; object-fit: cover; }
.stage.readable .name-block, .stage.readable .date-block, .stage.readable .place-block { position: relative; left: auto; top: auto; width: 100%; margin: 0; }
.stage.readable .date-block, .stage.readable .place-block { margin-top: 1.5rem; }
.stage.readable h1 { overflow-wrap: anywhere; }
.stage.readable .date { white-space: normal; }
.noscript-note { text-align: center; padding: 24px; line-height: 1.6; }
@keyframes arrive { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes loosen { 0% { opacity: 0; transform: translateX(0); } 35% { opacity: 1; transform: translateX(-1%); } 100% { opacity: 0; transform: translateX(-30%); } }
@keyframes loosen-right { 0% { opacity: 0; transform: translateX(0); } 35% { opacity: 1; transform: translateX(1%); } 100% { opacity: 0; transform: translateX(30%); } }
@media (max-width: 420px) {
  h1 { font-size: 3.2rem; }
  .eyebrow { font-size: .875rem; }
  .tender { font-size: .9375rem; }
  .name-block { top: 26%; }
  .date { font-size: 1.2rem; }
  .inviting { font-size: .875rem; margin-bottom: 7px; }
  .chapel { font-size: 1rem; }
  .city { font-size: .875rem; }
}
@media (max-width: 350px) {
  .story-copy h2 { font-size: 1.75rem; }
  .story-name h2 { font-size: 3.1rem; }
  .story-kicker { font-size: .6875rem; }
  .story-verse { font-size: 1rem; margin-top: 16px; }
  .story-signature { font-size: .875rem; margin-top: 18px; }
  .experience { padding-left: 10px; padding-right: 10px; }
  h1 { font-size: 2.7rem; margin-top: 2px; margin-bottom: 5px; }
  .tender { font-size: .875rem; }
  .date { font-size: 1.0625rem; }
  .date-divider { margin: 0 2px; }
  .place-block { top: 79%; }
  .chapel { font-size: 1rem; }
  .city { margin-top: 5px; }
  .welcome { gap: 4px; }
}
@media (min-width: 700px) and (min-height: 760px) {
  .experience { padding-top: 24px; padding-bottom: 24px; }
  .stage { width: 430px; }
  .experience.is-open { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 1ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
  .stage[data-state="open"] .doors { display: none; }
}
@media print {
  body { background: white; }
  .experience { padding: 0; display: block; overflow: visible; }
  .stage { width: 100%; max-width: 160mm; margin: 0 auto; box-shadow: none; }
  .inner { visibility: visible !important; opacity: 1 !important; }
  .name-block, .date-block, .place-block { opacity: 1 !important; transform: none !important; }
  .doors, .ribbon-layer, .open-target, .under-card, .welcome, .brand { display: none !important; }
}

/* The finished film carries the synchronized Kling scenes and original score. */
.invitation-film {position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#fafaf9;z-index:5;opacity:1;transition:opacity 1200ms ease;}
.invitation-film.is-ending {opacity:0;pointer-events:none;}
.cover-preview {position:absolute;inset:0;width:100%;height:100%;object-fit:contain;}
.cover-preview,.inner-art,.scene-art {filter:grayscale(.97);}
.stage.film-playing .cover-preview,.stage[data-state="open"] .cover-preview {display:none;}
.story-buttons .sound-invitation {border:1px solid #c7c2ba;border-radius:999px;background:#ffffffb8;padding-inline:14px;}
.stage.film-playing .doors,.stage.film-playing .ribbon-layer,.stage.film-playing .open-target,.stage.film-playing .story-canvas {display:none;}
.stage[data-state="closed"] .door::after {opacity:0;animation:none;}
.story-buttons {gap:4px;align-items:center;}
.story-buttons button {font-size:.875rem;}
@media (max-width:350px) {.story-buttons button{padding:10px 6px;}}

/* Sem legenda nem botão de música durante o filme */
#scene-label, .story-progress, #sound-story { display: none !important; }

/* Aviso discreto enquanto o filme começa sem som */
.stage.film-playing ~ .under-card .open-caption:not([hidden]) { animation: ilu-hint 2.6s ease-in-out infinite; }
@keyframes ilu-hint { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }

/* "Toque aqui para começar" no meio da capa: o toque inicia filme e música juntos */
#open-caption { display: none !important; }
.tap-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 6; }
.tap-hint span { font-style: italic; font-size: 1.125rem; letter-spacing: .01em; color: #57534e; padding: 12px 24px; border-radius: 999px; background: rgba(255,255,255,.84); border: 1px solid rgba(160,154,146,.55); box-shadow: 0 6px 24px rgba(60,55,50,.12); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: ilu-tap 2.4s ease-in-out infinite; }
@keyframes ilu-tap { 0%, 100% { opacity: .8; transform: scale(1); } 50% { opacity: 1; transform: scale(1.04); } }
.stage:not([data-state="closed"]) .tap-hint, .stage.film-playing .tap-hint { display: none; }
@media (prefers-reduced-motion: reduce) { .tap-hint span { animation: none; } }
