/* ==========================================================
   Chapters B — ceremonies, moments, venue, pass,
   closing, footer, lightbox
   ========================================================== */

/* ================= IV · CEREMONIES (sticky stack) ================= */
.ceremonies { background: linear-gradient(180deg, var(--ivory), var(--mint) 70%, var(--ivory)); padding-bottom: clamp(60px, 9vw, 120px); }
.stack { max-width: 1060px; margin: 0 auto; }
.ev {
  position: sticky; top: calc(96px + var(--i, 0) * 26px);
  display: grid; grid-template-columns: 1fr 1.25fr; overflow: hidden;
  min-height: min(470px, 72svh); margin-bottom: 16vh; border-radius: 30px;
  box-shadow: 0 50px 100px -50px rgba(86, 24, 49, .55), 0 0 0 1px rgba(180, 122, 99, .25);
  transform-origin: 50% 0; will-change: transform;
}
.ev:last-child { margin-bottom: 0; }
.ev-1 { --i: 0; background: linear-gradient(135deg, #fffdf9, #f8efe3); }
.ev-2 { --i: 1; background: linear-gradient(135deg, #fdf3f0, #f5dcd6); }
.ev-time {
  position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 20px;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(143, 192, 174, .45), transparent 60%),
    linear-gradient(160deg, var(--mint), var(--mint-2));
}
.ev-2 .ev-time { background: radial-gradient(ellipse at 50% 120%, rgba(187, 166, 193, .6), transparent 60%), linear-gradient(160deg, #efe6f0, var(--mauve)); }
.ev-time::before { /* jharokha arch outline */
  content: ''; position: absolute; inset: 26px 20% 0; border: 1px solid rgba(255, 255, 255, .8); border-bottom: 0;
  border-radius: 999px 999px 0 0 / 160px 160px 0 0;
}
.ev-hr { position: relative; font-variant-numeric: lining-nums; font-family: var(--serif); font-weight: 300; font-size: clamp(4.4rem, 10vw, 8.6rem); line-height: 1; letter-spacing: -.02em; }
.ev-ampm { position: relative; margin-top: .6rem; font-family: var(--caps); font-size: .66rem; letter-spacing: .3em; text-transform: uppercase; color: var(--wine); text-align: center; }
.ev-body { padding: clamp(32px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; }
.ev-icon { width: 54px; height: 54px; color: var(--rosegold); }
.ev-name { margin: .4rem 0 .2rem; font-family: var(--script); font-weight: 400; font-size: clamp(3.2rem, 6vw, 4.8rem); line-height: 1.1; color: var(--wine); }
.ev-desc { margin: 0 0 1.8rem; color: var(--ink); max-width: 440px; }
.ev-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 760px) {
  .ev { grid-template-columns: 1fr; top: calc(76px + var(--i, 0) * 18px); margin-bottom: 10vh; }
  .ev-time { padding: 34px 20px 26px; }
  .ev-time::before { inset: 14px 26% 0; }
}

/* ================= MARQUEE ================= */
.marquee { position: relative; z-index: 3; overflow: hidden; padding: 26px 0; background: var(--wine); border-block: 1px solid var(--rosegold); }
.mq-track { display: flex; align-items: center; gap: 36px; width: max-content; animation: marquee 38s linear infinite; }
.mq-track span { font-family: var(--script); font-size: clamp(2rem, 4vw, 3rem); line-height: 1.2; color: var(--rosegold-lt); white-space: nowrap; }
.mq-track i { font-style: normal; color: var(--rosegold); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ================= V · MOMENTS (horizontal) ================= */
.moments { position: relative; z-index: 3; background: linear-gradient(180deg, var(--paper), var(--ivory)); }
.hs-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; display: flex; align-items: center; }
.hs-track { display: flex; align-items: center; gap: clamp(28px, 4vw, 70px); padding: 0 8vw; will-change: transform; }
.hs-intro { flex: 0 0 min(420px, 80vw); }
.hs-intro .ch-title { text-align: left; }
.hs-lead { margin: 1rem 0 0; font-size: 1.2rem; font-style: italic; color: var(--muted); }
.hs-lead em { color: var(--wine); }
.hs-tip { display: flex; align-items: center; gap: 10px; margin: 2rem 0 0; font-family: var(--caps); font-size: .6rem; letter-spacing: .34em; text-transform: uppercase; color: var(--rosegold); }
.hs-tip svg { width: 22px; height: 22px; animation: nudge 1.8s var(--ease-io) infinite; }
@keyframes nudge { 50% { transform: translateX(8px); } }
.ph { position: relative; flex: 0 0 auto; margin: 0; overflow: hidden; border-radius: 20px; background: var(--paper-2); box-shadow: var(--shadow); }
.ph-tall { height: min(66vh, 620px); aspect-ratio: 100 / 140; }
.ph-wide { height: min(50vh, 460px); aspect-ratio: 3 / 2; }
.ph-sq { height: min(40vh, 380px); aspect-ratio: 1; }
.ph-arch { clip-path: url(#archClip); border-radius: 0; }
.ph.up { translate: 0 -7vh; } .ph.down { translate: 0 7vh; }
.ph img { width: 100%; height: 100%; object-fit: cover; transform: translateX(var(--px, 0)) scale(1.18); transition: scale 1.2s var(--ease); }
.ph:hover img { scale: 1.06; }
.ph figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 22px 18px;
  font-family: var(--script); font-size: 1.9rem; line-height: 1.1; color: #fff;
  background: linear-gradient(transparent, rgba(60, 15, 34, .65));
  transform: translateY(30%); opacity: 0; transition: transform .8s var(--ease), opacity .8s var(--ease);
}
.ph:hover figcaption { transform: none; opacity: 1; }
.hs-end { flex: 0 0 auto; padding-right: 4vw; }
.hs-meter {
  position: absolute; left: var(--gut); right: var(--gut); bottom: max(26px, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 16px; pointer-events: none;
}
.hs-count { font-family: var(--caps); font-size: .66rem; letter-spacing: .3em; color: var(--muted); white-space: nowrap; }
.hs-count b { font-weight: 500; color: var(--wine); }
.hs-line { position: relative; flex: 1; height: 1px; background: rgba(180, 122, 99, .25); overflow: hidden; }
.hs-line em { position: absolute; inset: 0; background: var(--foil); transform-origin: 0 50%; transform: scaleX(0); }
.hs-off .hs-meter { display: none; }

/* phones — pinned gallery tuned for narrow screens */
@media (max-width: 760px) {
  .moments:not(.hs-off) .hs-track { gap: 18px; padding: 0 7vw; }
  .moments:not(.hs-off) .hs-intro { flex-basis: 66vw; }
  .moments:not(.hs-off) .ph-tall { height: min(60svh, 500px); }
  .moments:not(.hs-off) .ph-wide { width: 86vw; height: auto; }
  .moments:not(.hs-off) .ph-sq { width: 74vw; height: auto; }
  .moments:not(.hs-off) .ph.up { translate: 0 -3svh; }
  .moments:not(.hs-off) .ph.down { translate: 0 3svh; }
  .moments:not(.hs-off) .ph figcaption { opacity: 1; transform: none; font-size: 1.5rem; padding: 50px 18px 14px; }
  .moments:not(.hs-off) .hs-end { flex-basis: 80vw; }
  .moments:not(.hs-off) .hs-end p { white-space: normal; font-size: 2.4rem; line-height: 1.2; }
  .hs-meter { bottom: calc(64px + env(safe-area-inset-bottom)); left: 7vw; right: 7vw; }
}
@media (hover: none) { .ph figcaption { opacity: 1; transform: none; } }
.hs-end p { margin: 0; font-family: var(--script); font-size: clamp(2.4rem, 4vw, 3.4rem); color: var(--wine); white-space: nowrap; }

/* swipe carousel — phones, tablets, reduced motion (class set by fx.js) */
.moments.hs-off { height: auto !important; padding: 90px 0 70px; }
.hs-off .hs-sticky { position: static; height: auto; display: block; }
.hs-off .hs-track {
  transform: none !important; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  padding: 10px var(--gut) 30px; gap: 16px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.hs-off .hs-track::-webkit-scrollbar { display: none; }
.hs-off .hs-track > * { scroll-snap-align: center; }
.hs-off .hs-intro { flex-basis: min(78vw, 420px); }
.hs-off .hs-tip { display: flex; }
.hs-off .ph.up, .hs-off .ph.down { translate: none; }
.hs-off .ph-tall { height: min(62svh, 520px); } .hs-off .ph-wide, .hs-off .ph-sq { height: min(42svh, 360px); }
.hs-off .ph img { transform: scale(1.02); }
.hs-off .ph figcaption { opacity: 1; transform: none; font-size: 1.5rem; padding: 50px 18px 14px; }
.hs-off .ph-wide { width: min(86vw, 560px); height: auto; }
.hs-off .ph-tall { width: auto; }
.hs-off .hs-end p { white-space: normal; max-width: 60vw; }

/* ================= VI · VENUE ================= */
.venue { background: var(--ivory); }
.venue-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: clamp(24px, 4vw, 56px); max-width: 1160px; margin: 0 auto; align-items: stretch; }
.venue-card {
  position: relative; text-align: center; padding: clamp(60px, 8vw, 90px) clamp(22px, 4vw, 44px) clamp(36px, 5vw, 52px);
  background: linear-gradient(180deg, #fffdf9, var(--paper));
  border-radius: 999px 999px 24px 24px / 200px 200px 24px 24px; box-shadow: var(--shadow);
  outline: 1px solid rgba(180, 122, 99, .4); outline-offset: -12px;
}
.venue-pin { width: 38px; height: 38px; color: var(--rosegold); }
.venue-card h3 { margin: .6rem 0 .8rem; font-family: var(--script); font-weight: 400; font-size: clamp(2.4rem, 4.4vw, 3.4rem); line-height: 1.1; color: var(--wine); }
.venue-addr { margin: 0 0 1rem; color: var(--ink); }
.venue-tel { display: flex; width: fit-content; margin: 0 auto 1.8rem; align-items: center; gap: 8px; font-family: var(--caps); font-size: .72rem; letter-spacing: .2em; text-decoration: none; color: var(--rosegold); }
.venue-tel svg { width: 16px; height: 16px; }
.venue-map { position: relative; min-height: 440px; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); }
.venue-map::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(180, 122, 99, .4), inset 0 0 0 8px rgba(251, 247, 240, .7); }
.venue-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: sepia(.28) saturate(.85) hue-rotate(-10deg) contrast(.96); transition: filter .8s; }
.venue-map:hover iframe { filter: none; }
@media (max-width: 860px) { .venue-grid { grid-template-columns: 1fr; } .venue-map { min-height: 340px; } }

/* ================= VII · PASS (ticket) ================= */
.pass-ch { background: linear-gradient(180deg, var(--ivory), var(--blush) 140%); }
.ticket {
  --mx: 50%; --my: 50%;
  position: relative; display: grid; grid-template-columns: 1fr 230px; max-width: 780px; margin: 0 auto;
  border-radius: 24px; overflow: hidden; transform-style: preserve-3d;
  background: linear-gradient(135deg, #fffdf9, #f7eee3);
  box-shadow: 0 50px 90px -40px rgba(86, 24, 49, .55), 0 0 0 1px rgba(180, 122, 99, .35);
  -webkit-mask: radial-gradient(circle 16px at calc(100% - 230px) 0, transparent 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle 16px at calc(100% - 230px) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
          mask: radial-gradient(circle 16px at calc(100% - 230px) 0, transparent 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle 16px at calc(100% - 230px) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
}
.tk-main { padding: clamp(28px, 5vw, 50px); border-right: 2px dashed rgba(180, 122, 99, .4); }
.tk-kicker { margin: 0; font-family: var(--caps); font-size: .64rem; letter-spacing: .42em; text-transform: uppercase; color: var(--rosegold); }
.tk-guest { margin: .2rem 0 0; font-family: var(--script); font-size: clamp(2.6rem, 6vw, 3.8rem); line-height: 1.15; }
.tk-couple { margin: .2rem 0 1.4rem; font-size: 1.3rem; color: var(--wine); font-weight: 500; }
.tk-couple i { color: var(--rosegold); }
.tk-meta { display: flex; flex-wrap: wrap; gap: 14px 30px; margin: 0; }
.tk-meta dt { font-family: var(--caps); font-size: .56rem; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.tk-meta dd { margin: .2rem 0 0; font-weight: 500; color: var(--wine); }
.tk-venue { margin: 1.3rem 0 0; font-style: italic; color: var(--muted); font-size: .95rem; }
.tk-stub { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 26px 18px; background: linear-gradient(160deg, var(--mint), var(--mint-2)); }
#qrcode { padding: 10px; background: #fff; border-radius: 10px; box-shadow: 0 0 0 1px rgba(180, 122, 99, .3); }
#qrcode img, #qrcode canvas { width: 132px !important; height: 132px !important; }
.tk-code { margin: 0; font-family: var(--caps); font-size: 1rem; letter-spacing: .3em; color: var(--wine); }
.tk-issued { display: flex; align-items: center; gap: 5px; margin: 0; font-family: var(--caps); font-size: .52rem; letter-spacing: .3em; color: var(--celadon-deep); }
.tk-sheen { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light; opacity: 0; transition: opacity .5s;
  background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, .95), transparent 45%), linear-gradient(115deg, transparent 30%, rgba(233, 194, 170, .6) 50%, transparent 70%); }
.ticket:hover .tk-sheen { opacity: 1; }
.pass-actions { text-align: center; margin-top: 2.6rem; }
@media (max-width: 640px) {
  .ticket { grid-template-columns: 1fr; -webkit-mask: none; mask: none; }
  .tk-main { border-right: 0; border-bottom: 2px dashed rgba(180, 122, 99, .4); text-align: center; }
  .tk-meta { justify-content: center; }
}

/* ================= CLOSING ================= */
.closing { position: relative; z-index: 3; min-height: 92svh; display: grid; place-items: center; overflow: hidden; text-align: center; padding: 120px var(--gut); }
.closing-bg { position: absolute; inset: -18% 0; background: center 30% / cover no-repeat; will-change: transform; }
.closing::before { content: ''; position: absolute; inset: 0; z-index: 1; background: radial-gradient(ellipse at 50% 50%, rgba(60, 15, 34, .55), rgba(60, 15, 34, .85)); }
.closing blockquote { position: relative; z-index: 2; margin: 0; max-width: 1100px; }
.closing p { margin: 0; text-wrap: balance; font-family: var(--script); font-size: clamp(2.2rem, 5.4vw, 4.4rem); line-height: 1.25; color: #fff; text-shadow: 0 4px 30px rgba(0, 0, 0, .3); }
.closing cite { display: block; margin-top: 1.8rem; font-style: normal; font-family: var(--caps); font-size: .7rem; letter-spacing: .42em; text-transform: uppercase; color: var(--rosegold-lt); }

/* ================= FOOTER ================= */
.footer { position: relative; z-index: 3; text-align: center; padding: 90px var(--gut) 110px; background: var(--ivory); }
.ft-mono { font-size: 3.6rem; margin: 0; }
.ft-line { margin: .4rem 0 0; font-family: var(--caps); font-size: .7rem; letter-spacing: .36em; color: var(--rosegold); }
.ft-lv { margin-top: 3.4rem; display: flex; flex-direction: column; align-items: center; }
.ft-rule { width: 1px; height: 60px; margin-bottom: 2rem; background: linear-gradient(transparent, var(--rosegold)); }
.ft-lv img { animation: lvTurn 12s var(--ease-io) infinite; }
.ft-lv-name { margin: .7rem 0 0; font-family: var(--serif); font-weight: 500; font-size: 2.4rem; line-height: 1.1; letter-spacing: .16em; padding-left: .16em; background: var(--foil-deep); background-size: 260% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: foil 6s var(--ease-io) infinite alternate; }
.ft-lv-tag { margin: .2rem 0 0; font-style: italic; color: var(--muted); }
.ft-lv-credit { margin: 1.4rem 0 0; font-family: var(--sans); font-size: .74rem; letter-spacing: .08em; color: var(--muted); }
.ft-lv-credit b { color: var(--wine); font-weight: 500; letter-spacing: .14em; }

/* ================= LIGHTBOX ================= */
.lightbox { position: fixed; inset: 0; z-index: 950; display: grid; place-items: center; background: rgba(40, 10, 24, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transition: opacity .5s var(--ease); }
.lightbox.show { opacity: 1; }
.lb-fig { margin: 0; text-align: center; }
.lb-img { max-width: 88vw; max-height: 78svh; border-radius: 8px; box-shadow: 0 40px 80px rgba(0, 0, 0, .5); transform: scale(.94); transition: transform .7s var(--ease), opacity .4s; }
.lightbox.show .lb-img { transform: none; }
.lb-cap { margin-top: 1rem; font-family: var(--script); font-size: 1.9rem; color: var(--rosegold-lt); }
.lb-btn { position: absolute; width: 54px; height: 54px; border-radius: 50%; border: 1px solid rgba(233, 194, 170, .4); background: rgba(255, 255, 255, .05); color: var(--ivory); font-size: 1.8rem; line-height: 1; transition: background .4s, transform .5s var(--ease); }
.lb-btn:hover { background: rgba(233, 194, 170, .2); transform: scale(1.08); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; margin-top: -27px; }
.lb-next { right: 18px; top: 50%; margin-top: -27px; }
.lb-brand { position: absolute; bottom: 18px; left: 0; right: 0; margin: 0; display: flex; justify-content: center; align-items: center; gap: 6px; font-family: var(--caps); font-size: .56rem; letter-spacing: .38em; color: var(--rosegold-lt); }
@media (max-width: 600px) { .lb-prev, .lb-next { top: auto; bottom: 56px; margin: 0; } }
