:root {
  --wine: #465137;
  --wine-deep: #292f22;
  --gold: #c8ae70;
  --gold-deep: #9a834d;
  --paper: #f4efdf;
  --ink: #3c432d;
  --serif: Baskerville, 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --display: Baskerville, 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Avenir Next', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: #eae4d4; }
body { min-height: 100vh; margin: 0; color: #f5e5bd; font-family: var(--serif); overflow-x: hidden; }
body.cover-active { height: 100vh; overflow: hidden; }
a { color: inherit; }
button { font: inherit; }
#background-layer, #background-overlay, #leaf-container { position: fixed; inset: 0; pointer-events: none; }
#background-layer { z-index: -3; background: url('olive-banquet-background.jpg') center / cover no-repeat; transform: scale(1.03); }
#background-overlay { z-index: -2; background: linear-gradient(rgba(38, 42, 30, .48), rgba(38, 42, 30, .58)); transition: background .8s ease, backdrop-filter .8s ease; }
body.envelope-open #background-overlay { background: linear-gradient(rgba(27, 32, 23, .56), rgba(27, 32, 23, .66)); }
#leaf-container { z-index: 3; overflow: hidden; }
.leaf { position: absolute; top: -30px; width: 7px; height: 12px; border-radius: 100% 0 100% 0; background: linear-gradient(135deg, #f4d37b, #9a834d); box-shadow: 0 0 5px rgba(244, 211, 123, .25); animation: leafFall linear infinite; }
@keyframes leafFall { 0% { transform: translate3d(0, -30px, 0) rotate(0deg); } 50% { transform: translate3d(35px, 50vh, 0) rotate(180deg); } 100% { transform: translate3d(-35px, 110vh, 0) rotate(360deg); } }
#main { position: relative; z-index: 2; opacity: 1; transition: opacity .65s ease; }
body.cover-active #main { visibility: hidden; opacity: 0; }
body.envelope-open #main { visibility: visible; opacity: 1; }
.skip-link { position: fixed; z-index: 30; top: 10px; left: 10px; transform: translateY(-150%); padding: 10px 14px; color: var(--paper); background: var(--wine); font: 12px var(--sans); }
.skip-link:focus { transform: none; }
body.cover-active .skip-link { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Envelope cover */
.cover { position: fixed; z-index: 20; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 27px; padding: 24px; cursor: pointer; transition: opacity .85s ease, visibility .85s ease; }
body.envelope-open .cover { visibility: hidden; opacity: 0; pointer-events: none; }
.envelope { --letter-lift: -280px; position: relative; width: min(450px, 84vw); height: min(300px, 56vw); min-height: 220px; transform-style: preserve-3d; filter: drop-shadow(0 18px 36px rgba(0, 0, 0, .52)); perspective: 1200px; transition: transform 1.35s cubic-bezier(.3,.68,.2,1), filter 1.35s ease; }
body.envelope-opening .envelope { transform: translateY(-5px); filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .48)); }
.envelope-back { position: absolute; inset: 0; z-index: 1; border: 1px solid rgba(225, 186, 111, .58); border-radius: 3px; background: radial-gradient(ellipse at 50% 0%, rgba(119, 135, 82, .38), transparent 68%), repeating-linear-gradient(97deg, rgba(255,255,255,.018) 0 1px, transparent 1px 5px), linear-gradient(145deg, #4b5737, #303a28 52%, #414b32); box-shadow: inset 0 0 0 5px rgba(15, 3, 7, .15), inset 0 0 38px rgba(11, 2, 5, .35); }
.letter { position: absolute; z-index: 2; left: 50%; top: 50%; width: 81%; height: 78%; overflow: visible; transform: translate(-50%, -50%); color: #41472f; border-radius: 1px; background: radial-gradient(ellipse at 50% 0%, #fffdf7, transparent 75%), linear-gradient(145deg, #f8f0e2, #e8d7b8); box-shadow: 0 8px 22px rgba(0, 0, 0, .3), inset 0 0 0 1px rgba(137, 99, 45, .27); transition: opacity .55s ease .42s; will-change: transform; }
.letter::before { content: ''; position: absolute; inset: 9px; border: 1px solid rgba(146, 103, 37, .32); pointer-events: none; }
.letter-content { position: absolute; z-index: 1; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px; text-align: center; }
.letter::after { content: ''; position: absolute; z-index: 2; left: 50%; top: 50%; width: 200vmax; height: 200vmax; border-radius: 50%; opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(.015); background: radial-gradient(circle, rgba(255, 255, 241, .98) 0%, rgba(255, 244, 212, .88) 3%, rgba(237, 195, 111, .57) 10%, rgba(223, 177, 91, .2) 23%, transparent 57%); mix-blend-mode: screen; }
body.envelope-flashing .letter { z-index: 6; }
body.envelope-flashing .letter::after { animation: cardRadiance .72s cubic-bezier(.16,.72,.2,1) both; }
@keyframes cardRadiance { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.015); } 10% { opacity: .92; transform: translate(-50%, -50%) scale(.055); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1); } }
.letter-small { margin-bottom: 9px; font: 500 11px/1.2 var(--sans); letter-spacing: 1.5px; text-transform: uppercase; }
.letter h2 { margin: 0; font: 500 clamp(26px, 5vw, 38px)/1.08 var(--display); letter-spacing: .8px; }
.letter h2 i { color: #a58b50; }
.letter-crest { display: block; width: min(176px, 76%); height: 40px; margin: 5px 0 2px; object-fit: cover; object-position: center; filter: saturate(.72) brightness(.84); opacity: .9; }
.letter-main-text { display: flex; flex-direction: column; gap: 4px; margin: 0; color: #75552e; }
.letter-main-text time { font: 600 12px/1.2 var(--display); letter-spacing: 1.4px; text-transform: uppercase; }
.letter-main-text span { color: #8c7048; font: 500 10px/1.2 var(--sans); letter-spacing: 2px; text-transform: uppercase; }
.envelope-front { position: absolute; z-index: 4; inset: 0; overflow: hidden; border-radius: 3px; background: repeating-linear-gradient(98deg, rgba(255,255,255,.025) 0 1px, transparent 1px 4px), radial-gradient(ellipse at 50% 0%, rgba(170, 154, 100, .27), transparent 66%), linear-gradient(150deg, #4a5637 0%, #36402b 48%, #303827 100%); box-shadow: inset 0 0 40px rgba(12, 2, 6, .22); pointer-events: none; }
.envelope-front::before, .envelope-front::after { content: ''; position: absolute; bottom: 0; width: 58%; height: 72%; }
.envelope-front::before { left: 0; background: linear-gradient(135deg, transparent 49.5%, rgba(236, 183, 83, .18) 50%, transparent 50.7%); }
.envelope-front::after { right: 0; background: linear-gradient(225deg, transparent 49.5%, rgba(236, 183, 83, .16) 50%, transparent 50.7%); }
.envelope-frame { position: absolute; inset: 10px; display: block; border: 1px solid rgba(226, 187, 118, .31); box-shadow: inset 0 0 0 1px rgba(20, 3, 8, .16); }
.envelope-flap { position: absolute; z-index: 5; top: 0; left: 0; width: 100%; height: 68%; transform-origin: top center; transform-style: preserve-3d; transition: transform 1.05s cubic-bezier(.36,.06,.22,1) .12s, z-index 0s linear 1.18s; }
.flap-face { position: absolute; inset: 0; display: block; clip-path: polygon(0 0, 100% 0, 50% 100%); backface-visibility: hidden; }
.flap-face::after { content: ''; position: absolute; inset: 9px 10px 10px; border: 1px solid rgba(237, 197, 126, .48); clip-path: polygon(0 0, 100% 0, 50% 100%); pointer-events: none; }
.flap-face-front { background: repeating-linear-gradient(102deg, rgba(255,255,255,.022) 0 1px, transparent 1px 5px), linear-gradient(145deg, #5e6945, #465137 68%, #35402b); }
.flap-face-back { transform: rotateX(180deg) translateZ(.5px); background: linear-gradient(150deg, #78805a, #5a6444 58%, #454b33); box-shadow: inset 0 0 0 1px rgba(234, 193, 126, .24); }
body.envelope-opening .envelope-flap { z-index: 1; transform: rotateX(-180deg); }
.envelope-hinge { position: absolute; z-index: 6; top: -1px; right: 9px; left: 9px; height: 3px; border-top: 1px solid rgba(245, 216, 157, .72); border-bottom: 1px solid rgba(89, 38, 31, .42); background: linear-gradient(90deg, transparent, rgba(234, 193, 126, .26) 12%, rgba(234, 193, 126, .26) 88%, transparent); box-shadow: 0 1px 5px rgba(16, 3, 7, .28); pointer-events: none; }
body.envelope-opening .letter { animation: letterRise 1.2s cubic-bezier(.22,.72,.18,1) 1.23s both; }
@keyframes letterRise {
  0% { transform: translate(-50%, -50%) rotate(.35deg) scale(.985); }
  70% { transform: translate(-50%, -50%) translateY(var(--letter-lift)) rotate(.3deg) scale(1.012); }
  86% { transform: translate(-50%, -50%) translateY(calc(var(--letter-lift) - 6px)) rotate(-.3deg) scale(1.027); }
  100% { transform: translate(-50%, -50%) translateY(var(--letter-lift)) scale(1.025); }
}
.wax-seal { position: absolute; z-index: 7; left: 50%; top: 51%; display: grid; place-items: center; width: 86px; height: 86px; transform: translate(-50%, -50%); padding: 0; border: 1px solid rgba(238, 201, 130, .78); border-radius: 50%; color: #f0d79d; background: radial-gradient(circle at 35% 24%, #879061, #4f5b3b 61%, #2f3726); box-shadow: 0 5px 16px rgba(0, 0, 0, .43), inset 0 0 0 4px rgba(20, 3, 8, .24), inset 0 0 0 6px rgba(238, 201, 130, .34); cursor: pointer; transition: transform .62s cubic-bezier(.36,.06,.22,1), opacity .5s ease, filter .5s ease; }
.wax-seal::before { content: ''; position: absolute; inset: -8px; border: 1px solid rgba(242, 207, 134, .75); border-radius: 50%; opacity: 0; transform: scale(.72); pointer-events: none; }
.wax-seal::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, rgba(255, 242, 197, .75), rgba(238, 201, 130, .15) 44%, transparent 70%); opacity: 0; pointer-events: none; }
.wax-seal:hover { transform: translate(-50%, -50%) scale(1.04); }
.wax-seal:focus-visible { outline: 3px solid #fff3d6; outline-offset: 4px; }
.seal-inner { width: 68px; height: 68px; display: flex; align-items: center; justify-content: center; gap: 4px; border: 1px solid rgba(255, 243, 203, .52); border-radius: 50%; font: 500 19px var(--display); letter-spacing: -1px; }
.seal-inner span { color: #fff1c7; font: 11px var(--sans); }
body.envelope-opening .wax-seal { opacity: 0; filter: blur(.5px); transform: translate(-50%, -50%) translateY(-8px); transition-delay: .06s; }
body.envelope-opening .wax-seal::before { opacity: 0; transform: scale(1); transition: opacity .4s ease; }
.tap-text { margin: 0; color: #f5df9c; font: 500 12px var(--sans); letter-spacing: 3px; text-transform: uppercase; opacity: .86; transition: opacity .35s ease, transform .35s ease; }
body.envelope-opening .tap-text { opacity: 0; transform: translateY(6px); }

/* Main invitation */
.hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; padding: 90px 20px 82px; text-align: center; }
.hero-content { width: min(900px, 100%); }
body.envelope-open .hero-content { animation: heroArrives .95s cubic-bezier(.2,.75,.2,1) both; }
@keyframes heroArrives { from { opacity: 0; transform: translateY(18px) scale(.99); filter: blur(3px); } to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); } }
.small-heading { margin: 0 0 18px; font: 500 clamp(18px, 2.3vw, 24px)/1.4 var(--serif); letter-spacing: 1.5px; color: #f3e2bd; opacity: .97; }
.om-ornament { display: block; width: 82px; height: 82px; margin: 0 auto 11px; object-fit: contain; }
.couple-name { display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0; color: #fff1d1; font-family: var(--serif); font-weight: 500; line-height: .88; text-shadow: 0 5px 25px rgba(0, 0, 0, .5); }
.couple-name .name-line { display: block; font-size: clamp(72px, 11vw, 128px); }
.couple-name .amp-line { display: block; margin: .08em 0; color: #c8ae70; font-size: clamp(30px, 5vw, 48px); font-style: italic; line-height: 1; }
.invitation-text { max-width: 720px; margin: 15px auto 18px; font: 500 19px/1.7 var(--serif); color: #fff3dc; text-shadow: 0 2px 9px rgba(0, 0, 0, .4); }
.hero-invitation { max-width: 660px; margin-top: 19px; font-size: 20px; }
.ornament { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 20px 0 18px; color: #c8ae70; font-size: 23px; }
.ornament::before, .ornament::after { content: ''; width: 54px; height: 1px; background: linear-gradient(90deg, transparent, rgba(228, 189, 98, .78)); }
.ornament::after { transform: scaleX(-1); }
.scratch-date { position: relative; width: min(470px, 92vw); height: 158px; margin: 0 auto; overflow: hidden; border: 1px solid rgba(238, 202, 129, .98); border-radius: 3px; background: #f5ead6; box-shadow: 0 23px 52px rgba(0, 0, 0, .4), 0 0 0 4px rgba(38, 43, 29, .28), 0 0 28px rgba(228, 189, 98, .17); transition: box-shadow .26s ease, transform .26s cubic-bezier(.2,.75,.2,1), border-color .26s ease; }
.scratch-date:hover { transform: translateY(-3px) scale(1.008); border-color: #f6dda2; box-shadow: 0 28px 60px rgba(0, 0, 0, .42), 0 0 0 5px rgba(38, 43, 29, .28), 0 0 34px rgba(228, 189, 98, .24); }
.scratch-date::before { content: ''; position: absolute; z-index: 6; inset: 7px; border: 1px solid rgba(206, 166, 91, .58); pointer-events: none; }
.scratch-date::after { content: ''; position: absolute; z-index: 4; top: -25%; bottom: -25%; left: 0; width: 38%; transform: translateX(-170%) skewX(-18deg); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .32), transparent); mix-blend-mode: screen; opacity: 0; pointer-events: none; animation: scratchReflection 5.2s ease-in-out infinite; }
@keyframes scratchReflection { 0%, 18% { transform: translateX(-170%) skewX(-18deg); opacity: 0; } 30% { opacity: .72; } 62%, 100% { transform: translateX(390%) skewX(-18deg); opacity: 0; } }
.scratch-date.is-scratching::after, .scratch-date.date-revealed::after { animation: none; opacity: 0; }
.scratch-date.is-scratching { transform: scale(1.018); border-color: #ffe5a7; box-shadow: 0 0 38px rgba(228, 189, 98, .3), 0 23px 52px rgba(0, 0, 0, .42); }
.scratch-date-text { position: absolute; z-index: 1; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px; color: #41472f; text-align: center; background: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, .75), transparent 72%), linear-gradient(135deg, #f8f0e2, #eee0c7); }
.scratch-date-overline { color: #8b6830; font: 600 12px/1.2 var(--sans); letter-spacing: 3px; text-transform: uppercase; }
.scratch-date-main { color: #3d442e; font: 500 clamp(27px, 4.8vw, 36px)/1.14 var(--display); letter-spacing: .9px; text-transform: uppercase; }
#scratch-canvas { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; transition: opacity .45s ease; }
.scratch-date.is-scratching #scratch-canvas { cursor: grabbing; }
.scratch-cue { position: absolute; z-index: 3; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; color: #4a4f34; text-align: center; pointer-events: none; transition: opacity .22s ease, transform .22s ease; }
.scratch-cue::before, .scratch-cue::after { content: ''; width: 42px; height: 1px; background: linear-gradient(90deg, transparent, rgba(86, 46, 27, .58)); }
.scratch-cue::after { transform: scaleX(-1); }
.scratch-cue-copy { display: flex; flex-direction: column; align-items: center; gap: 3px; margin: 0 13px; text-shadow: 0 1px 0 rgba(255, 248, 225, .32); }
.scratch-cue-copy small { color: #68481f; font: 600 10px/1.2 var(--sans); letter-spacing: 2.2px; text-transform: uppercase; }
.scratch-cue-copy span { color: #414830; font: italic 500 28px/1.05 var(--serif); letter-spacing: .2px; }
.scratch-date.is-scratching .scratch-cue, .scratch-date.date-revealed .scratch-cue { opacity: 0; transform: translateY(4px); }
.scratch-sparkles { position: absolute; z-index: 5; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.scratch-date.date-revealed { border-color: #c8ae70; box-shadow: 0 0 35px rgba(229, 189, 96, .22), 0 20px 46px rgba(0, 0, 0, .34); }
.scratch-date.date-revealed .scratch-date-main { animation: dateReveal .65s cubic-bezier(.2,.75,.2,1) both; }
@keyframes dateReveal { from { opacity: .3; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.scratch-help { margin: 12px 0 0; color: #f4dfad; font: 500 13px/1.4 var(--sans); letter-spacing: 1.1px; }
.hero-location { margin: 22px 0 0; color: #f7e9c9; font: 500 clamp(15px, 1.7vw, 18px)/1.4 var(--sans); letter-spacing: 2px; }
.hero-location strong { color: #fff1d1; font-weight: 600; }
.hero-location span { color: #c8ae70; padding: 0 7px; }
.countdown-section { width: min(780px, 100%); margin: 42px auto 0; }
.countdown-title { margin: 0 0 16px; color: #f1dfb4; font: 500 17px var(--sans); letter-spacing: 2px; text-transform: uppercase; }
.countdown { position: relative; display: flex; align-items: stretch; justify-content: center; width: 100%; padding: 22px 14px; border: 1px solid rgba(218, 183, 113, .78); background: radial-gradient(ellipse at 50% 0%, rgba(122, 135, 87, .34), transparent 70%), linear-gradient(115deg, rgba(37, 44, 28, .96), rgba(52, 62, 38, .95) 50%, rgba(34, 40, 26, .97)); box-shadow: inset 0 0 0 4px rgba(228, 189, 98, .08), 0 18px 44px rgba(0, 0, 0, .3); }
.countdown::before { content: ''; position: absolute; inset: 5px; border: 1px solid rgba(232, 198, 126, .21); pointer-events: none; }
.countdown-box { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 5px 10px; }
.countdown-box + .countdown-box { border-left: 1px solid rgba(232, 198, 126, .35); }
.countdown-box strong { color: #f3d98f; font: 500 clamp(54px, 7vw, 76px)/1 var(--display); font-variant-numeric: tabular-nums; text-shadow: 0 0 22px rgba(243, 217, 143, .18); }
.countdown-box span { color: #f0e3c8; font: 500 13px var(--sans); letter-spacing: 1.8px; text-transform: uppercase; }
.countdown-note { margin: 13px 0 0; color: #f0dfbd; font: 500 16px/1.5 var(--serif); letter-spacing: .3px; opacity: .98; }
.save-date-button { margin-top: 18px; padding: 12px 20px; border: 1px solid rgba(223, 190, 123, .7); color: #f7e8c3; background: linear-gradient(135deg, rgba(56, 65, 40, .88), rgba(41, 49, 31, .94)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.045); font: 500 12px var(--sans); letter-spacing: 1.4px; text-transform: uppercase; cursor: pointer; transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.save-date-button:hover { transform: translateY(-2px); background: linear-gradient(135deg, #67714b, #3e462f); box-shadow: 0 8px 22px rgba(0,0,0,.28); }
.save-date-button:active, .map-button:active, .rsvp-contact:active, .itinerary-list a:active { transform: scale(.98); }
.scroll-more-indicator { position: absolute; bottom: 22px; left: 50%; display: flex; flex-direction: column; align-items: center; gap: 5px; transform: translateX(-50%); color: #f0dda8; text-decoration: none; font: 500 11px var(--sans); letter-spacing: 1.8px; text-transform: uppercase; white-space: nowrap; }
.scroll-more-indicator span { color: #c8ae70; font-size: 17px; }

/* Blessing pause between the opening and the invitation cards */
.blessing-section { min-height: 62vh; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; padding: 50px 22px 96px; text-align: center; }
.blessing-mark { display: grid; place-items: center; width: 74px; height: 74px; margin-bottom: 17px; color: #c8ae70; border: 1px solid rgba(228, 189, 98, .55); border-radius: 50%; font-size: 30px; text-shadow: 0 0 20px rgba(228, 189, 98, .25); }
.blessing-overline { margin: 0 0 9px; color: #f1d89d; font: 500 12px var(--sans); letter-spacing: 2.5px; text-transform: uppercase; }
.blessing-section h2 { margin: 0; color: #fff0ce; font: 500 clamp(34px, 6vw, 52px)/1.05 var(--serif); text-shadow: 0 3px 18px rgba(0, 0, 0, .5); }
.blessing-section > p:not(.blessing-overline) { max-width: 460px; margin: 12px auto 0; color: #f5e4c5; font: italic 19px/1.5 var(--serif); }
.blessing-section .scroll-more-indicator { bottom: 25px; }

/* A concise, tappable itinerary before the full invitation cards */
.itinerary { width: min(1000px, calc(100% - 40px)); margin: 0 auto; padding: 40px 0 54px; }
.itinerary .section-heading { margin-bottom: 20px; }
.itinerary-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.itinerary-list a { display: grid; grid-template-columns: 54px minmax(0, 1fr) 18px; align-items: center; gap: 13px; min-height: 92px; padding: 15px 18px; color: #f2e7d1; border: 1px solid rgba(218, 183, 113, .56); background: linear-gradient(120deg, rgba(42, 50, 32, .92), rgba(58, 69, 42, .91) 55%, rgba(38, 46, 29, .95)); box-shadow: inset 0 0 0 3px rgba(228, 189, 98, .055), 0 12px 27px rgba(0, 0, 0, .22); text-decoration: none; transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.itinerary-list a:hover { transform: translateY(-2px); border-color: rgba(240, 210, 151, .86); background: linear-gradient(120deg, rgba(52, 63, 38, .96), rgba(68, 78, 48, .94) 55%, rgba(34, 42, 27, .98)); }
.itinerary-list time { display: flex; flex-direction: column; align-items: center; color: #edcf8e; font: 500 25px/1 var(--display); font-variant-numeric: tabular-nums; }
.itinerary-list time small { margin-top: 5px; color: #d9c8a6; font: 500 10px var(--sans); letter-spacing: 1.6px; }
.itinerary-list a > span { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.itinerary-list .itinerary-title { display: flex; flex-direction: row; align-items: center; gap: 10px; }
.itinerary-icon { display: grid; flex: 0 0 36px; place-items: center; width: 36px; height: 36px; color: #efd28d; border: 1px solid rgba(227, 193, 125, .48); border-radius: 50%; background: radial-gradient(circle at 35% 25%, rgba(231, 200, 141, .12), rgba(39, 44, 30, .38)); box-shadow: inset 0 0 0 3px rgba(225, 189, 116, .045); }
.itinerary-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.itinerary-list strong { color: #fff3dc; font: 500 18px/1.25 var(--serif); }
.itinerary-list a > span small { color: #e2d0ac; font: 13px/1.35 var(--sans); }
.itinerary-list b { color: #d9b96e; font: 16px var(--sans); }

/* Large ivory invitation cards */
.functions { padding: 48px 20px 58px; }
.section-heading { width: min(1000px, 100%); margin: 0 auto 30px; text-align: center; }
.section-heading p { margin: 0 0 11px; color: #f2dda6; font: 500 12px var(--sans); letter-spacing: 3px; text-transform: uppercase; }
.section-heading h2 { margin: 0; color: #fff0cf; font: 500 clamp(38px, 7vw, 58px)/1.1 var(--serif); }
.section-line { margin-top: 15px; color: #c8ae70; }
.function-list { width: min(1000px, 100%); margin: 0 auto; }
.function-card { position: relative; isolation: isolate; margin-bottom: 35px; padding: 72px clamp(26px, 5vw, 60px) 60px; color: var(--ink); border: 1px solid rgba(168, 129, 63, .72); border-radius: 3px; background: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, .88), transparent 64%), linear-gradient(140deg, #fbf6ed, #f4e9d8 58%, #f9f1e4); box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .35), inset 0 0 50px rgba(125, 79, 28, .07), 0 22px 58px rgba(0, 0, 0, .34); text-align: center; transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease; }
.function-card::before { content: ''; position: absolute; z-index: -1; inset: 11px; border: 1px solid rgba(168, 129, 63, .28); pointer-events: none; }
.function-card::after { content: ''; position: absolute; z-index: 0; inset: 19px; pointer-events: none; opacity: .44; background: linear-gradient(#9a834d,#9a834d) left top/22px 1px no-repeat, linear-gradient(#9a834d,#9a834d) left top/1px 22px no-repeat, linear-gradient(#9a834d,#9a834d) right top/22px 1px no-repeat, linear-gradient(#9a834d,#9a834d) right top/1px 22px no-repeat, linear-gradient(#9a834d,#9a834d) left bottom/22px 1px no-repeat, linear-gradient(#9a834d,#9a834d) left bottom/1px 22px no-repeat, linear-gradient(#9a834d,#9a834d) right bottom/22px 1px no-repeat, linear-gradient(#9a834d,#9a834d) right bottom/1px 22px no-repeat; }
@media (hover: hover) { .function-card:hover { transform: translateY(-3px); border-color: rgba(173, 130, 57, .9); box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .4), inset 0 0 50px rgba(125, 79, 28, .08), 0 30px 66px rgba(0, 0, 0, .4); } }
.function-number { position: absolute; top: 17px; left: 50%; display: grid; place-items: center; width: 38px; height: 38px; transform: translateX(-50%); color: #87642f; border: 1px solid rgba(168, 129, 63, .48); border-radius: 50%; background: rgba(255, 251, 241, .72); font: 500 18px/1 var(--serif); font-variant-numeric: oldstyle-nums; }
.function-card h3 { margin: 0; color: #3d442e; font: 500 clamp(29px, 4.2vw, 42px)/1.2 var(--display); letter-spacing: .8px; text-wrap: balance; }
.card-ornament { display: flex; align-items: center; justify-content: center; gap: 13px; margin: 17px 0 24px; color: #a9803d; font-size: 15px; }
.card-ornament::before, .card-ornament::after { content: ''; width: 44px; height: 1px; background: rgba(168, 129, 63, .5); }
.function-card .invitation-text { max-width: 650px; margin: 15px auto 18px; color: #4b5038; font: 500 22px/1.55 var(--serif); text-shadow: none; }
.couple-invitation { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; margin: 24px auto 30px; }
.couple-invitation strong { color: #674322; font: 500 31px/1.1 var(--serif); letter-spacing: 1px; }
.couple-invitation span { color: #916d36; font: 500 12px var(--sans); letter-spacing: 2.5px; }
.event-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; width: min(700px, 100%); margin: 0 auto 24px; }
.detail-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 9px; border-top: 1px solid rgba(165, 126, 49, .32); }
.detail-full { grid-column: 1 / -1; }
.detail-icon { display: none; }
.detail-item strong { color: #77592c; font: 600 14px/1.3 var(--sans); letter-spacing: 1.2px; text-transform: uppercase; }
.detail-item > span:last-child { color: #4b4d33; font: 500 21px/1.45 var(--serif); }
.map-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 13px 25px; border: 1px solid rgba(226, 187, 118, .78); color: #fff4db; background: linear-gradient(135deg, #4f5b3b, #37412d 76%); box-shadow: inset 0 0 0 3px rgba(226, 187, 118, .09), 0 7px 18px rgba(61, 24, 19, .14); text-decoration: none; font: 600 13px var(--sans); letter-spacing: 1.1px; text-transform: uppercase; transition: transform .2s ease, background .25s ease, border-color .25s ease, box-shadow .25s ease; }
.map-icon { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: #efd08b; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.map-button:hover { transform: translateY(-2px); border-color: #f0d79e; background: linear-gradient(135deg, #6e7850, #404a31 76%); box-shadow: inset 0 0 0 3px rgba(226, 187, 118, .13), 0 10px 22px rgba(61, 24, 19, .22); }
.map-button:focus-visible { outline: 3px solid #b28a47; outline-offset: 4px; }
.map-button:active { transform: scale(.98); }
.hosted-by { margin: 22px 0 0; color: #4e5338; font: 20px/1.7 var(--serif); }
.hosted-by strong { color: #7b5a22; font: 600 13px var(--sans); letter-spacing: 1.4px; text-transform: uppercase; }
.function-tagline { margin: 26px 0 0; color: #795728; font: italic 21px/1.5 var(--serif); }
.couple-details { display: flex; align-items: center; justify-content: center; gap: 24px; margin: 25px auto 30px; }
.couple-details div { display: flex; flex-direction: column; gap: 5px; }
.couple-details strong { color: var(--gold-deep); font: 600 29px/1.1 var(--display); letter-spacing: .5px; }
.couple-details span { max-width: 245px; color: #6b5145; font: 16px/1.5 var(--serif); }
.couple-details i { color: #967d46; font: italic 16px var(--serif); }
.barat-note { margin: 0 auto 20px; color: #6d503e; font: italic 18px/1.55 var(--serif); }

/* RSVP and closing */
.rsvp { width: min(1100px, 100%); margin: 0 auto; padding: 34px 20px 82px; text-align: center; }
.rsvp-intro { margin: 0 0 5px; color: #fff0cf; font: 500 19px var(--serif); }
.rsvp h2 { margin: 0 0 22px; color: #fff0cf; font: 500 clamp(50px, 9vw, 82px)/1.1 var(--display); letter-spacing: 2px; }
.rsvp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; text-align: left; }
.rsvp-contact { display: flex; align-items: center; gap: 14px; min-height: 78px; padding: 15px 22px; color: #4e5239; background: rgba(255, 250, 242, .96); border: 1px solid rgba(188, 145, 61, .35); box-shadow: 0 9px 25px rgba(0, 0, 0, .17); text-decoration: none; transition: transform .2s ease, background .2s ease; }
.rsvp-contact:hover { transform: translateY(-2px); background: #fffdf7; }
.phone-icon { color: #9a834d; font: 20px var(--sans); }
.rsvp-contact > span:last-child { display: flex; flex-direction: column; gap: 4px; }
.rsvp-contact strong { color: #54241c; font: 600 16px var(--sans); }
.rsvp-contact small { color: #8b6c32; font: 15px var(--sans); }
.closing { margin-top: 65px; color: #f5e5bd; }
.closing-sparkle { color: #c8ae70; font-size: 20px; }
.closing h3 { margin: 12px 0 5px; color: #fff0cf; font: 500 clamp(34px, 6vw, 48px)/1.1 var(--serif); }
.closing-date { margin: 0; color: #f2dda6; font: 12px var(--sans); letter-spacing: 2px; }
.with-love { margin: 29px 0 6px; font: 13px var(--sans); letter-spacing: 1px; }
.family-name { margin: 0; color: #fff0cf; font: 500 20px/1.7 var(--serif); }
.final-blessing { margin: 35px 0 0; color: #f2dda6; font: 11px/1.9 var(--sans); letter-spacing: 2.4px; text-transform: uppercase; }

@media (max-width: 650px) {
  #background-layer { background-image: url('olive-banquet-mobile.jpg'); background-position: center center; background-size: cover; transform: none; }
  #background-overlay { background: linear-gradient(rgba(29, 34, 24, .50), rgba(29, 34, 24, .63)); }
  body.envelope-open #background-overlay { background: linear-gradient(rgba(27, 32, 23, .59), rgba(27, 32, 23, .69)); }
  .envelope { width: 88vw; height: 54vw; min-height: 205px; }
  .wax-seal { width: 82px; height: 82px; }
  .seal-inner { width: 65px; height: 65px; font-size: 21px; }
  .letter-content { padding: 13px; }
  .letter-small { margin-bottom: 6px; font-size: 9px; letter-spacing: 1.15px; }
  .letter h2 { font-size: clamp(22px, 7.2vw, 28px); }
  .letter-crest { width: min(164px, 78%); height: 34px; margin: 3px 0 1px; }
  .letter-main-text time { font-size: 10px; letter-spacing: 1.1px; }
  .letter-main-text span { font-size: 9px; }
  .envelope { --letter-lift: min(-50vw, -205px); }
  .tap-text { margin-top: 0; font-size: 11px; letter-spacing: 2.4px; }
  .hero { min-height: 100svh; padding: 85px 16px 82px; }
  .om-ornament { width: 72px; height: 72px; margin-bottom: 10px; }
  .small-heading { max-width: 340px; margin: 0 auto 15px; font-size: 18px; letter-spacing: 1.5px; }
  .couple-name { line-height: .88; }
  .couple-name .name-line { font-size: clamp(60px, 17vw, 96px); }
  .couple-name .amp-line { margin: .1em 0; font-size: 30px; }
  .hero-invitation { max-width: 420px; margin-top: 17px; font-size: 18px; line-height: 1.55; }
  .ornament { margin: 15px 0; }
  .scratch-date { width: 92vw; height: 150px; }
  .scratch-date-main { font-size: clamp(25px, 7.8vw, 32px); }
  .scratch-date-overline { font-size: 11px; letter-spacing: 2px; }
  .scratch-cue-copy { margin: 0 9px; }
  .scratch-cue-copy small { font-size: 8px; letter-spacing: 1.8px; }
  .scratch-cue-copy span { font-size: 24px; }
  .scratch-help { max-width: 340px; margin: 11px auto 0; font-size: 12px; }
  .hero-location { font-size: 14px; letter-spacing: 1.3px; }
  .countdown-section { margin-top: 32px; }
  .countdown { padding: 14px 6px; }
  .countdown-box { min-width: 0; padding: 5px 4px; gap: 6px; }
  .countdown-box strong { font-size: clamp(38px, 12vw, 48px); }
  .countdown-box span { font-size: 11px; letter-spacing: .7px; }
  .countdown-title { font-size: 14px; }
  .countdown-note { max-width: 320px; margin: 10px auto 0; font-size: 14px; line-height: 1.5; }
  .save-date-button { width: min(100%, 350px); padding: 13px 12px; font-size: 11px; }
  .blessing-section { min-height: 56vh; padding-inline: 20px; }
  .blessing-section h2 { font-size: 36px; }
  .blessing-section > p:not(.blessing-overline) { font-size: 17px; }
  .itinerary { width: calc(100% - 28px); padding: 28px 0 38px; }
  .itinerary-list { grid-template-columns: 1fr; gap: 9px; }
  .itinerary-list a { min-height: 82px; padding: 12px 14px; grid-template-columns: 48px minmax(0, 1fr) 16px; gap: 10px; }
  .itinerary-list strong { font-size: 18px; }
  .itinerary-icon { flex-basis: 33px; width: 33px; height: 33px; }
  .itinerary-icon svg { width: 23px; height: 23px; }
  .functions { padding: 34px 12px 28px; }
  .section-heading { margin-bottom: 25px; }
  .section-heading h2 { font-size: 38px; }
  .function-card { margin-bottom: 20px; padding: 70px 18px 46px; }
  .function-card h3 { font-size: clamp(28px, 7.5vw, 35px); line-height: 1.2; letter-spacing: .35px; }
  .invitation-text { font-size: 18px; line-height: 1.6; }
  .function-card .invitation-text { font-size: 19px; line-height: 1.55; }
  .couple-invitation { margin: 21px auto 26px; }
  .couple-invitation strong:first-child { font-size: 27px; }
  .couple-invitation strong:last-child { font-size: 27px; }
  .event-details { grid-template-columns: 1fr; gap: 7px; }
  .detail-full { grid-column: auto; }
  .detail-item { padding: 15px 10px; gap: 7px; }
  .detail-item strong { font-size: 13px; }
  .detail-item > span:last-child { font-size: 19px; }
  .map-button { width: min(100%, 300px); min-height: 54px; padding: 13px 16px; font-size: 12px; }
  .hosted-by { font-size: 20px; }
  .couple-details strong { font-size: 29px; }
  .couple-details span { font-size: 16px; }
  .barat-note { font-size: 17px; }
  .function-tagline { font-size: 20px; }
  .couple-details { flex-direction: column; gap: 12px; }
  .couple-details span { max-width: 280px; }
  .rsvp { padding: 28px 12px 62px; }
  .rsvp-grid { grid-template-columns: 1fr; gap: 11px; }
  .rsvp-contact { min-height: 72px; padding: 14px 18px; }
  .closing { margin-top: 48px; }
}

@media (max-width: 380px) {
  .small-heading { font-size: 18px; }
  .couple-name .name-line { font-size: 58px; }
  .couple-name .amp-line { font-size: 26px; }
  .countdown-box strong { font-size: clamp(38px, 12vw, 44px); }
  .countdown-note { font-size: 12px; }
  .function-card h3 { font-size: 27px; }
  .function-number { left: 50%; transform: translateX(-50%); }
}

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