@import url("layout.css");
:root { --paper:#f9f0e0; --wine:#530c1b; --script:"Snell Roundhand","URW Chancery L","Apple Chancery",cursive; --serif:"Times New Roman",serif; }
* { box-sizing:border-box }
body { margin:0; background:var(--paper); overflow-x:clip }
body:has(#envelope:not([hidden])),body:has(dialog[open]) { overflow:hidden }
button { background:none; border:0; padding:0; color:inherit; font:inherit; cursor:pointer }
button:focus-visible { outline:2px solid var(--wine); outline-offset:3px }
[hidden] { display:none!important }
main { width:450px; margin:auto; zoom:var(--scale,1) }
section { position:relative }
.layer { position:absolute; margin:0; padding:0; pointer-events:none; text-align:center }
button.layer,.layer:has(iframe) { pointer-events:auto }
.text { display:block; align-content:center }
.layer img,.layer svg,iframe { display:block; width:100%; height:100%; border:0 }
iframe { border-radius:14px }
.swans { width:100%; height:100%; object-fit:cover }
#envelope { position:fixed; inset:0; width:100%; height:100%; z-index:100; background:var(--paper); display:grid; place-items:center; transition:opacity .85s }
#envelope.leaving { opacity:0; pointer-events:none }
.envelope-card { position:relative; width:min(92vw,435px,47vh); aspect-ratio:9/16; display:block }
.envelope-card img,.envelope-card video { position:absolute; inset:0; width:100%; height:100%; object-fit:contain }
.envelope-card video { opacity:0 }
#envelope.playing video { opacity:1 }
#envelope.playing .tap { opacity:0 }
.tap { position:absolute; left:0; width:100%; top:69%; color:#9a8062; font:11px Georgia,serif; text-transform:uppercase; letter-spacing:3px; animation:breathe 2s ease-in-out infinite }
.tap i { display:block; margin:0 auto 12px; width:10px; height:10px; transform:rotate(45deg); border-left:1px solid; border-top:1px solid }
@keyframes breathe { 50% { opacity:.42 } }
#audio-toggle { position:fixed; z-index:50; right:20px; bottom:20px; border-radius:50%; width:60px; height:60px; background:var(--wine); color:white; font:22px system-ui; box-shadow:0 2px 6px #38101c22 }
.clock { height:100%; display:flex; align-items:center; justify-content:center; gap:23px; color:#b18e49; font-family:Ovo,Georgia,serif }
.clock span { position:relative; display:grid; gap:5px }
.clock span+span::before { content:":"; position:absolute; left:-19px; font-size:42px }
.clock b { font-size:46px; font-weight:400; font-variant-numeric:tabular-nums }
.clock small { font-size:16px }
.tracking-rose { translate:0 var(--rose,0px) }
.motion [data-reveal] { transition:opacity 1.1s ease,translate 1.1s ease,scale 1.1s ease }
.motion [data-reveal]:not(.visible) { opacity:0 }
.motion [data-reveal=fadeinup]:not(.visible) { translate:0 24px }
.motion [data-reveal=fadeinleft]:not(.visible) { translate:-20px 0 }
.motion [data-reveal=fadeinright]:not(.visible) { translate:20px 0 }
.motion [data-reveal=zoomin]:not(.visible) { scale:.9 }
dialog { color:#191411; background:#fffaf6; border:none; border-radius:5px; width:min(560px,94vw); max-height:94dvh; padding:40px 45px; font:20px Georgia,serif }
dialog::backdrop { background:#16130fa6 }
dialog h2,dialog form>p { text-align:center; font-size:20px; font-weight:400; margin:0 0 12px }
dialog form>p { margin-bottom:34px;font-size:18px }
dialog form>label,fieldset { display:block; margin:0 0 28px; border:none; padding:0 }
dialog input:not([type=radio]) { display:block; width:100%; height:60px; border:1px solid #cfc5bf; border-radius:5px; margin-top:9px; padding:12px; background:transparent; font:inherit }
dialog small,fieldset label { display:block; font-size:16px; margin-top:8px }
dialog .close { position:absolute; top:7px; right:13px; font:29px Arial }
.submit { width:100%; color:white; background:var(--wine); border-radius:20px; height:60px }
output { display:block; margin-top:12px; font-size:16px }
@media(max-width:500px){dialog{padding:34px 22px}#audio-toggle{width:44px;height:44px;right:12px;bottom:12px}}
@media(prefers-reduced-motion:reduce){*,*::before{transition-duration:.01ms!important;animation:none!important}.tracking-rose{translate:0 0}}
