:root {
  --champagne: #f6eee6;
  --cream: #fbf7f2;
  --blush: #ead2c4;
  --gold: #c9a063;
  --gold-deep: #9c7440;
  --cocoa: #4a3328;
  --cocoa-soft: #7a6052;
  --script: 'Italianno', cursive;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --ease: cubic-bezier(.22, .8, .2, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--serif); color: var(--cocoa); font-size: 18px; line-height: 1.5;
  background: radial-gradient(circle at 30% 20%, #efe3d8, #d9c6b6 70%) fixed;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; height: 100svh; }
.app { position: relative; max-width: 480px; margin: 0 auto; background: var(--cream); min-height: 100svh; overflow: hidden; box-shadow: 0 0 70px rgba(74, 51, 40, .18); }

.script { font-family: var(--script); font-weight: 400; line-height: .95; color: var(--gold-deep); }
.caps { text-transform: uppercase; letter-spacing: .3em; font-size: 11px; font-weight: 600; }
.gold-text {
  background: linear-gradient(100deg, #9c7440 0%, #d9b679 30%, #f3dfae 45%, #c9a063 60%, #8e6634 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.rule { display: flex; align-items: center; gap: 12px; justify-content: center; color: var(--gold); margin: 14px auto; width: 70%; }
.rule::before, .rule::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.rule span { font-size: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; padding: 13px 30px; border-radius: 999px;
  border: 1px solid var(--gold); color: var(--cocoa); background: transparent; text-decoration: none; cursor: pointer;
  font: 600 11px/1 var(--serif); letter-spacing: .28em; text-transform: uppercase; transition: background .3s, color .3s;
}
.btn:hover { background: var(--gold); color: #fff; }
.btn.solid { background: linear-gradient(120deg, #b88a50, #dcbd84 50%, #b38449); border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(156, 116, 64, .3); }
.btn.solid:hover { filter: brightness(1.05); }

[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

/* ───────── Intro ───────── */
.intro {
  position: relative; min-height: 100svh; padding: 34px 22px 30px; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background:
    radial-gradient(120% 60% at 50% 0%, #fff8f1 0%, transparent 60%),
    radial-gradient(90% 50% at 50% 100%, #f1dfd3 0%, transparent 70%),
    var(--champagne);
}
.intro::before { /* thin gold double border */
  content: ''; position: absolute; inset: 12px; border: 1px solid rgba(201, 160, 99, .55); pointer-events: none;
  box-shadow: inset 0 0 0 4px var(--champagne), inset 0 0 0 5px rgba(201, 160, 99, .3);
}
.arch-wrap { position: relative; width: 62%; max-width: 250px; aspect-ratio: 3 / 4; animation: rise 1.4s var(--ease) both .1s; }
.arch-wrap::before { /* gold halo line around the arch */
  content: ''; position: absolute; inset: -9px; border-radius: 999px 999px 18px 18px; border: 1px solid rgba(201, 160, 99, .6);
}
.arch { position: relative; width: 100%; height: 100%; border-radius: 999px 999px 14px 14px; overflow: hidden; box-shadow: 0 14px 34px rgba(74, 51, 40, .22); }
.arch img { width: 100%; height: 100%; object-fit: cover; animation: kb 14s ease-in-out infinite alternate; }
.arch::after { content: ''; position: absolute; inset: 7px; border-radius: 999px 999px 9px 9px; border: 1px solid rgba(255, 245, 225, .75); }
.intro .eyebrow { font-style: italic; font-size: 17px; color: var(--cocoa-soft); margin-top: 26px; animation: rise 1.2s var(--ease) both .4s; }
.intro .names { font-family: var(--script); font-size: clamp(56px, 17vw, 74px); line-height: .9; margin-top: 4px; animation: rise 1.2s var(--ease) both .55s; }
.intro .names .amp { font-size: .7em; padding: 0 .18em; }
.title-wrap { position: relative; height: 54px; margin-top: 8px; width: 100%; }
.title-wrap > * { position: absolute; left: 0; right: 0; transition: opacity .7s var(--ease), transform .9s var(--ease); }
.hint { top: 14px; font-size: 15px; letter-spacing: .06em; color: var(--cocoa-soft); animation: rise 1.2s var(--ease) both .7s; }
.std { font-family: var(--script); font-size: 54px; line-height: 1; opacity: 0; transform: scale(.7) translateY(10px); }
.revealed .hint { opacity: 0; transform: translateY(-10px); }
.revealed .std { opacity: 1; transform: none; transition-delay: .2s; }

.coins { display: flex; justify-content: center; gap: 14px; margin-top: 6px; animation: rise 1.2s var(--ease) both .85s; }
.coin { position: relative; width: 92px; height: 92px; }
.coin .val {
  position: absolute; inset: 0; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 35%, #fffdf9, #f4e9dd); border: 1px solid rgba(201, 160, 99, .5);
  box-shadow: inset 0 2px 8px rgba(156, 116, 64, .15);
}
.coin .val b { font-weight: 500; font-size: 32px; line-height: 1; letter-spacing: .02em; }
.coin .val.long b { font-size: 25px; }
.coin .val small { font-size: 9px; letter-spacing: .25em; text-transform: uppercase; color: var(--cocoa-soft); margin-top: 4px; }
.coin canvas {
  position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); border-radius: 50%;
  touch-action: none; cursor: grab; transition: opacity .8s ease, transform .8s var(--ease);
  filter: drop-shadow(0 4px 8px rgba(120, 85, 40, .35));
}
.coin.done canvas { opacity: 0; transform: scale(1.12); pointer-events: none; }
.coin.done .val { animation: pop .7s var(--ease); }
.coin:not(.done) { animation: wiggle 3.2s ease-in-out infinite; }
.coin:nth-child(2):not(.done) { animation-delay: .4s; }
.coin:nth-child(3):not(.done) { animation-delay: .8s; }
.dust { position: absolute; width: 4px; height: 4px; border-radius: 1px; pointer-events: none; z-index: 5;
  background: linear-gradient(135deg, #f5e2b0, #b98a4c); animation: dust .9s ease-out forwards; }

.tap-reveal { margin-top: 18px; font-size: 13px; letter-spacing: .14em; color: var(--cocoa-soft); background: none; border: 0; border-bottom: 1px solid rgba(201, 160, 99, .6); padding: 2px 0; cursor: pointer; font-family: var(--serif); }
.revealed .tap-reveal { display: none; }
.details-btn { opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity .8s var(--ease) .9s, transform .8s var(--ease) .9s; margin-top: 18px; }
.revealed .details-btn { opacity: 1; transform: none; pointer-events: auto; }
.details-btn .arrow { display: inline-block; animation: bob 1.6s ease-in-out infinite; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes kb { from { transform: scale(1.04); } to { transform: scale(1.14) translateY(-2%); } }
@keyframes pop { 0% { transform: scale(.85); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes wiggle { 0%, 86%, 100% { transform: rotate(0); } 90% { transform: rotate(-6deg); } 94% { transform: rotate(5deg); } }
@keyframes dust { to { transform: translate(var(--dx), var(--dy)) rotate(200deg); opacity: 0; } }
@keyframes bob { 50% { transform: translateY(4px); } }

/* ───────── Details ───────── */
.section { position: relative; padding: 78px 28px; text-align: center; }
.section h2 { font-family: var(--script); font-weight: 400; font-size: 58px; line-height: 1; color: var(--gold-deep); margin-bottom: 8px; }
.section p { max-width: 340px; margin: 0 auto; }
.muted { color: var(--cocoa-soft); }

.round-photo { width: 168px; height: 168px; margin: 0 auto 26px; border-radius: 50%; overflow: hidden; position: relative; box-shadow: 0 10px 26px rgba(74, 51, 40, .2); }
.round-photo img { width: 100%; height: 100%; object-fit: cover; }
.round-photo::after { content: ''; position: absolute; inset: 6px; border-radius: 50%; border: 1px solid rgba(255, 245, 225, .8); }

.band { position: relative; height: 420px; overflow: hidden; }
.band img { position: absolute; left: 0; width: 100%; height: 140%; top: -20%; object-fit: cover; will-change: transform; }
.band::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(74, 51, 40, .05), rgba(74, 51, 40, .55)); }
.band .quote { position: absolute; left: 0; right: 0; bottom: 42px; z-index: 1; text-align: center; color: #fff; font-family: var(--script); font-size: 46px; line-height: 1; text-shadow: 0 2px 14px rgba(0, 0, 0, .3); padding: 0 24px; }

.dark { background: radial-gradient(120% 80% at 50% 0%, #5c4134, var(--cocoa) 70%); color: #f3e7da; }
.dark h2 { color: #e9cf9c; }
.dark .muted { color: #cdb9a6; }
.dark .btn { color: #f3e7da; border-color: #c9a063; }
.countdown { display: flex; justify-content: center; gap: 8px; margin-top: 22px; }
.countdown div { width: 74px; padding: 14px 0 10px; border: 1px solid rgba(233, 207, 156, .35); border-radius: 999px 999px 12px 12px; background: rgba(255, 255, 255, .04); }
.countdown b { display: block; font-weight: 400; font-size: 36px; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.countdown span { font-size: 9px; letter-spacing: .25em; text-transform: uppercase; opacity: .75; }
.cd-date { margin-top: 20px; letter-spacing: .14em; font-style: italic; }

.timeline { position: relative; max-width: 360px; margin: 30px auto 0; text-align: left; }
.timeline::before { content: ''; position: absolute; left: 88.5px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(var(--gold), rgba(201, 160, 99, .2)); }
.tl-row { display: grid; grid-template-columns: 74px 30px 1fr; margin-bottom: 26px; }
.tl-time { text-align: right; font-size: 16px; padding-top: 1px; color: var(--gold-deep); font-weight: 500; white-space: nowrap; }
.tl-dot { width: 11px; height: 11px; border-radius: 50%; margin: 6px 0 0 9.5px; background: radial-gradient(circle at 35% 35%, #f6e2b5, #b88a50); box-shadow: 0 0 0 3px var(--cream), 0 0 0 4px rgba(201, 160, 99, .5); position: relative; z-index: 1; }
.tl-title { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; font-weight: 600; padding-top: 3px; }
.tl-text { font-size: 15px; line-height: 1.4; color: var(--cocoa-soft); margin-top: 3px; }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 14px; }
.duo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px; display: block; }
.duo img:nth-child(2) { margin-top: 38px; }

.venue-photo { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 160px 160px 8px 8px; margin: 6px 0 22px; display: block; box-shadow: 0 10px 26px rgba(74, 51, 40, .18); }
.venue-name { font-size: 30px; font-weight: 500; }

.palette { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
.palette span { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(74, 51, 40, .15); box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .08); }

.rsvp-card {
  margin: 0 auto; max-width: 360px; padding: 40px 24px 34px; border-radius: 6px;
  background: linear-gradient(180deg, #fffdf9, #f6ede3); border: 1px solid rgba(201, 160, 99, .45);
  box-shadow: 0 14px 30px rgba(74, 51, 40, .12), inset 0 0 0 6px #fffdf9, inset 0 0 0 7px rgba(201, 160, 99, .3);
}
.rsvp-card .btns { display: flex; flex-direction: column; align-items: center; }
.rsvp-card .btns .btn { margin-top: 14px; }

footer.section { padding-top: 30px; padding-bottom: 64px; }
footer .mono { font-family: var(--script); font-size: 72px; line-height: 1; }

.music-btn { position: fixed; right: max(16px, calc(50vw - 240px + 16px)); bottom: 18px; z-index: 40; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(201, 160, 99, .5); background: var(--cream); color: var(--gold-deep); cursor: pointer; }
.music-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; }

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

button:focus-visible, a:focus-visible, canvas:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
