@import url("assets/fonts/fonts.css");

:root {
  color-scheme: light;
  --wine: #701e22;
  --paper: #faf8f4;
  --ink: #231c19;
  --serif: Taviraj, "Times New Roman", serif;
  --flourish: "Great Vibes", Italianno, "Times New Roman", cursive;
  --sans: Quicksand, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { margin: 0; scroll-behavior: smooth; }
body { margin: 0; background: #f3f1ee; color: var(--ink); font: 16px/1.5 var(--serif); }
body.has-opening { overflow: hidden; }
body.design-3 { --wine: #142c1a; }
body.design-5 { --wine: #751211; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid #c89055; outline-offset: 3px; }
img { display: block; width: 100%; height: 100%; }
button[hidden], [hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
.eyebrow { font: 600 .7rem/1.5 var(--sans); letter-spacing: .22em; }
.fit-cover { object-fit: cover; }
.fit-fill { object-fit: fill; }

.catalog-page { background: radial-gradient(ellipse at top, #fffdfa, #f5ede6 72%); }
.catalog { max-width: 1150px; margin: 0 auto; padding: 64px 30px 84px; }
.catalog header { text-align: center; margin-bottom: 44px; }
.catalog-mark { color: var(--wine); margin: 0 auto 13px; border: 1px solid #b38278; border-radius: 50%; width: 55px; height: 55px; display: grid; place-items: center; font: 28px "Noto Serif SC", serif; }
.catalog header h1 { color: var(--wine); font: 400 clamp(4rem,10vw,6.3rem)/1.1 var(--flourish); margin-top: 10px; }
.catalog header > p:last-child { font-size: .98rem; color: #6f5650; }
.catalog-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 15px; }
.catalog-card { color: #482d2a; background: #fffdfa; border: 1px solid #eadbd3; border-radius: 10px; overflow: hidden; text-decoration: none; transition: box-shadow .25s, transform .25s; }
.catalog-card:hover { transform: translateY(-5px); box-shadow: 0 12px 24px #64382618; }
.catalog-photo { aspect-ratio: 3/4; position: relative; background: #6c2020; overflow: hidden; }
.catalog-photo img { object-fit: cover; object-position: center 25%; }
.sample-1 .catalog-photo img { object-fit: contain; object-position: center bottom; padding: 12px 0 0; }
.sample-3 .catalog-photo { background: #142b18; padding: 16px 22px 0; }
.sample-3 .catalog-photo img { border-radius: 50% 50% 0 0 / 34% 34% 0 0; }
.sample-5 .catalog-photo { background: #581b1c; padding: 15px 18px; }
.sample-5 .catalog-photo img { border: 4px solid #f6e9da; }
.catalog-photo span { position: absolute; top: 9px; left: 9px; background: #fff7ee; color: #6c2624; padding: 3px 6px; border-radius: 20px; font: 700 11px var(--sans); }
.catalog-name { padding: 13px 12px 14px; display: flex; gap: 4px; align-items: center; justify-content: space-between; }
.catalog-name h2 { font: 600 .96rem/1.28 var(--serif); }
.catalog-name p { font: .78rem/1.35 var(--sans); margin-top: 4px; color: #766361; }
.catalog-name b { font: .8rem var(--sans); color: #8d4b43; }
@media (max-width: 960px) { .catalog-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 600px) {
  .catalog { padding: 36px 14px 44px; }
  .catalog header { margin-bottom: 27px; }
  .catalog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
}

#invitation { position: relative; width: min(100%, 500px); margin: 0 auto; }
.paper { position: relative; width: 100%; min-height: 100svh; background: white; container-type: inline-size; }
@media (min-width: 560px) {
  #invitation { margin: 16px auto; }
  .paper { box-shadow: 0 15px 55px #3b24151c; border-radius: 16px; clip-path: inset(0 round 16px); }
  .red-opening { top: 16px !important; height: calc(100svh - 32px) !important; border-radius: 16px; }
}
.top-tools { position: fixed; z-index: 120; top: max(11px,env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: min(100%,500px); padding-inline: 12px; display: flex; justify-content: space-between; pointer-events: none; }
@media (min-width: 560px) { .top-tools { top: 25px; } }
.icon-button { pointer-events: auto; border: 1px solid #fff9; background: #211715; color: white; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; padding: 0; line-height: 1; box-shadow: 0 1px 5px #0004; font: 18px Arial,sans-serif; }
.replay { opacity: .75; }
.music.playing { animation: disc 8s linear infinite; }
@keyframes disc { to { transform: rotate(360deg); } }
body.design-3 .icon-button { background: #203624; }
body.design-5 .icon-button { background: #741c21; }
.utility { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 5px 15px; text-align: center; padding: 18px 10px max(18px, env(safe-area-inset-bottom)); background: #fbf7f1; font: 700 12px var(--sans); color: var(--wine); border-top: 1px solid #80615925; }
.utility button, .utility a { border: 0; background: transparent; text-decoration: underline; padding: 5px 0; text-underline-offset: 3px; }

.canvas { position: relative; overflow: hidden; width: 100%; }
.layer, .burg-layer { position: absolute; }
.layer-copy { white-space: pre-wrap; overflow-wrap: break-word; }
.layer-copy a { display: inline-block; text-decoration: none; min-width: 45%; }
.layer-copy a:hover { text-decoration: underline; }
.font-serif { font-family: "Times New Roman", serif; }
.font-hand { font-family: "Oooh Baby", "Great Vibes", cursive; }
.font-flourish { font-family: var(--flourish); }
.font-script { font-family: Italianno, "Great Vibes", cursive; }
.font-sans { font-family: var(--sans); }
.layer-image, .shape { width: 100%; height: 100%; overflow: hidden; mask-size: 100% 100%; mask-repeat: no-repeat; }
.shape.arch { border-radius: 14% 14% 13% 13%; }
.shape.round { border-radius: 50%; }
.shape.pill { border-radius: 100px; }
.photo-open { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; overflow: hidden; }
.photo-open img { object-fit: cover; }
.photo-open:hover img { filter: brightness(1.05); }
.layer-image .photo-open img.fit-fill { object-fit: fill; }
.paper.ready-to-reveal [data-reveal] { opacity: 0; translate: var(--from-x,0) var(--from-y,23px); scale: var(--from-s,1); transition: opacity .82s ease, translate 1.05s cubic-bezier(.19,.66,.32,1), scale 1.1s ease; }
.paper.ready-to-reveal [data-reveal="left"] { --from-x: 30px; --from-y: 0; }
.paper.ready-to-reveal [data-reveal="right"] { --from-x: -30px; --from-y: 0; }
.paper.ready-to-reveal [data-reveal="zoom"] { --from-x: 0; --from-y: 0; --from-s: .92; }
.paper.ready-to-reveal [data-delay="1"] { transition-delay: .09s; }
.paper.ready-to-reveal [data-delay="2"] { transition-delay: .18s; }
.paper.ready-to-reveal [data-reveal].shown, .paper.ready-to-reveal [data-reveal]:focus-within { opacity: 1; translate: 0 0; scale: 1; }

.countdown { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 2cqw; text-align: center; width: 100%; }
.countdown.vertical { grid-template-columns: 1fr; grid-template-rows: repeat(4,1fr); height: 100%; }
.countdown strong { display: block; font: 500 4.7cqw/1.18 var(--serif); font-variant-numeric: tabular-nums; }
.countdown small { font: 3.3cqw/1 var(--serif); }
.layer-count .countdown { padding: 1.8cqw; background: #160e0e; color: #fffaf3; }
.layer-count .countdown.vertical { background: #631717; }
.layer-count strong { font: 600 4cqw/1.1 var(--sans); }
.layer-count small { font: 3cqw/1 var(--sans); }
.calendar { background: #fffdfa; color: #2e2320; border: 1px solid #b8908380; border-radius: 8px; padding: 3.8cqw; width: 100%; font-size: 3.5cqw; }
.calendar-title { font-size: 6cqw; color: var(--wine); margin: 0 auto 1.5cqw; text-align: center; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,1fr); text-align: center; align-items: center; gap: 1.2cqw .55cqw; }
.calendar-grid > * { line-height: 1.75; min-height: 5.6cqw; }
.calendar-grid b { font-size: .78em; color: var(--wine); }
.calendar-grid .marked { border-radius: 50%; background: var(--wine); color: #fff; font-weight: bold; }
.calendar-plain { border: 0; border-radius: 0; color: #fff5ee; background: transparent; }
.calendar-plain .marked { outline: 1px solid #f0ddcb; background: #a24c49; }
.map-card { background-color: #f3eee4; background-image: repeating-linear-gradient(18deg,transparent 0 21px,#e6dccc 22px 25px,transparent 26px 39px),repeating-linear-gradient(112deg,transparent 0 24px,#fff9ef 25px 29px,transparent 30px 52px); color: #593532; border: 1px solid #ddcebd; border-radius: 4px; padding: 4cqw 2cqw; text-align: center; height: 100%; display: grid; place-content: center; gap: 1.3cqw; font-size: 3.6cqw; }
.map-card > span { color: var(--wine); font-size: 9cqw; line-height: 1; }
.map-card p { max-width: 31ch; }
.pill { font: 600 14px/1.22 var(--sans); display: inline-block; border-radius: 99px; background: var(--wine); border: 1px solid var(--wine); color: #fff9f2; padding: 9px 17px; text-align: center; text-decoration: none; }
.pill:hover { filter: brightness(1.18); }
.layer-rsvp .guest-form { background: #fffffa; }
.design-1 .layer-rsvp .guest-form { font-size: 3.25cqw; padding: 2.6cqw; gap: 1.3cqw; }
.guest-form { width: 100%; background: #fffaf3; border-radius: 7px; padding: min(4cqw,20px); display: grid; gap: min(2cqw,11px); font: 500 clamp(12px,3.05cqw,16px)/1.33 var(--sans); color: #3e302b; border: 1px solid #d9c7b8; box-shadow: 0 3px 12px #38171113; }
.guest-form h3 { font: 600 1.25em/1.25 var(--sans); color: var(--wine); text-align: center; }
.guest-form label { display: block; }
.guest-form label :is(input:not([type=radio]),select,textarea) { display: block; width: 100%; margin-top: 4px; color: #291d16; padding: .5em .55em; background: #fff; border: 1px solid #d5c7bc; border-radius: 4px; }
.guest-form fieldset { padding: 0; margin: 0; border: 0; display: grid; gap: 3px; }
.guest-form input[type=radio] { margin: 0 .2em 0 0; accent-color: var(--wine); }
.guest-form legend { padding: 0; margin-bottom: 4px; }
.guest-form .pill { width: 100%; padding: .6em; font-size: 1em; }
.form-status { min-height: 1.2em; color: var(--wine); font-size: .9em; }

.green-paper { background: #f8f8f8; color: #20251e; font: 4cqw/1.55 Lora,"Times New Roman",serif; }
.green-hero { height: 156cqw; position: relative; overflow: hidden; color: #e0e6da; }
.green-arc { position: absolute; width: 132%; height: 83cqw; left: -16%; top: -19cqw; background: #0c210f; border-radius: 0 0 50% 50% / 0 0 70% 70%; }
.green-welcome { position: absolute; top: 8.2cqw; width: 100%; text-align: center; letter-spacing: .33em; font: 2.05cqw var(--serif); }
.green-couple { position: absolute; top: 13.9cqw; width: 100%; padding: 0 5cqw; display: grid; grid-template-columns: 1fr 16cqw 1fr; align-items: center; text-align: center; }
.green-couple b { font: 400 4.4cqw/1.25 var(--serif); text-transform: uppercase; }
.green-couple small { display: block; font: 2.2cqw var(--sans); }
.hy-glyph { font: 13cqw/1.1 "Noto Serif SC",serif; }
.green-motto { width: 57%; height: 19cqw; position: absolute; top: 24cqw; left: 21.5%; overflow: visible; }
.green-motto text { fill: #d9e4d7; font-family: Georgia,serif; letter-spacing: 4px; font-size: 14px; }
.green-portrait { position: absolute; top: 39cqw; left: 20.2%; width: 59.6%; height: 100.3cqw; border-radius: 50% 50% 0 0 / 28% 28% 0 0; overflow: hidden; }
.green-portrait img { object-fit: cover; object-position: 50% 49%; }
.green-paper section { padding-bottom: 7cqw; text-align: center; }
.green-heading { margin: 0; background: #0c210f; color: #eef1e8; padding: 2.1cqw 4cqw; font: 400 4.05cqw/1.45 Lora,serif; }
.green-inner { padding: 4cqw 7.5cqw 0; }
.green-inner p + p { margin-top: 3cqw; }
.guest-line { display: block; max-width: 53cqw; margin: 0 auto 4cqw; padding-bottom: 1cqw; border-bottom: 1px dotted #5a6555; font-weight: normal; }
.green-paper .families, .green-addresses { display: grid; grid-template-columns: 1fr 1fr; gap: 4cqw; }
.families { display: grid; grid-template-columns: 1fr 1fr; gap: 3cqw; text-align: center; }
.families span { font-weight: bold; }
.families p { white-space: pre-line; }
.green-paper .families { font-size: 3.7cqw; }
.green-addresses { font-size: 2.9cqw; margin-top: 1.4cqw; }
.report .eyebrow { margin-top: 7cqw; font-size: 2.9cqw; letter-spacing: .12em; }
.report-names { color: #17351d; display: flex; align-items: center; justify-content: center; gap: 3cqw; margin: 6cqw 0 3cqw; font: 6.2cqw var(--flourish); }
.report-names small { display: block; color: #394b36; text-transform: uppercase; font: 2.2cqw var(--sans); }
.green-gallery { display: grid; gap: 1cqw; }
.green-gallery > .photo-open:nth-child(1) { aspect-ratio: 3/4; }
.green-gallery > .photo-open:nth-child(2) { aspect-ratio: 3/2; }
.gallery-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 19%; gap: 1%; overflow: auto; scrollbar-width: thin; }
.gallery-strip button { aspect-ratio: 1; }
.ceremonies { display: grid; gap: 4cqw; }
.ceremony { border: 1px solid #677c63; padding: 4cqw; }
.ceremony h3 { font: 500 4.4cqw/1.2 var(--serif); color: #152d1b; }
.ceremony > div { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; gap: 2cqw; padding: 2cqw 0; text-transform: uppercase; font-size: 3cqw; }
.ceremony strong { font: 500 11cqw/1.1 var(--serif); border-inline: 1px solid #acb5a7; color: #142e1b; }
.ceremony p { font-size: 3.1cqw; }
.green-calendar .countdown { margin: 4cqw 0 0; }
.green-maps { display: grid; gap: 4cqw; }
.green-maps article { padding: 3cqw; border: 1px solid #a1ad9e; }
.green-maps .map-card { min-height: 37cqw; margin: 3cqw 0; }
.green-maps article > a { font: 3cqw var(--sans); }
.schedule { padding: 2cqw 0 0; margin: 0 auto; max-width: 73%; list-style: none; text-align: left; }
.schedule li { display: grid; grid-template-columns: 8cqw 17cqw 1fr; align-items: center; gap: 2cqw; padding: 1.8cqw 0; border-bottom: 1px solid #8f9d8a60; font-size: 3.7cqw; }
.schedule li > span:first-child { font-size: 5cqw; text-align: center; color: var(--wine); }
.swatches { display: flex; justify-content: center; padding: 4cqw 0 0; }
.swatches span { width: 11cqw; height: 11cqw; border-radius: 50%; border: 1px solid #fff9; margin-inline: -1cqw; }
.wish-wall { display: grid; grid-template-columns: 1fr 1fr; gap: 2cqw; }
.wish-wall blockquote { margin: 1cqw 0 4cqw; padding: 4cqw 2.8cqw; background: #ebeee1; box-shadow: 0 2px 4px #344c3320; font-size: 3.2cqw; overflow-wrap: anywhere; }
.wish-wall cite { display: block; margin-top: 2cqw; }
.green-inner .pill { margin-top: 3cqw; }
.green-ending { position: relative; min-height: 115cqw; }
.green-ending img { aspect-ratio: 3/4; object-fit: cover; }
.green-ending p { position: absolute; inset: auto 0 0; background: linear-gradient(transparent,#081507d9 60%); color: #fff; padding: 10cqw 6cqw 5cqw; text-align: center; }

.burg-paper { height: 1584.2cqw; background: #f6f3ee; color: #751211; font: 3.42cqw/1.48 var(--serif); }
.burg-copy { text-align: center; }
.burg-polaroid { border: 7px solid #fffdfa; overflow: hidden; }
.burg-guest { display: inline-block; min-width: 57cqw; border-bottom: 1px dashed #9b5a4f; }
.burg-script { font: 400 13cqw/1.15 var(--flourish); }
.burg-script.big { font-size: 16.5cqw; }
.burg-count .countdown { gap: 0; }
.burg-count .countdown strong, .burg-count .countdown small { font-size: 4cqw; }
.burg-place { font-size: 5.3cqw; line-height: 1.2; }
.burg-person { background: #f5e7d5b3; padding: .8cqw 0; font-size: 3.8cqw; }
.burg-person i, .letter, .signatures i { font: 400 5.1cqw/1.15 Italianno,var(--flourish); }
.burg-fade { background: linear-gradient(transparent,#f6f3ee 78%); }
.burg-end-fade { background: linear-gradient(transparent,#4b1014 89%); }
.burg-timeline .schedule { max-width: 88%; padding: 1cqw 0; }
.burg-timeline .schedule li { padding: 4cqw 0; }
.burg-gallery { width: 100%; height: 100%; background: #270d0d; position: relative; }
.burg-gallery img { object-fit: cover; }
.signatures { display: flex; justify-content: space-around; }
.on-red { color: #f7e6d4; }
.album-counter { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); border-radius: 99px; background: #170b0bbb; color: #fff; font: 13px var(--sans); padding: 5px 9px; pointer-events: none; }

.opening { z-index: 150; position: fixed; }
.green-opening { inset: 0; display: grid; place-items: center; overflow: hidden; background: linear-gradient(140deg,#0a1f11,#14261b 66%,#1b3524); color: #e8efe2; font: 16px/1.4 Lora,serif; }
.green-stars { position: absolute; inset: 0; pointer-events: none; width: 100%; height: 100%; }
.green-stars { overflow: hidden; }
.floating-hy { position: absolute; top: 0; left: var(--x); color: #c59c37; opacity: 0; font: var(--sz) "Noto Serif SC",serif; animation: float-hy var(--speed) var(--delay) linear infinite; }
.floating-hy:nth-child(3n) { color: #bb7154; }
@keyframes float-hy { 0% { transform: translateY(103svh) rotate(-12deg); opacity: 0; } 16%,69% { opacity: .42; } 100% { transform: translate(20px, -5svh) rotate(16deg); opacity: 0; } }
.green-envelope { width: min(600px, calc(100% - 30px)); min-height: 450px; position: relative; padding: 21px 18px 30px; background: #1d3825; border: 1px solid #6c826d51; box-shadow: 0 20px 44px #07130bd6; border-radius: 8px; text-align: center; overflow: hidden; }
.corner-hy { color: #d6e4cc; opacity: .17; position: absolute; line-height: 1; font: 250px/1 "Noto Serif SC",serif; pointer-events: none; transform: rotate(32deg); }
.corner-hy.one { top: -53px; left: -84px; }
.corner-hy.two { bottom: -93px; right: -71px; }
.green-seal { position: relative; display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 15px; color: #6b7d68; text-shadow: 1px 1px #fbfff5; background: radial-gradient(ellipse at 30% 20%,#ecf3e8,#b5c5b3); border-radius: 50%; box-shadow: 0 2px 5px #b2cbb34a; font: 28px "Noto Serif SC",serif; }
.green-envelope h1 { position: relative; font: 400 32px/1.05 var(--serif); letter-spacing: -.035em; }
.green-envelope h1 small { display: block; font: 15px/1.2 Lora,serif; }
.green-rule { margin: 14px auto 10px; color: #cbd7c8; }
.green-envelope p { position: relative; }
.green-envelope .green-invite { margin: 17px 0 10px; font-size: 19px; }
.green-envelope b { display: inline-block; margin-bottom: 13px; position: relative; }
.open-green { position: relative; margin-top: 15px; background: #e9f0e4; color: #1d3825; padding: 7px 28px; border: 0; border-radius: 100px; font: 700 18px/1.5 Lora,serif; box-shadow: 0 0 18px #c9e4c521; }
.open-green:hover { background: #fafff7; box-shadow: 0 0 22px #c9e4c559; }
.green-opening.opening-active { animation: open-green-back 1.16s both; }
.green-opening.opening-active .green-envelope { animation: open-green-panel .9s cubic-bezier(.28,.66,.43,1) both; }
@keyframes open-green-back { 0%,59% { opacity: 1; } 100% { opacity: 0; } }
@keyframes open-green-panel { 0% { transform: scale(1); opacity: 1; } 38% { transform: scale(1.025); opacity: .99; } 100% { transform: translateY(-46px) scale(.93); opacity: 0; } }
@media (max-width: 400px) {
  .green-envelope { min-height: 0; padding: 24px 14px 27px; }
  .green-envelope h1 { font-size: 29px; }
  .green-envelope p { font-size: 14px; }
  .green-envelope .green-invite { font-size: 17px; }
  .corner-hy { font-size: 190px; }
}

.red-opening {
  --texture: url("assets/art/paper-texture.svg");
  width: min(100%,500px); height: 100svh; left: 50%; top: 0; transform: translateX(-50%);
  overflow: hidden; background: #4b1317; isolation: isolate; perspective: 1200px;
  color: #f4decb;
}
.envelope-pocket, .envelope-flap { background: var(--texture),radial-gradient(ellipse at 27% 14%,#6a2428 0,#59191f 55%,#451114 100%); }
.envelope-pocket { position: absolute; inset: 0; overflow: hidden; z-index: 1; box-shadow: inset 0 0 64px #20070948; }
.envelope-flap {
  position: absolute; left: 0; top: 0; right: 0; height: 50%; z-index: 3; transform-origin: top;
  background: var(--texture), radial-gradient(ellipse at 37% 38%,#6e262a,#5b1d23 65%,#4e171b);
  clip-path: polygon(0 0,100% 0,100% 84%,86% 84%,78% 85%,73% 89%,64% 96%,60% 100%,40% 100%,36% 96%,27% 89%,22% 85%,14% 84%,0 84%);
}
.flap-seam { position: absolute; left: 0; bottom: 0; width: 100%; height: 17.5%; fill: none; stroke: #d6a68b75; stroke-width: 1px; }
.flap-seam path:first-child { stroke-dasharray: 4 3; }
.flap-copy { text-align: center; width: 100%; position: absolute; top: 52%; padding-inline: 16px; }
.flap-copy p, .envelope-guest p { font: 12px/1.5 var(--serif); letter-spacing: .28em; }
.flap-copy h1 { font: 400 clamp(24px,7.4vw,41px)/1.13 var(--flourish); margin-top: 15px; }
.wax-button { position: absolute; z-index: 6; top: 50%; left: 50%; transform: translate(-50%,-50%); width: clamp(95px,28vw,132px); aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; background: transparent; filter: drop-shadow(0 3px 7px #3e1810a0); transition: scale .2s, filter .2s; }
.wax-button:hover { scale: 1.05; filter: drop-shadow(0 3px 11px #f5d7a670); }
.envelope-guest { position: absolute; width: 100%; top: calc(50% + 74px); text-align: center; z-index: 4; padding-inline: 10px; }
.envelope-guest span { display: block; font: 400 30px/1.3 var(--flourish); margin-top: 7px; }
.invite-preview { position: absolute; z-index: 2; width: 82%; left: 9%; top: 27%; padding: 31px 7px 32px; background: #fbf0de; color: #6b2328; text-align: center; box-shadow: 0 5px 20px #2b0c15a0; border: 6px double #b18d6a; opacity: 0; letter-spacing: .18em; font: 13px var(--serif); }
.invite-preview em { display: block; margin-top: 14px; font: 44px var(--flourish); }
.red-opening.opening-active { animation: envelope-out 1.95s both; }
.red-opening.opening-active .envelope-flap { animation: lift-flap 1.05s .18s cubic-bezier(.21,.59,.42,1) both; }
.red-opening.opening-active .wax-button { animation: lift-seal .63s both; }
.red-opening.opening-active .envelope-guest { animation: fade .45s both; }
.red-opening.opening-active .invite-preview { animation: pull-card .92s .6s both; }
@keyframes fade { to { opacity: 0; } }
@keyframes lift-flap { 0% { transform: rotateX(0); } 75%,100% { transform: rotateX(104deg) translateY(-10px); opacity: .15; } }
@keyframes lift-seal { 40% { transform: translate(-50%,-50%) rotate(-14deg) scale(1.12); } 100% { transform: translate(-42%,-83%) rotate(35deg) scale(.8); opacity: 0; } }
@keyframes pull-card { 0% { transform: translateY(120px) scale(.92); opacity: 0; } 40% { opacity: 1; } 100% { transform: translateY(-24px) scale(1); opacity: 1; } }
@keyframes envelope-out { 0%,68% { opacity: 1; } 100% { opacity: 0; } }

.pop { width: min(90vw,440px); max-height: 87svh; padding: 22px; border: 1px solid #bd8c7d; border-radius: 12px; color: #392222; background: #fffaf3; box-shadow: 0 10px 60px #0006; }
.pop::backdrop { background: #14080cc7; }
.dialog-close { position: absolute; z-index: 5; top: 5px; right: 6px; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; line-height: 1; color: var(--wine); background: #fff8ee; border: 1px solid #d9c7b8; border-radius: 50%; font: 24px Arial; }
.pop .guest-form { box-shadow: none; border: 0; padding: 15px 3px 2px; }
.gift-content { padding: 15px 0 5px; text-align: center; }
.gift-content h3 { color: var(--wine); margin-bottom: 10px; }
.gift-content p + p { margin-top: 7px; }
.share-field { width: 100%; padding: 7px; }
.photo-pop { max-width: min(94vw,680px); width: max-content; padding: 8px; background: #1a1211; color: white; border: 0; }
.lightbox { position: relative; min-width: min(71vw,270px); text-align: center; }
.lightbox img { width: auto; max-width: calc(94vw - 16px); height: auto; max-height: 76svh; object-fit: contain; margin: 0 auto; }
.lightbox p { margin: 7px; font: 13px var(--sans); }
.photo-arrow { position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #fff8; border-radius: 50%; background: #170c0ca8; color: #fff; padding: 0; font: 27px/1 Georgia,serif; }
.photo-arrow.prev { left: 10px; }
.photo-arrow.next { right: 10px; }
.toast { position: fixed; z-index: 250; bottom: 14px; left: 50%; transform: translate(-50%,10px); max-width: 94vw; width: max-content; opacity: 0; pointer-events: none; border-radius: 20px; color: #fff; background: #271411; font: 13px var(--sans); padding: 8px 13px; transition: opacity .25s, transform .25s; }
.toast.on { opacity: 1; transform: translate(-50%,0); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

.layer-gift { color: inherit; background: none; border: 0; padding: 0 2px; font: inherit; }
.layer-gift:hover { text-decoration: underline; }

/* Màn bìa thiệp và chuyển cảnh Song Hỷ */
.studio-opening {
  inset: 0;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
  background: radial-gradient(ellipse at 48% 25%, #512329, #220b12 78%);
}
.studio-cover {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(430px, 100%);
  container-type: inline-size;
  height: min(720px, calc(100svh - 28px));
  min-height: 460px;
  isolation: isolate;
  text-align: center;
  box-shadow: 0 20px 70px #12040bbb;
  overflow: hidden;
}
.studio-cover::after {
  content: "";
  position: absolute;
  z-index: 5;
  inset: 8px;
  border: 1px solid #e8c89b55;
  pointer-events: none;
}
.opening-script .studio-cover {
  color: #fff5e7;
  background:
    url("assets/art/paper-texture.svg"),
    radial-gradient(ellipse at 51% 39%, #963c37 0%, #752323 56%, #511218 99%);
}
.script-header {
  padding: clamp(20px,4.7svh,35px) 17px 2px;
  position: relative;
  z-index: 2;
}
.script-header > p { font: 400 clamp(36px,9vw,52px)/1 var(--flourish); }
.script-header time { display: block; margin-top: 6px; font: 12px/1.25 var(--serif); letter-spacing: .21em; }
.cover-couple { margin: 0; font: 400 clamp(22px,7.7cqw,35px)/1.15 var(--flourish); text-wrap: balance; }
.cover-couple span { display: inline-block; white-space: nowrap; }
.cover-couple i { margin-inline: .25em; font: inherit; }
.script-header .cover-couple { margin-top: clamp(8px,2.4svh,17px); }
.script-portrait {
  position: relative;
  width: 94%;
  height: 100%;
  margin-inline: auto;
  overflow: hidden;
}
.script-portrait img {
  position: relative;
  object-fit: cover;
  object-position: 50% 45%;
  mask-image: radial-gradient(ellipse 65% 59% at 50% 51%, #000 56%, #000b 79%, transparent 100%);
}
.script-portrait span { position: absolute; top: 4%; right: 8%; color: #f6bba0; opacity: .22; font: 126px/1 "Noto Serif SC", serif; }
.cover-action {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 9px 12px clamp(18px,3svh,26px);
  font: 12px/1.35 var(--serif);
}
.cover-action p b { margin-left: .28em; font-weight: 600; }
.open-wine {
  border: 1px solid #dfba86;
  border-radius: 99px;
  color: #651a20;
  background: #faeddb;
  min-width: 137px;
  min-height: 42px;
  padding: 7px 19px;
  box-shadow: 0 4px 15px #39121625;
  font: 700 15px/1.2 var(--serif);
  transition: background-color .2s, box-shadow .2s, translate .2s;
}
.open-wine svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; margin-left: 3px; vertical-align: -.13em; }
.open-wine:hover { background: #fff7ed; box-shadow: 0 6px 20px #3e151c4f; translate: 0 -2px; }
.open-wine:disabled, .open-green:disabled, .wax-button:disabled { cursor: default; }
.opening-arch .studio-cover {
  --arch-wine: #631717;
  --arch-paper: #fffcf8;
  grid-template-rows: auto minmax(0,1fr) auto auto;
  background: var(--arch-paper);
  color: var(--arch-wine);
}
.opening-arch-4 .studio-cover { --arch-wine: #551c24; --arch-paper: #f7f0e5; }
.opening-arch .studio-cover::after { border-color: #c69f7b80; }
.arch-header {
  position: relative;
  display: grid;
  place-items: center;
  gap: 1px;
  background: var(--arch-wine);
  color: #fff8ee;
  padding: clamp(20px,3.9svh,31px) 10px 2px;
}
.arch-header p { font: 500 clamp(13px,3.7vw,17px)/1.2 var(--sans); letter-spacing: .22em; }
.arch-header span { font-size: 11px; color: #e4bd85; }
.cover-arch-stage {
  position: relative;
  min-height: 0;
  background: linear-gradient(to bottom, var(--arch-wine) 0 86%, transparent 86%);
}
.cover-arch-photo {
  position: absolute;
  left: 9%;
  top: 4%;
  bottom: 0;
  width: 62%;
  overflow: hidden;
  border-radius: 50% 50% 0 0 / 31% 31% 0 0;
  box-shadow: 0 5px 14px #34111222;
}
.cover-arch-photo img { object-fit: cover; object-position: center 40%; }
.opening-arch-4 .cover-arch-photo { left: 12%; width: 59%; border: 3px solid #e9d7c0; }
.cover-side-note {
  position: absolute;
  top: 38%;
  left: 4%;
  writing-mode: vertical-rl;
  rotate: 180deg;
  color: #f5ddbb;
  font: 9px/1 var(--serif);
  letter-spacing: .28em;
}
.cover-date-rail {
  position: absolute;
  right: 3%;
  bottom: 19%;
  width: 24%;
  color: #fff8ee;
  font: clamp(8px,2.6vw,12px)/1.22 var(--serif);
}
.cover-date-rail p { margin-bottom: 5px; }
.cover-date-rail time { white-space: nowrap; }
.cover-date-rail hr { margin: 8px 4px; border: 0; height: 1px; background: #e8ceaf91; }
.arch-caption {
  padding: clamp(9px,2.2svh,17px) 12px 0;
}
.arch-caption > p { font: 400 clamp(28px,8vw,43px)/1 "Times New Roman", serif; letter-spacing: .17em; }
.arch-caption .cover-couple { margin-top: 6px; font-size: clamp(22px,7.5cqw,34px); }
.opening-arch .open-wine { color: #fff7ed; background: var(--arch-wine); border-color: var(--arch-wine); }
.opening-arch .open-wine:hover { background: #873037; }
.opening-active.studio-opening .studio-cover { animation: cover-away .84s cubic-bezier(.35,.2,.3,1) both; }
.opening-active.opening-arch-4 .studio-cover { animation-name: cover-turn; }
@keyframes cover-away {
  0% { opacity: 1; transform: scale(1); }
  42% { opacity: 1; transform: scale(1.022); }
  100% { opacity: .05; transform: translateY(-34px) scale(.93); }
}
@keyframes cover-turn {
  from { opacity: 1; transform: perspective(900px) rotateX(0); }
  to { opacity: 0; transform: perspective(900px) rotateX(28deg) translateY(-25px) scale(.94); }
}
.envelope-guest .open-wine { margin-top: 13px; }
@media (max-height: 640px) {
  .envelope-guest { top: calc(50% + 57px); }
  .flap-copy { top: 44%; }
  .green-envelope { min-height: 0; padding-top: 14px; padding-bottom: 19px; }
  .green-envelope .green-seal { width: 42px; height: 42px; margin-bottom: 8px; }
}
@media (max-width: 375px) {
  .studio-opening { padding-inline: 9px; }
  .cover-action { gap: 5px; }
}

.celebration {
  --celebration-center: #682329;
  --celebration-edge: #200a12;
  position: fixed;
  z-index: 170;
  inset: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 43%, var(--celebration-center), var(--celebration-edge) 72%);
  animation: celebration-in .43s both;
}
.design-3 .celebration { --celebration-center: #25432b; --celebration-edge: #0a160f; }
.design-5 .celebration { --celebration-center: #632027; --celebration-edge: #1d080f; }
.celebration.celebration-leave { animation: celebration-out .44s ease-in both; }
.celebration canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.celebration-emblem {
  display: grid;
  place-items: center;
  position: relative;
  width: clamp(135px, 43vw, 225px);
  aspect-ratio: 1;
  margin-top: -6svh;
  animation: emblem-in 1.5s cubic-bezier(.24,.68,.35,1) both;
}
.celebration-ring {
  position: absolute;
  inset: 0;
  border: 1px solid #f6d59d95;
  border-radius: 50%;
  box-shadow: inset 0 0 22px #f4be6c15, 0 0 39px #ffd29420;
}
.celebration-ring::after { content: ""; position: absolute; inset: -8px; border: 1px solid #f6d59d39; border-radius: 50%; }
.celebration-hy {
  position: relative;
  color: #ffdda2;
  font: clamp(86px,28vw,151px)/1 "Noto Serif SC", serif;
  text-shadow: 0 0 10px #f9bb6b, 0 0 37px #f8bd72c0, 1px 2px 1px #784c1a;
}
@keyframes celebration-in { from { opacity: .82; } to { opacity: 1; } }
@keyframes celebration-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes emblem-in {
  0% { opacity: .9; scale: .76; filter: blur(.6px); }
  37% { opacity: 1; scale: 1.05; filter: blur(0); }
  100% { opacity: 1; scale: 1; }
}

.layer-image:has(img.red-wedding-hero) { mask-image: radial-gradient(ellipse 61% 59% at 50% 48%, #000 55%, #000b 80%, transparent 100%); }
.layer-image img.red-wedding-hero { object-fit: cover; object-position: 50% 43%; }
.catalog-photo img { object-position: center 40%; }
.sample-1 .catalog-photo img { object-fit: cover; padding: 0; object-position: center 43%; }
.custom-invitation { width: min(92%, 680px); margin: 24px auto; padding: 24px; border: 1px solid #d8c7af; color: #4b2824; background: #fffaf2; text-align: center; }
.custom-invitation p { margin: 0; font: 500 clamp(15px, 2.4vw, 22px)/1.7 Georgia, serif; white-space: pre-line; }
