/* =========================================================
   DigiInvite · "Two Journeys" (wedding, made for phones)
   ivory + teak + a golden thread. Marcellus · Source Serif 4 · Pinyon Script
   The page is one phone-width column (.phone-col). On a computer it sits
   in the middle of a soft backdrop, with a QR code to open it on a phone.
   ========================================================= */
:root{
  --ivory:#FAF5EC; --paper:#FFFCF6; --teak:#3A2A1E; --soft:#7A6656; --gold:#C49A45; --gold-l:#E2C88E; --gold-d:#8E6A2A;
  --blush:#E9D3C4; --line:rgba(196,154,69,.4); --col: 430px;
  --head:'Marcellus', Georgia, serif; --serif:'Source Serif 4', Georgia, serif; --script:'Pinyon Script', cursive;
}
*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
html, body{ overflow-x:clip; }
body{ margin:0; background: var(--ivory); color: var(--teak); font-family: var(--serif); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
body.gate-locked{ overflow:hidden; }
img{ max-width:100%; display:block; }
h1, h2, h3{ font-weight: 400; margin: 0; }
.caps{ font-family: var(--head); font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-d); margin: 0; }
.phone-col{ position:relative; width: 100%; max-width: var(--col); margin: 0 auto; background: var(--ivory); }

/* ---------- buttons ---------- */
.btn{ display:inline-flex; align-items:center; justify-content:center; gap: 8px; font-family: var(--head); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; text-decoration:none; padding: 14px 24px; border-radius: 999px; cursor:pointer; border: 1px solid transparent; }
.btn-gold{ background: linear-gradient(180deg, #CFA756, #A9812F); color: #fff; box-shadow: 0 10px 20px -12px rgba(140,100,30,.9); }
.btn-line{ background: transparent; color: var(--gold-d); border-color: var(--line); }
.btn-sm{ padding: 10px 18px; font-size: .7rem; }
.btn-block{ width:100%; }
.btn svg{ width: 16px; height: 16px; }

/* ---------- computer view ---------- */
.desk-side{ display:none; }
@media (min-width: 760px){
  body{ background: #2F241B url(media/backdrop.jpg) center / cover fixed; }
  .phone-col{ box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 40px 90px -30px rgba(0,0,0,.7); min-height: 100vh; }
  .desk-side{ display:block; position:fixed; top: 50%; left: calc(50% + var(--col) / 2 + 40px); transform: translateY(-50%); width: 230px; z-index: 1; }
  .ds-card{ background: rgba(255,252,246,.94); border-radius: 18px; padding: 24px 20px; text-align:center; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); }
  .ds-cap{ font-family: var(--head); font-size: .66rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold-d); margin: 0; }
  .ds-names{ font-family: var(--script); font-size: 2.2rem; margin: 6px 0 4px; line-height: 1.1; }
  .ds-names i{ font-style: normal; color: var(--gold); }
  .ds-line{ font-size: .86rem; color: var(--soft); margin: 0 0 14px; }
  .ds-qr{ margin: 0 auto; width: 132px; height: 132px; border-radius: 8px; background: #fff; padding: 6px; }
}
@media (min-width: 760px) and (max-width: 1040px){ .desk-side{ display:none; } }

/* =========================================================
   OPENING
   ========================================================= */
#gate{ position:fixed; top:0; bottom:0; left: 50%; width: min(var(--col), 100%); transform: translateX(-50%); z-index: 100; display:flex; align-items:center; justify-content:center; padding: 24px;
  background: linear-gradient(180deg, rgba(42,30,20,.25), rgba(42,30,20,.75)), url(media/her-first.jpg?v=2) center 20% / cover; transition: opacity .8s ease, visibility .8s ease; }
#gate.is-open{ opacity: 0; visibility: hidden; }
#gate.is-hidden{ display:none; }
.g-in{ text-align:center; color: #FFF8EC; }
.g-cap{ font-family: var(--head); font-size: .72rem; letter-spacing: .34em; text-transform: uppercase; margin: 0; color: var(--gold-l); }
.g-dear{ font-family: var(--script); font-size: 3rem; line-height: 1.15; margin: 10px 0 6px; }
.g-line{ margin: 0 0 26px; font-style: italic; opacity: .92; }
.g-btn{ border: 1px solid var(--gold-l); background: rgba(255,248,236,.12); color: #FFF8EC; font-family: var(--head); font-size: .85rem; letter-spacing: .22em; text-transform: uppercase; padding: 15px 28px; border-radius: 999px; cursor:pointer; position:relative; }
.g-btn::after{ content:''; position:absolute; inset: -6px; border-radius: 999px; border: 1px solid rgba(226,200,142,.5); animation: pulse 2.2s ease-out infinite; }
@keyframes pulse{ from{ transform: scale(.94); opacity: 1; } to{ transform: scale(1.18); opacity: 0; } }
.g-sound{ margin: 14px 0 0; font-size: .8rem; opacity: .75; }

/* ---------- the film: two halves, then the meeting ---------- */
.film{ position:relative; height: 100vh; height: 100svh; overflow:hidden; background: #1E1610; color:#fff; }
.half{ position:absolute; left:0; right:0; height: 50%; overflow:hidden; z-index: 3; transition: transform 1.3s cubic-bezier(.7,0,.25,1); }
.half.her{ top:0; } .half.his{ bottom:0; }
.half video{ position:absolute; inset:0; width:100%; height:100%; object-fit: cover; }
.half.her video{ object-position: 50% 26%; } .half.his video{ object-position: 50% 30%; }
.tag{ position:absolute; left: 16px; bottom: 14px; margin:0; display:flex; flex-direction:column; text-shadow: 0 1px 10px rgba(0,0,0,.6); }
.half.her .tag{ bottom: 20px; }
.tag b{ font-family: var(--script); font-weight: 400; font-size: 2rem; line-height: 1; }
.tag span{ font-family: var(--head); font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; opacity: .9; }
.seam{ position:absolute; left:0; right:0; top: 50%; height: 0; z-index: 4; transition: opacity .6s ease; }
.seam i{ position:absolute; left: 0; right: 0; top: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--gold-l) 20%, #FFF2CF 50%, var(--gold-l) 80%, transparent); box-shadow: 0 0 14px 2px rgba(226,200,142,.7); transform-origin: 50% 50%; transform: scaleX(0); animation: none; }
body.film-playing .seam i{ animation: seam 1.6s .2s ease forwards; }
@keyframes seam{ to{ transform: scaleX(1); } }
.meet, .meet-last{ position:absolute; inset:0; width:100%; height:100%; object-fit: cover; z-index: 1; }
.meet-last{ z-index: 2; opacity: 0; transition: opacity .6s ease; pointer-events:none; }
.film.is-meeting .half.her{ transform: translateY(-101%); }
.film.is-meeting .half.his{ transform: translateY(101%); }
.film.is-meeting .seam{ opacity: 0; }
.film-shade{ position:absolute; inset:0; z-index: 5; pointer-events:none; opacity:0; transition: opacity 1.4s ease;
  background: linear-gradient(180deg, rgba(30,20,12,.62) 0%, rgba(30,20,12,.25) 30%, rgba(30,20,12,0) 46%, rgba(30,20,12,0) 78%, rgba(30,20,12,.5) 100%); }
.film-names{ position:absolute; left:0; right:0; top: 6%; z-index: 6; text-align:center; padding: 0 18px; opacity: 0; transform: translateY(14px); transition: opacity 1.4s ease .3s, transform 1.4s cubic-bezier(.2,.7,.2,1) .3s; pointer-events:none; }
.film-names .caps{ color: var(--gold-l); }
.film-names h1{ font-family: var(--script); font-size: clamp(3.4rem, 15vw, 4.6rem); line-height: 1; margin: 8px 0 6px; text-shadow: 0 2px 20px rgba(30,20,12,.6); }
.film-names h1 span{ display:block; } .film-names h1 em{ display:block; font-style: normal; font-size: .55em; color: var(--gold-l); line-height: .9; }
.film-names .when{ font-family: var(--head); letter-spacing: .14em; margin: 4px 0 0; }
.film-names .where{ margin: 0; font-style: italic; opacity: .9; }
.film-names p{ text-shadow: 0 1px 10px rgba(30,20,12,.7); }
.film.is-done .film-shade{ opacity: 1; }
.film.is-done .film-names{ opacity: 1; transform: none; }
.film.is-done .meet-last{ opacity: 1; }
.film-down{ position:absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 6; display:flex; flex-direction:column; align-items:center; gap: 6px; color: #fff; text-decoration:none; font-family: var(--head); font-size: .66rem; letter-spacing: .3em; text-transform: uppercase; opacity: 0; transition: opacity 1s ease 1s; }
.film-down i{ width: 1px; height: 30px; background: linear-gradient(#fff, transparent); }
.film.is-done .film-down{ opacity: 1; }
.film-skip, .film-again{ position:absolute; top: 14px; right: 14px; z-index: 7; font-family: var(--head); font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: #fff; background: rgba(30,20,12,.4); border: 1px solid rgba(255,255,255,.5); border-radius: 999px; padding: 8px 14px; cursor:pointer; }
.film-again{ display:none; } .film.is-done .film-again{ display:block; } .film.is-done .film-skip{ display:none; }

/* ---------- top bar ---------- */
.top{ position:fixed; top:0; left: 50%; width: min(var(--col), 100%); transform: translateX(-50%); z-index: 40; display:flex; justify-content:space-between; align-items:center; padding: 10px 14px; background: rgba(250,245,236,.94); box-shadow: 0 1px 0 var(--line); opacity: 0; pointer-events:none; transition: opacity .3s ease; }
.top.is-past{ opacity: 1; pointer-events:auto; }
.mono{ font-family: var(--head); font-size: 1.05rem; letter-spacing: .14em; color: var(--teak); text-decoration:none; }
.mono i{ font-style: normal; color: var(--gold); }
.lang{ display:flex; border: 1px solid var(--line); border-radius: 999px; overflow:hidden; }
.lang button{ border:0; background:none; padding: 5px 9px; font-family: var(--serif); font-size: .74rem; color: var(--soft); cursor:pointer; }
.lang button.active{ background: var(--gold); color: #fff; }

/* =========================================================
   THE GOLDEN THREAD: one line down the page, a knot at each section
   ========================================================= */
.thread{ position:relative; padding: 50px 14px 10px; }
.thread::before{ content:''; position:absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: linear-gradient(var(--gold-l), var(--gold), var(--gold-l)); transform-origin: top; transform: scaleY(var(--grow, 0)); }
.knot-sec{ position:relative; z-index: 1; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 44px 20px 30px; margin: 0 0 54px; text-align:center; box-shadow: 0 24px 40px -32px rgba(80,55,20,.55); }
.knot{ position:absolute; top: -20px; left: 50%; width: 60px; height: 40px; margin-left: -30px; color: var(--gold); background: var(--ivory); border-radius: 50%; padding: 0 4px; }
.knot-sec h2{ font-family: var(--head); font-size: 1.7rem; line-height: 1.2; margin: 6px 0 14px; }
.lead{ color: var(--soft); margin: 0 0 16px; }
[data-reveal]{ opacity:0; transform: translateY(22px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
[data-reveal].in-view{ opacity:1; transform:none; }
[data-reveal] .knot{ transform: scale(.4) rotate(-40deg); transition: transform .9s cubic-bezier(.3,1.6,.5,1) .2s; }
[data-reveal].in-view .knot{ transform: none; }

/* invitation */
.parents{ font-family: var(--head); font-size: .95rem; letter-spacing: .05em; line-height: 1.7; margin: 12px 0; }
.parents em{ font-family: var(--serif); color: var(--gold-d); }
.couple{ font-family: var(--script); font-size: 3.2rem; line-height: 1.1; margin: 0; }
.couple em{ font-style: normal; color: var(--gold); }
.date{ font-family: var(--head); letter-spacing: .14em; margin: 6px 0 0; }
.place{ font-style: italic; color: var(--soft); margin: 0 0 18px; }
.count{ display:flex; justify-content:center; gap: 8px; margin: 0 0 20px; }
.count div{ flex: 1; max-width: 76px; padding: 10px 0 8px; border-radius: 14px; background: var(--ivory); border: 1px solid var(--line); }
.count strong{ display:block; font-family: var(--head); font-size: 1.5rem; font-weight: 400; color: var(--gold-d); line-height: 1.1; }
.count span{ font-family: var(--head); font-size: .58rem; letter-spacing: .2em; text-transform: uppercase; color: var(--soft); }
.cal{ display:flex; flex-wrap:wrap; gap: 8px; justify-content:center; }

/* two of them */
.pair{ display:grid; grid-template-columns: 1fr 1fr; gap: 12px; text-align:left; }
.who{ margin:0; }
.who .frame{ border-radius: 999px 999px 14px 14px; overflow:hidden; border: 1px solid var(--line); padding: 5px; background: var(--ivory); }
.who img{ width:100%; height:auto; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 30%; border-radius: 999px 999px 10px 10px; }
.who figcaption{ margin-top: 10px; font-size: .88rem; color: var(--soft); line-height: 1.5; }
.who b{ display:block; font-family: var(--script); font-weight: 400; font-size: 2rem; color: var(--teak); line-height: 1; margin-bottom: 4px; }

/* story beads */
.beads, .times{ list-style:none; margin: 6px 0 0; padding: 0; text-align:left; position:relative; }
.beads::before, .times::before{ content:''; position:absolute; left: 13px; top: 6px; bottom: 6px; width: 1.5px; background: var(--gold-l); }
.beads li, .times li{ position:relative; padding: 0 0 18px 40px; }
.beads li::before, .times li::before{ content:''; position:absolute; left: 7px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 2px solid var(--gold); }
.beads b{ display:block; font-family: var(--head); color: var(--gold-d); letter-spacing: .08em; }
.beads span, .times span{ color: var(--teak); }
.times time{ display:block; font-family: var(--head); font-size: 1.15rem; color: var(--gold-d); }
.times li.main::before{ background: var(--gold); box-shadow: 0 0 0 5px rgba(196,154,69,.2); }
.times li.main span{ font-weight: 500; }
.note{ font-style: italic; color: var(--soft); margin: 4px 0 0; font-size: .95rem; }

/* place */
.map-box{ border-radius: 16px; overflow:hidden; border: 1px solid var(--line); margin: 0 0 14px; }
#place .map-ph{ height: 200px; }
#place .map-ph img{ filter: sepia(.4) saturate(.8); }
.wear{ margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line); }
.wear p{ margin: 6px 0 10px; color: var(--soft); }
.dots{ display:flex; justify-content:center; gap: 8px; }
.dots span{ width: 28px; height: 28px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--line); }

/* gift card on the thread */
.thread .digi-gift{ position:relative; z-index: 1; padding: 0 0 54px; }
.thread .digi-gift .dg-inner{ background: var(--paper); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 24px 40px -32px rgba(80,55,20,.55); }
.thread .digi-gift .dg-cap{ font-family: var(--head); color: var(--gold-d); opacity: 1; }
.thread .digi-gift .dg-title{ font-family: var(--head); }

/* reply */
.dear{ font-family: var(--script); font-size: 2.2rem; line-height: 1.1; margin: 0 0 14px; }
#rsvpForm{ text-align:left; }
.field{ margin-bottom: 12px; }
.field label, .field .lbl{ display:block; font-family: var(--head); font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-d); margin-bottom: 6px; }
.field label em{ font-family: var(--serif); text-transform: none; letter-spacing: 0; }
.field input, .field select, .field textarea{ width:100%; font: inherit; font-size: 1rem; color: var(--teak); padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--ivory); }
.field input:focus, .field select:focus, .field textarea:focus{ outline: 2px solid var(--gold-l); outline-offset: 1px; }
.known{ font-family: var(--script); font-size: 2rem; }
.pick{ display:grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 14px; }
.pick input{ position:absolute; opacity:0; pointer-events:none; }
.pick label{ text-align:center; padding: 13px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--ivory); cursor:pointer; font-size: .95rem; }
.pick input:checked + label{ background: var(--teak); border-color: var(--teak); color: var(--gold-l); }
.pick input:focus-visible + label{ outline: 2px solid var(--gold); }
.thanks{ display:none; padding-top: 6px; }
.thanks.is-visible{ display:block; }
.tied{ width: 90px; height: 60px; color: var(--gold); animation: tie 1.2s cubic-bezier(.3,1.6,.5,1); }
@keyframes tie{ from{ transform: scale(.3) rotate(-90deg); opacity: 0; } to{ transform: none; opacity: 1; } }
.thanks h3{ font-family: var(--script); font-size: 2.8rem; line-height: 1.1; }
.thanks p{ color: var(--soft); }

/* thread tag pass */
.tag-wrap{ position:relative; display:flex; flex-direction:column; align-items:center; padding-top: 34px; margin-bottom: 14px; }
.string{ position:absolute; top: 0; left: 50%; width: 2px; height: 46px; margin-left: -1px; background: var(--gold); }
.ttag{ position:relative; width: 230px; padding: 30px 16px 18px; background: #F6E9CF; border-radius: 14px 14px 18px 18px; clip-path: polygon(50% 0, 100% 9%, 100% 100%, 0 100%, 0 9%); box-shadow: 0 18px 30px -20px rgba(80,55,20,.8);
  background-image: repeating-linear-gradient(0deg, rgba(140,100,40,.05) 0 1px, transparent 1px 4px); transform-origin: 50% 0; animation: sway 4s ease-in-out infinite alternate; }
@keyframes sway{ from{ transform: rotate(-2.5deg); } to{ transform: rotate(2.5deg); } }
.hole{ position:absolute; top: 12px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 1px 2px rgba(80,55,20,.5); border: 2px solid var(--gold); }
.tt-names{ font-family: var(--script); font-size: 1.9rem; line-height: 1; margin: 8px 0 0; }
.tt-names i{ font-style: normal; color: var(--gold-d); }
.tt-date{ font-family: var(--head); font-size: .62rem; letter-spacing: .18em; color: var(--soft); margin: 4px 0 12px; }
.tt-qr{ width: 156px; height: 156px; margin: 0 auto; background: #fff; border-radius: 10px; display:flex; align-items:center; justify-content:center; padding: 8px; }
#qrWaiting p{ font-size: .82rem; color: var(--soft); margin: 0; font-style: italic; line-height: 1.35; }
#qrImage{ width: 140px; height: 140px; }
.tt-guest{ font-family: var(--script); font-size: 1.8rem; margin: 10px 0 0; line-height: 1; }
.tt-code{ font-family: var(--head); font-size: .58rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-d); margin: 4px 0 0; }
.table-card{ margin-top: 24px; padding: 18px 16px; border-radius: 16px; background: var(--ivory); border: 1px solid var(--line); }
.table-card p{ color: var(--soft); margin: 6px 0 10px; }
.seat-find{ display:flex; gap: 8px; }
.seat-find input{ flex:1; min-width:0; font: inherit; padding: 10px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; }
.seat-result{ display:none; } .seat-result.is-visible{ display:block; }
.seat-no{ font-family: var(--head); font-size: 1.6rem; color: var(--gold-d) !important; margin: 10px 0 4px !important; }
.demo{ font-size: .82rem; font-style: italic; }

/* album */
#guestUpload{ display:none; }
.upload-preview{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 14px; }
.upload-preview img{ width:100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }

/* footer */
.foot{ text-align:center; padding: 10px 18px 96px; }
.knot.big{ position:static; display:block; margin: 0 auto 6px; width: 80px; height: 54px; background: none; }
.f-names{ font-family: var(--script); font-size: 3rem; line-height: 1.1; margin: 0; }
.f-names i{ font-style: normal; color: var(--gold); }
.f-date{ font-family: var(--head); letter-spacing: .2em; font-size: .8rem; margin: 4px 0 18px; color: var(--soft); }
.f-tools{ display:flex; gap: 8px; justify-content:center; flex-wrap:wrap; }
.made{ font-size: .8rem; color: var(--soft); margin-top: 22px; }

/* music */
.music{ position:fixed; bottom: 16px; right: max(14px, calc(50% - var(--col) / 2 + 14px)); z-index: 40; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,252,246,.95); color: var(--gold-d); display:flex; align-items:center; justify-content:center; cursor:pointer; box-shadow: 0 8px 18px -10px rgba(80,55,20,.6); }
.music svg{ width: 20px; height: 20px; }
.music.is-off{ opacity: .8; }
.music:not(.is-off) svg{ animation: spin 6s linear infinite; }
@keyframes spin{ to{ transform: rotate(360deg); } }

/* short phones: keep the names clear of the Watch again button */
@media (max-height: 720px){ .film-names{ top: 64px; } }
