/* =========================================================
   DigiInvite · "Staircase" (Kandyan wedding)
   ivory + antique gold + Kandyan maroon, over embossed golden roses.
   Cinzel (caps) · EB Garamond (text) · Italianno (names)
   ========================================================= */
:root{
  --ivory:#FBF6EC; --paper:#FFFCF6; --gold:#B38A43; --gold-l:#D9BC7E; --gold-d:#86622A;
  --maroon:#6E1E2C; --ink:#2E241C; --soft:#6B5D50; --line:rgba(179,138,67,.38);
  --caps:'Cinzel', Georgia, serif; --serif:'EB Garamond', Georgia, serif; --script:'Italianno', cursive;
}
*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
html, body{ overflow-x:clip; }
body{ margin:0; background: var(--ivory); color: var(--ink); font-family: var(--serif); font-size: 18px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
/* embossed golden roses behind everything after the staircase (fixed layer, so it works on phones too) */
body::before{ content:''; position:fixed; inset:0; z-index:-1; background: var(--ivory) url(media/roses-tile.jpg) center top / 460px auto repeat; opacity:.9; }
@media (max-width: 700px){ body::before{ background: var(--ivory) url(media/roses-tall.jpg) center / cover no-repeat; } }
img{ max-width:100%; display:block; }
a{ color: var(--gold-d); }
h1, h2, h3{ font-weight: 400; margin: 0; }
.caps{ font-family: var(--caps); font-size: .74rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold-d); margin: 0; }

/* ---------- buttons ---------- */
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px; font-family: var(--caps); font-size: .76rem; letter-spacing: .2em; text-transform: uppercase; text-decoration:none; padding: 14px 26px; border-radius: 2px; cursor:pointer; border: 1px solid var(--gold); transition: background .25s ease, color .25s ease, transform .2s ease; }
.btn:hover{ transform: translateY(-1px); }
.btn-gold{ background: linear-gradient(180deg, #C69C55, #A67C36); color: #FFFCF4; border-color: #9A722F; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 18px -12px rgba(110,80,30,.8); }
.btn-line{ background: rgba(255,252,246,.7); color: var(--gold-d); }
.btn-line:hover{ background: var(--paper); }
.btn-sm{ padding: 10px 18px; font-size: .7rem; }
.btn-block{ width:100%; }
.btn svg{ width:16px; height:16px; }

/* ---------- top bar ---------- */
.top{ position:fixed; top:0; left:0; right:0; z-index: 40; display:flex; justify-content:space-between; align-items:center; padding: 14px 22px; pointer-events:none; }
.top > *{ pointer-events:auto; }
.mono{ font-family: var(--caps); font-size: 1.05rem; letter-spacing: .2em; color: var(--ink); text-decoration:none; background: rgba(255,252,246,.82); padding: 6px 14px; border: 1px solid var(--line); }
.mono i{ font-style: normal; color: var(--gold); }
.lang{ display:flex; border: 1px solid var(--line); background: rgba(255,252,246,.82); }
.lang button{ border:0; background:none; padding: 6px 11px; font-family: var(--caps); font-size: .72rem; color: var(--soft); cursor:pointer; }
.lang button.active{ background: var(--gold); color: #fff; }

/* =========================================================
   THE STAIRCASE — sticky canvas, scrubbed by scroll
   ========================================================= */
.stair{ position:relative; height: 380vh; background: #EFE6D6; }
.stair-stick{ position:sticky; top:0; height: 100vh; height: 100svh; overflow:hidden; background: var(--ivory); }
/* as the names arrive, the scene glides down to give them the top of the screen */
.scene{ position:absolute; inset:0; transform: translateY(calc(var(--names,0) * var(--glide, 19%))); }
.scene-fade{ position:absolute; left:0; right:0; top:-1px; height: 28%; background: linear-gradient(180deg, var(--ivory) 0%, rgba(251,246,236,.75) 35%, rgba(251,246,236,0) 100%); opacity: var(--names,0); }
#stairCanvas{ position:absolute; inset:0; width:100%; height:100%; display:block; background:#EDE3D2 url(media/p/001.webp?v=2) center / cover no-repeat; }
@media (min-aspect-ratio: 1/1){ #stairCanvas{ background-image: url(media/l/001.webp?v=2); } }
.stair-shade{ position:absolute; inset:0; pointer-events:none;
  background: linear-gradient(180deg, rgba(251,246,236,calc(.15 + var(--names,0) * .85)) 0%, rgba(251,246,236,calc(var(--names,0) * .8)) 20%, rgba(251,246,236,calc(var(--names,0) * .35)) 36%, rgba(251,246,236,0) 50%),
              linear-gradient(0deg, var(--ivory) 0%, rgba(251,246,236,0) 14%); }

.stair-intro{ position:absolute; left:0; right:0; top: 13%; text-align:center; padding: 0 20px; opacity: var(--intro,1); transform: translateY(calc((1 - var(--intro,1)) * -30px)); }
.ayu{ font-family: var(--serif); font-size: 1.15rem; color: var(--gold-d); margin: 0 0 4px; letter-spacing: .06em; }
.stair-intro .dear{ font-family: var(--script); font-size: clamp(2.6rem, 9vw, 4rem); line-height: 1; margin: 0; color: var(--ink); text-shadow: 0 1px 14px rgba(255,250,240,.9); }
.intro-line{ font-family: var(--caps); font-size: .78rem; letter-spacing: .32em; text-transform: uppercase; margin: 12px 0 0; color: var(--ink); text-shadow: 0 0 12px rgba(255,250,240,.95); }
.scroll-cue{ position:absolute; left:50%; bottom: 22px; transform: translateX(-50%); margin:0; display:flex; flex-direction:column; align-items:center; gap: 8px; font-family: var(--caps); font-size: .66rem; letter-spacing: .3em; text-transform: uppercase; color: var(--ink); opacity: var(--intro,1); }
.scroll-cue span{ background: rgba(255,252,246,.85); padding: 4px 10px; }
.scroll-cue i{ width: 1px; height: 42px; background: linear-gradient(var(--gold-d), transparent); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue{ 0%{ transform: scaleY(0); transform-origin: top; } 50%{ transform: scaleY(1); transform-origin: top; } 51%{ transform-origin: bottom; } 100%{ transform: scaleY(0); transform-origin: bottom; } }

.stair-names{ position:absolute; left:0; right:0; top: 11%; text-align:center; padding: 0 18px; opacity: var(--names,0); transform: translateY(calc((1 - var(--names,0)) * 24px)); pointer-events: none; }
.stair-names h1{ font-family: var(--script); font-size: clamp(3.4rem, 12vw, 6.4rem); line-height: .95; color: var(--ink); margin: 10px 0 6px; }
.stair-names h1 span{ display:inline-block; }
.stair-names h1 em{ font-style: normal; color: var(--gold); margin: 0 .18em; }
.stair-names .sub{ font-size: 1.1rem; font-style: italic; color: var(--soft); margin: 0; }
.stair-names .when{ font-family: var(--caps); font-size: .76rem; letter-spacing: .2em; text-transform: uppercase; margin: 10px 0 0; color: var(--ink); }
.stair-names .when b{ color: var(--gold); font-weight: 400; margin: 0 .4em; }
@media (max-width: 600px){ .stair-names h1 span{ display:block; } .stair-names h1 em{ display:block; font-size: .6em; margin: 0; } .stair-names .when span{ display:block; } .stair-names .when b{ display:none; } }

.stair-rail{ position:absolute; right: 18px; top: 50%; width: 2px; height: 160px; margin-top: -80px; background: rgba(46,36,28,.18); opacity: calc(1 - var(--names,0)); }
.stair-rail i{ position:absolute; left:0; right:0; top:0; height: calc(var(--walk,0) * 100%); background: var(--gold); }

/* =========================================================
   LANDINGS joined by flights of stairs
   ========================================================= */
.landings{ position:relative; max-width: 1060px; margin: 0 auto; padding: 40px 22px 30px; }
.landing{ position:relative; width: min(640px, 64%); background: rgba(255,252,246,.94); border: 1px solid var(--line); padding: 46px 46px 40px; text-align:center; box-shadow: 0 30px 50px -36px rgba(110,80,30,.55), inset 0 0 0 7px var(--paper), inset 0 0 0 8px var(--line); }
.landing.wide{ width: min(820px, 80%); }
.l-left{ margin-right:auto; } .l-right{ margin-left:auto; }
.landing h2{ font-family: var(--caps); font-size: clamp(1.25rem, 3vw, 1.7rem); letter-spacing: .1em; color: var(--ink); margin: 2px 0 10px; }
.landing .lead{ color: var(--soft); margin: 0 auto 18px; max-width: 34em; }
.step-no{ font-family: var(--caps); font-size: .66rem; letter-spacing: .34em; text-transform: uppercase; color: var(--gold); margin: 0 0 12px; }
.step-no::before, .step-no::after{ content:''; display:inline-block; width: 26px; height: 1px; background: var(--gold-l); vertical-align: middle; margin: 0 10px; }
.cn{ position:absolute; width: 40px; height: 40px; color: var(--gold); }
.cn.tl{ top: 14px; left: 14px; } .cn.tr{ top: 14px; right: 14px; transform: scaleX(-1); }
.cn.bl{ bottom: 14px; left: 14px; transform: scaleY(-1); } .cn.br{ bottom: 14px; right: 14px; transform: scale(-1,-1); }
.lotus{ width: 64px; height: 36px; color: var(--gold); display:block; margin: 0 auto 10px; }

.flight{ height: 90px; width: min(640px, 64%); margin: 0 auto; }
.flight svg{ width: 100%; height: 100%; overflow: visible; }
.flight path{ fill:none; stroke: var(--gold); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.flight.to-left svg{ transform: scaleX(-1); }

/* reveal */
[data-reveal]{ opacity:0; transform: translateY(26px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
[data-reveal].in-view{ opacity:1; transform:none; }

/* ---------- landing I ---------- */
.parents{ font-family: var(--caps); font-size: .92rem; letter-spacing: .1em; line-height: 1.8; margin: 0; }
.parents span{ font-family: var(--serif); font-style: italic; letter-spacing: 0; color: var(--gold-d); text-transform: none; }
.request{ font-style: italic; color: var(--soft); margin: 14px auto 6px; max-width: 26em; }
.couple-line{ font-family: var(--script); font-size: clamp(3rem, 8vw, 4.4rem); line-height: 1.05; margin: 0; }
.couple-line em{ font-style:normal; color: var(--gold); }
.date-line{ font-family: var(--caps); letter-spacing: .18em; font-size: .9rem; margin: 8px 0 0; }
.venue-line{ margin: 0; color: var(--soft); font-style: italic; }
.count{ display:flex; justify-content:center; gap: 10px; margin: 24px 0 26px; }
.count div{ width: 76px; padding: 12px 0 10px; border: 1px solid var(--line); background: var(--ivory); }
.count strong{ display:block; font-family: var(--caps); font-size: 1.6rem; font-weight: 500; color: var(--gold-d); line-height: 1.1; }
.count span{ font-family: var(--caps); font-size: .58rem; letter-spacing: .22em; text-transform: uppercase; color: var(--soft); }
.actions{ display:flex; flex-wrap:wrap; gap: 10px; justify-content:center; }
.actions [data-add-to-calendar]{ display:flex; flex-wrap:wrap; gap: 10px; justify-content:center; }

/* ---------- landing II: ola leaves ---------- */
.ola{ list-style:none; margin: 6px 0 14px; padding: 0 0 0 0; display:flex; flex-direction:column; gap: 10px; position:relative; }
.ola::before{ content:''; position:absolute; left: 30px; top: -8px; bottom: -8px; width: 2px; background: #8A5A2B; border-radius: 2px; box-shadow: 1px 0 0 rgba(255,255,255,.3); }
.ola li{ position:relative; display:flex; align-items:center; gap: 18px; text-align:left; padding: 13px 22px 13px 56px; border-radius: 40px / 50%;
  background: repeating-linear-gradient(0deg, rgba(120,80,30,.06) 0 1px, transparent 1px 4px), linear-gradient(180deg, #ECD7A6, #DDBE83 55%, #D2B073);
  box-shadow: inset 0 0 0 1px rgba(134,98,42,.35), inset 0 -3px 6px rgba(120,80,30,.15), 0 6px 12px -10px rgba(90,60,20,.7); color: #4A3418; }
.ola li::before{ content:''; position:absolute; left: 25px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: #F6EBD2; box-shadow: inset 0 1px 2px rgba(80,50,15,.6); }
.ola time{ font-family: var(--caps); font-size: .95rem; font-weight: 600; min-width: 5.6em; color: #5A3B14; }
.ola span{ font-size: 1.05rem; }
.ola li.main{ background: repeating-linear-gradient(0deg, rgba(120,80,30,.06) 0 1px, transparent 1px 4px), linear-gradient(180deg, #E9CD8F, #D3A95E 55%, #C79C52); }
.ola li.main span{ font-weight: 500; }
.landing .note{ font-style: italic; color: var(--soft); margin: 0; font-size: .98rem; }

/* ---------- landing III: the couple ---------- */
.pair{ display:grid; grid-template-columns: 1fr 1fr; gap: 26px; margin: 18px 0 18px; }
.portrait{ margin: 0; }
.portrait .frame{ position:relative; padding: 10px; border: 1px solid var(--gold-l); background: var(--paper); }
.portrait img{ width:100%; aspect-ratio: 3 / 4; object-fit: cover; filter: saturate(.92) contrast(1.02); }
.portrait .cn{ width: 34px; height: 34px; }
.portrait .cn.tl{ top: -6px; left: -6px; } .portrait .cn.br{ bottom: -6px; right: -6px; }
.portrait figcaption{ margin-top: 12px; }
.portrait figcaption b{ display:block; font-family: var(--script); font-weight: 400; font-size: 2.4rem; line-height: 1; }
.portrait figcaption span{ font-size: .95rem; color: var(--soft); font-style: italic; }
.story{ max-width: 36em; margin: 0 auto; color: var(--ink); }

/* ---------- landing IV ---------- */
.map-frame{ border: 1px solid var(--line); padding: 8px; background: var(--paper); margin: 8px 0 16px; }
#venue .map-ph{ height: 230px; }
#venue .map-ph img{ filter: sepia(.45) saturate(.8) hue-rotate(-8deg); }
.dress{ margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.dress p{ margin: 8px 0 12px; color: var(--soft); }
.chips{ display:flex; flex-wrap:wrap; justify-content:center; gap: 8px; }
.chips span{ display:inline-flex; align-items:center; gap: 8px; font-family: var(--caps); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; padding: 6px 12px 6px 6px; border: 1px solid var(--line); background: var(--paper); }
.chips span::before{ content:''; width: 18px; height: 18px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }

/* ---------- landing V: RSVP ---------- */
.dear-r{ font-family: var(--script); font-size: 2.2rem; line-height: 1.1; margin: 0 0 14px; }
#rsvpForm{ text-align:left; }
.field{ margin-bottom: 14px; }
.field label, .field .lbl{ display:block; font-family: var(--caps); font-size: .64rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-d); margin-bottom: 6px; }
.field label em{ text-transform:none; letter-spacing: 0; font-family: var(--serif); }
.field input, .field select, .field textarea{ width:100%; font: inherit; font-size: 1rem; color: var(--ink); padding: 11px 12px; border: 1px solid var(--line); background: var(--paper); border-radius: 2px; }
.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; }
.row2{ display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice{ display:grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 16px; }
.choice input{ position:absolute; opacity:0; pointer-events:none; }
.choice label{ text-align:center; padding: 14px 10px; border: 1px solid var(--line); background: var(--paper); cursor:pointer; font-style: italic; transition: all .2s ease; }
.choice input:checked + label{ background: var(--maroon); border-color: var(--maroon); color: #F8EBD6; font-style: normal; box-shadow: inset 0 0 0 3px rgba(217,188,126,.55); }
.choice input:focus-visible + label{ outline: 2px solid var(--gold); }
.thanks{ display:none; padding: 18px 0 4px; }
.thanks.is-visible{ display:block; }
.thanks h3{ font-family: var(--script); font-size: 3rem; line-height: 1; }
.thanks p{ color: var(--soft); }

/* ---------- landing VI: token + table ---------- */
.pass-row{ display:grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items:start; margin-top: 14px; }
.token{ position:relative; padding: 26px 22px 22px; color: #F6E9CF; background:
  radial-gradient(circle at 50% 0%, rgba(217,188,126,.25), transparent 60%), linear-gradient(160deg, #7A2433, #5A1622); border: 1px solid #9A722F; box-shadow: inset 0 0 0 6px #6A1C2A, inset 0 0 0 7px rgba(217,188,126,.7), 0 22px 34px -22px rgba(60,15,20,.8); }
.token .lotus{ color: var(--gold-l); }
.tk-cap{ font-family: var(--caps); font-size: .66rem; letter-spacing: .32em; text-transform: uppercase; color: var(--gold-l); margin: 0 0 10px; }
.tk-names{ font-family: var(--script); font-size: 2.4rem; line-height: 1; margin: 0; }
.tk-names i{ font-style: normal; color: var(--gold-l); }
.tk-date{ font-family: var(--caps); font-size: .64rem; letter-spacing: .2em; margin: 6px 0 14px; color: #E8D5AE; }
.tk-qr{ width: 172px; height: 172px; margin: 0 auto; background: #FFFCF4; padding: 11px; display:flex; align-items:center; justify-content:center; box-shadow: 0 0 0 1px var(--gold-l); }
#qrWaiting p{ color: var(--soft); font-style: italic; font-size: .95rem; margin: 0; line-height: 1.35; }
#qrImage{ width: 150px; height: 150px; }
.tk-guest{ font-family: var(--script); font-size: 1.9rem; margin: 12px 0 0; line-height: 1; }
.tk-code{ font-family: var(--caps); font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: #E8D5AE; margin: 4px 0 14px; }
.token .btn-line{ background: transparent; color: var(--gold-l); border-color: rgba(217,188,126,.6); }
.table-card{ border: 1px solid var(--line); background: var(--ivory); padding: 24px 20px; }
.table-card p{ color: var(--soft); margin: 8px 0 12px; }
.seat-find{ display:flex; gap: 8px; }
.seat-find input{ flex:1; min-width:0; font: inherit; font-size: 1rem; padding: 10px 12px; border: 1px solid var(--line); background: var(--paper); }
.seat-result{ display:none; } .seat-result.is-visible{ display:block; }
.seat-no{ font-family: var(--caps); font-size: 1.5rem; color: var(--maroon) !important; margin: 14px 0 4px !important; }
.demo{ font-size: .85rem; font-style: italic; }

/* ---------- landing VII: album ---------- */
#guestUpload{ display:none; }
.upload-preview{ display:grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; margin-top: 16px; }
.upload-preview img{ width:100%; aspect-ratio: 1; object-fit: cover; border: 4px solid var(--paper); box-shadow: 0 0 0 1px var(--line); }

/* ---------- gift card (../_shared/extras.js), dressed as a landing ---------- */
.landings > .digi-gift{ padding: 26px 0; }
.landings > .digi-gift .dg-inner{ width: min(640px, 100%); background: rgba(255,252,246,.96); border: 1px solid var(--line); border-radius: 0; box-shadow: 0 30px 50px -36px rgba(110,80,30,.55), inset 0 0 0 7px var(--paper), inset 0 0 0 8px var(--line); padding: 40px 34px 34px; }
.landings > .digi-gift .dg-cap{ font-family: var(--caps); color: var(--gold); opacity: 1; }
.landings > .digi-gift .dg-title{ font-family: var(--caps); letter-spacing: .08em; }
.landings > .digi-gift .dg-show, .landings > .digi-gift .dg-copy{ font-family: var(--caps); border-color: var(--gold); color: var(--gold-d); }

/* ---------- footer ---------- */
.foot{ text-align:center; padding: 50px 22px 96px; background: linear-gradient(180deg, rgba(251,246,236,0), rgba(251,246,236,.88) 28%); }
.foot-names{ font-family: var(--script); font-size: clamp(3rem, 9vw, 4.4rem); line-height: 1; margin: 6px 0 0; }
.foot-names i{ font-style: normal; color: var(--gold); }
.foot-date{ font-family: var(--caps); letter-spacing: .3em; margin: 6px 0 0; }
.foot-bless{ font-style: italic; color: var(--soft); margin: 6px 0 18px; }
.foot-tools{ display:flex; gap: 10px; justify-content:center; flex-wrap:wrap; }
.made{ font-size: .85rem; color: var(--soft); margin-top: 26px; }

/* ---------- music ---------- */
.music{ position:fixed; right: 18px; bottom: 18px; z-index: 40; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--gold); background: rgba(255,252,246,.92); color: var(--gold-d); display:flex; align-items:center; justify-content:center; cursor:pointer; }
.music svg{ width: 20px; height: 20px; }
.music.is-off{ opacity: .75; }
.music:not(.is-off) svg{ animation: spin 6s linear infinite; }
@keyframes spin{ to{ transform: rotate(360deg); } }

/* =========================================================
   phones: landings stack, flights become a short vertical stair
   ========================================================= */
@media (max-width: 760px){
  body{ font-size: 17px; }
  .landings{ padding: 26px 14px 20px; }
  .landing, .landing.wide{ width: 100%; padding: 38px 20px 32px; }
  .flight{ width: 86px; height: 64px; }
  .cn{ width: 30px; height: 30px; }
  .cn.tl{ top: 10px; left: 10px; } .cn.tr{ top: 10px; right: 10px; } .cn.bl{ bottom: 10px; left: 10px; } .cn.br{ bottom: 10px; right: 10px; }
  .pair{ gap: 12px; }
  .portrait figcaption b{ font-size: 2rem; }
  .portrait figcaption span{ font-size: .85rem; }
  .pass-row{ grid-template-columns: 1fr; }
  .count div{ width: 66px; }
  .count strong{ font-size: 1.35rem; }
  .ola::before{ left: 24px; }
  .ola li{ padding: 12px 16px 12px 46px; gap: 12px; }
  .ola li::before{ left: 19px; }
  .ola time{ font-size: .82rem; min-width: 5.2em; }
  .ola span{ font-size: .98rem; line-height: 1.3; }
  .row2{ grid-template-columns: 1fr; gap: 0; }
  .top{ padding: 10px 12px; }
  .stair-rail{ right: 10px; height: 120px; margin-top: -60px; }
}
@media (max-aspect-ratio: 1/1){ .stair{ --glide: 9%; } }
