/* Vermilion wedding edition: red printed stock, cream ink, unfiltered photographs. */
:root {
  --paper: #fff4e4;
  --ink: #76222c;
  --muted: #8b605b;
  --red: #b7222d;
  --line: #e1c4b8;
  --ceremony-red: #b7222d;
  --deep-red: #861c29;
  --cream: #fff4e4;
}
html, body, body[data-mode=before] { background: #eadbd0; }
::selection { background: #e6b6ad; color: #681721; }
dialog::backdrop { background: #2c0e15d9; }
#invite { background: var(--ceremony-red); color: var(--cream); box-shadow: 0 0 70px #53142017; }
#invite .invite-hero { background: #33151a; }

/* A compact masthead gives the photo sequence the character of a wedding poster. */
.hero-edition {
  position: absolute; z-index: 5; inset: 0 0 auto;
  min-height: 58px; padding: max(12px, env(safe-area-inset-top)) 7% 12px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  background: var(--ceremony-red); color: var(--cream);
  font: 16px/1.4 var(--serif); letter-spacing: .5px;
  border-bottom: 1px solid #fff4e433;
}
.hero-edition i { font: italic 15px Georgia, serif; margin: 0 3px; }
.hero-edition-mark { display: grid; place-items: center; width: 35px; height: 35px; font: 27px/1 var(--serif); color: var(--red); background: var(--cream); border-radius: 50%; outline: 1px solid #fff4e466; outline-offset: 3px; }
.hero-edition-date { font: 12px/1.4 var(--sans); letter-spacing: 1px; text-align: right; }
.hero-heading { top: calc(75px + env(safe-area-inset-top)); }
.hero-heading:after { display: none; }
.wedding-countdown>span { font-size: 12px; }
.wedding-countdown>strong { font-size: 22px; }
.hero-photo-shade { background: linear-gradient(180deg,#24101655 0%,transparent 22%,transparent 65%,#35111a0d 72%,#35111a91 88%,#35111abf 100%); }
.greeting-bubble { color: #9f202b; }
.bubble-paper { fill: var(--cream); }
.greeting-bubble:active .bubble-paper { fill: #ffe4ce; }
.hero-slide-dark-ink .hero-doodles { color: #7f2630; }
.hero-slide-dark-ink .person-name { color: #681e28; text-shadow: 0 1px 5px #fff4e4e6; }
.hero-photo-stage:focus-visible,.greeting-bubble:focus-visible { outline-color: var(--cream); }
.hello-rays { stroke: #fff4e4; }
#invite #wedding-info { font-family: var(--serif); letter-spacing: .12em; text-shadow: 0 2px 14px #35111a80; }

/* The reveal and the invitation facts share the same red paper. */
.home-opening,.home-opening:before { background: var(--ceremony-red); color: var(--cream); }
.home-opening:before { clip-path: none; }
.home-opening:after { opacity: .18; }
.opening-happiness { display: block; font: 76px/1 var(--serif); margin-bottom: 35px; animation: opening-signature .9s .1s ease both; }
.home-opening-line { font-family: var(--serif); letter-spacing: .1em; }
.home-opening-names i { color: #f1c5ae; }
.home-opening-stroke { stroke: #f1c5ae; }
.home-opening-skip { color: var(--cream); }
.home-opening-skip:focus-visible { outline-color: var(--cream); }
#invite .invite-paper { background: var(--ceremony-red); color: var(--cream); box-shadow: 0 -10px 28px #48131c26; }
#invite .wedding-information { padding: 26px 7% 26px; background: var(--ceremony-red); }
#invite .wedding-information:before { background: var(--ceremony-red); clip-path: none; height: 9px; }
#invite .wedding-information:after { opacity: .3; }
#invite .paper-curl { background: linear-gradient(180deg,transparent,#ef7d7755 36%,#76182566 57%,#b7222d 90%); }
.paper-date { color: var(--cream); gap: 8px 27px; }
.paper-date-numerals { font-size: clamp(58px,16cqw,80px); letter-spacing: -3px; gap: 14px; padding: 0; color: inherit; overflow: visible; }
.paper-date-numerals>i { color: #f0b5a3; font-size: .65em; }
.paper-date-meta { font-size: 15px; letter-spacing: 1px; gap: 4px; }
#date-ink { color: #ffcbbb; }
#date-ink path { stroke-width: 1; }
.paper-event-row { margin-top: 18px; }
.paper-event-venue { border-color: #fff4e457; }
#invite .invitation-reply {
  background: var(--cream); color: #9e1f2a; border: 1px solid var(--cream);
  border-radius: 0; box-shadow: none; min-height: 58px; font-family: var(--sans); font-size: 17px;
}
#invite .paper-rsvp { margin-top: 38px; }
#invite .invitation-reply:focus-visible { outline-color: var(--cream); }
#invite .invitation-reply:active { background: #ffe2cd; border-color: #ffe2cd; }
@media (hover:hover) { #invite .invitation-reply:hover { background: #ffe2cd; border-color: #ffe2cd; } }
.paper-reply-note { color: #f7d4c4; font-size: 13px; margin-top: 10px; }
.paper-event-address { color: #f7d4c4; }
.paper-info-links>button,.paper-info-links>a { color: var(--cream); }
.paper-info-links>button:focus-visible,.paper-info-links>a:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }

/* Let photographs interrupt the red; cream stock gives the album a quiet interval. */
.memory-scene { background: #4b1721; }
.memory-shade { background: linear-gradient(180deg,#4b172100 35%,#4b17210d 48%,#4b17219e 70%,#4b1721 91%); }
.memory-scene:before { background: var(--ceremony-red); clip-path: none; height: 1px; }
.memory-scene:after { background: var(--cream); clip-path: none; height: 1px; }
.memory-caption { left: 8%; bottom: 8%; text-shadow: 0 2px 10px #38121d40; }
#invite .memory-caption h2 { color: var(--cream); font-size: clamp(32px,8.8cqw,45px); line-height: 1.45; letter-spacing: 1px; }
.album-paper-insert { background: var(--cream); color: var(--ink); padding-top: 34px; padding-bottom: 25px; }
.album-handnote { color: #9e2932; transform: none; font: 17px/1.8 var(--serif); letter-spacing: 1px; }
.album-paper-insert .home-album-prints img { background: #fffcf5; box-shadow: 0 5px 14px #5e252124; }
.home-album-caption { border-bottom: 1px solid var(--line); }
.home-album-caption small { color: var(--muted); }

/* A cream envelope against red: the same object opens, folds, and receives a stamp. */
#invite .home-reply { background: var(--ceremony-red); color: var(--cream); padding-top: 48px; padding-bottom: 24px; }
#invite .reply-heading .section-intro { color: #f7d4c4; letter-spacing: 2px; }
#invite .reply-heading h2 { font-size: clamp(29px,8cqw,40px); letter-spacing: 1.5px; }
.reply-heading>p:last-child { color: #f7d4c4; }
.reply-stationery { background: var(--cream); color: var(--ink); box-shadow: 3px 16px 25px #5b111f38,-1px 0 1px #fff9ed66; }
.reply-fold-shadow { border-top-color: #fffdf6; border-bottom-color: #dec3b2; background: linear-gradient(180deg,#c7877012,transparent 18%,transparent 79%,#d5aa8f26); }
.reply-stationery[data-reply-state=closed]:after { background: linear-gradient(156deg,transparent 49%,#ba866522 50%,#f7e8d2 51%); }
.reply-envelope-top,.reply-kept-top { color: #946253; }
.reply-envelope-address>span { color: #946253; }
.reply-envelope-address>strong { color: var(--ink); }
.reply-postage { background: var(--red); color: var(--cream); border-color: #ffefdb; outline-color: #c65752; }
.reply-pull { color: var(--ink); border-color: #dcbfb0; }
.reply-kept-top { border-color: var(--line); }
.reply-kept-count,.reply-kept-note { color: var(--muted); }
.reply-edit { border-color: #cf9c8e; }
.reply-ink-stamp { color: var(--red); border-color: var(--red); outline-color: var(--red); }
.inline-rsvp-mount .eyebrow { color: var(--muted); }
#invite .home-reply .reply-postscript { color: #f7d4c4; }
.home-signature { position: relative; background: var(--ceremony-red); color: var(--cream); padding-top: 24px; padding-bottom: 36px; }
.home-signature:before { content: ""; display: block; width: 40px; height: 1px; background: #fff4e466; margin-bottom: 10px; }
.home-signature>span { font-size: 23px; letter-spacing: 4px; }
.home-signature i { color: #efb6a2; }
.home-signature>a { color: #f7d4c4; }

/* Shared controls, details and secondary scenes use red ink on cream stock. */
.primary-button { background: var(--red); color: var(--cream); }
.primary-button:hover { background: var(--deep-red); }
.sheet-dialog,.album-dialog { border-radius: 0; box-shadow: 0 -12px 70px #37101b29; border-top: 4px solid var(--red); }
.attendance-options span,#album-favorite,.note-entry-button { border-color: #d5b5a8; }
.attendance-options input:checked+span { background: var(--red); border-color: var(--red); color: var(--cream); }
#guest-name,.stepper { border-color: #c79b8b; }
#guest-name::placeholder,.note-writing textarea::placeholder { color: var(--muted); }
.detail-date>span { color: #bf766c; }
.calendar-download,.reply-paper .text-button,.underlined,.voice-signature b,.voice-restart { border-color: #c89a89; }
.album-paper-behind { background: #e7c7b3; }
.album-viewer,.album-grid button,.album-thumbs button { background: #fffcf5; }
.album-viewer>img,.letter-photo.has-selected-photo { background: #f2e7db; }
.letter-photo:after { background: linear-gradient(transparent 50%,#4b172199); }
.letter-photo.has-selected-photo:after { background: linear-gradient(transparent 70%,#4b1721bf); }
.album-back { background: #f9ecd9; }
.album-thumbs { scrollbar-color: #c99d8d transparent; }
#album-favorite[aria-pressed=true] { background: var(--red); border-color: var(--red); color: var(--cream); }
.photo-dialog,.photo-dialog::backdrop { background: #211217; }
.photo-tools { background: #211217ed; }
.photo-dialog [aria-pressed=true] { color: #ffc5ac; }
.reply-paper,.personal-letter,.kept-paper,.seat-paper { background: var(--cream); border-color: var(--line); }
.reply-paper-top,.seat-paper { border-color: var(--line); }
.note-entry-button:hover { background: #f3ddca; }
.note-writing textarea { border-color: #c79b8b; background-image: repeating-linear-gradient(transparent 0,transparent 31px,#d5b7a670 31px,#d5b7a670 32px); }
.note-writing textarea:focus-visible { outline-color: var(--red); }
.kept-paper:after { background: linear-gradient(176deg,#f1dfc9 48%,#d9b6a0 49%,#fff0dc 51%); }
.voice-progress,.voice-progress::-webkit-progress-bar { background: #e4cabb; }
.ritual-preview-controls,.voice-preview input::file-selector-button { border-color: #d5b5a8; }
.envelope-back { background: #94222d; }
.envelope-flap { background: #b7222d; }
.envelope-front { background: #b7222d; color: var(--cream); }
.paper-fold { background: linear-gradient(145deg,transparent 49.6%,#861c2980 49.9%,#c3343b 50.5%); }
.post-stamp { background: var(--cream); color: var(--red); outline-color: var(--red); }
.pull-tab { background: var(--cream); color: var(--red); }
.envelope-address>span,.gesture-hint { color: var(--muted); }
.home-open-button { background: var(--red); color: var(--cream); border-color: var(--red); }
.home-open-button:hover { background: var(--deep-red); border-color: var(--deep-red); }
#arrival #arrival-title,.home-venue small { color: var(--ink); }
.home-venue,.home-seat-button { color: var(--ink); border-color: var(--line); }
.home-address-label,.home-time,.home-date { color: var(--ink); }
.preview-tools,.preview-tools .utility-bar,.preview-label { color: var(--muted); }
.preview-tools .replay { border-color: #c99c8c; }
.time-switch { background: #e9d5c7; }
.time-switch button { color: var(--muted); }
.time-switch [aria-pressed=true] { background: var(--cream); color: var(--red); }

@media (max-width:360px) {
  .hero-edition { min-height: 54px; padding-left: 6%; padding-right: 6%; gap: 8px; font-size: 14px; }
  .hero-edition-date { font-size: 10px; }
  .hero-edition-mark { font-size: 26px; }
  .hero-heading { top: calc(60px + env(safe-area-inset-top)); }
  .wedding-countdown { min-height: 24px; }
  .wedding-countdown>span { font-size: 11px; }
  .wedding-countdown>strong { font-size: 19px; }
  .paper-date { gap: 8px 20px; }
  .paper-date-meta { font-size: 14px; }
  .paper-event-row { gap: 4px 7px; }
  .paper-event-venue { padding-left: 7px; }
  .home-album-caption>span:first-child { gap: 8px; }
  #invite .reply-heading h2 { font-size: clamp(24px,7.6cqw,29px); letter-spacing: .5px; }
}
@media (prefers-reduced-motion:reduce) { .opening-happiness { animation: none; } }

/* Small discoveries share one material language: ink, photo paper and a folding stamp. */
.invitation-edition {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding-bottom: 13px; border-bottom: 1px solid #fff4e43d;
  margin-bottom: 18px; color: #f7d4c4; font: 11px/1.6 var(--sans); letter-spacing: 1.5px;
}
.invitation-edition>span:first-child { font: 16px/1.5 var(--serif); letter-spacing: 4px; color: var(--cream); }
.date-handnote {
  display: flex; align-items: center; justify-content: flex-end; gap: 6px;
  margin: 0 4% 17px 0; color: #f7d4c4; font: 13px/1.6 var(--serif);
  transform: rotate(-4deg); transform-origin: 100% 50%; letter-spacing: .5px;
}
.date-handnote svg { width: 29px; height: 20px; stroke: currentColor; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
#date-note-toggle { cursor: pointer; touch-action: manipulation; transition: transform .25s ease; }
#date-note-toggle:focus-visible { outline: 1px dashed var(--cream); outline-offset: 9px; border-radius: 50%; }
#date-note-toggle:active { transform: rotate(-2deg) scale(.97); }
.date-is-marked #date-ink path { animation: date-remark .65s ease-out both; }
.date-memo {
  position: relative; width: fit-content; max-width: 100%; min-width: 210px;
  margin: 24px auto 6px; padding: 17px 28px 16px 21px; background: var(--cream); color: var(--ink);
  text-align: left; transform: rotate(-3deg); box-shadow: 2px 5px 0 #68122026;
  font: 16px/1.8 var(--serif); animation: memo-arrive .4s cubic-bezier(.18,.8,.25,1) both;
}
.date-memo:after { content: ""; position: absolute; right: 0; bottom: 0; width: 13px; height: 13px; background: linear-gradient(135deg,#e5c7aa 49%,var(--ceremony-red) 51%); }
.memo-pin { position: absolute; top: 6px; right: 10px; width: 12px; height: 4px; border: 1px solid #ae655780; border-radius: 3px; transform: rotate(-12deg); }
.memo-signature { display: block; margin-top: 6px; text-align: right; font: 12px/1.5 var(--serif); color: var(--muted); }
#invite .paper-rsvp:before { content: ""; position: absolute; top: -18px; left: -8.15%; right: -8.15%; height: 0; border-top: 1px dashed #f7d4c478; pointer-events: none; }
#invite .paper-rsvp:after { content: ""; position: absolute; width: 6px; height: 6px; border: 1px solid #f7d4c478; border-radius: 50%; top: -21px; left: -4%; background: var(--ceremony-red); pointer-events: none; }

/* Move the complete print, including its caption; each exposed edge is a real button. */
.album-paper-insert { padding-top: 35px; padding-bottom: 22px; }
.album-handnote { text-align: left; font-size: 19px; letter-spacing: .4px; }
.album-pick-hint { margin: 7px 0 0; text-align: right; color: var(--muted); font: 12px/1.7 var(--serif); }
.album-pick-hint>span { display: inline-block; margin-left: 5px; font-size: 22px; vertical-align: -2px; }
.album-paper-insert .interactive-prints { height: 64cqw; max-height: 310px; margin: 24px auto 7px; isolation: isolate; }
.interactive-prints .keepsake-print {
  --print-turn: -10deg; --print-delay: 0ms;
  position: absolute; left: 0; top: 9%; width: 43%; height: 84%; min-height: 150px;
  display: grid; grid-template-rows: minmax(0,1fr) 30px;
  padding: 6px 6px 0; background: #fffcf5; color: var(--ink);
  box-shadow: 1px 5px 12px #5e252124; transform: rotate(var(--print-turn));
  transition: transform .35s cubic-bezier(.18,.75,.25,1),box-shadow .35s; touch-action: manipulation;
}
.interactive-prints .keepsake-print:nth-child(2) { left: 28.5%; top: 0; z-index: 2; --print-turn: 1deg; --print-delay: 100ms; }
.interactive-prints .keepsake-print:nth-child(3) { left: 57%; top: 11%; --print-turn: 10deg; --print-delay: 200ms; }
.interactive-prints .keepsake-print:nth-child(2):before { content: ""; position: absolute; top: -7px; left: 32%; width: 37%; height: 14px; background: #edd5b797; border-left: 1px dashed #ad8c6745; border-right: 1px dashed #ad8c6745; transform: rotate(-5deg); z-index: 1; pointer-events: none; }
.album-paper-insert .interactive-prints .keepsake-print img {
  position: static; display: block; width: 100%; height: 100%; min-height: 0;
  padding: 0; object-fit: cover; object-position: center 45%; background: #f8ecda;
  box-shadow: none; transform: none; opacity: 1; animation: none; transition: none;
}
.album-paper-insert .interactive-prints .keepsake-print:nth-child(2) img { object-position: center 48%; }
.print-caption { display: flex; align-items: center; justify-content: center; gap: 7px; font: 12px/1.3 var(--serif); letter-spacing: .4px; white-space: nowrap; }
.print-caption small { font: 8px/1.3 var(--sans); color: #9b7765; letter-spacing: 0; }
.interactive-prints.motion-pending .keepsake-print { opacity: 0; transform: translateY(25px) rotate(0); }
.interactive-prints.is-revealed .keepsake-print { animation: keepsake-entrance .75s var(--print-delay) cubic-bezier(.18,.75,.3,1) backwards; }
.interactive-prints .keepsake-print:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; z-index: 5; transform: translateY(-10px) rotate(0); opacity: 1; }
.interactive-prints .keepsake-print:active { transform: translateY(-5px) rotate(0) scale(1.025); z-index: 5; }
@media(hover:hover) { .interactive-prints .keepsake-print:hover { z-index: 5; transform: translateY(-10px) rotate(0) scale(1.025); box-shadow: 2px 14px 22px #5e252130; } }
.album-paper-insert .home-album-entry { margin-top: 0; }
.home-album-caption { font-size: 15px; }

/* The note occupies a reserved fold in the envelope, so its reply pull stays put. */
.reply-stationery { background-image: repeating-linear-gradient(0deg,#9f725a03 0,#9f725a03 1px,transparent 1px,transparent 3px); }
.reply-invite { display: grid; grid-template-rows: auto auto auto auto; padding: 22px 24px 0; }
.reply-envelope-top { border-bottom: 1px solid #c99a8033; padding-bottom: 10px; font-size: 10px; }
.reply-envelope-address { padding-top: 21px; padding-right: 55px; }
.reply-postage { top: 68px; right: 24px; width: 49px; height: 63px; min-height: 63px; padding: 0; z-index: 5; cursor: pointer; transform: rotate(5deg); transition: transform .5s cubic-bezier(.2,.75,.2,1); perspective: 400px; }
.reply-postage:focus-visible { outline: 2px solid var(--red); outline-offset: 5px; }
.postage-front,.postage-back { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: transform .5s,opacity .3s; backface-visibility: hidden; }
.postage-front b { font: 28px/1 var(--serif); }
.postage-front small { font: 9px/1.5 Georgia,serif; letter-spacing: .6px; margin-top: 4px; }
.postage-back { transform: rotateY(-180deg); opacity: 0; font: 14px/1.5 var(--serif); letter-spacing: 2px; }
.has-postage-note .reply-postage { transform: rotate(-8deg); }
.has-postage-note .postage-front { transform: rotateY(180deg); opacity: 0; }
.has-postage-note .postage-back { transform: rotateY(0); opacity: 1; }
.postage-note-slot { position: relative; z-index: 4; display: grid; align-items: center; min-height: 68px; padding: 9px 0; }
.postage-note-slot>* { grid-area: 1 / 1; }
.postage-whisper { text-align: right; color: var(--muted); font: 12px/1.6 var(--serif); }
.postage-whisper>span { display: inline-block; margin-left: 5px; font-size: 21px; }
.has-postage-note .postage-whisper { visibility: hidden; }
#postage-note { font: 15px/1.65 var(--serif); color: var(--red); animation: postage-note-in .4s ease both; transform-origin: 100% 0; }
.reply-pull { margin-top: 0; border-top-style: dashed; min-height: 55px; }
.reply-envelope-address>strong { font-size: clamp(18px,5cqw,24px); }
.reply-pull>span:last-child { font: 24px var(--serif); }
.home-signature:before { display: none; }
.signature-knot { width: 76px; height: 34px; margin-bottom: 2px; stroke: #f1c5ae; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }

@keyframes date-remark { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes memo-arrive { from { opacity: 0; transform: translateY(8px) rotate(-5deg); } to { opacity: 1; transform: translateY(0) rotate(-3deg); } }
@keyframes keepsake-entrance { from { opacity: 0; transform: translateY(25px) rotate(0); } to { opacity: 1; transform: translateY(0) rotate(var(--print-turn)); } }
@keyframes postage-note-in { from { opacity: 0; transform: translateY(-4px) rotate(2deg); } to { opacity: 1; transform: none; } }
@media(max-width:360px) {
  .hero-edition-mark { width: 30px; height: 30px; font-size: 23px; }
  .invitation-edition { letter-spacing: .6px; font-size: 10px; }
  .date-handnote { font-size: 12px; margin-right: 0; }
  .album-handnote { font-size: 17px; }
  .print-caption { font-size: 10px; gap: 4px; letter-spacing: 0; }
  .print-caption small { font-size: 7px; }
  .interactive-prints .keepsake-print { padding: 4px 4px 0; grid-template-rows: minmax(0,1fr) 27px; min-height: 142px; }
  .reply-invite { padding: 20px 20px 0; }
  .reply-postage { right: 20px; width: 46px; }
}
@media(prefers-reduced-motion:reduce) {
  .date-is-marked #date-ink path { animation: none; stroke-dashoffset: 0; }
  .date-memo,#postage-note { animation: none; }
  .interactive-prints .keepsake-print,.interactive-prints.motion-pending .keepsake-print,.interactive-prints.is-revealed .keepsake-print { opacity: 1; animation: none; transform: rotate(var(--print-turn)); transition: none; }
  .postage-front,.postage-back,.reply-postage { transition: none; }
}
