*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:"Cormorant Garamond",Georgia,serif;color:#fff;background:#222}body{overflow:hidden}.background,.shade{position:fixed;inset:0}.background{background:#555 url('assets/couple.png') center 37%/cover no-repeat;filter:grayscale(1)}.shade{background:rgba(0,0,0,.57)}button,a{font:inherit}button{cursor:pointer;color:inherit}.start{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:20px;font-size:20px}.start-button{border:1px solid white;border-radius:50%;background:transparent;width:112px;height:112px;font-size:29px}.start-button:hover,.outline:hover{background:#fff;color:#222}main{position:relative;height:100svh;max-width:700px;margin:auto}header{position:absolute;top:18px;left:20px;right:20px;display:flex;justify-content:space-between;z-index:4}.icon,.lang,.nav-arrow{border:0;background:transparent}.icon{font-size:27px}.lang{font-size:18px}nav{position:absolute;z-index:5;top:65px;left:20px;background:rgba(20,20,20,.95);padding:15px;min-width:190px}nav button{display:block;width:100%;text-align:left;padding:9px;background:none;border:0;font-size:17px}.slides{height:100%;position:relative}.slide{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:80px 36px 125px;opacity:0;visibility:hidden;transform:translateX(25px);transition:opacity .5s,transform .5s,visibility .5s}.slide.active{opacity:1;visibility:visible;transform:none}.slide p{max-width:450px;font-size:21px;line-height:1.4;margin:10px 0}.slide .eyebrow{font-size:13px;letter-spacing:.25em}.script{font-family:"Great Vibes",cursive;font-size:clamp(54px,11vw,82px);font-weight:400;line-height:1.25;margin:24px 0}.hero h1{font-size:clamp(74px,15vw,115px);line-height:1.12}.hero h1 span{display:block;font-size:.7em}.slide .smallcaps{font-size:15px;letter-spacing:.3em}.slide .verse{font-style:italic;font-size:21px}.slide .reference{font-size:16px}.rule{width:42px;border-top:1px solid #fff;margin:22px auto}.date{display:flex;align-items:center;gap:16px;margin:10px 0 20px;letter-spacing:.15em;font-size:14px}.date strong{font-size:70px;font-weight:400;line-height:1}.venue{font-size:29px!important}.number{font-size:30px!important;letter-spacing:.18em}.outline{display:inline-block;margin-top:22px;padding:12px 25px;border:1px solid white;background:transparent;color:white;text-decoration:none;letter-spacing:.15em;font-size:13px}.signature{font-size:55px!important}footer{position:absolute;bottom:18px;left:0;right:0;text-align:center;display:flex;justify-content:center;align-items:center;gap:16px}.nav-arrow{font-size:32px;line-height:1}#dots{display:flex;gap:12px;align-items:center}#dots button{width:7px;height:7px;border-radius:50%;border:0;background:#ffffff66;padding:0}#dots button.current{background:#fff}.swipe{position:absolute;bottom:40px;font-size:16px;white-space:nowrap}#copyStatus{margin-top:10px;font-size:15px}@media (min-width:800px){.background{background-position:center 35%}.shade{background:rgba(0,0,0,.62)}}@media(max-height:650px){.slide{padding-top:55px;padding-bottom:95px}.slide p{font-size:18px}.script{margin:10px 0;font-size:55px}.hero h1{font-size:70px}.swipe{bottom:32px}}
[hidden]{display:none!important}

.music-toggle{margin-left:auto;margin-right:20px;background:transparent;border:0;font-size:23px}.music-panel{position:absolute;z-index:6;top:65px;right:20px;background:rgba(20,20,20,.96);padding:12px;text-align:center;font-size:15px}.music-panel p{margin:0 0 8px}.music-panel iframe{border:0;display:block}.music-panel a{display:block;color:white;margin-top:8px}.music-panel[hidden]{display:block!important;visibility:hidden;pointer-events:none;position:fixed;left:-10000px;top:0;right:auto}

.contact-link{color:inherit;text-decoration:none;font-size:18px;overflow-wrap:anywhere}.contact-name{font-size:24px!important}.contact-link:hover{text-decoration:underline}

.backgrounds{position:fixed;inset:0}.background{opacity:0;animation:crossfade 32s infinite}.bg1{background-image:url('assets/photo1.jpg');animation-delay:0s}.bg2{background-image:url('assets/photo2.jpg');animation-delay:8s}.bg3{background-image:url('assets/photo3.jpg');animation-delay:16s}.bg4{background-image:url('assets/photo4.jpg');animation-delay:24s}@keyframes crossfade{0%{opacity:0}6%,25%{opacity:1}31%,100%{opacity:0}}.bg1{opacity:1}.families{font-weight:600}.event-icon{font-size:45px;margin:8px 0}.pin{font-size:35px;margin-top:22px}.venue-slide .script,.gift-slide .script{margin:0 0 25px;font-size:clamp(48px,9vw,72px)}.venue-slide p{margin:3px}.venue-slide .outline{margin-top:16px;font-size:16px;letter-spacing:0;text-transform:none;border-radius:7px}.gift-slide p{margin:12px 0}.gift-slide .venue{margin-top:55px}.rsvp-slide{overflow:auto}.rsvp-slide .script{font-size:54px;margin:0 0 18px}#rsvp{width:min(100%,480px)}fieldset{border:0;margin:0;padding:0}.attendance,.send-buttons{display:flex;gap:10px}.attendance label,.send-buttons button{flex:1}.attendance input{position:absolute;opacity:0}.attendance span,.send-buttons button{display:block;width:100%;padding:11px 8px;border:1px solid #fff;border-radius:5px;background:transparent;color:white;font-size:18px;cursor:pointer}.attendance input:checked+span{background:#25b65b;border-color:#25b65b}.attendance input:focus-visible+span{outline:2px solid #fff;outline-offset:3px}.field{display:flex;align-items:center;justify-content:space-between;gap:15px;text-align:left;margin:15px 0;font-size:18px}.field input{width:55%;min-width:0;padding:10px;border:1px solid white;border-radius:5px;background:#0008;color:white;font:inherit}.rsvp-note{font-size:15px!important;margin:12px 0!important}.send-buttons button{font-size:16px}.send-buttons button:hover{background:white;color:#111}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}@media(max-height:700px){.rsvp-slide .script{font-size:42px;margin:0}.field{margin:8px 0}.venue-slide .event-icon{margin:2px;font-size:30px}.venue-slide .script{margin:0 0 8px}}

nav{position:fixed;inset:0;z-index:20;background:#414141;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(10px,3vh,30px);padding:70px 20px}nav button:not(.close-menu){text-align:center;width:auto;font-size:clamp(25px,4vh,36px);padding:4px 20px}nav .close-menu{position:absolute;top:15px;left:20px;width:auto;background:transparent;border:0;font-family:Arial,sans-serif;font-size:50px;line-height:1}nav button:hover{text-decoration:underline}.bg1{animation-delay:-2s}.bg2{animation-delay:6s}.bg3{animation-delay:14s}.bg4{animation-delay:22s}@media(prefers-reduced-motion:reduce){.background{animation:none}.bg1{opacity:1}}

.event-icon svg{display:block;width:42px;height:42px}.pin svg{width:40px;height:40px}

.final-slide{padding:65px 35px 110px}.polaroid{width:min(62vw,340px);max-height:70svh;transform:rotate(-10deg);background:#fff;color:#111;border-radius:7px;padding:12px 12px 18px;margin:0;box-shadow:0 12px 35px #0006}.polaroid img{display:block;width:100%;height:min(52svh,480px);object-fit:cover;border-radius:4px;filter:grayscale(1)}.polaroid figcaption{text-align:center;font-family:Georgia,serif;font-size:24px;line-height:1.5;padding-top:8px}@media(max-width:500px){.polaroid{width:min(70vw,340px)}}

.rsvp-slide .deadline{font-size:17px;margin:0 0 14px}.music-panel{max-width:calc(100vw - 40px)}

/* Use lining numerals for a clear, balanced wedding date. */
.date strong{font-family:Georgia,"Times New Roman",serif;font-size:clamp(54px,7vw,68px);font-weight:400;font-variant-numeric:lining-nums;letter-spacing:-.04em;line-height:1}

.date,.date-text{font-family:Georgia,"Times New Roman",serif;font-variant-numeric:lining-nums}

.slide .invitation-copy{font-family:Georgia,"Times New Roman",serif;font-size:clamp(18px,2.5vw,21px);line-height:1.5}.slide .families{font-weight:700}

#countControl{width:55%;display:block}#countControl input,#countControl select{width:100%;padding:10px;border:1px solid white;border-radius:5px;background:#171717;color:white;font:inherit}.invitation-greeting{font-weight:600;font-size:22px!important}.rsvp-slide{justify-content:flex-start;padding-top:65px;padding-bottom:115px}.rsvp-slide .rsvp-note{margin:8px 0!important}.guest-name-field{margin:8px 0}.rsvp-slide #rsvp{padding-bottom:15px}

/* Keep media inside its container without changing its desktop dimensions. */
img,video,iframe,embed,object{max-width:100%}
img,video{height:auto}

/* Phone layouts retain the desktop composition with room to scroll each page. */
@media(max-width:767px),(max-height:500px){
  body{font-size:16px}
  main{height:100svh;height:100dvh;min-width:0}
  header{top:max(12px,env(safe-area-inset-top));left:16px;right:16px}
  button,a,input,select{min-width:44px;min-height:44px}
  .music-toggle{margin-right:8px}
  .slide{padding:76px 20px calc(116px + env(safe-area-inset-bottom));overflow-y:auto;overflow-x:hidden;justify-content:safe center;overscroll-behavior-y:contain;overflow-wrap:anywhere;transform:none}
  .slide>*{flex-shrink:0;max-width:100%;min-width:0}
  .slide .eyebrow,.slide .smallcaps,.date,.outline,.rsvp-note,.slide .rsvp-note{font-size:16px!important}
  .slide .eyebrow,.slide .smallcaps{letter-spacing:.15em}
  .hero h1{font-size:clamp(60px,15vw,100px)}
  .venue-slide .script,.gift-slide .script{font-size:clamp(40px,9vw,68px)}
  .date{gap:10px;letter-spacing:.06em}
  footer{bottom:calc(10px + env(safe-area-inset-bottom));gap:4px;padding:0 8px;pointer-events:none}
  footer .nav-arrow{flex:0 0 44px}
  footer button,#dots{pointer-events:auto}
  #dots{display:flex;flex:1 1 0;max-width:352px;min-width:0;flex-wrap:nowrap;gap:0}
  #dots button{flex:1 1 0;min-width:0;width:44px;height:44px;border-radius:0;background:radial-gradient(circle,#ffffff66 3.5px,transparent 4px)}
  #dots button.current{background:radial-gradient(circle,#fff 3.5px,transparent 4px)}
  .swipe{bottom:44px;margin:8px 0;font-size:16px}
  nav{min-width:0;max-width:100%;padding:70px 20px calc(20px + env(safe-area-inset-bottom));gap:4px;overflow-y:auto;justify-content:safe center}
  nav button:not(.close-menu){font-size:25px;max-width:100%;flex-shrink:0;overflow-wrap:anywhere}
  nav .close-menu{top:max(12px,env(safe-area-inset-top))}
  .rsvp-slide{padding-top:76px;padding-bottom:calc(116px + env(safe-area-inset-bottom));justify-content:flex-start}
  .field{flex-wrap:wrap;gap:8px}
  .field>span:first-child{flex:1 1 120px}
  .field input,#countControl{flex:1 1 140px;width:55%;max-width:100%;font-size:18px}
  #countControl input,#countControl select{width:100%;font-size:18px}
  .attendance label,.send-buttons button{min-width:0}
  .attendance span{min-height:44px}
  .attendance input{min-width:0;min-height:0;width:1px;height:1px}
  .send-buttons{flex-wrap:wrap}
  .send-buttons button{flex:1 1 130px}
  .polaroid{width:min(65vw,340px);max-height:none}
  .polaroid img{height:min(45svh,480px)}
}

.music-status{position:absolute;z-index:6;top:65px;right:20px;max-width:calc(100% - 40px);margin:0;padding:10px 14px;background:rgba(20,20,20,.96);font-size:16px;line-height:1.4}


/* Slide only the invitation content; the photo backdrop stays independent. */
.slides{display:flex;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;scrollbar-width:none}
.slides::-webkit-scrollbar,.slides>.slide::-webkit-scrollbar{display:none}
.slides>.slide{position:relative;inset:auto;flex:0 0 100%;min-width:0;height:100%;overflow-y:auto;opacity:1;visibility:visible;transform:none;transition:none;scroll-snap-align:start;scroll-snap-stop:always;scrollbar-width:none}

/* Grab the text pages while leaving the independent photo slideshow in place. */
.slides{cursor:grab}
.slides.is-dragging,.slides.is-settling{scroll-snap-type:none}
.slides.is-dragging{cursor:grabbing;user-select:none}
.slides a,.slides button,.slides input,.slides select,.slides label{cursor:auto}
.slides button,.slides a,.slides label{cursor:pointer}

/* Keep the story track physical while localizing each page for Arabic reading. */
.slides,header,footer{direction:ltr}
.hero h1 .couple-name{display:inline;font-size:inherit}
html[lang="ar"] body{font-family:"Noto Naskh Arabic",serif}
html[lang="ar"] .slide,html[lang="ar"] nav,html[lang="ar"] .music-status{direction:rtl}
html[lang="ar"] .script,html[lang="ar"] .date,html[lang="ar"] .date-text,html[lang="ar"] .date strong,html[lang="ar"] .slide .invitation-copy{font-family:"Noto Naskh Arabic",serif}
html[lang="ar"] .script{line-height:1.5}
html[lang="ar"] .eyebrow,html[lang="ar"] .smallcaps,html[lang="ar"] .date,html[lang="ar"] .outline{letter-spacing:normal}
html[lang="ar"] .field{text-align:right}
html[lang="ar"] .hero h1{font-size:clamp(60px,13vw,95px)}
html[lang="ar"] .rsvp-slide .script{font-size:clamp(30px,7vw,48px)}
