/* Mélisse. Illustrated Riviera stationery in olive ink, rose and warm ivory. */
@font-face { font-family: Vibes; src: url("./fonts/great-vibes-regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: Cormorant; src: url("./fonts/cormorant-garamond-latin.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: Cormorant; src: url("./fonts/cormorant-garamond-latin-italic.woff2") format("woff2"); font-style: italic; font-weight: 300 700; font-display: swap; }

:root {
  color-scheme: light;
  --ink: #384829;
  --quiet: #4d5740;
  --olive: #40512e;
  --rose: #84475e;
  --paper: #f6efe3;
  --ivory: #fff8ef;
  --rule: #9a936e;
  --pink-rule: #b77b8a7a;
  --serif: Cormorant, Georgia, serif;
  --script: Vibes, Georgia, serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  background: #e9ebe2;
  color: var(--ink);
  font: 500 18px/1.42 var(--serif);
  scroll-behavior: smooth;
}
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, ol { margin: 0; }
img { display: block; width: 100%; height: auto; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button, summary { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.skip { position: fixed; top: .6rem; left: .6rem; z-index: 5; background: var(--ivory); padding: .5rem .8rem; }
.skip:not(:focus), .sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.masthead, .invitation { width: min(100%, 440px); margin-inline: auto; }
.masthead {
  min-height: 53px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .6rem;
  padding: .28rem 1rem;
  background: var(--paper) url("./assets/papier.webp") center top / 440px;
}
.brand { font: 400 33px/1 var(--script); text-decoration: none; padding: .09em .19em; }
.masthead nav, .languages { display: flex; align-items: center; }
.masthead nav { gap: .75rem; }
.languages { border: 1px solid #b1a88d; border-radius: 100px; padding: 2px; }
.languages button { border: 0; min-width: 35px; min-height: 33px; background: none; border-radius: 100px; font-size: .68rem; font-weight: 700; letter-spacing: .08em; }
.languages [aria-pressed="true"] { background: var(--olive); color: var(--ivory); }
.nav-reply { display: grid; min-height: 43px; place-items: center; font-size: .82rem; text-decoration: none; font-weight: 700; }
.nav-reply:hover { text-decoration: underline; text-underline-offset: .2em; }
.invitation { container-type: inline-size; overflow: clip; text-align: center; background: var(--paper) url("./assets/papier.webp") center top / 440px; box-shadow: 0 16px 50px #40482f1b; }
.eyebrow { color: var(--quiet); font-size: .65rem; font-weight: 750; line-height: 1.44; letter-spacing: .14em; text-transform: uppercase; }
.script { font-family: var(--script); font-weight: 400; }
.cover { position: relative; isolation: isolate; aspect-ratio: 10 / 17; overflow: clip; background: var(--paper); }
.cover-art { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.cover-copy { position: absolute; top: 43%; left: 48.5%; translate: -50% -50%; width: 49%; }
.cover-copy .eyebrow { font-size: clamp(.5rem, 2.7cqw, .64rem); letter-spacing: .14em; }
.cover h1 { display: grid; justify-items: center; gap: .055em; margin-block: .23em .15em; font: 400 clamp(1.92rem, 11.9cqw, 3rem)/1.04 var(--script); }
.cover h1 span { padding-inline: .13em; white-space: nowrap; }
.cover h1 i, .closing-card i { color: var(--rose); font-size: .59em; line-height: .86; font-style: normal; }
.cover time { display: block; color: var(--quiet); font-size: clamp(.57rem, 2.95cqw, .76rem); font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.sea-light { position: absolute; inset: 78% 16% 12%; overflow: hidden; pointer-events: none; mask-image: radial-gradient(ellipse, #000 23%, transparent 74%); }
.sea-light::before, .sea-light::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background:
    linear-gradient(90deg, transparent, #fffceb, transparent) 13% 20% / 43% 1px no-repeat,
    linear-gradient(90deg, transparent, #f5fffd, transparent) 91% 38% / 52% 1px no-repeat,
    linear-gradient(90deg, transparent, #fdfbf2, transparent) 37% 57% / 59% 1px no-repeat,
    linear-gradient(90deg, transparent, #fff9e7, transparent) 75% 78% / 40% 1px no-repeat;
}
.cover-next { position: absolute; left: 50%; bottom: 3.3%; translate: -50% 0; display: grid; gap: .02rem; padding: .23rem .64rem; border-radius: 999px; background: #fff8edea; color: var(--ink); text-decoration: none; }
.cover-next span:last-child { font: 18px/1.1 Georgia, serif; }
.sound {
  position: fixed;
  right: max(12px, calc((100% - 440px) / 2 + 12px));
  bottom: max(12px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  z-index: 4;
  border: 1px solid #cfadad;
  border-radius: 50%;
  background: var(--ivory);
  color: var(--olive);
  box-shadow: 0 3px 12px #47452e1f;
  font: 18px/1 Georgia, serif;
}
.sound[aria-pressed="true"] { color: var(--ivory); background: var(--olive); }

.chapter { position: relative; padding: 2.55rem clamp(1.15rem, 7cqw, 1.65rem); scroll-margin-top: .6rem; }
h2 { padding: .12em .1em .22em; font: 400 clamp(2.06rem, 11cqw, 2.75rem)/1.12 var(--script); scroll-margin-top: .85rem; text-wrap: balance; }
h3 { padding: .1em .08em .15em; font: 400 clamp(1.58rem, 8.5cqw, 2.02rem)/1.15 var(--script); text-wrap: balance; }
.picture-card { position: relative; isolation: isolate; }
.frame-art { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.countdown { padding-block: 2.25rem 2.45rem; }
.countdown-card { width: min(100%, 340px); min-height: 207px; display: flex; flex-direction: column; justify-content: center; padding: 2.25rem 13%; margin-inline: auto; }
.countdown h2 { font-size: clamp(1.52rem, 8.65cqw, 2.18rem); }
.clock { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: .4rem; }
.clock div { display: grid; gap: .21rem; padding-inline: .1rem; }
.clock div + div { border-left: 1px solid #969b7562; }
.clock b { font: italic 500 clamp(1.4rem, 8.1cqw, 1.92rem)/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.clock small { font-size: .52rem; font-weight: 700; text-transform: uppercase; letter-spacing: .105em; }
.welcome { position: relative; }
.garland { width: 100%; max-height: 220px; object-fit: fill; }
.welcome-bird { position: absolute; top: calc(46cqw - 1.1rem); left: 8%; width: 16%; pointer-events: none; }
.welcome-copy { max-width: 32ch; margin-inline: auto; padding: .65rem 1.3rem 2rem; }
.welcome-families { margin: .28rem auto 1.18rem; color: var(--quiet); font-style: italic; }
.welcome-names { margin: 0 auto 1.13rem; font-size: clamp(1.5rem, 8cqw, 1.96rem); line-height: 1.19; }
.welcome-names i { display: block; color: var(--rose); font-style: normal; font-size: .78em; margin-block: .24em; }
.welcome-date { margin-top: .75rem; color: var(--rose); }

.flower-bed { position: relative; z-index: 1; width: 100%; max-height: 172px; object-fit: fill; margin-bottom: -1rem; }
.venue-paper {
  position: relative;
  padding: 2.35rem 6.8% .9rem;
  background: repeating-linear-gradient(90deg, #81925534 0 11%, #81925512 11% 11.8%, transparent 11.8% 20%);
}
.venue-card { display: grid; justify-items: center; align-content: center; min-height: clamp(351px, 96cqw, 418px); padding: 4.1rem 14% 4.65rem; }
.venue-card h2 { font-size: clamp(1.69rem, 9.85cqw, 2.45rem); }
.venue-kicker { margin: .3rem 0 .42rem; font-size: clamp(.52rem, 2.7cqw, .65rem); }
.venue-card h3 { margin-top: .12rem; font-size: clamp(1.38rem, 7.8cqw, 1.9rem); }
.venue-card .eyebrow:last-of-type { margin-top: .19rem; }
.venue-date { display: grid; gap: .16rem; margin-top: .68rem; font-size: .96rem; font-style: italic; text-wrap: balance; }
.villa { position: relative; width: min(84%, 300px); margin: -2.92rem auto 0; }
.event-links { display: flex; align-items: flex-start; justify-content: center; flex-wrap: wrap; gap: .35rem 1rem; margin: .75rem 1rem 0; }
.text-link { display: inline-grid; place-items: center; width: fit-content; min-height: 40px; padding: .18rem .15rem; border: 0; background: none; color: var(--ink); font-size: .68rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; text-underline-offset: .24em; text-decoration: underline; text-decoration-color: var(--rule); }
.text-link:hover { text-decoration-color: currentColor; }
.calendar summary, .story-note summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
.calendar div { display: flex; justify-content: center; gap: .65rem; padding-block: .15rem .4rem; font-size: .87rem; }

.attire { padding-top: 2.8rem; }
.attire-note { position: relative; border: 1px solid #89956f; border-radius: 19% 20% 18% 17% / 19% 19% 17% 19%; background: #fff9eee0; padding: 2rem 1.18rem 2.6rem; }
.attire-flower { position: absolute; width: 30%; top: -1.55rem; left: -.95rem; pointer-events: none; rotate: -14deg; }
.attire-guests { position: relative; width: min(88%, 300px); margin: -1.65rem auto 0; }
.attire-note p { max-width: 27ch; margin: .36rem auto 0; }
.attire-note .attire-ivory { margin-top: .58rem; color: var(--rose); font-style: italic; }
.butterflies { width: 74px; }
.attire-butterflies { position: absolute; right: 9%; bottom: -.4rem; rotate: 9deg; }
.programme { padding-top: 1.8rem; }
.programme-card { display: grid; place-items: center; min-height: clamp(368px, 104cqw, 433px); padding: 3.5rem 0 3.4rem; margin: .65rem auto 0; width: min(100%, 332px); }
.timeline { position: relative; inset-inline-end: 2%; list-style: none; padding: 0; width: min(54%, 168px); }
.timeline li { display: grid; gap: .19rem; }
.timeline li + li { margin-top: .85rem; }
.timeline time { color: var(--rose); font-size: .75rem; font-variant-numeric: lining-nums; font-weight: 750; letter-spacing: .085em; }
.timeline li span { font-size: .93rem; font-weight: 650; text-wrap: balance; }
.timeline li:last-child { position: relative; inset-inline-end: 6%; width: 86%; margin-inline: auto; }

.story { padding-top: 1.2rem; }
.story-butterflies { margin: 0 auto .29rem; }
.pill { display: inline-grid; place-items: center; min-height: 43px; padding: .45rem .95rem; border: 0; border-radius: 100px; color: var(--ivory); background: var(--olive); font-size: .87rem; font-weight: 700; }
.pill:hover { background: #526440; }
.story-note { margin-block: .39rem 1.14rem; }
.story-close, .story-note[open] .story-open { display: none; }
.story-note[open] .story-close { display: block; }
.story-letter {
  position: relative;
  isolation: isolate;
  margin: .85rem auto 0;
  padding: 2.7rem 1rem .85rem;
  max-width: 344px;
  border: 1px solid var(--pink-rule);
  border-radius: .16rem;
  background: var(--ivory) url("./assets/papier.webp") center / 350px;
  text-align: start;
  box-shadow: 0 6px 15px #554d3515;
}
.story-letter::before {
  content: "";
  position: absolute;
  right: .62rem;
  top: .48rem;
  width: 26px;
  height: 36px;
  rotate: 8deg;
  background: url("./assets/camee-oranges.webp") center / contain no-repeat;
}
.story-letter::after {
  content: "";
  position: absolute;
  right: 1.85rem;
  top: 1.2rem;
  width: 34px;
  height: 11px;
  rotate: -10deg;
  opacity: .65;
  background: repeating-linear-gradient(0deg, transparent 0 3px, var(--pink-rule) 3px 4px);
}
.story-letter p { margin: 0 auto .62rem; max-width: 33ch; }
.story-letter .story-signature { margin-bottom: 0; color: var(--rose); font-size: 1.53rem; line-height: 1.2; }
.story-gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 82%; gap: .7rem; margin-inline: calc(-1 * clamp(1.15rem, 7cqw, 1.65rem)); padding: .45rem clamp(1.15rem, 7cqw, 1.65rem) .72rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: clamp(1.15rem, 7cqw, 1.65rem); scrollbar-width: thin; scrollbar-color: var(--rule) transparent; }
.postcard-photo { min-width: 0; margin: 0; padding: .4rem .4rem .18rem; background: var(--ivory); border: 1px solid var(--pink-rule); box-shadow: 0 3px 8px #55543a15; scroll-snap-align: start; }
.postcard-photo img { aspect-ratio: 4 / 5; object-fit: cover; border-radius: .09rem; }
.postcard-photo figcaption { padding: .49rem .23rem .3rem; color: var(--quiet); font-size: .89rem; font-style: italic; text-wrap: balance; }
.gallery-controls { display: flex; justify-content: center; gap: .45rem; margin-top: .48rem; }
.gallery-controls button { width: 44px; height: 44px; border: 1px solid var(--rule); border-radius: 50%; background: var(--ivory); font: 17px/1 Georgia, serif; }
.gallery-controls button:disabled { opacity: .55; cursor: default; }
.medallion { width: min(38%, 142px); margin: 0 auto .8rem; }
.eve, .travel { padding-top: 1.2rem; }
.stationery { position: relative; border: 1px solid var(--pink-rule); background: #fff8ea70; }
.eve-card { margin-top: 1.2rem; padding: 2.05rem 1.1rem 1rem; }
.corner-flower { position: absolute; right: -.78rem; top: -1.18rem; width: 31%; pointer-events: none; }
.eve-card > :is(h3, p) { position: relative; }
.eve-date { display: grid; gap: .14rem; margin: .72rem 0; font-style: italic; }
.travel-card { margin-top: .9rem; padding: 1.65rem 16% 2.6rem; }
.palms, .travel-car { position: absolute; pointer-events: none; }
.palms { width: 28%; top: -.94rem; left: -1.03rem; }
.travel-car { width: 35%; right: -1rem; bottom: -1.55rem; }
.travel-card > :is(h3, p, .tiny-rule) { position: relative; }
.tiny-rule { width: 34px; height: 1px; margin: .78rem auto; background: var(--pink-rule); }
.stay { padding-top: 1.8rem; }
.stay-card { padding: 1.34rem 1rem 1.35rem; }
.stay-card h3 { margin: .37rem auto .16rem; }
.stay-card p:not(.eyebrow) { max-width: 27ch; margin-inline: auto; }
.hotel { margin: .9rem auto .35rem; width: min(63%, 210px); }

.rsvp { padding-top: 1.8rem; }
.reply-card { margin-top: 1.1rem; padding: 2.05rem .92rem 1.24rem; }
.reply-card > .corner-flower { width: 30%; }
.reply-card .corner-bottom { inset: auto auto -1.2rem -.8rem; rotate: 180deg; }
.rsvp form { position: relative; display: grid; gap: .85rem; text-align: left; }
.field { display: grid; gap: .26rem; }
.field > span, legend, .field-label { font-size: .91rem; font-weight: 700; }
.field input, .field textarea { width: 100%; min-height: 43px; padding: .42rem .55rem; background: #fff9efa6; border: 1px solid #a77e818a; border-radius: .2rem; }
.field textarea { resize: vertical; }
fieldset { min-inline-size: 0; margin: 0; padding: 0; border: 0; }
legend { padding: 0; }
.choices { display: grid; gap: .1rem; margin-top: .23rem; }
.choices label { display: flex; align-items: center; min-height: 32px; gap: .41rem; font-size: .9rem; }
.choices input { margin: 0; accent-color: var(--rose); }
.attending { display: grid; gap: .72rem; }
.stepper { display: flex; align-items: center; gap: .53rem; margin-top: .28rem; }
.stepper button { min-width: 44px; min-height: 44px; padding: 0; border: 1px solid #a77e818a; border-radius: .22rem; background: #fff9efa8; }
.stepper button:disabled { opacity: .58; cursor: default; }
.stepper output { min-width: 1.5rem; text-align: center; font-weight: 700; font-variant-numeric: lining-nums tabular-nums; }
.submit { min-height: 45px; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .43rem .66rem; border: 0; border-radius: .29rem; background: var(--rose); color: var(--ivory); font-size: .89rem; font-weight: 700; }
.submit:hover { background: #753e53; }
.confirmation { position: relative; padding: .7rem .55rem; }
.confirmation .script { font-size: 2.1rem; }
.endnote { padding-block: 1.3rem 1.9rem; }
.closing-card { display: grid; place-items: center; width: min(100%, 312px); aspect-ratio: 1; margin-inline: auto; padding: 12%; text-decoration: none; }
.closing-card .script { margin-bottom: .34rem; font-size: clamp(2.1rem, 10.3cqw, 2.65rem); line-height: .98; }
.closing-arrow { display: grid; place-items: center; width: 32px; height: 32px; margin: .3rem auto 0; }
.endnote small { display: block; margin-top: 1.1rem; color: var(--quiet); font-size: .64rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }

@media (min-width: 480px) {
  .masthead { margin-top: 16px; }
  .invitation { margin-bottom: 20px; }
}
@media (max-width: 352px) {
  .countdown-card { min-height: 179px; }
  .clock small { font-size: .48rem; letter-spacing: .075em; }
}
@media (prefers-reduced-motion: reduce) { :root { scroll-behavior: auto; } }
@media (prefers-reduced-motion: no-preference) {
  @keyframes arrive { from { opacity: .28; translate: 0 9px; } to { opacity: 1; translate: 0 0; } }
  @keyframes leaf-drift { from { opacity: .28; translate: -14px 8px; scale: .92; } to { opacity: 1; translate: 0 0; scale: 1; } }
  @keyframes sea-glint {
    0% { opacity: 0; transform: translateX(-14%) scaleX(.84); }
    33% { opacity: .72; }
    57% { opacity: .3; }
    80% { opacity: .51; }
    100% { opacity: 0; transform: translateX(14%) scaleX(1.04); }
  }
  @keyframes unfold { from { opacity: .25; translate: 0 -6px; scale: .98 .94; } to { opacity: 1; translate: 0 0; scale: 1; } }
  .cover-copy .eyebrow { animation: arrive .5s var(--ease) both; }
  .cover h1 span { animation: arrive .72s .12s var(--ease) both; }
  .cover h1 i { animation: arrive .55s .24s var(--ease) both; }
  .cover h1 span:last-child { animation-delay: .31s; }
  .cover time { animation: arrive .57s .49s var(--ease) both; }
  .sea-light::before { animation: sea-glint 4.2s .24s ease-in-out both; }
  .sea-light::after { animation: sea-glint 3.45s .7s ease-in-out reverse both; }
  .revealed { animation: arrive .58s var(--ease) both; }
  :is(.butterflies, .welcome-bird).revealed { animation-name: leaf-drift; animation-duration: .82s; }
  .story-note[open] .story-letter { transform-origin: center top; animation: unfold .28s var(--ease) both; }
  .confirmation:not([hidden]) { animation: arrive .24s var(--ease) both; }
}
