:root {
  --rose: #c48b8b;
  --rose-dark: #a96b6f;
  --sage: #8a9a7b;
  --sage-dark: #55664a;
  --cream: #fbf6ef;
  --cream-dark: #f3eadf;
  --gold: #b8975a;
  --gold-light: #e6c984;
  --text: #4a4040;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', sans-serif; font-weight: 300; color: var(--text);
  background: var(--cream); line-height: 1.75; overflow-x: hidden;
}
body.locked { overflow: hidden; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

.script { font-family: 'Great Vibes', cursive; font-weight: 400; }
.center { text-align: center; }
.eyebrow { font-size: .78rem; letter-spacing: 5px; text-transform: uppercase; color: var(--sage-dark); font-weight: 500; }

.shimmer {
  background: linear-gradient(100deg, var(--rose-dark) 20%, var(--gold) 45%, var(--gold-light) 50%, var(--gold) 55%, var(--rose-dark) 80%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 5s linear infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* Preloader */
#preloader {
  position: fixed; inset: 0; z-index: 300; background: var(--cream);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  transition: opacity .7s ease, visibility .7s;
}
#preloader.done { opacity: 0; visibility: hidden; }
#preloader .script { font-size: 2.6rem; color: var(--rose); }
.rings { position: relative; width: 90px; height: 60px; }
.rings span {
  position: absolute; top: 4px; width: 48px; height: 48px; border-radius: 50%;
  border: 6px solid var(--gold); animation: ringMove 1.6s ease-in-out infinite;
}
.rings span:first-child { left: 0; }
.rings span:last-child { right: 0; border-color: var(--rose); animation-delay: .8s; }
@keyframes ringMove { 0%, 100% { transform: translateX(0) scale(1); } 50% { transform: translateX(10px) scale(1.12); } }

/* FX canvas */
#fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 90; pointer-events: none; }

/* Toast */
#toast {
  position: fixed; left: 50%; bottom: 90px; z-index: 400;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: rgba(60, 50, 50, .92); color: #fff; padding: 10px 22px;
  border-radius: 30px; font-size: .85rem; transition: all .4s var(--ease);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; border: none;
  background: linear-gradient(135deg, var(--rose), var(--rose-dark)); color: #fff; text-decoration: none;
  padding: 13px 32px; border-radius: 40px; font-size: .92rem; letter-spacing: 1px; font-weight: 400;
  box-shadow: 0 8px 22px rgba(169, 107, 111, .35);
  transition: transform .3s var(--ease), box-shadow .3s, background .3s;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(169, 107, 111, .45); }
.btn:active { transform: translateY(0) scale(.97); }
.btn-outline { background: transparent; color: var(--rose-dark); border: 1.5px solid var(--rose); box-shadow: none; padding: 10px 24px; font-size: .82rem; }
.btn-outline:hover { background: var(--rose); color: #fff; }
.btn-light { background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .6); box-shadow: none; padding: 8px 22px; font-size: .8rem; backdrop-filter: blur(4px); }
.btn-light:hover { background: #fff; color: #333; }
.btn-pulse { animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(196, 139, 139, .55); } 70% { box-shadow: 0 0 0 18px rgba(196, 139, 139, 0); } 100% { box-shadow: 0 0 0 0 rgba(196, 139, 139, 0); } }

/* Cover */
.cover {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 20px; text-align: center; overflow: hidden;
  clip-path: circle(150% at 50% 50%);
  transition: clip-path 1.5s cubic-bezier(.7, 0, .3, 1);
}
.cover.open { clip-path: circle(0% at 50% 50%); pointer-events: none; }
.cover-bg {
  position: absolute; inset: -5%; background: url('../img/hero.jpg') center/cover no-repeat;
  animation: kenburns 22s ease-in-out infinite alternate;
}
.cover-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(251, 246, 239, .35), rgba(251, 246, 239, .7)); }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.14) translate(-1.5%, -1%); } }

.glass {
  position: relative; background: rgba(255, 255, 255, .55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .8); border-radius: 28px; box-shadow: 0 20px 60px rgba(120, 90, 90, .2);
}
.cover-box { padding: 44px 36px; max-width: 460px; width: 100%; animation: floatIn 1.2s var(--ease) both .3s; }
@keyframes floatIn { from { opacity: 0; transform: translateY(40px) scale(.96); } to { opacity: 1; transform: none; } }
.cover-box h1 { font-size: 4rem; line-height: 1.1; margin: 8px 0 4px; }
.cover-date { letter-spacing: 6px; font-size: .9rem; color: var(--gold); font-weight: 500; }
.cover-guest { margin: 28px 0; padding: 18px 0; border-top: 1px dashed rgba(184, 151, 90, .6); border-bottom: 1px dashed rgba(184, 151, 90, .6); }
.cover-guest p { font-size: .85rem; }
.cover-guest h2 { font-family: 'Playfair Display', serif; font-weight: 600; font-size: 1.5rem; margin: 6px 0; color: var(--text); }
.cover-guest small { font-size: .72rem; color: #8a7d7d; }

/* Hero */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 30px 20px 120px; overflow: hidden; }
.hero-bg {
  position: absolute; inset: -10% 0; background: url('../img/hero.jpg') center/cover no-repeat; will-change: transform;
}
.hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(251, 246, 239, .2), rgba(251, 246, 239, .75)); }
.hero-text { position: relative; z-index: 2; }
.hero-text h1 { font-size: clamp(3.4rem, 11vw, 6.5rem); line-height: 1.1; margin: 10px 0; }
.hero-date { font-family: 'Playfair Display', serif; font-style: italic; font-size: 1.2rem; }
.in { opacity: 0; transform: translateY(30px); }
body.started .in { animation: rise 1.1s var(--ease) forwards; animation-delay: var(--d, 0s); }
@keyframes rise { to { opacity: 1; transform: none; } }
body.started .shimmer.in { animation: rise 1.1s var(--ease) forwards, shimmer 5s linear infinite; animation-delay: var(--d, 0s), 0s; }

.countdown { display: flex; gap: 14px; justify-content: center; margin-top: 34px; }
.cd { background: rgba(255, 255, 255, .72); backdrop-filter: blur(8px); border: 1px solid #fff; border-radius: 16px; width: 82px; padding: 14px 0 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .08); }
.cd span { display: block; font-family: 'Playfair Display', serif; font-size: 2rem; line-height: 1.1; color: var(--gold); }
.cd span.flip { animation: flip .5s ease; }
@keyframes flip { 0% { transform: rotateX(90deg); opacity: 0; } 100% { transform: rotateX(0); opacity: 1; } }
.cd small { font-size: .68rem; letter-spacing: 2px; text-transform: uppercase; color: #8a7d7d; }

.scroll-hint { display: block; margin: 40px auto 0; width: 26px; height: 42px; border: 2px solid var(--sage-dark); border-radius: 20px; position: relative; }
.scroll-hint i { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; background: var(--sage-dark); border-radius: 2px; animation: wheel 1.6s infinite; }
@keyframes wheel { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(14px); } }

/* Sections */
.section { padding: 100px 22px; position: relative; }
.section.alt { background: linear-gradient(180deg, var(--cream-dark), #f7efe4); }
.title { font-family: 'Playfair Display', serif; font-weight: 400; font-size: clamp(1.8rem, 5vw, 2.5rem); color: var(--text); margin: 8px 0 34px; position: relative; padding-bottom: 20px; }
.title::after { content: ''; position: absolute; left: 50%; bottom: 0; width: 90px; height: 2px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.title::before { content: ''; position: absolute; left: 50%; bottom: -4px; width: 9px; height: 9px; transform: translateX(-50%) rotate(45deg); background: var(--gold); z-index: 1; }
.lead { max-width: 660px; margin: 0 auto 28px; }
.lead.light { color: #fff; opacity: .9; }
.quote { max-width: 620px; margin: 34px auto 0; padding: 26px 28px; font-family: 'Playfair Display', serif; font-style: italic; font-size: 1.05rem; border-left: 3px solid var(--gold); background: rgba(255, 255, 255, .6); border-radius: 0 16px 16px 0; text-align: left; }
.quote cite { display: block; margin-top: 12px; font-family: 'Poppins', sans-serif; font-style: normal; font-size: .8rem; letter-spacing: 2px; color: var(--gold); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal-left { transform: translateX(-60px); }
.reveal-right { transform: translateX(60px); }
.reveal-zoom { transform: scale(.85); }
.reveal.show { opacity: 1; transform: none; }

/* Couple */
.couple { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 26px; }
.person { max-width: 290px; padding: 30px 24px; background: #fff; border-radius: 26px; box-shadow: 0 14px 40px rgba(0, 0, 0, .08); }
.photo { width: 190px; height: 190px; margin: 0 auto 16px; padding: 5px; border-radius: 50%; background: conic-gradient(var(--gold), var(--rose), var(--sage), var(--gold)); animation: spin-border 8s linear infinite; }
@keyframes spin-border { to { filter: hue-rotate(40deg); } }
.photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 4px solid #fff; }
.person h3 { font-size: 2.3rem; color: var(--rose-dark); line-height: 1.2; }
.role { font-size: .75rem; letter-spacing: 3px; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; font-weight: 500; }
.ig { display: inline-block; margin-top: 12px; font-size: .82rem; color: var(--sage-dark); text-decoration: none; padding: 4px 14px; border: 1px solid var(--sage); border-radius: 20px; transition: .3s; }
.ig:hover { background: var(--sage); color: #fff; }
.amp { font-size: 4.5rem; color: var(--gold); animation: beat 2s infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }

/* Tilt */
.tilt { transform-style: preserve-3d; will-change: transform; }

/* Timeline */
.timeline { position: relative; max-width: 900px; margin: 10px auto 0; padding: 10px 0; }
.tl-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; margin-left: -1.5px; background: rgba(184, 151, 90, .25); border-radius: 2px; }
.tl-line i { display: block; width: 100%; height: 0; background: linear-gradient(var(--gold), var(--rose)); border-radius: 2px; }
.tl-item { position: relative; width: 50%; padding: 0 44px 40px 0; text-align: right; }
.tl-item.right { margin-left: 50%; padding: 0 0 40px 44px; text-align: left; }
.tl-dot { position: absolute; top: 18px; right: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--cream); border: 4px solid var(--gold); z-index: 2; box-shadow: 0 0 0 6px rgba(184, 151, 90, .18); }
.tl-item.right .tl-dot { right: auto; left: -9px; }
.glass-lite { background: #fff; border-radius: 20px; box-shadow: 0 10px 30px rgba(0, 0, 0, .07); }
.tl-card { padding: 22px 24px; }
.tl-card b { color: var(--gold); font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 600; }
.tl-card h4 { font-family: 'Playfair Display', serif; font-weight: 600; color: var(--rose-dark); margin: 2px 0 6px; font-size: 1.15rem; }
.tl-card p { font-size: .9rem; }

/* Events */
.cards { display: flex; flex-wrap: wrap; gap: 26px; justify-content: center; margin-bottom: 36px; }
.event-card { width: 320px; padding: 38px 28px 30px; background: #fff; border-radius: 26px; box-shadow: 0 14px 40px rgba(0, 0, 0, .09); position: relative; overflow: hidden; }
.event-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: linear-gradient(90deg, var(--sage), var(--rose), var(--gold)); }
.date-badge { width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 50%; background: linear-gradient(135deg, var(--sage), var(--sage-dark)); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; box-shadow: 0 8px 20px rgba(85, 102, 74, .35); }
.date-badge b { font-family: 'Playfair Display', serif; font-size: 2rem; }
.date-badge span { font-size: .65rem; letter-spacing: 1px; margin-top: 4px; }
.event-card h3 { font-family: 'Playfair Display', serif; font-size: 1.5rem; color: var(--rose-dark); }
.time { font-weight: 500; margin: 4px 0 10px; }
.place { margin-bottom: 20px; font-size: .92rem; }
.map { max-width: 760px; margin: 0 auto 26px; border-radius: 24px; overflow: hidden; box-shadow: 0 14px 40px rgba(0, 0, 0, .12); border: 5px solid #fff; }
.map iframe { width: 100%; height: 320px; border: 0; display: block; }
.dress { margin-top: 44px; }
.dress h4 { font-family: 'Playfair Display', serif; font-size: 1.3rem; color: var(--gold); }
.swatches { display: flex; gap: 14px; justify-content: center; margin: 14px 0 8px; }
.swatches span { width: 44px; height: 44px; border-radius: 50%; background: var(--c); border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .15); transition: transform .3s var(--ease); }
.swatches span:hover { transform: translateY(-6px) scale(1.12); }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 220px; gap: 14px; max-width: 980px; margin: 0 auto; }
.g-item { border: none; padding: 0; cursor: zoom-in; border-radius: 18px; overflow: hidden; background: #eee; position: relative; box-shadow: 0 8px 24px rgba(0, 0, 0, .1); }
.g-wide { grid-column: span 2; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.g-item::after { content: '+'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2.6rem; color: #fff; background: rgba(120, 90, 90, .45); opacity: 0; transition: opacity .4s; }
.g-item:hover img { transform: scale(1.12); }
.g-item:hover::after { opacity: 1; }

.lightbox { position: fixed; inset: 0; z-index: 500; background: rgba(30, 24, 24, .92); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s; }
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 88vw; max-height: 84vh; border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); animation: zoomIn .4s var(--ease); }
@keyframes zoomIn { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
.lb-close, .lb-nav { position: absolute; background: rgba(255, 255, 255, .12); color: #fff; border: none; cursor: pointer; border-radius: 50%; width: 48px; height: 48px; font-size: 2rem; line-height: 1; transition: background .3s; }
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .3); }
.lb-close { top: 20px; right: 20px; }
.lb-nav { top: 50%; margin-top: -24px; }
.lb-prev { left: 18px; } .lb-next { right: 18px; }

/* Bank cards */
.bank-card { width: 310px; padding: 28px 26px; text-align: left; color: #fff; border-radius: 22px; background: linear-gradient(135deg, var(--g1), var(--g2)); box-shadow: 0 16px 40px rgba(0, 0, 0, .22); position: relative; overflow: hidden; transition: transform .4s var(--ease); }
.bank-card:hover { transform: translateY(-8px) rotate(-1deg); }
.bank-card::after { content: ''; position: absolute; width: 200px; height: 200px; right: -60px; top: -80px; border-radius: 50%; background: rgba(255, 255, 255, .13); }
.bank { font-weight: 600; letter-spacing: 2px; text-transform: uppercase; font-size: .85rem; }
.no { font-family: 'Playfair Display', serif; font-size: 1.7rem; letter-spacing: 3px; margin: 18px 0 4px; }
.no.addr { font-size: 1.05rem; letter-spacing: 0; line-height: 1.5; min-height: 3.3rem; }
.an { font-size: .88rem; margin-bottom: 16px; opacity: .92; }

/* Form */
.form { max-width: 520px; margin: 0 auto 40px; padding: 30px 26px; text-align: left; display: flex; flex-direction: column; gap: 16px; }
.form label { font-size: .8rem; letter-spacing: 1px; font-weight: 500; color: var(--sage-dark); display: flex; flex-direction: column; gap: 6px; flex: 1; }
.form .row { display: flex; gap: 14px; }
.form input, .form select, .form textarea { padding: 13px 16px; border: 1.5px solid #e6dcd2; border-radius: 12px; font-family: inherit; font-size: .95rem; background: #fffdfa; color: var(--text); transition: border-color .3s, box-shadow .3s; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 4px rgba(196, 139, 139, .18); }
.form .btn { align-self: center; margin-top: 4px; }

.stats { display: flex; justify-content: center; gap: 18px; margin-bottom: 30px; flex-wrap: wrap; }
.stats div { min-width: 100px; padding: 14px 18px; background: #fff; border-radius: 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, .07); }
.stats b { display: block; font-family: 'Playfair Display', serif; font-size: 1.8rem; color: var(--gold); line-height: 1.2; }
.stats span { font-size: .72rem; letter-spacing: 2px; text-transform: uppercase; color: #8a7d7d; }

.wishes { max-width: 520px; margin: 0 auto; text-align: left; max-height: 460px; overflow-y: auto; padding-right: 6px; }
.wishes::-webkit-scrollbar { width: 6px; } .wishes::-webkit-scrollbar-thumb { background: var(--rose); border-radius: 6px; }
.wish { display: flex; gap: 14px; background: #fff; border-radius: 16px; padding: 14px 18px; margin-bottom: 12px; box-shadow: 0 6px 18px rgba(0, 0, 0, .06); animation: rise .6s var(--ease) both; }
.avatar { flex: 0 0 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; background: var(--c, var(--rose)); }
.wish b { color: var(--text); font-weight: 500; }
.badge { font-size: .65rem; letter-spacing: 1px; padding: 2px 10px; margin-left: 8px; border-radius: 20px; background: var(--cream-dark); color: var(--sage-dark); vertical-align: middle; }
.wish time { display: block; font-size: .7rem; color: #aaa; margin-bottom: 2px; }
.wish p { font-size: .9rem; }
.note { font-size: .75rem; margin-top: 16px; color: #aaa; }

/* Footer */
.footer { padding: 90px 22px 150px; background: linear-gradient(160deg, var(--sage), var(--sage-dark)); color: #fff; }
.footer .eyebrow { color: #fff; opacity: .85; }
.footer .script { font-size: 3.6rem; margin: 10px 0; }
.footer .small { opacity: .85; letter-spacing: 2px; }
.credit { margin-top: 36px; font-size: .72rem; opacity: .6; }

/* Dock */
#dock {
  position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 120px); z-index: 150;
  display: flex; gap: 4px; padding: 8px 10px; border-radius: 40px;
  background: rgba(255, 255, 255, .8); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid #fff; box-shadow: 0 10px 34px rgba(0, 0, 0, .18);
  transition: transform .8s var(--ease) .8s;
}
body.started #dock { transform: translate(-50%, 0); }
#dock a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 14px; border-radius: 28px; color: #8a7d7d; text-decoration: none; font-size: .62rem; letter-spacing: .5px; transition: all .35s var(--ease); }
#dock svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#dock a:hover { color: var(--rose-dark); transform: translateY(-3px); }
#dock a.active { background: linear-gradient(135deg, var(--rose), var(--rose-dark)); color: #fff; }

/* Responsive */
@media (max-width: 760px) {
  .section { padding: 80px 18px; }
  .cover-box h1 { font-size: 3rem; }
  .cd { width: 68px; } .cd span { font-size: 1.5rem; }
  .countdown { gap: 8px; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; }
  .g-wide, .g-item:last-child { grid-column: span 2; }
  .tl-line { left: 20px; }
  .tl-item, .tl-item.right { width: 100%; margin-left: 0; padding: 0 0 32px 52px; text-align: left; }
  .tl-dot, .tl-item.right .tl-dot { left: 11px; right: auto; }
  .form .row { flex-direction: column; }
  #dock a { padding: 8px 10px; } #dock a span { display: none; }
  .reveal-left, .reveal-right { transform: translateY(40px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
