/* =========================================================
   Wedding invitation – ivory, maroon & kasavu gold
   ========================================================= */
:root {
  --ivory: #fbf6ec;
  --ivory-2: #f4ead6;
  --maroon: #6b1d2a;
  --maroon-2: #4e1220;
  --gold: #b8893b;
  --gold-light: #d8b26a;
  --gold-pale: #f3dfb1;
  --ink: #3b2a22;
  --muted: #7d6a5c;
  --line: rgba(184, 137, 59, 0.35);
  --serif: "Cormorant Garamond", Georgia, serif;
  --script: "Great Vibes", "Brush Script MT", cursive;
  --sans: "Jost", system-ui, sans-serif;
  --radius: 22px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ivory); color: var(--ink); font-family: var(--sans); font-weight: 300; font-size: 17px; line-height: 1.7; overflow-x: hidden; }
body.is-locked { overflow: hidden; height: 100vh; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { width: min(980px, 100% - 40px); margin-inline: auto; position: relative; }
.script { font-family: var(--script); font-weight: 400; color: var(--maroon); }
.section { padding: 84px 0; position: relative; }
.section-title { font-family: var(--serif); font-weight: 600; font-size: clamp(32px, 5vw, 46px); color: var(--maroon); text-align: center; margin: 0 0 36px; letter-spacing: .01em; }
.section-title::after { content: ""; display: block; width: 90px; height: 10px; margin: 14px auto 0; background:
  radial-gradient(circle, var(--gold) 3px, transparent 3.5px) center / 10px 10px no-repeat,
  linear-gradient(var(--gold), var(--gold)) left center / 38px 1px no-repeat,
  linear-gradient(var(--gold), var(--gold)) right center / 38px 1px no-repeat; }
.eyebrow { font-family: var(--sans); font-size: 13px; letter-spacing: .32em; text-transform: uppercase; color: var(--gold); font-weight: 500; margin: 0 0 14px; }

/* Kasavu (gold-bordered) stripe */
.kasavu { height: 16px; background:
  linear-gradient(to bottom, transparent 0 3px, var(--gold) 3px 5px, transparent 5px 7px, var(--gold-light) 7px 11px, transparent 11px 13px, var(--gold) 13px 15px, transparent 15px); }

/* Ornament divider */
.ornament { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 22px auto; }
.ornament span { height: 1px; width: 70px; background: linear-gradient(90deg, transparent, var(--gold)); }
.ornament span:last-child { background: linear-gradient(90deg, var(--gold), transparent); }
.ornament i { width: 10px; height: 10px; border: 1.5px solid var(--gold); transform: rotate(45deg); }
.ornament.small { margin: 18px auto; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-family: var(--sans); font-size: 15px; font-weight: 500; letter-spacing: .04em; padding: 13px 26px; border-radius: 999px; border: 1.5px solid transparent; cursor: pointer; text-decoration: none; transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn-gold { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: #fff; box-shadow: 0 10px 24px rgba(184, 137, 59, .35); }
.btn-maroon { background: var(--maroon); color: #fff; }
.btn-maroon:hover { background: var(--maroon-2); }
.btn-ghost { background: transparent; color: var(--maroon); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); background: #fff; }
:focus-visible { outline: 3px solid rgba(184, 137, 59, .6); outline-offset: 3px; }

/* ================= COVER ================= */
.cover { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; perspective: 1600px; }
.door { position: absolute; top: 0; bottom: 0; width: 50.5%; background: var(--maroon); transition: transform 1.6s cubic-bezier(.65, 0, .25, 1); overflow: hidden; }
.door-left { left: 0; transform-origin: left center; border-right: 2px solid var(--gold); }
.door-right { right: 0; transform-origin: right center; border-left: 2px solid var(--gold); }
.door-pattern { position: absolute; inset: 18px; border: 1.5px solid rgba(216, 178, 106, .55); border-radius: 6px; background:
  radial-gradient(circle at 50% 50%, rgba(216, 178, 106, .16) 0 2px, transparent 2.5px) 0 0 / 28px 28px,
  linear-gradient(135deg, rgba(255, 255, 255, .04), transparent 60%); }
.door-pattern::after { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(216, 178, 106, .3); border-radius: 4px; }
.cover-content { position: relative; z-index: 2; text-align: center; color: var(--gold-pale); padding: 24px; transition: opacity .5s ease, transform .5s ease; }
.cover-kicker { font-family: var(--serif); font-style: italic; font-size: 22px; letter-spacing: .06em; margin: 0 0 22px; }
.seal { width: 132px; height: 132px; margin: 0 auto 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 35% 30%, #f6dfa6, var(--gold) 60%, #8d6526); box-shadow: 0 0 0 6px rgba(216, 178, 106, .25), 0 18px 40px rgba(0, 0, 0, .35); animation: seal-glow 3s ease-in-out infinite; }
.seal span { font-family: var(--script); font-size: 40px; color: var(--maroon-2); white-space: nowrap; }
@keyframes seal-glow { 50% { box-shadow: 0 0 0 12px rgba(216, 178, 106, .12), 0 18px 40px rgba(0, 0, 0, .35); } }
.cover-names { font-family: var(--script); font-weight: 400; font-size: clamp(46px, 11vw, 80px); color: #fff; margin: 0; line-height: 1.1; }
.cover-names em { font-style: normal; color: var(--gold-light); font-size: .7em; }
.cover-date { font-family: var(--serif); letter-spacing: .3em; font-size: 18px; margin: 10px 0 30px; }
.cover-btn { animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.05); } }
.cover.is-open .door-left { transform: rotateY(-105deg); }
.cover.is-open .door-right { transform: rotateY(105deg); }
.cover.is-open .cover-content { opacity: 0; transform: scale(.92); pointer-events: none; }
.cover.is-gone { display: none; }

/* ================= TOP BAR ================= */
.topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; background: rgba(251, 246, 236, .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); transform: translateY(-100%); transition: transform .5s ease; }
.topbar.is-visible { transform: none; }
.topbar-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.mini-seal { width: 40px; height: 40px; border-radius: 50%; background: var(--maroon); color: var(--gold-pale); display: inline-flex; align-items: center; justify-content: center; font-family: var(--script); font-size: 15px; white-space: nowrap; border: 1.5px solid var(--gold-light); }
.topbar-names { font-family: var(--serif); font-weight: 600; font-size: 19px; color: var(--maroon); }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--maroon); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.is-playing { background: var(--maroon); color: var(--gold-pale); animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ================= HERO ================= */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; text-align: center; padding: 110px 0 60px; background:
  radial-gradient(ellipse at 50% 0%, rgba(216, 178, 106, .25), transparent 60%),
  radial-gradient(ellipse at 50% 100%, rgba(107, 29, 42, .08), transparent 60%), var(--ivory); position: relative; }
.hero .kasavu-top { position: absolute; top: 0; left: 0; right: 0; }
.blessing { font-family: var(--serif); font-style: italic; font-size: clamp(19px, 2.6vw, 24px); color: var(--muted); max-width: 560px; margin: 0 auto; }
.invite-text { max-width: 560px; margin: 0 auto 10px; color: var(--muted); }
.couple { margin: 8px 0 6px; display: flex; flex-direction: column; align-items: center; line-height: 1; font-weight: 400; }
.couple .script { font-size: clamp(72px, 15vw, 132px); }
.couple .with { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--gold); letter-spacing: .2em; margin: 6px 0 12px; }
.tagline { font-family: var(--serif); font-size: clamp(20px, 2.8vw, 26px); color: var(--maroon); margin: 18px 0 40px; }
.scroll-cue { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; letter-spacing: .25em; text-transform: uppercase; color: var(--gold); text-decoration: none; }
.scroll-cue span { font-size: 22px; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }

/* ================= FAMILIES ================= */
.families { background: var(--ivory-2); }
.family-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; }
.family-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 38px 28px; text-align: center; position: relative; }
.family-card::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(184, 137, 59, .18); border-radius: 16px; pointer-events: none; }
.family-role { font-size: 12px; letter-spacing: .32em; text-transform: uppercase; color: var(--gold); margin: 0; font-weight: 500; }
.family-card h3 { font-size: 64px; margin: 4px 0 6px; line-height: 1.1; }
.family-rel { font-family: var(--serif); font-style: italic; color: var(--muted); margin: 0; font-size: 18px; }
.family-parents { font-family: var(--serif); font-weight: 600; font-size: 21px; color: var(--ink); margin: 2px 0 14px; }
.family-home { margin: 0; color: var(--muted); font-size: 15px; }
.family-home strong { color: var(--maroon); font-weight: 500; }
.family-amp { font-family: var(--script); font-size: 70px; color: var(--gold); }

/* ================= EVENT CARDS ================= */
.event-card { background: #fff; border-radius: 28px; padding: 48px 32px; text-align: center; position: relative; box-shadow: 0 24px 60px rgba(107, 29, 42, .08); }
.event-card::before { content: ""; position: absolute; inset: 10px; border: 1.5px solid var(--gold-light); border-radius: 20px; pointer-events: none; }
.event-card::after { content: ""; position: absolute; inset: 16px; border: 1px solid rgba(184, 137, 59, .25); border-radius: 15px; pointer-events: none; }
.event-main { max-width: 640px; margin: 0 auto; }
.date-block { display: flex; align-items: center; justify-content: center; gap: 18px; font-family: var(--serif); color: var(--maroon); }
.date-day, .date-month { font-size: 19px; letter-spacing: .14em; text-transform: uppercase; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px 0; min-width: 130px; }
.date-num { font-size: 76px; font-weight: 700; line-height: 1; color: var(--gold); }
.trad-date { font-family: var(--serif); font-style: italic; color: var(--muted); margin: 12px 0 0; font-size: 19px; }
.venue { font-family: var(--serif); font-weight: 700; font-size: 27px; color: var(--maroon); margin: 0; line-height: 1.25; }
.place { margin: 2px 0 0; color: var(--muted); }
.muhurtham { display: inline-flex; flex-direction: column; gap: 2px; margin: 24px 0 6px; background: var(--ivory); border: 1px dashed var(--gold); border-radius: 16px; padding: 14px 30px; }
.muhurtham-label { font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); font-weight: 500; }
.muhurtham strong { font-family: var(--serif); font-size: 26px; color: var(--maroon); }
.card-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; position: relative; z-index: 1; }

.event-reception { display: grid; grid-template-columns: 1fr 220px; gap: 32px; align-items: center; text-align: left; background: var(--maroon); color: var(--gold-pale); }
.event-reception::before { border-color: rgba(216, 178, 106, .6); }
.event-reception::after { border-color: rgba(216, 178, 106, .2); }
.event-reception .eyebrow { color: var(--gold-light); }
.event-reception .venue { color: #fff; }
.event-reception .place { color: rgba(243, 223, 177, .8); }
.reception-date { font-family: var(--serif); font-size: 26px; margin: 0; color: #fff; }
.reception-time { font-family: var(--serif); font-size: 22px; color: var(--gold-light); margin: 0 0 16px; }
.event-reception .card-actions { justify-content: flex-start; }
.event-reception .btn-maroon { background: var(--gold); }
.event-reception .btn-maroon:hover { background: var(--gold-light); color: var(--maroon-2); }
.event-reception .btn-ghost { color: var(--gold-pale); border-color: rgba(216, 178, 106, .5); }
.event-reception .btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.qr-box { margin: 0; text-align: center; position: relative; z-index: 1; }
.qr { background: #fff; padding: 12px; border-radius: 16px; display: inline-block; line-height: 0; }
.qr img, .qr svg { width: 168px; height: 168px; }
.qr-box figcaption { font-size: 13px; letter-spacing: .24em; text-transform: uppercase; margin-top: 10px; color: var(--gold-light); }

/* ================= COUNTDOWN ================= */
.countdown-section { text-align: center; background: linear-gradient(180deg, var(--ivory), var(--ivory-2)); }
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; max-width: 620px; margin: 0 auto; }
.countdown div { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px 6px 14px; box-shadow: 0 10px 26px rgba(107, 29, 42, .06); }
.countdown strong { display: block; font-family: var(--serif); font-weight: 700; font-size: clamp(34px, 7vw, 54px); color: var(--maroon); line-height: 1.05; font-variant-numeric: tabular-nums; }
.countdown span { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.countdown-done { font-family: var(--script); font-size: 44px; color: var(--maroon); margin: 0; }

/* ================= GALLERY ================= */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gallery button { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 5; position: relative; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.gallery button:hover img { transform: scale(1.06); }
.gallery button::after { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(255, 255, 255, .6); border-radius: 12px; pointer-events: none; }

.lightbox { position: fixed; inset: 0; z-index: 1100; background: rgba(30, 10, 14, .94); display: flex; align-items: center; justify-content: center; padding: 20px; }
.lb-figure { margin: 0; max-width: min(900px, 100%); text-align: center; }
.lb-figure img { max-height: 80vh; margin: 0 auto; border-radius: 12px; }
.lb-figure figcaption { color: var(--gold-pale); font-family: var(--serif); font-style: italic; font-size: 20px; margin-top: 12px; }
.lb-btn { position: absolute; background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .25); width: 52px; height: 52px; border-radius: 50%; font-size: 32px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lb-btn:hover { background: rgba(255, 255, 255, .2); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }

/* ================= FIND US ================= */
.find-section { background: var(--ivory-2); }
.find-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.find-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 26px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.find-icon { width: 62px; height: 62px; border-radius: 50%; background: var(--ivory); border: 1px solid var(--line); color: var(--maroon); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.find-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.find-card h3 { font-family: var(--sans); font-size: 13px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); margin: 0 0 8px; font-weight: 500; }
.find-card .venue { font-size: 24px; }
.find-when { color: var(--muted); margin: 12px 0 20px; flex: 1; }

/* ================= CLOSING ================= */
.closing { background: var(--maroon); color: var(--gold-pale); text-align: center; padding: 96px 0 80px; position: relative; overflow: hidden; }
.closing .kasavu-top { position: absolute; top: 0; left: 0; right: 0; }
.closing::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; border: 1px solid rgba(216, 178, 106, .18); left: 50%; top: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 40px rgba(216, 178, 106, .04), 0 0 0 80px rgba(216, 178, 106, .03); }
.closing-lines { font-family: var(--serif); font-size: clamp(28px, 5vw, 40px); line-height: 1.3; margin: 0; color: #fff; }
.closing-lines span { font-style: italic; color: var(--gold-light); }
.closing-sign { font-size: clamp(54px, 10vw, 84px); color: var(--gold-light); margin: 18px 0 0; line-height: 1.2; }
.closing-date { font-family: var(--serif); letter-spacing: .4em; font-size: 20px; margin: 4px 0 18px; }
.closing-note { max-width: 460px; margin: 0 auto 30px; color: rgba(243, 223, 177, .85); }
.share-msg { margin: 14px 0 0; font-size: 14px; color: var(--gold-light); }

/* ================= CONTACTS ================= */
.contacts { background: var(--maroon-2); color: var(--gold-pale); padding: 48px 0 110px; text-align: center; }
.contacts-title { font-family: var(--serif); font-weight: 600; font-size: 26px; margin: 0 0 18px; color: #fff; }
.contact-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.contact-list a { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; padding: 10px 20px 10px 10px; border: 1px solid rgba(216, 178, 106, .4); border-radius: 999px; transition: background .2s ease; }
.contact-list a:hover { background: rgba(255, 255, 255, .06); }
.contact-list .call-icon { width: 38px; height: 38px; border-radius: 50%; background: var(--gold); color: var(--maroon-2); display: inline-flex; align-items: center; justify-content: center; }
.contact-list .call-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.contact-list small { display: block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-light); text-align: left; }
.contact-list strong { font-weight: 500; color: #fff; font-size: 17px; }
.made-with { margin: 28px 0 0; font-size: 13px; color: rgba(243, 223, 177, .55); }

/* ================= PETALS + REVEAL ================= */
.petals { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.petal { position: absolute; top: -40px; width: 14px; height: 18px; border-radius: 80% 0 80% 0; background: linear-gradient(135deg, #f3b2a6, #d9707a); opacity: .85; animation: fall linear forwards; }
.petal.gold { background: linear-gradient(135deg, var(--gold-pale), var(--gold)); }
@keyframes fall {
  0% { transform: translate3d(0, 0, 0) rotate(0deg); }
  100% { transform: translate3d(var(--drift, 60px), 110vh, 0) rotate(var(--spin, 540deg)); opacity: .4; }
}
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ================= RESPONSIVE ================= */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .family-grid { grid-template-columns: 1fr; gap: 6px; }
  .family-amp { text-align: center; font-size: 56px; line-height: 1; }
  .event-card { padding: 40px 22px; }
  .event-reception { grid-template-columns: 1fr; text-align: center; }
  .event-reception .card-actions { justify-content: center; }
  .date-block { gap: 10px; }
  .date-day, .date-month { font-size: 14px; min-width: 0; padding: 6px 4px; }
  .date-num { font-size: 60px; }
  .countdown { gap: 8px; }
  .countdown div { padding: 14px 2px 10px; border-radius: 14px; }
  .countdown span { font-size: 10px; letter-spacing: .12em; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .find-grid { grid-template-columns: 1fr; }
  .lb-prev, .lb-next { top: auto; bottom: 22px; transform: none; }
  .lb-prev { left: calc(50% - 64px); }
  .lb-next { right: calc(50% - 64px); }
  .card-actions .btn { width: 100%; }
  .topbar-names { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
