/* Inline masks also render when index.html is opened directly from disk. */
:root {
  --edge-scoop-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201200%2040%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M0%203C78%208%20142%2016%20237%2022S455%2035%20605%2031%20822%2023%20925%2018%201115%206%201200%202v38H0Z%22%2F%3E%3C%2Fsvg%3E");
  --edge-wave-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201200%2040%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M0%2029C144%2027%20223%204%20397%205s248%2016%20403%2018%20250-4%20400-16v33H0Z%22%2F%3E%3C%2Fsvg%3E");
}

:root {
  --garden-wash: radial-gradient(ellipse at 2% 20%, #eed6cd 0%, transparent 52%), radial-gradient(ellipse at 98% 66%, #e1e8ce 0%, transparent 59%), var(--paper);
  --schedule-paper: #edf0e3;
  --wishes-paper: #f3e3df;
}

.music-control { margin-bottom: 1.25rem; }
.music-caption { margin-top: .35rem; color: var(--green); font-size: 1.05rem; }
.music-control .music, .rotation-control {
  display: grid;
  place-items: center;
  min-height: 2.85rem;
  width: 2.85rem;
  margin-inline: auto;
  padding: 0;
  border: 1px solid #879174;
  border-radius: 50%;
  color: #43523d;
  background: #e8ebd9;
}
.music-control .music svg, .rotation-control svg { display: block; width: 1.15rem; height: 1.15rem; }
.play-icon { fill: currentColor; }
.pause-icon { display: none; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
[aria-pressed="true"] .pause-icon { display: initial; }
[aria-pressed="true"] .play-icon { display: none; }
.music-message { margin-top: .25rem; color: var(--rose); font-size: 1rem; }

.welcome { isolation: isolate; overflow: clip; padding-top: clamp(4.3rem, 11vw, 8rem); background: var(--garden-wash); }
.welcome::before { content: ""; position: absolute; inset: 0 0 auto; height: clamp(3.2rem, 13vw, 7rem); z-index: -1; background: url(assets/fairy-lights.svg) center top / 100% auto no-repeat; filter: drop-shadow(0 1px 3px #be873d75); }
.bunny { width: clamp(6.6rem, 32vw, 9.2rem); height: auto; margin: 0 auto .65rem; }
.month-calendar { border-collapse: separate; border-spacing: 0 .23rem; table-layout: fixed; width: min(100%, 20rem); margin: 1.7rem auto 0; color: var(--green); font-variant-numeric: lining-nums tabular-nums; }
.month-calendar caption { font-size: 1.42rem; color: var(--rose); margin-bottom: .5rem; }
.month-calendar th { font-size: .99rem; font-weight: 700; }
.month-calendar td { font-size: 1.17rem; height: 2rem; }
.month-calendar time {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  color: #322821;
  font-weight: 700;
  position: relative;
  z-index: 0;
}

.moments { padding-top: 2rem; isolation: isolate; overflow: clip; background: radial-gradient(ellipse at 100% 22%, #ebc7c4 0%, transparent 64%), radial-gradient(ellipse at 0% 85%, #cedbb9 0%, transparent 68%), #f8eddf; }
.photo-collage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(.55rem, 2vw, 1.2rem);
  max-width: 41rem;
  padding: .32rem;
  margin: 1.4rem auto 0;
}
.photo-column { display: grid; gap: clamp(.55rem, 2vw, 1.2rem); }
.photo-column:nth-child(2) { padding-top: 1.55rem; }
.photo-column img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%;  }
.photo-column:first-child img:first-child, .photo-column:nth-child(2) img:last-child { aspect-ratio: 4 / 5.65; }

.countdown { isolation: isolate; overflow: clip; }
.count-grid > div + div { border-left: 0; }
.countdown::before {
  content: "";
  position: absolute;
  inset: -.5rem 0 0;
  z-index: -1;
  background: url(assets/fairy-lights.svg) center top / min(110%, 55rem) auto no-repeat;
  opacity: .8;
}
.scallop { isolation: isolate; }
.scallop::before {
  content: "";
  position: absolute;
  inset: -2.2rem 0 auto;
  height: 2.3rem;
  z-index: -1;
  background: var(--section-paper);
  mask: var(--edge) center bottom / 100% 100% no-repeat;
}
.schedule { --section-paper: var(--schedule-paper); --edge: var(--edge-scoop-mask); background: var(--section-paper); }
.dress { --section-paper: var(--cream); --edge: var(--edge-wave-mask); background: var(--section-paper); }
.wishes { --section-paper: var(--wishes-paper); --edge: var(--edge-scoop-mask); background: var(--section-paper); }
.venue { padding-bottom: 5.6rem; }
.schedule { padding-bottom: 4rem; }
.dress { padding-bottom: 5.6rem; }

.welcome::after, .moments::after, .dress::after, .contacts::after, .goodbye::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: -1;
  background-repeat: no-repeat;
}
.welcome::after { background-image: url(assets/foliage.webp), url(assets/flowers.webp); background-size: min(32vw, 10rem), min(27vw, 10rem); background-position: left -.9rem top 2.8rem, right -1.65rem bottom 0; opacity: .43; }
.moments::after { background-image: url(assets/foliage.webp); background-size: min(46vw, 15rem); background-position: left -2.5rem bottom -.4rem; opacity: .47; }
.dress::after { background-image: url(assets/flowers.webp), url(assets/fairy-lights.svg); background-size: min(29vw, 10rem), min(65vw, 31rem); background-position: right -1.35rem top 1.25rem, left top 5rem; opacity: .48; }
.contacts, .goodbye { isolation: isolate; }
.contacts::after { background-image: url(assets/foliage.webp); background-size: min(29vw, 11rem); background-position: left -.5rem bottom .25rem; opacity: .39; }
.goodbye::after { background-image: url(assets/flowers.webp), url(assets/fairy-lights.svg); background-size: min(32vw, 14rem), min(75%, 35rem); background-position: right -.25rem bottom 0, left bottom .15rem; opacity: .54; }
.rotation-control { margin: .85rem auto 0; background: #f1eee4; }
.gallery .slide-window > img { transition: opacity .65s ease-in-out, visibility .65s; }
.wish-art { width: clamp(7rem, 36vw, 10rem); height: auto; margin: 0 auto .65rem; }
.event-icon { width: clamp(3.55rem, 14vw, 4.65rem); height: clamp(3.55rem, 14vw, 4.65rem); padding: .38rem; border-radius: 50%; background: radial-gradient(ellipse, #dce5ca 0, #e1e9d59c 45%, transparent 72%); }
.timeline li time { margin-block: .1rem; }
.hero-date time { color: var(--rose); }
.goodbye .goodbye-date { color: var(--rose); font-size: clamp(1.13rem, 4.8vw, 1.6rem); font-variant-numeric: lining-nums; }

.reveal-pending { opacity: 0; transform: translateY(.48rem); transition: opacity .65s ease, transform .65s ease; transition-delay: var(--reveal-delay, 0ms); }
.reveal-pending.is-visible, .reveal-pending:focus-within { opacity: 1; transform: none; }
.section h2.reveal-pending { transition-duration: .76s; transition-timing-function: cubic-bezier(.22,.61,.36,1); }
.month-calendar.reveal-pending { transform: none; transition-duration: .9s; }
.swatches .reveal-pending { transform: translateX(-1.15rem); transition-duration: 1.25s; }
.swatches .reveal-pending.is-visible { transform: none; }

dialog[open] { animation: none; }
#close-rsvp:focus:not(:focus-visible) { outline: none; }
#guest-form input[type="text"], #guest-form textarea {
  display: block;
  font: normal 17px/1.45 system-ui, sans-serif;
  caret-color: var(--green-deep);
  border-radius: .2rem;
  padding: .55rem .65rem;
  min-height: 2.75rem;
  scroll-margin-block: 4rem;
}
#guest-form input[type="text"]:focus, #guest-form textarea:focus { outline: 2px solid #788a6a; outline-offset: 1px; }
@media (max-width: 540px) {
  #rsvp-dialog[open] {
    position: fixed;
    inset: var(--keyboard-top, 0px) 0 auto;
    margin: 0;
    width: 100%;
    max-width: 100%;
    max-height: none;
    height: var(--keyboard-height, 100dvh);
    border: 0;
    overflow-y: auto;
  }
  .dialog-inner { padding-top: max(3.1rem, calc(env(safe-area-inset-top) + 2.85rem)); padding-bottom: max(1.4rem, env(safe-area-inset-bottom)); }
}
@media (max-width: 410px) {
  .count-grid { margin-inline: -.15rem; }
  .count-grid span { font-size: .79rem; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal-pending, .swatches .reveal-pending { opacity: 1; transform: none; }
}
.month-calendar time::before { content: ""; position: absolute; inset: -.11rem; z-index: -1; opacity: .53; background: url(assets/heart.svg) center / contain no-repeat; }
.hero { min-height:100svh; display:grid; align-items:center; }
.hero h1 { font-family:var(--serif); font-size:clamp(3.2rem,13vw,6.6rem); font-weight:400; line-height:.98; text-transform:uppercase; white-space:pre-line; letter-spacing:.035em; }
#soundtrack { text-align:center; background:var(--paper); padding:1.35rem 1rem .85rem; }
#soundtrack .music-control { margin:0; }
.welcome::after,.dress::after { content:none; }
.moments { --edge:var(--edge-wave-mask); --section-paper:#f8eddf; background-color:var(--section-paper); }
.moments::before { background:linear-gradient(90deg,#f8eddf,#efd2cc); }
.contacts { --edge:var(--edge-scoop-mask); --section-paper:var(--paper); }
.schedule { background:radial-gradient(ellipse at 2% 20%,#eed6cd,transparent 52%),radial-gradient(ellipse at 98% 66%,#e1e8ce,transparent 59%),var(--paper); }
.schedule::before { background:linear-gradient(90deg,#efdad2,var(--paper)); }
.event-icon { background:none; color:#67745d; transform:rotate(-4deg); }
.timeline li:nth-child(even) .event-icon { transform:rotate(3deg); }
.month-calendar.reveal-pending { transition:opacity 1.4s ease-in-out; }
.moments::after,.contacts::after,.goodbye::after { background-image:url(assets/blossom.svg); background-size:clamp(2rem,8vw,3rem); background-position:4% 92%; opacity:.72; }
.contacts::after { background-position:94% 80%; }

.hero { background: var(--paper); }
.hero h1 {
  font-family: var(--script);
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.08;
}


/* The cream silhouette and lights use the same coordinate system. */
.welcome::before {
  background-image: url(assets/fairy-lights.svg), url(assets/intro-edge.svg);
  filter: none;
}
.moments { --section-paper: var(--paper); overflow: visible; background: var(--section-paper); }
.moments::before {
  inset: auto 0 calc(100% - 1px);
  height: clamp(1.3rem, 6vw, 2.4rem);
  background: var(--section-paper);
  mask: none;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.date-stamp { width: auto; margin-inline: -1.35rem; background: var(--green-deep); border-color: var(--green-deep); }
.date-stamp .eyebrow, .date-stamp time { color: var(--cream); }

.welcome::after, .moments::after, .dress::after, .wishes::after,
.contacts::after, .goodbye::after { content: none; }

.schedule { background: transparent; }
.schedule::before {
  inset: -2.2rem 0 0;
  height: auto;
  background: var(--garden-wash);
  mask: var(--edge) top / 100% 2.3rem no-repeat,
    linear-gradient(#000 0 0) bottom / 100% calc(100% - 2.2rem) no-repeat;
}
.venue-card { border: 0; background: var(--cream); }

.hero-date time, .date-stamp time, .month-calendar caption,
.month-calendar td, .month-calendar time, .count-grid b,
.venue-time, .timeline li time, .goodbye .goodbye-date {
  font-family: var(--serif);
  font-weight: 500;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: normal;
}
.scallop::after {
  content: "";
  position: absolute;
  inset: -2.2rem 0 auto;
  height: 2.3rem;
  pointer-events: none;
  opacity: 1;
  background: url(assets/lights-scoop.svg) center / 100% 100% no-repeat;
}
.dress::after { background-image: url(assets/lights-wave.svg); }
.moments::after {
  inset: auto 0 calc(100% - 1px);
  height: clamp(1.3rem, 6vw, 2.4rem);
  background-image: url(assets/lights-arc.svg);
}

@media (min-width: 700px) {
  .hero { min-height: min(81svh, 52rem); }
  .hero-card {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    grid-template-rows: 1fr auto auto 1fr;
    column-gap: clamp(1rem, 3vw, 3.5rem);
    width: min(100%, 74rem);
    max-width: none;
    padding: 2rem clamp(1rem, 3vw, 3rem);
    justify-items: center;
  }
  .hero-card > .eyebrow { grid-area: 1 / 1; align-self: end; }
  .hero h1 { grid-area: 2 / 1; font-size: clamp(3.2rem, 6.6vw, 6.2rem); white-space: nowrap; }
  .hero-date { grid-area: 3 / 1; }
  .scroll-link { grid-area: 4 / 1; align-self: start; margin-top: 2.2rem; }
  .hero-art { grid-area: 1 / 2 / 5; width: 100%; margin: 0; }
  #soundtrack { padding-block: 0 1.5rem; }
  .welcome { padding-top: clamp(7rem, 12vw, 13rem); }
  .welcome::before { height: 14vw; }
  .welcome .prose { max-width: 37rem; }
  .date-stamp { margin-top: 2.5rem; }
  .photo-collage { max-width: 74rem; gap: 1rem; }
  .photo-column { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 1rem; }
  .photo-column:nth-child(2) { padding-top: 0; }
  .photo-column img:nth-child(even) { margin-top: 1.6rem; }
  .venue-card { width: min(100%, 69rem); align-items: center; padding: 0; background: var(--cream); gap: 2rem; }
  .dress-galleries { max-width: 58rem; margin-inline: auto; }
}

@media (max-width: 699px) {
  .hero-card { justify-content: flex-start; padding-top: clamp(1.7rem, 3.8svh, 2.6rem); }
}

.hero-art { width: min(100%, 41rem); height: min(73svh, 44rem); aspect-ratio: 3 / 4; object-fit: contain; mix-blend-mode: normal; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201086%201448%22%3E%3Cdefs%3E%3Cfilter%20id%3D%22soft%22%3E%3CfeGaussianBlur%20stdDeviation%3D%223%22%2F%3E%3C%2Ffilter%3E%3C%2Fdefs%3E%3Cpath%20fill%3D%22white%22%20filter%3D%22url%28%23soft%29%22%20d%3D%22M-20%20-20H1106V1405C1030%201405%20990%201409%20950%201419S888%201421%20850%201430%20790%201434%20760%201432%20715%201440%20684%201436%20641%201437%20611%201441%20565%201436%20537%201440%20492%201440%20461%201433%20419%201436%20385%201428%20342%201430%20314%201425%20269%201429%20235%201418%20151%201411-20%201405Z%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }
.goodbye img { width: min(88%, 23rem); aspect-ratio: 4 / 5; object-position: center 62%; border-radius: 48% 48% 0 0 / 22% 22% 0 0; }
#photo-collage img { object-position: center 63%; }
.photo-column:nth-child(2) img:last-child { object-position: 30% 75%; }

.hero-art { transform: translate(1%, 2%) scale(1.035); }
#photo-collage .photo-column:first-child img:first-child { object-position: 28% center; }
@media (min-width: 700px) {
  .hero-art { transform: translate(4%, 4%) scale(1.075); }
}
