:root{color-scheme:dark;--navy:#071326;--deep:#040c1a;--silver:#d7e3f1;--silver-bright:#f5f8ff;--white:#f3f6fc;--muted:#a9b6cc;--line:rgba(215,227,241,.24);--serif:'Cormorant Garamond',Georgia,serif;--sans:Manrope,Arial,sans-serif}
*{box-sizing:border-box}html{background:var(--deep);scroll-behavior:smooth}body{margin:0;color:var(--white);font-family:var(--sans);font-size:16px;line-height:1.6;background:radial-gradient(ellipse at 50% 25%,#172949 0%,#071326 50%,#030915 100%);min-height:var(--stage-height)}body:has(dialog[open]){overflow:hidden}button,input,textarea{font:inherit}button,a,input,textarea{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:wait;opacity:.65}button{color:inherit}button:focus-visible,a:focus-visible{outline:2px solid var(--silver-bright);outline-offset:5px}button svg,a svg{width:20px;height:20px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}button{border:0}button[hidden],a[hidden],[hidden]{display:none!important}a{color:inherit}.svg-library{position:absolute;width:0;height:0;overflow:hidden}.eyebrow{text-transform:uppercase;font-size:11px;letter-spacing:.2em;font-weight:600;color:var(--silver);margin:0}.invitation{position:relative;isolation:isolate;max-width:480px;margin:auto;min-height:var(--stage-height);overflow:hidden;background:var(--navy);box-shadow:0 0 100px #0005}.invite-heading{position:absolute;top:calc(48px + env(safe-area-inset-top,0px));left:16px;right:16px;text-align:center;text-shadow:0 2px 20px #031027,0 0 40px #031027}.invite-heading h1{font-family:var(--serif);font-size:clamp(82px,23vw,110px);line-height:1;letter-spacing:-.035em;color:var(--silver-bright);font-weight:500;margin:9px 0 9px}.birthday-line{display:flex;align-items:center;justify-content:center;gap:11px}.birthday-line p{font-family:var(--serif);font-size:24px;font-style:italic;margin:0;line-height:1.4}.birthday-line>span{height:1px;width:31px;background:linear-gradient(90deg,transparent,var(--silver));opacity:.7}.birthday-line>span:last-child{transform:rotate(180deg)}.invite-details{position:relative;text-align:center;padding:0 25px 25px;margin-top:clamp(540px,calc(100svh - 295px),650px)}.event-summary{color:var(--muted);font-size:12px;letter-spacing:.025em;margin:8px 0 20px}.action-buttons{display:grid;gap:11px}.button{display:flex;align-items:center;justify-content:center;gap:11px;min-height:55px;padding:14px 20px;border-radius:12px;font-size:14px;font-weight:700;line-height:1.4;text-align:center;text-decoration:none;transition:transform .2s,box-shadow .2s,background .2s}.button:active{transform:scale(.975)}.button-silver{position:relative;overflow:hidden;background:linear-gradient(110deg,#91aacb,#edf3fc 45%,#b7c9e1);color:#19243b;box-shadow:0 5px 25px #0003,inset 0 1px 0 #fff7}.button-silver:hover{box-shadow:0 5px 30px #d7e3f124,inset 0 1px 0 #fff7}.rsvp-button{letter-spacing:.01em}.rsvp-button svg{width:19px;height:19px}.secondary-actions{display:grid;grid-template-columns:1fr 1fr;gap:11px}.button-outline{border:1px solid var(--line);background:linear-gradient(140deg,#17294280,#0b1b3080);color:#dce7f7;font-size:12px;min-height:69px;padding:12px 10px;gap:10px}.button-outline:hover{background:#243a5260;border-color:#d7e3f159}.button-outline svg{width:22px;height:22px;color:var(--silver)}.replay-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;background:transparent;color:#a1aec3;font-size:11px;padding:9px 12px}.replay-button svg{width:12px;height:12px}.welcome{position:fixed;inset:0;z-index:20;margin:auto;max-width:480px;background:var(--navy);display:flex;align-items:center;justify-content:center;overflow:hidden;transition:opacity .7s,visibility .7s}.welcome-picture{position:absolute;inset:-12px;background:linear-gradient(180deg,#06112673,#061126ba 33%,#061126f0 70%,#061126),var(--night-art) center/cover;filter:blur(3px);opacity:.65;transform:scale(1.025)}.welcome::after{content:'';position:absolute;inset:13px;border:1px solid #d7e3f126;border-radius:180px 180px 12px 12px;pointer-events:none}.welcome-content{position:relative;z-index:1;width:100%;padding:35px 29px 70px;text-align:center}.welcome-emblem{position:relative;display:grid;place-items:center;width:108px;height:104px;margin:0 auto 30px}.welcome-emblem svg{width:90px;height:80px;fill:var(--silver);filter:drop-shadow(0 0 22px #d7e3f144);opacity:.93}.welcome-emblem span{position:absolute;top:31px;left:0;right:0;color:#1d2b43;font-family:var(--serif);font-size:58px;line-height:1}.welcome .eyebrow{font-size:9px;letter-spacing:.14em}.welcome h2{font-family:var(--serif);font-size:clamp(38px,10vw,48px);font-weight:500;line-height:1.1;letter-spacing:-.025em;margin:21px 0;color:#f4f7fd}.welcome h2 em{font-weight:500;color:var(--silver)}.welcome-divider{display:flex;align-items:center;justify-content:center;gap:14px;font-size:12px;color:var(--silver);margin:25px auto 21px}.welcome-divider span{width:40px;height:1px;background:#d7e3f150}.welcome-name{font-family:var(--serif);font-size:28px;line-height:1.3;color:var(--silver);margin:0 0 32px}.welcome-name span{font-family:var(--sans);display:block;font-size:11px;letter-spacing:.2em;text-transform:uppercase;margin-top:9px;color:#d5dce8}.open-invitation{width:100%;max-width:310px;margin:0 auto;font-size:14px;min-height:57px}.open-invitation svg{width:18px;height:18px}.sound-hint{display:flex;align-items:center;justify-content:center;gap:7px;margin:15px 0 0;font-size:10px;color:#9faec4}.sound-hint svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.5}.welcome-footnote{position:absolute;bottom:max(29px,env(safe-area-inset-bottom));z-index:1;font-family:var(--serif);font-style:italic;color:#8b9ab3;font-size:14px;padding:0 20px;text-align:center}.loading-note{position:absolute;left:15px;right:15px;bottom:7px;font-size:12px;color:var(--silver)}.skip-button{position:absolute;bottom:calc(25px + env(safe-area-inset-bottom));right:19px;background:#071326a6;border:1px solid #ffffff38;backdrop-filter:blur(8px);border-radius:30px;font-size:11px;font-weight:500;display:flex;align-items:center;gap:7px;padding:10px 15px}.skip-button svg{color:var(--silver);width:12px;height:12px}.video-progress{position:absolute;left:0;bottom:0;height:2px;width:100%;background:#ffffff14}.video-progress span{height:100%;width:0;display:block;background:var(--silver);transition:width .15s linear}.sound-button{position:fixed;top:calc(17px + env(safe-area-inset-top));right:max(17px,calc((100vw - 480px)/2 + 17px));display:grid;place-items:center;z-index:15;width:38px;height:38px;border:1px solid #d7e3f12c;border-radius:50%;background:#09182c90;backdrop-filter:blur(12px);color:var(--silver)}.sound-button svg{width:17px;height:17px}.toast{position:fixed;left:50%;bottom:30px;transform:translate(-50%,15px);background:#192c46f2;border:1px solid var(--line);border-radius:30px;padding:10px 20px;font-size:12px;z-index:50;text-align:center;min-width:200px;opacity:0;pointer-events:none;transition:opacity .3s,transform .3s}.toast.visible{opacity:1;transform:translate(-50%,0)}
.detail-dialog{position:fixed;max-height:calc(100dvh - 32px);width:calc(100% - 30px);max-width:420px;border:1px solid #b4c7e14d;background:radial-gradient(ellipse at top,#182d49,#0a172c 60%);border-radius:24px;padding:38px 25px 28px;color:var(--white);box-shadow:0 30px 100px #0009;overscroll-behavior:contain}.detail-dialog::backdrop{background:#020916bd;backdrop-filter:blur(8px)}.detail-dialog[open]{animation:dialog-in .3s ease}.detail-dialog .close-dialog:not(.button){position:absolute;top:12px;right:12px;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;color:#b2bfd0;background:#ffffff09}.close-dialog svg{width:18px;height:18px}.dialog-icon{display:grid;place-items:center;width:54px;height:54px;margin:0 auto 22px;border:1px solid var(--line);border-radius:50%;color:var(--silver);background:#d7e3f108}.dialog-icon svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round}.detail-dialog .eyebrow{text-align:center;font-size:9px;letter-spacing:.14em}.detail-dialog h2{font-family:var(--serif);font-size:36px;font-weight:500;line-height:1.15;text-align:center;margin:13px 0 12px;color:var(--silver-bright);letter-spacing:-.02em}.dialog-description{font-size:13px;text-align:center;color:#b8c4d6;margin:0 0 27px;line-height:1.8}form label{display:block;margin:16px 0 8px;font-size:12px;font-weight:600;color:#e7edf7}form label span{font-size:10px;font-weight:400;color:#9eacc0}input,textarea{background:#050f20a6;border:1px solid #889cb038;border-radius:9px;color:var(--white);outline:none;padding:13px 12px;width:100%;font-size:16px;transition:border-color .2s}input::placeholder,textarea::placeholder{font-size:12px;color:#8190a6}input:focus,textarea:focus{border-color:var(--silver)}textarea{resize:vertical;min-height:80px}.guest-counts{display:grid;grid-template-columns:1fr 1fr;gap:15px}.stepper{display:flex;align-items:center;border:1px solid #889cb038;border-radius:9px;background:#050f20a6;overflow:hidden}.stepper button{width:40px;height:46px;flex-shrink:0;background:transparent;color:var(--silver);font-size:21px}.stepper button:disabled{opacity:.25;cursor:default}.stepper input{border:0;background:transparent;text-align:center;border-radius:0;padding:8px 0;min-width:0;appearance:textfield;-moz-appearance:textfield}.stepper input::-webkit-inner-spin-button,.stepper input::-webkit-outer-spin-button{appearance:none}.field-hint{font-size:10px;color:#8999af;margin:8px 0 0}.submit-rsvp{width:100%;font-size:13px;margin-top:19px}.privacy-note{color:#8e9eb4;font-size:10px;text-align:center;margin:14px 0 0}.form-error{font-size:12px;color:#ffbfb4;margin:8px 0 0}.rsvp-success{text-align:center}.success-check{width:56px;height:56px;display:grid;place-items:center;border-radius:50%;background:#d7e3f115;color:var(--silver);margin:25px auto 15px}.success-check svg{width:27px;height:27px;fill:none;stroke:currentColor;stroke-width:1.8}.rsvp-success h3{font-family:var(--serif);font-size:28px;font-weight:500;color:var(--silver);margin:10px 0}.rsvp-success p{font-size:13px;line-height:1.8;color:#bcc8d9}.rsvp-success .button{margin-top:27px;width:100%}.text-button{padding:12px;background:transparent;text-decoration:underline;text-underline-offset:4px;font-size:11px;color:#9caec5;margin-top:10px}.information-card{display:flex;align-items:flex-start;gap:14px;padding:19px 17px;margin:12px 0;border:1px solid #d7e3f121;background:#ffffff03;border-radius:12px}.information-card>svg{fill:none;stroke:var(--silver);stroke-width:1.4;width:22px;height:22px;flex-shrink:0;margin-top:2px}.information-card span{display:block;color:var(--silver);font-size:10px;text-transform:uppercase;letter-spacing:.12em}.information-card p{margin:5px 0 0;font-size:14px;line-height:1.7}.information-card small{display:block;font-size:12px;color:#9baec7;line-height:1.8;margin-top:6px}.dialog-footer{text-align:center;color:#93a4bd;font-family:var(--serif);font-style:italic;font-size:16px;line-height:1.7;margin:25px 0 0}.map-link{margin-top:23px}.gift-list .information-card{padding:17px}.gift-list .information-card span{font-size:14px;letter-spacing:0;text-transform:none}.gift-list .information-card p{font-size:12px;line-height:1.9;color:#adbbce}.detail-dialog #gift-link{margin-top:23px}@keyframes dialog-in{from{opacity:0;transform:translateY(14px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
:root {
  --stage-height: 100vh;
  --night-art: url('assets/scene.png');
}

@supports (height: 100dvh) {
  :root { --stage-height: 100dvh; }
}

html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }

.invitation, .welcome {
  --art-height: var(--stage-height);
  height: var(--art-height);
  max-width: 480px;
}

.artwork {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: var(--navy);
}

/* Fill any extra space with the colors of the scene, preserving its edges. */
.artwork::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: var(--night-art) center / cover no-repeat;
  filter: blur(20px) brightness(.59);
}

.artwork video, .intro-controls, .invitation-content {
  position: absolute;
  inset: 0;
}

.artwork video {
  /* The encoded frame has an 800 × 1472 center within 1080 × 1920.
     Fit that center first, then trim only the extra scenery at the edges. */
  inset: auto;
  top: 50%;
  left: 50%;
  width: max(100%, calc(var(--art-height) * .5625), min(135%, calc(var(--art-height) * .73369565)));
  height: auto;
  aspect-ratio: 1080 / 1920;
  transform: translate(-50%, -50%);
}

.artwork.unavailable video { visibility: hidden; }
.artwork.unavailable::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--night-art) center / contain no-repeat;
}

.intro-controls { pointer-events: none; }
.intro-controls button { pointer-events: auto; }
.skip-button { min-height: 44px; }
.welcome { transition-duration: .3s; }
.open-invitation:disabled { opacity: 1; }
.welcome-emblem span { font-family: Georgia, serif; font-size: 49px; top: 35px; }
.sound-button { width: 44px; height: 44px; }

.invitation-content {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}

body[data-phase='invitation'] .invitation-content {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

body[data-phase='welcome'], body[data-phase='intro'] { overflow: hidden; }
body:not([data-phase='welcome']) .welcome { opacity: 0; visibility: hidden; pointer-events: none; }

.invite-heading { top: calc(clamp(20px, 5vh, 48px) + env(safe-area-inset-top, 0px)); }
.invite-details {
  position: absolute;
  isolation: isolate;
  bottom: max(10px, env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  margin: 0;
  padding-block: 0;
}
.invite-details::before {
  position: absolute;
  z-index: -1;
  content: '';
  inset: -24px 0 -20px;
  background: linear-gradient(0deg, #071326e8, #071326ae 69%, transparent);
  pointer-events: none;
}
.event-summary { font-size: 14px; margin: 0 0 12px; color: #e6edf8; }
.button-outline { min-height: 60px; font-size: 14px; background-color: #091a30ad; }
.replay-button { margin-top: 5px; padding-block: 8px; }
.dialog-description, .information-card p, form label { font-size: 14px; }

/* Resposta: vou / não vou */
.attendance { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 4px; }
form label.choice { position: relative; margin: 0; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice span {
  display: flex; align-items: center; justify-content: center; min-height: 50px; padding: 10px;
  border: 1px solid #889cb038; border-radius: 10px; background: #050f20a6;
  font-size: 13px; font-weight: 700; color: #c9d4e4; text-align: center; transition: background .2s, color .2s;
}
.choice input:checked + span { background: linear-gradient(110deg, #91aacb, #edf3fc 45%, #b7c9e1); color: #19243b; border-color: transparent; }
.choice input:focus-visible + span { outline: 2px solid var(--silver-bright); outline-offset: 3px; }
.family-greeting {
  margin: -12px 0 22px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: #d7e3f10d; text-align: center; font-size: 13px; line-height: 1.6; color: #e6edf8;
}

@media (min-width: 600px) {
  body { padding-block: 25px; }
  .invitation, .welcome {
    --art-height: calc(var(--stage-height) - 50px);
    min-height: 0;
    border-radius: 22px;
    outline: 1px solid #d7e3f11a;
  }
  .welcome-content { padding-inline: 45px; }
  .sound-button { top: 42px; }
}

@media (max-width: 599px) {
  /* No celular, a cor de fundo é a mesma do cenário: no iPhone (sem tela cheia para páginas)
     as barras do Safari e a área do entalhe se misturam ao convite. */
  html, body { background: var(--navy); }
  .invitation, .welcome { width: 100%; max-width: none; }
  .sound-button { right: max(14px, env(safe-area-inset-right)); }
}

@media (max-height: 700px) {
  .invite-heading h1 { font-size: clamp(68px, 21vw, 92px); margin-block: 5px; }
  .birthday-line p { font-size: 21px; }
  .welcome-emblem { width: 80px; height: 80px; margin-bottom: 17px; }
  .welcome-emblem svg { width: 70px; height: 66px; }
  .welcome-emblem span { font-size: 45px; top: 25px; }
  .welcome-content { padding-top: 20px; padding-bottom: 45px; }
  .welcome h2 { font-size: 36px; margin-top: 17px; }
  .welcome-divider { margin: 18px auto; }
  .welcome-name { font-size: 25px; margin-bottom: 24px; }
  .welcome-footnote { font-size: 12px; bottom: 12px; }
}

@media (max-width: 359px) {
  .invite-details { padding-inline: 17px; }
  .button-outline { font-size: 12px; }
  .detail-dialog { padding-inline: 19px; }
  .detail-dialog h2 { font-size: 31px; }
  .guest-counts { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
  }
}
