.cinematic-entry {
  --entry-ease: cubic-bezier(.22,.61,.36,1);
  position: fixed; inset: 0; z-index: 50; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 28px 20px; color: #f8f1e4; background: #193021;
}
.cinematic-entry::before { content: ""; position: absolute; inset: 0; background: linear-gradient(#122519b3,#122519f0),url("assets/patio-original.jpeg") center/cover; }
.cinematic-entry::after { content: ""; position: absolute; inset: 16px; border: 1px solid #e5c48d40; pointer-events: none; }
.entry-light { display: none; }
.entry-heading { position: relative; text-align: center; z-index: 2; flex-shrink: 0; }
.entry-heading span { display: block; font-size: .58rem; letter-spacing: .22em; text-transform: uppercase; margin-bottom: 12px; }
.entry-heading strong { font: 400 clamp(1.7rem,5vw,2.6rem) Georgia,serif; letter-spacing: -.045em; }
.entry-heading i { color: #e5c48d; font-weight: 400; }
.entry-composition { position: relative; flex-shrink: 0; width: min(84vw,440px,65svh); aspect-ratio: 1/1.2; isolation: isolate; }
.entry-envelope-back,.entry-envelope-pocket { position: absolute; left: 0; top: 48%; width: 100%; height: 45%; border-radius: 3px; }
.entry-envelope-back { z-index: 1; background: linear-gradient(145deg,#b9a384,#deceb0); box-shadow: 0 20px 45px #0005; }
.entry-envelope-pocket { z-index: 3; background: linear-gradient(32deg,#deceb0,#f2e6cf); clip-path: polygon(0 0,50% 56%,100% 0,100% 100%,0 100%); }
.entry-envelope-pocket::after { content: ""; position: absolute; inset: 0; background: linear-gradient(145deg,#f5ead6,#e3d1b1); clip-path: polygon(0 100%,50% 44%,100% 100%); }
.entry-envelope-flap { position: absolute; top: 48%; left: 0; width: 100%; height: 26%; z-index: 4; transform-origin: center top; }
.entry-envelope-flap > div { width: 100%; height: 100%; background: linear-gradient(170deg,#f7ecda,#dfc9a7); clip-path: polygon(0 0,100% 0,50% 100%); }
.entry-card-stage { position: absolute; inset: 0; z-index: 2; overflow: hidden; clip-path: inset(0 0 7%); }
.entry-card { position: absolute; width: 72%; aspect-ratio: 2/3; left: 14%; top: 49%; border-radius: 2px; overflow: hidden; transform: translateY(0); background: #f6ecda; box-shadow: 0 8px 24px #3f2a1733; }
.entry-card-paper { display: block; width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.entry-card-copy { position: absolute; inset: 20% 10%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; color: #49604a; }
.entry-card-copy > span { color: #ae704f; font: italic clamp(.65rem,2vw,.9rem) Georgia,serif; }
.entry-card-copy strong { font: 400 clamp(1.7rem,6vw,3rem)/1.05 Georgia,serif; letter-spacing: -.06em; margin: 18px 0; }
.entry-card-copy strong i { color: #b57855; font-size: .72em; }
.entry-card-copy small { font-size: clamp(.46rem,1.5vw,.65rem); line-height: 1.8; letter-spacing: .1em; text-transform: uppercase; }
.entry-seal-button { position: absolute; z-index: 5; left: 41%; top: 62%; width: 18%; aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; background: transparent; touch-action: manipulation; }
.entry-seal-button img { display: block; height: 100%; width: 100%; object-fit: contain; filter: drop-shadow(0 4px 4px #49221855); }
.entry-seal-button:focus-visible { outline: 2px solid #e5c48d; outline-offset: 8px; }
.entry-instruction { display: flex; align-items: center; gap: 10px; position: relative; font-size: .58rem; letter-spacing: .16em; text-transform: uppercase; flex-shrink: 0; }
.entry-instruction svg { color: #e5c48d; }
.entry-note { display: none; }
.cinematic-entry.is-opening { animation: entryFade .8s ease-in-out 3.1s both; }
.is-opening .entry-heading,.is-opening .entry-instruction { animation: entryTextOut .5s ease both; }
.is-opening .entry-seal-button { animation: sealLift .65s var(--entry-ease) both; }
.is-opening .entry-envelope-flap { animation: flapOpen 1s ease-in-out .3s both; }
.is-opening .entry-card { animation: cardRise 1.5s var(--entry-ease) 1.05s both; will-change: transform; }
.is-opening .entry-envelope-back,.is-opening .entry-envelope-pocket { animation: envelopeOut .9s ease-in-out 1.9s both; }
@keyframes entryFade { from { opacity: 1; } to { opacity: 0; } }
@keyframes entryTextOut { to { opacity: 0; } }
@keyframes sealLift { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(-24px) scale(1.12); } }
@keyframes flapOpen {
  0% { transform: scaleY(1); z-index: 4; opacity: 1; }
  49% { z-index: 4; }
  50% { transform: scaleY(0); z-index: 0; }
  100% { transform: scaleY(-1); z-index: 0; opacity: 0; }
}
@keyframes cardRise { from { transform: translateY(0); } to { transform: translateY(-53%); } }
@keyframes envelopeOut { to { opacity: 0; transform: translateY(32px); } }
@media (prefers-reduced-motion: reduce) {
  .cinematic-entry.is-opening { animation-delay: 0s; }
  .is-opening .entry-card,.is-opening .entry-seal-button,.is-opening .entry-envelope-flap,
  .is-opening .entry-envelope-back,.is-opening .entry-envelope-pocket { animation: none; }
}

/* The seal comes forward before the envelope opens. */
.entry-seal-button { transform-origin: 50% 50%; }
.cinematic-entry.is-opening { animation-delay: 4.5s; }
.is-opening .entry-seal-button { animation: sealPortrait 2.05s cubic-bezier(.4,0,.2,1) both; }
.is-opening .entry-envelope-flap { animation-delay: 1.7s; }
.is-opening .entry-card { animation-delay: 2.45s; }
.is-opening .entry-envelope-back,.is-opening .entry-envelope-pocket { animation-delay: 3.3s; }
@keyframes sealPortrait {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  35%,65% { transform: translateY(-110%) scale(3.8); opacity: 1; }
  100% { transform: translateY(-140%) scale(4.1); opacity: 0; }
}


/* Layered stationery and botanical finishing. */
.entry-composition { width: min(86vw,490px,65svh); }
.entry-envelope-back { background: linear-gradient(145deg,#c4b28e,#e8d9b9); box-shadow: 0 25px 55px #0005,0 3px 5px #0003; }
.entry-envelope-pocket { background: repeating-linear-gradient(15deg,#ffffff08 0 1px,transparent 1px 3px),linear-gradient(32deg,#d9c6a3,#f5e8cf); }
.entry-envelope-pocket::after { background: repeating-linear-gradient(100deg,#ad956210 0 1px,transparent 1px 3px),linear-gradient(145deg,#f7edd9,#e3d1b1); }
.entry-envelope-flap { filter: drop-shadow(0 2px 1px #5d48252b); }
.entry-envelope-flap > div { background: repeating-linear-gradient(15deg,#b99f7012 0 1px,transparent 1px 3px),linear-gradient(170deg,#f7ecda,#dfc9a7); }
.entry-envelope-flap > div::after { content: ""; position: absolute; inset: 5px 8px 9px; background: #b59a6355; clip-path: polygon(0 0,50% 98%,100% 0,99.5% 0,50% 96%,.5% 0); }
.envelope-signature { position: absolute; z-index: 1; left: 0; right: 0; bottom: 9%; text-align: center; font: italic clamp(.75rem,2.5vw,1rem) Georgia,serif; color: #88734b; letter-spacing: .03em; }
.entry-stationery { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.entry-sprig { position: absolute; width: 35%; height: 48%; object-fit: contain; left: 44%; top: 32%; transform: rotate(24deg); filter: drop-shadow(1px 3px 2px #423b2230); }
.entry-cord { position: absolute; left: 0; right: 0; top: 69%; height: 3px; background: repeating-linear-gradient(65deg,#a99365 0 2px,#e0d0ad 2px 4px); box-shadow: 0 2px 2px #45381a33; transform: rotate(1deg); }
.entry-cord-second { top: 70.2%; transform: rotate(-1deg); }
.entry-seal-button { z-index: 6; }
.entry-note { display: block; position: relative; font-size: .51rem; letter-spacing: .16em; text-transform: uppercase; margin: 20px 0 0; opacity: .6; }
.is-opening .entry-stationery { animation: stationeryRelease .8s ease 1.5s both; }
.is-opening .entry-note { animation: entryTextOut .5s ease both; }
@keyframes stationeryRelease { to { opacity: 0; transform: translateY(20px); } }

.cinematic-entry .entry-heading strong{display:block}.cinematic-entry .entry-card-copy strong{display:block}.cinematic-entry .entry-card-copy small{display:block}.cinematic-entry .entry-instruction{margin:0}.cinematic-entry .entry-note{margin:20px 0 0}.cinematic-entry .quiet{position:absolute;bottom:20px;font-size:11px}.cinematic-entry .entry-seal-button img{max-width:none}@media(prefers-reduced-motion:reduce){.cinematic-entry.is-opening{animation-delay:0s;animation-duration:.01ms}.is-opening .entry-stationery{animation:none}}
