@font-face {
  font-family: 'Leila';
  src: url('assets/font/Leila-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Leila';
  src: url('assets/font/Leila-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root{
  --ink:#2b2b2b;
  --cream:#ffffff;
  --green-dark:#1f4a3a;
  --green-btn:#599f63;
  --red-btn:#da3e49;
  --line:#c9c9c9;
  --gold:#b79b6b;
  --safe-x: 28px;
}

*{ box-sizing:border-box; -webkit-tap-highlight-color:transparent; }

html,body{
  margin:0; padding:0;
  background:#ffffff;
  font-family:'Leila', sans-serif;
  font-weight:400;
  color:var(--ink);
  overflow-x:hidden;
}

body.locked{ overflow:hidden; height:100vh; }

img{ max-width:100%; display:block; }

/* Phone frame wrapper: keeps design phone-shaped even on wide viewports */
#opening-screen, #site-main{
  max-width:480px;
  margin:0 auto;
  position:relative;
  background:#fff;
}

.hidden{ display:none !important; }

/* ============ OPENING VIDEO ============ */
#opening-screen{
  height:100vh;
  height:100dvh;
  overflow:hidden;
  background:#000;
  display:flex;
  align-items:center;
  justify-content:center;
}
#opening-video{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.play-btn{
  position:absolute;
  inset:0;
  width:100%; height:100%;
  background:none; border:none;
  cursor:pointer;
  padding:0;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  transition:opacity .35s ease;
}
.play-btn.is-hidden{
  opacity:0;
  pointer-events:none;
}
.play-hint{
  margin-bottom:38px;
  font-family:'Leila', sans-serif;
  font-weight:400;
  font-size:17px;
  letter-spacing:.05em;
  color:rgba(255,255,255,.75);
  text-shadow:0 1px 4px rgba(0,0,0,.35);
}

/* ============ MUSIC POPUP ============ */
.overlay{
  position:fixed;
  inset:0;
  z-index:50;
  width:100%;
  height:100%;
  background:#ffffff;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 26px;
  opacity:1;
  transition:opacity .3s ease;
}
.overlay.hidden{ display:none; }
.overlay.fade-out{ opacity:0; }

.popup{
  width:100%;
  max-width:340px;
  background:#0e101d;
  border-radius:22px;
  padding:27px 21px 24px;
  text-align:center;
  box-shadow:0 10px 40px rgba(0,0,0,.4);
}
.popup-title{
  color:#fff;
  font-family:'Leila', sans-serif;
  font-weight:700;
  font-size:35px;
  margin:0 0 13px;
}
.popup-subtitle{
  color:#e7e7ea;
  font-family:'Leila', sans-serif;
  font-weight:400;
  font-size:22px;
  margin:0 0 21px;
}
.popup-buttons{
  display:flex;
  justify-content:center;
  gap:13px;
}
.pill{
  min-width:104px;
  padding:14px 12px;
  border:none;
  border-radius:12px;
  font-family:'Leila', sans-serif;
  font-weight:700;
  font-size:23px;
  color:#fff;
  cursor:pointer;
  box-shadow:0 4px 10px rgba(0,0,0,.25);
}
.pill-red{ background:var(--red-btn); }
.pill-green{ background:var(--green-btn); }

/* ============ SHARED SECTION ============ */
.section{
  position:relative;
  min-height:100vh;
  min-height:100dvh;
  padding:36px 22px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
}

/* pearl scatter background (round pearls) */
.pearl-bg{
  background-color:#ffffff;
  background-image:
    url('assets/images/pearl-round.png'),
    url('assets/images/pearl-round.png'),
    url('assets/images/pearl-round.png'),
    url('assets/images/pearl-round.png'),
    url('assets/images/pearl-round.png'),
    url('assets/images/pearl-round.png'),
    url('assets/images/pearl-round.png'),
    url('assets/images/pearl-round.png'),
    url('assets/images/pearl-round.png'),
    url('assets/images/pearl-round.png'),
    url('assets/images/pearl-round.png'),
    url('assets/images/pearl-round.png');
  background-repeat:no-repeat;
  background-size:16px 16px;
  background-position:
    8% 6%, 32% 4%, 58% 9%, 82% 5%,
    12% 30%, 70% 28%, 90% 45%,
    6% 62%, 40% 70%, 65% 60%,
    18% 88%, 85% 90%;
}

/* ============ COVER / FLIP CARD ============ */
.cover-section{ gap:14px; }

.flip-card{
  width:78%;
  max-width:300px;
  aspect-ratio: 800/862;
  perspective:1600px;
  cursor:pointer;
}
.flip-inner{
  position:relative;
  width:100%; height:100%;
  transition:transform .9s cubic-bezier(.4,.15,.2,1);
  transform-style:preserve-3d;
}
.flip-card.flipped .flip-inner{
  transform:rotateY(180deg);
}
.flip-face{
  position:absolute; inset:0;
  backface-visibility:hidden;
  overflow:hidden;
}
.flip-back{
  transform:rotateY(180deg);
}
.cover-img{
  width:100%; height:100%;
}
.cover-img-typo{
  object-fit:contain;
}
.cover-img-photo{
  object-fit:cover;
  border-radius:6px;
  box-shadow:0 8px 30px rgba(0,0,0,.12);
}
.tap-hint{
  font-family:'Leila', sans-serif;
  font-weight:400;
  font-size:18px;
  color:#9a9a9a;
  letter-spacing:.02em;
  margin:0;
}

/* ============ STORY SECTION ============ */
.story-section{ gap:11px; }

.tilt-photo{
  width:80%;
  max-width:280px;
  box-shadow:0 10px 26px rgba(0,0,0,.18);
  border-radius:4px;
  overflow:hidden;
}
.tilt-photo img{ width:100%; display:block; }
.tilt-left{ transform:rotate(-6deg); }
.tilt-right{ transform:rotate(6deg); }

.story-typo-img{
  width:88%;
  max-width:320px;
}

/* ============ COUNTDOWN SECTION ============ */
.countdown-section{ gap:17px; }

.pinned-photos{
  display:flex;
  gap:14px;
  align-items:flex-start;
  justify-content:center;
}
.polaroid{
  position:relative;
  width:44%;
  max-width:165px;
  background:#fff;
  padding:8px 8px 10px;
  box-shadow:0 8px 22px rgba(0,0,0,.16);
}
.polaroid img:not(.pin){ width:100%; display:block; }
.polaroid .pin{
  position:absolute;
  top:-16px;
  left:50%;
  transform:translateX(-50%);
  width:34px;
  height:auto;
  z-index:2;
  filter:drop-shadow(0 3px 4px rgba(0,0,0,.25));
}
.countdown-section .tilt-left{ transform:rotate(-8deg); }
.countdown-section .tilt-right{ transform:rotate(7deg); margin-top:14px; }

.countdown-title{
  font-family:'Leila', sans-serif;
  font-weight:700;
  font-size:21px;
  margin:0;
}
.countdown-boxes{
  display:flex;
  gap:10px;
  direction:ltr;
}
.cbox{
  background:#f4f4f4;
  border-radius:10px;
  padding:12px 6px 10px;
  min-width:58px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
  box-shadow:inset 0 0 0 1px #ececec;
}
.cnum{
  font-size:31px;
  font-weight:700;
  font-family: Georgia, serif;
}
.clabel{
  font-size:13px;
  color:#999;
  font-family: Georgia, serif;
}

/* ============ TIMELINE SECTION (static image) ============ */
.timeline-section{ padding:36px 29px; }
.timeline-img{
  width:100%;
  max-width:360px;
}

/* ============ ADDRESS SECTION ============ */
.address-section{
  min-height:60vh;
  gap:16px;
}
.address-text{
  font-family:'Leila', sans-serif;
  font-weight:700;
  font-size:21px;
  line-height:1.9;
  max-width:320px;
  margin:0;
}
.map-icons{
  display:flex;
  gap:18px;
  align-items:center;
  justify-content:center;
}
.map-icon-link img{
  width:48px; height:48px;
  border-radius:50%;
  box-shadow:0 4px 14px rgba(0,0,0,.15);
}

/* ============ RSVP FORM ============ */
.rsvp-section{
  align-items:stretch;
  min-height:100vh;
  min-height:100dvh;
  padding-top:40px;
  padding-bottom:40px;
}
#rsvp-form{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  text-align:right;
}
.rsvp-title{
  font-family:'Leila', sans-serif;
  font-weight:700;
  font-size:25px;
  margin:0 0 14px;
  align-self:flex-start;
}
.rsvp-question{
  font-family:'Leila', sans-serif;
  font-weight:400;
  font-size:19px;
  margin:0 0 13px;
  align-self:flex-start;
}
.rsvp-radios{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom:21px;
  width:100%;
  align-items:flex-start;
}
.radio-item{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  cursor:pointer;
}
.radio-text{
  font-family:'Leila', sans-serif;
  font-weight:400;
  font-size:18px;
}
.radio-item input{
  position:absolute;
  opacity:0;
  width:0; height:0;
}
.radio-mark{
  width:18px; height:18px;
  border-radius:50%;
  border:1.5px solid #999;
  position:relative;
  flex:0 0 18px;
}
.radio-item input:checked + .radio-mark::after{
  content:"";
  position:absolute;
  inset:3px;
  border-radius:50%;
  background:var(--green-dark);
}

.rsvp-field{
  width:100%;
  margin-bottom:14px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
}
.rsvp-field label{
  font-family:'Leila', sans-serif;
  font-weight:400;
  font-size:20px;
  margin-bottom:7px;
}
.rsvp-field input{
  width:100%;
  border:1px solid #d8d8d8;
  border-radius:10px;
  padding:14px 14px;
  font-family:'Leila', sans-serif;
  font-weight:400;
  font-size:18px;
  text-align:right;
  background:#fff;
  color:var(--ink);
}
.rsvp-field input:focus{
  outline:none;
  border-color:var(--green-dark);
}

.rsvp-submit{
  width:100%;
  margin-top:8px;
  background:var(--green-dark);
  color:#fff;
  border:none;
  border-radius:10px;
  padding:15px 0;
  font-family:'Leila', sans-serif;
  font-weight:700;
  font-size:20px;
  cursor:pointer;
  text-align:center;
}
.rsvp-submit:active{ opacity:.85; }

.rsvp-success{
  width:100%;
  text-align:center;
  color:var(--green-dark);
  font-family:'Leila', sans-serif;
  font-weight:400;
  font-size:18px;
  margin-top:11px;
}

/* ============ SMALL PHONES ============ */
@media (max-width:360px){
  .cnum{ font-size:26px; }
  .cbox{ min-width:50px; }
}
