:root {
  color-scheme: light;
  --wine: #531d17;
  --ink: #231a15;
  --paper: #e7dfcf;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: #d6ccbb; overflow-x: clip; }
body { margin: 0; color: var(--ink); font-family: var(--serif); min-height: 100svh; caret-color: transparent; }
input, textarea { caret-color: var(--ink); }
button, input, textarea { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: wait; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--wine); outline-offset: 4px;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.backdrop { position: fixed; inset: 0; width: 100vw; height: 100lvh; object-fit: cover; z-index: -1; pointer-events: none; }
.sunlit-dust { position: fixed; inset: 0; width: 100vw; height: 100lvh; z-index: 0; pointer-events: none; }
.dappled-sunlight { position: fixed; inset: 0; width: 100vw; height: 100lvh; overflow: hidden; pointer-events: none; z-index: 0; }
.leaf-shadows { position: absolute; inset: -12%; width: 124%; height: 124%; object-fit: fill; opacity: .26; filter: blur(7px); transform-origin: 15% 5%; animation: leaf-sway 11s ease-in-out infinite alternate; }
.sun-wash { position: absolute; inset: -15%; background: radial-gradient(ellipse at 28% 18%, #fff1c966, transparent 47%), radial-gradient(ellipse at 80% 76%, #fff2ce45, transparent 38%); animation: sunlight-drift 17s ease-in-out infinite alternate; }
@keyframes leaf-sway {
  from { transform: translate3d(-1.5%, -1%, 0) rotate(-1.5deg); opacity: .22; }
  to { transform: translate3d(2%, 1%, 0) rotate(1.5deg); opacity: .34; }
}
@keyframes sunlight-drift {
  from { transform: translate3d(-2%, 0, 0); opacity: .55; }
  to { transform: translate3d(3%, 2%, 0); opacity: 1; }
}
.controls { position: fixed; inset: 18px auto auto 20px; width: calc(100vw - 40px); z-index: 5; pointer-events: none; display: flex; align-items: center; justify-content: space-between; }
.utility { pointer-events: auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #531d1725; min-height: 44px; padding: 9px 14px; background: #f0eadddf; color: var(--wine); border-radius: 999px; font: 500 .65rem/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.back { margin-right: auto; }
.back > span:first-child { font-size: 1.15rem; }
.utility.sound { margin-left: auto; width: 44px; height: 44px; padding: 0; gap: 0; border: 0; background: transparent; border-radius: 50%; opacity: .68; transition: opacity .2s ease; }
.sound:hover, .sound:focus-visible { opacity: 1; }
#sound-label { display: none; }
.sound svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sound .sound-waves { display: none; }
.sound.is-playing .sound-waves { display: initial; }
.sound.is-playing .sound-slash { display: none; }
.stage { position: relative; z-index: 1; display: grid; align-items: start; width: 100vw; min-height: 100svh; isolation: isolate; overflow: clip; }
.scene { grid-area: 1 / 1; width: 100%; min-height: 100svh; padding: 36px 22px 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 23px; }
.invitation-art { position: relative; width: min(380px, 76vw, calc((100svh - 126px) * .66625)); aspect-ratio: 533 / 800; touch-action: pan-y pinch-zoom; user-select: none; -webkit-user-select: none; }
.invitation-art > img, .stationery-face, .stationery-face > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.stationery-face { z-index: 1; pointer-events: none; transform: perspective(900px) rotateX(var(--card-x, 0deg)) rotateY(var(--card-y, 0deg)) translateY(var(--card-press, 0px)) scale(var(--card-scale, 1)); transition: transform 700ms cubic-bezier(.2, .8, .2, 1); }
.invitation-art img { pointer-events: none; -webkit-user-drag: none; }
.card-shadow { z-index: 0; opacity: var(--card-shadow-opacity, .86); transform: translate(calc(var(--card-shadow-offset, 8.5%) + var(--card-shadow-x, 0px)), calc(3px + var(--card-shadow-y, 0px))) perspective(900px) rotateX(var(--card-x, 0deg)) rotateY(var(--card-y, 0deg)) scale(var(--card-shadow-scale, 1.12)); transition: transform 700ms cubic-bezier(.2, .8, .2, 1), opacity 350ms ease-out; }
.invitation-art.is-following .stationery-face, .invitation-art.is-following .card-shadow { transition-duration: 160ms; }
.invitation-art.is-pressed { --card-press: 1.5px; --card-scale: .987; --card-shadow-offset: 6.3%; --card-shadow-scale: 1.09; --card-shadow-opacity: .96; }
.invitation-card { z-index: 1; }
.underline-action { position: relative; display: inline-flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 44px; padding: 8px 0; border: 0; border-radius: 0; background: transparent; color: var(--wine); text-decoration: none; font: 500 .8rem/1.3 var(--sans); letter-spacing: .23em; text-transform: uppercase; transition: color .2s; }
.underline-action::after { content: ''; position: absolute; left: 0; right: 0; top: calc(50% + 13px); border-bottom: 1px solid currentColor; pointer-events: none; }
.underline-action:hover { color: #8b4437; }
.action-arrow { flex: 0 0 auto; width: 29px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.underline-action:hover .action-arrow { transform: translateX(3px); }
.next { width: 104px; gap: 12px; }
.intro-pending .invitation-art, .intro-pending .next { opacity: 0; filter: blur(52px); }
.opening-pending .stage, .opening-pending .controls { visibility: hidden; }
.opening-gate { position: fixed; inset: 0; width: 100vw; height: 100svh; z-index: 4; display: grid; place-items: center; pointer-events: none; }
.opening-veil { position: absolute; inset: 0; background: #eee6d7; opacity: .3; transition: opacity .35s ease; }
.opening-button { position: relative; z-index: 1; pointer-events: auto; border: 0; border-radius: 0; background: transparent; padding: 22px 32px; color: var(--wine); font: 500 .875rem/1.4 var(--sans); letter-spacing: .34em; text-indent: .34em; transition: opacity .35s ease, filter .55s ease, transform .55s ease; }
.opening-button:hover { opacity: .7; }
.opening-running .opening-button { opacity: 0; filter: blur(7px); transform: scale(1.04); pointer-events: none; }
.opening-running .opening-veil { opacity: 0; }
.opening-running .invitation-art, .opening-running .invitation-scene .next { animation: invitation-reveal 2s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes invitation-reveal {
  0% { opacity: .15; filter: blur(52px); }
  100% { opacity: 1; filter: blur(0); }
}
.note-scene { gap: 19px; padding-top: 25px; }
.note-art { width: min(380px, 82vw, calc((100svh - 106px) * .60)); display: flex; align-items: center; flex-direction: column; }
.polaroid { position: relative; width: 94%; aspect-ratio: 1142 / 1378; transform: perspective(1100px) rotateX(var(--paper-x, 0deg)) rotateY(var(--paper-y, 0deg)) rotate(3deg); transition: transform 1s ease-out; animation: polaroid-breathe 11s ease-in-out infinite alternate; filter: drop-shadow(3px 6px 5px #30201420); }
@keyframes polaroid-breathe {
  from { translate: 0 0; rotate: -.7deg; }
  to { translate: 0 -5px; rotate: .7deg; }
}
.polaroid > img { display: block; width: 100%; height: auto; }
/* Only the photo develops; the supplied paper border keeps its original color. */
.polaroid > .polaroid-photo { position: absolute; inset: 0; height: 100%; clip-path: inset(5.08% 5.25% 21.26% 5.25%); pointer-events: none; }
.note-scene:not([hidden]) .polaroid-photo { animation: polaroid-develop 3s cubic-bezier(.4, 0, .2, 1) .1s both; }
@keyframes polaroid-develop {
  from { filter: brightness(2.1) saturate(0) contrast(.55); }
  to { filter: brightness(1) saturate(1) contrast(1); }
}
.handwritten-note-frame { position: relative; width: 100%; aspect-ratio: 1630 / 962; overflow: hidden; margin-top: -2px; transform: rotate(-5deg); }
.handwritten-note { position: absolute; width: 186.13497%; height: auto; max-width: none; left: -43.12883%; top: -72.76507%; }
.details-scene { padding: 78px 20px 38px; }
.details-content { width: min(440px, 100%); display: flex; align-items: center; flex-direction: column; gap: 24px; }
.form-card { width: 100%; background: var(--paper); border: 1px solid #531d1799; border-radius: 0; padding: 30px; color: var(--wine); font-family: var(--sans); font-weight: 500; text-transform: uppercase; }
.form-card h2 { margin: 0 0 10px; font-family: var(--serif); font-size: clamp(1.75rem, 6vw, 2.1rem); line-height: 1.1; font-weight: 500; letter-spacing: .015em; text-align: center; }
.form-card h2:focus { outline: none; }
.form-subheading { margin: 0 0 30px; font-size: .625rem; line-height: 1.6; letter-spacing: .21em; text-align: center; }
.field { margin-bottom: 24px; }
.field label, legend { display: block; margin-bottom: 8px; font-size: .6875rem; font-weight: 500; line-height: 1.6; letter-spacing: .15em; }
.field label span, legend span { font-size: inherit; }
.field input, .field textarea { display: block; width: 100%; min-height: 44px; border: 1px solid #988b7b; border-radius: 2px; background: #eee7da55; padding: 10px; color: var(--ink); font-family: var(--sans); font-size: 1rem; font-weight: 500; line-height: 1.35; text-transform: none; }
.field textarea { resize: vertical; min-height: 62px; }
.field input:focus, .field textarea:focus { background: #faf4e7; }
.excitement { border: 0; padding: 0; margin: 28px 0 24px; min-width: 0; }
.rating-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.rating { position: relative; display: grid; place-items: center; height: 50px; cursor: pointer; }
.rating input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.rating span { display: grid; place-items: center; width: 100%; height: 100%; background: transparent; border: 1px solid transparent; border-radius: 0; pointer-events: none; color: #49433a; font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; font-size: 2rem; letter-spacing: 0; line-height: 1; }
.rating input:checked + span { background: #531d1710; border-color: var(--wine); color: var(--wine); }
.rating input:focus-visible + span { outline: 3px solid var(--wine); outline-offset: 3px; }
.rating:hover span { background: #531d170a; }
.submit-button { display: flex; align-items: center; justify-content: center; gap: 24px; width: 100%; min-height: 52px; padding: 12px 18px; border-radius: 0; border: 0; background: var(--wine); color: #fff; font: 500 .75rem/1.5 var(--sans); letter-spacing: .23em; text-transform: uppercase; }
.submit-button:hover { background: #702c23; }
.submit-button .action-arrow { width: 24px; }
.submit-button:disabled { opacity: .65; }
.form-status:empty { display: none; }
.form-status, .preview-notice { font: 500 .625rem/1.7 var(--sans); letter-spacing: .075em; margin: 16px 0 0; }
.preview-notice { margin: 0 0 14px; color: #594b3e; text-align: center; }
.form-status.is-error { color: #7a1811; }
.calendar-links { display: grid; gap: 15px; justify-items: center; width: 100%; }
.calendar { width: fit-content; max-width: 100%; gap: 20px; font-size: .6875rem; letter-spacing: .17em; }
.calendar .action-arrow { width: 25px; }
.thank-you { text-align: center; padding: 8px 0 14px; }
.thank-you p { line-height: 1.8; font-size: .8rem; letter-spacing: .1em; }
.text-button { background: none; border: 0; padding: 12px 0; color: var(--wine); text-decoration: underline; text-underline-offset: 6px; min-height: 44px; font: 500 .6875rem/1.6 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.noscript-message { position: fixed; bottom: 0; width: 100%; background: var(--paper); padding: 18px; text-align: center; }
.motion-paused .leaf-shadows, .motion-paused .sun-wash, .motion-paused .stationery-face > img, .motion-paused .card-shadow, .motion-paused .polaroid { animation-play-state: paused; }
@media (max-width: 540px) {
  .controls { inset: max(12px, env(safe-area-inset-top)) auto auto 12px; width: calc(100vw - 24px); }
  .utility { padding: 9px 12px; }
  .invitation-scene { padding-top: 70px; }
  .invitation-art { width: min(82vw, 380px, calc((100svh - 170px) * .66625)); }
  .note-scene { padding-top: 72px; }
  .note-art { width: min(86vw, 375px, calc((100svh - 155px) * .60)); }
  .details-scene { padding: 66px 16px max(10px, env(safe-area-inset-bottom)); }
  .details-content { gap: 10px; }
  .form-card { padding: 18px 16px; }
  .form-card h2 { margin-bottom: 4px; font-size: clamp(1.375rem, 6vw, 1.75rem); }
  .form-subheading { margin-bottom: 16px; letter-spacing: .14em; }
  #guest-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 12px; }
  #guest-form > * { grid-column: 1 / -1; min-width: 0; }
  #guest-form > .field:nth-child(2) { grid-column: 1; }
  #guest-form > .field:nth-child(3) { grid-column: 2; }
  .field { margin-bottom: 12px; }
  .field label, legend { margin-bottom: 5px; line-height: 1.35; letter-spacing: .07em; }
  .field input, .field textarea { padding: 8px; }
  .field textarea { height: 46px; min-height: 46px; }
  .excitement { margin: 2px 0 12px; }
  .rating { height: 44px; }
  .rating-options { gap: 10px; }
  .rating span { font-size: 1.8rem; }
  .submit-button { min-height: 44px; padding: 10px 16px; }
  .calendar-links { gap: 0; }
  .calendar { gap: 14px; font-size: .625rem; letter-spacing: .13em; }
  .preview-notice { margin-bottom: 8px; }
}
@media (max-width: 540px) and (max-height: 680px) {
  .details-scene { padding-top: 62px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .details-content { gap: 8px; }
  .form-card { padding-block: 12px; }
  .form-subheading { margin-bottom: 10px; }
  .field { margin-bottom: 7px; }
  .excitement { margin: 0 0 8px; }
  .calendar-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .calendar { width: 100%; gap: 6px; letter-spacing: .07em; }
  .calendar .action-arrow { width: 20px; }
  .calendar::after { top: auto; bottom: 3px; }
}
@media (max-height: 570px) and (orientation: landscape) {
  .invitation-scene { min-height: 570px; }
  .invitation-art { width: 285px; }
  .note-scene { min-height: 620px; }
  .note-art { width: 315px; }
}
@media (prefers-reduced-motion: reduce) {
  .sunlit-dust, .dappled-sunlight { display: none; }
  .stationery-face { transform: none; }
  .polaroid { transform: rotate(3deg); }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .intro-pending .invitation-art, .intro-pending .next { opacity: 1; filter: none; }
}
