/* Dress Code page. Numbers are design pixels (see --u in site.css): first the phone design, then the computer design.
   Tablets (760 to 1099px wide) get the phone design at its largest, because the computer design needs 1040px of width. */

.dress {
  --pt: 30; --pb: 124;
  --tw: 326; --crest: 32; --h1: 54; --h1-mt: 5; --tlabel: 10.5; --tlabel-mt: 16;
  --nw: 366; --note-mt: -30; --n-pt: 62; --n-px: 14; --n-pb: 46; --key: 7;
  --orn-mt: 30; --orn-w: 44; --h2: 39; --h2-mt: 12; --h2-mb: 12; --h3: 11; --seal: 74;
  --lead: 18.5; --body: 15.5;
  --aw: 322; --ah: 354; --pw: 296; --drop: 12; --frame: 7; --lock: 62;
  --chip-w: 92; --chip-h: 46; --wear: 15.5; --wgap: 20;
  --cw: 344; --time-mt: -16; --t-px: 30; --th2: 37; --row: 61; --ic: 42; --tm: 19; --tl: 15.5;
  --sw: 342; --share-mt: 124; --s-pt: 132; --pols-top: -104; --polsw: 312; --polw: 172; --hash: 28;
  --olive-script: #3d4a1f;
  padding: calc(var(--pt) * var(--u)) 0 calc(var(--pb) * var(--u));
  padding-bottom: calc(var(--pb) * var(--u) + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 760px) and (max-width: 1099.98px) {
  .dress { --u: calc(520px / 390); --wall: 440; }
}
@media (min-width: 1100px) {
  .dress {
    --pt: 56; --pb: 170;
    --tw: 540; --crest: 53; --h1: 90; --h1-mt: 9; --tlabel: 15; --tlabel-mt: 26;
    --nw: 1040; --note-mt: -46; --n-pt: 100; --n-px: 60; --n-pb: 64; --key: 9;
    --orn-mt: 40; --orn-w: 64; --h2: 56; --h2-mt: 14; --h2-mb: 16; --h3: 13; --seal: 104;
    --lead: 25; --body: 19.5;
    --aw: 418; --ah: 456; --pw: 388; --drop: 16; --frame: 8; --lock: 84;
    --chip-w: 124; --chip-h: 58; --wear: 19.5; --wgap: 30;
    --cw: 452; --time-mt: 0; --t-px: 44; --th2: 50; --row: 80; --ic: 54; --tm: 25; --tl: 19.5;
    --sw: 470; --share-mt: 150; --s-pt: 178; --pols-top: -136; --polsw: 416; --polw: 228; --hash: 38;
  }
}

/* ---------- title card: the maroon frame turned to landscape, crest, title and the line under it (as on the Entourage page) ---------- */
.head { position: relative; z-index: 3; }
.title { position: relative; width: calc(var(--tw) * var(--u)); margin: 0 auto; }
.title-bg { width: 100%; height: auto; filter: brightness(1.06) drop-shadow(1px 1.5px 1px rgba(52, 30, 18, .30)) drop-shadow(4px 9px 10px rgba(52, 30, 18, .20)); }
.tcopy { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--pearl); }
.crest { width: calc(var(--crest) * var(--u)); height: auto; }
/* the padding gives the script's swashes room inside the box (needed for the written-on reveal); the margins cancel it out */
.tcopy h1 {
  position: relative; left: -.03em; font-family: var(--script); font-size: calc(var(--h1) * var(--u)); line-height: 1;
  padding: .3em .25em .5em; margin: calc(var(--h1-mt) * var(--u) - .3em) -.25em -.5em;
}
.tlabel {
  font-family: var(--label); font-size: calc(var(--tlabel) * var(--u)); line-height: 1; text-transform: uppercase;
  letter-spacing: .3em; padding-left: .3em; margin-top: calc(var(--tlabel-mt) * var(--u)); white-space: nowrap; color: #d9dcdf;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .tlabel { background: var(--silver-foil); -webkit-background-clip: text; background-clip: text; color: transparent; }
}

.bq { position: absolute; z-index: 6; }
.bq img { width: 100%; height: auto; filter: drop-shadow(1px 2px 1.5px rgba(40, 24, 14, .26)) drop-shadow(5px 10px 9px rgba(40, 24, 14, .20)); }
.bq1 { left: calc(50% - 197 * var(--u)); top: calc(-16 * var(--u)); width: calc(106 * var(--u)); }
.bq2 { left: calc(50% + 120 * var(--u)); top: calc(-34 * var(--u)); width: calc(88 * var(--u)); }
@media (min-width: 1100px) {
  .bq1 { left: calc(50% - 352px); top: -26px; width: 180px; }
  .bq2 { left: calc(50% + 424px); top: -96px; width: 142px; }
}

/* ---------- ivory paper with a silver keyline ---------- */
.note {
  position: relative; z-index: 2; width: calc(var(--nw) * var(--u)); margin: calc(var(--note-mt) * var(--u)) auto 0;
  padding: calc(var(--n-pt) * var(--u)) calc(var(--n-px) * var(--u)) calc(var(--n-pb) * var(--u));
  background: linear-gradient(165deg, #f8f4ee 0%, #f1e9dd 100%);
  box-shadow: 1px 1.5px 1.5px rgba(52, 30, 18, .24), 5px 11px 14px rgba(52, 30, 18, .17);
}
.note::after {
  content: ""; position: absolute; top: calc(var(--key) * var(--u)); right: calc(var(--key) * var(--u)); bottom: calc(var(--key) * var(--u)); left: calc(var(--key) * var(--u));
  pointer-events: none; border: 1px solid transparent;
  border-image: linear-gradient(115deg, #7d8288, #d5d8db 30%, #858a90 52%, #c3c7cb 74%, #7d8288) 1;
  outline: 1px solid rgba(125, 130, 136, .32); outline-offset: 3px;
}
.orn { display: flex; align-items: center; justify-content: center; gap: calc(9 * var(--u)); margin-top: calc(var(--orn-mt) * var(--u)); }
.orn i { display: block; height: 1px; width: calc(var(--orn-w) * var(--u)); background: linear-gradient(90deg, rgba(125, 130, 136, 0), #8d9298 60%, #b9bdc2); }
.orn i:last-child { background: linear-gradient(270deg, rgba(125, 130, 136, 0), #8d9298 60%, #b9bdc2); }
.orn b { display: block; width: calc(5 * var(--u)); height: calc(5 * var(--u)); transform: rotate(45deg); background: linear-gradient(135deg, #c9cdd1, #7d8288); }
.note h2 {
  font-family: var(--script); font-size: calc(var(--h2) * var(--u)); line-height: 1; text-align: center; white-space: nowrap; color: var(--burgundy-ink);
  padding: .25em .3em .45em; margin: calc(var(--h2-mt) * var(--u) - .25em) -.3em calc(var(--h2-mb) * var(--u) - .45em);
}
.dress h3 {
  font-family: var(--display); font-size: calc(var(--h3) * var(--u)); line-height: 1.4; text-transform: uppercase; letter-spacing: .22em; padding-left: .22em; color: var(--olive-deep);
}

/* ---------- the opening words ---------- */
.hello { text-align: center; padding: 0 calc(10 * var(--u)); }
.lead { font-size: calc(var(--lead) * var(--u)); line-height: 1.2; color: var(--burgundy-ink); text-wrap: balance; }
.intro { font-size: calc(var(--body) * var(--u)); line-height: 1.34; margin-top: calc(10 * var(--u)); text-wrap: balance; }

/* ---------- one plate per group: script name, the arched frame with the people, then what to wear ---------- */
.plate { text-align: center; }
.plate.olive h2 { color: var(--olive-script); }
.arch { position: relative; width: calc(var(--aw) * var(--u)); height: calc(var(--ah) * var(--u)); margin: 0 auto; }
.niche {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  border-radius: 50% 50% calc(3 * var(--u)) calc(3 * var(--u)) / 36% 36% calc(3 * var(--u)) calc(3 * var(--u));
  box-shadow: 0 0 0 1px rgba(160, 165, 170, .6), 1px 2px 2px rgba(52, 30, 18, .30), 4px 9px 12px rgba(52, 30, 18, .20);
}
.olive .niche { background: linear-gradient(168deg, #5c6631 0%, #434c1f 44%, #343b17 100%); }
.wine .niche { background: linear-gradient(168deg, #77192b 0%, #590e1b 44%, #430913 100%); }
.niche::before {            /* the cream inside of the frame */
  content: ""; position: absolute; top: calc(var(--frame) * var(--u)); right: calc(var(--frame) * var(--u)); bottom: calc(var(--frame) * var(--u)); left: calc(var(--frame) * var(--u));
  border-radius: 50% 50% calc(1.5 * var(--u)) calc(1.5 * var(--u)) / 36% 36% calc(1.5 * var(--u)) calc(1.5 * var(--u));
  background: radial-gradient(86% 66% at 50% 46%, #fefbf6 0%, #f4ecdf 58%, #e8ddcb 100%);
  box-shadow: 0 0 0 1px #d2d6da, inset 0 calc(5 * var(--u)) calc(13 * var(--u)) rgba(70, 48, 28, .22), inset 0 0 0 1px rgba(255, 255, 255, .55);
}
.niche::after {             /* a silver hairline running inside the coloured frame */
  content: ""; position: absolute; top: calc(3 * var(--u)); right: calc(3 * var(--u)); bottom: calc(3 * var(--u)); left: calc(3 * var(--u));
  border-radius: 50% 50% calc(2 * var(--u)) calc(2 * var(--u)) / 36% 36% calc(2 * var(--u)) calc(2 * var(--u));
  border: 1px solid rgba(220, 224, 228, .46);
}
.people { position: absolute; left: 50%; bottom: calc(var(--drop) * -1 * var(--u)); width: calc(var(--pw) * var(--u)); height: auto; transform: translateX(-50%); }

.wear { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: calc(var(--wgap) * var(--u)); margin-top: calc((var(--drop) + 20) * var(--u)); }
.wear::before {
  content: ""; position: absolute; left: 50%; top: 1px; bottom: 1px; width: 1px;
  background: linear-gradient(180deg, rgba(125, 130, 136, 0), #8d9298 16%, #c9cdd1 50%, #8d9298 84%, rgba(125, 130, 136, 0));
}
.col { display: flex; flex-direction: column; align-items: center; }
/* the colour palette: flat rectangles, no shading and no shadow, each inside a thin silver line (the user's decision) */
.chip { display: block; width: calc(var(--chip-w) * var(--u)); height: calc(var(--chip-h) * var(--u)); border-radius: calc(1.5 * var(--u));
  box-shadow: 0 0 0 calc(3 * var(--u)) #f7f2ea, 0 0 0 calc(3 * var(--u) + 1px) #a9aeb4; }
.c-olive { background: #686a16; }     /* the colour of the gowns in the user's picture */
.c-wine { background: #622226; }      /* the colour of the dresses in the user's picture */
.c-black { background: #1c1b1a; }
.col h3 { margin-top: calc(13 * var(--u)); }
.col p { font-size: calc(var(--wear) * var(--u)); line-height: 1.18; margin-top: calc(5 * var(--u)); }
.col .hue { font-family: var(--display); font-size: calc(12 * var(--u)); line-height: 1.3; text-transform: uppercase; letter-spacing: .2em; padding-left: .2em; margin-top: calc(7 * var(--u)); }
.olive .hue { color: #4c5820; }
.wine .hue { color: var(--burgundy-ink); }

/* the doors of each frame: seen only while the frame opens. Without motion they are never drawn. */
.doors {
  display: none; position: absolute; z-index: 3; top: calc(var(--frame) * var(--u)); right: calc(var(--frame) * var(--u)); bottom: calc(var(--frame) * var(--u)); left: calc(var(--frame) * var(--u));
  border-radius: 50% 50% calc(1.5 * var(--u)) calc(1.5 * var(--u)) / 36% 36% calc(1.5 * var(--u)) calc(1.5 * var(--u));
  overflow: hidden; perspective: calc(620 * var(--u));
}
.leaf { position: absolute; top: 0; bottom: 0; width: 50%; }
.leaf.l { left: 0; transform-origin: left center; box-shadow: inset -1px 0 0 rgba(0, 0, 0, .38); }
.leaf.r { right: 0; transform-origin: right center; box-shadow: inset 1px 0 0 rgba(255, 255, 255, .10); }
.olive .leaf { background: linear-gradient(168deg, #59632f 0%, #454e20 46%, #363d18 100%); }
.wine .leaf { background: linear-gradient(168deg, #73182a 0%, #5a0e1c 46%, #450914 100%); }
.leaf i { position: absolute; top: calc(11 * var(--u)); bottom: calc(11 * var(--u)); border: 1px solid rgba(222, 226, 230, .5); }
.leaf.l i { left: calc(11 * var(--u)); right: calc(9 * var(--u)); border-radius: 100% 0 0 0 / 39% 0 0 0; }
.leaf.r i { right: calc(11 * var(--u)); left: calc(9 * var(--u)); border-radius: 0 100% 0 0 / 0 39% 0 0; }
.leaf s { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: #000; opacity: 0; }   /* the door darkens as it turns away from the light */
.leaf::after { content: ""; position: absolute; top: 57%; width: calc(6 * var(--u)); height: calc(6 * var(--u)); border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffffff, #b4b9be 60%, #7d8288); box-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.leaf.l::after { right: calc(20 * var(--u)); }
.leaf.r::after { left: calc(20 * var(--u)); }
.lock { position: absolute; left: 50%; top: 50%; width: calc(var(--lock) * var(--u)); height: auto; margin: calc(var(--lock) * -.5 * var(--u)) 0 0 calc(var(--lock) * -.5 * var(--u));
  filter: drop-shadow(1px 2px 1.5px rgba(20, 8, 6, .55)) drop-shadow(3px 6px 6px rgba(20, 8, 6, .35)); }

/* ---------- the note about white ---------- */
.nowhite { display: flex; flex-direction: column; align-items: center; text-align: center; }
.nowhite .orn { margin-bottom: calc(22 * var(--u)); }
.c-white { background: linear-gradient(to top left, rgba(255, 255, 255, 0) calc(50% - .8px), #8d9298 calc(50% - .8px), #8d9298 calc(50% + .8px), rgba(255, 255, 255, 0) calc(50% + .8px)), #ffffff; }
.nowhite h3 { margin-top: calc(14 * var(--u)); }
.nowhite p { font-size: calc(var(--body) * var(--u)); line-height: 1.32; max-width: calc(296 * var(--u)); margin-top: calc(6 * var(--u)); text-wrap: balance; }

/* ---------- the timeline: the burgundy card, upright ---------- */
.lower { position: relative; z-index: 3; }
.time { position: relative; z-index: 4; width: calc(var(--cw) * var(--u)); margin: calc(var(--time-mt) * var(--u)) auto 0; }
.time picture { display: block; }
.time-bg { width: 100%; height: auto; filter: brightness(1.06) drop-shadow(1px 1.5px 1px rgba(52, 30, 18, .30)) drop-shadow(4px 9px 10px rgba(52, 30, 18, .22)); }
.tcard { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--pearl); padding: 0 calc(var(--t-px) * var(--u)); }
.tcard h2 { font-family: var(--script); font-size: calc(var(--th2) * var(--u)); line-height: 1; white-space: nowrap; padding: .25em .3em .45em; margin: -.25em -.3em -.45em; }
.tcard .orn { margin: calc(12 * var(--u)) 0 calc(14 * var(--u)); }
.tcard .orn i { background: linear-gradient(90deg, rgba(217, 220, 223, 0), #b9bdc2 60%, #e6e8ea); }
.tcard .orn i:last-child { background: linear-gradient(270deg, rgba(217, 220, 223, 0), #b9bdc2 60%, #e6e8ea); }
.tcard .orn b { background: linear-gradient(135deg, #f1f2f3, #a4a8ae); }
.line { position: relative; list-style: none; width: 100%; margin: 0; padding: 0; }
.line::before {
  content: ""; position: absolute; left: 50%; top: calc(var(--row) * .5 * var(--u)); bottom: calc(var(--row) * .5 * var(--u)); width: 1px; margin-left: -.5px;
  background: linear-gradient(180deg, #8f949a, #dfe2e4 50%, #8f949a);
}
.line li { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) calc(var(--ic) * var(--u)) minmax(0, 1fr); column-gap: calc(13 * var(--u)); align-items: center; min-height: calc(var(--row) * var(--u)); }
.line time { text-align: right; font-family: var(--display); font-size: calc(var(--tm) * var(--u)); line-height: 1; letter-spacing: .07em; white-space: nowrap; }
.line p { text-align: left; font-size: calc(var(--tl) * var(--u)); font-weight: 500; line-height: 1.13; color: #f1e8dc; text-wrap: balance; }
.ic { position: relative; display: block; width: calc(var(--ic) * var(--u)); height: calc(var(--ic) * var(--u)); border-radius: 50%;
  background: radial-gradient(circle at 50% 36%, #6c1524 0%, #4c0b17 100%); box-shadow: 0 0 0 1px #c3c7cb, 0 calc(2 * var(--u)) calc(5 * var(--u)) rgba(20, 2, 6, .5); }
/* the icons come from the user's own attire sheet; each is a shape, painted in silver here */
.ic::after { content: ""; position: absolute; top: 17%; right: 17%; bottom: 17%; left: 17%; background: linear-gradient(135deg, #ffffff, #d5d8db 55%, #f1f2f3);
  -webkit-mask: var(--pic) center / contain no-repeat; mask: var(--pic) center / contain no-repeat; }
.ic.rings { --pic: url("../img/icon-rings.png"); }
.ic.appetizers { --pic: url("../img/icon-appetizers.png"); }
.ic.toast { --pic: url("../img/icon-toast.png"); }
.ic.dinner { --pic: url("../img/icon-dinner.png"); }
.ic.video { --pic: url("../img/icon-video.png"); }

/* ---------- snap and share: two polaroids laid over the top of a small note ---------- */
.dress .share { width: calc(var(--sw) * var(--u)); margin-top: calc(var(--share-mt) * var(--u)); padding: calc(var(--s-pt) * var(--u)) calc(18 * var(--u)) calc(66 * var(--u)); text-align: center; }
.pols { position: absolute; z-index: 6; left: 50%; top: calc(var(--pols-top) * var(--u)); width: calc(var(--polsw) * var(--u)); height: calc(230 * var(--u)); margin-left: calc(var(--polsw) * -.5 * var(--u)); }
.pol { position: absolute; width: calc(var(--polw) * var(--u)); height: calc(var(--polw) * var(--u) * 679 / 560); filter: drop-shadow(1px 2px 1.5px rgba(40, 24, 14, .30)) drop-shadow(4px 9px 9px rgba(40, 24, 14, .22)); }
.pol .ph { position: absolute; left: 6.4%; top: 6.3%; width: 87%; height: 72.8%; object-fit: cover; }
.pol .fr { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.p1 { left: 0; top: calc(14 * var(--u)); transform: rotate(-7deg); }
.p2 { right: 0; top: 0; transform: rotate(5.5deg); }
.share .say { font-size: calc(var(--body) * var(--u)); line-height: 1.32; text-wrap: balance; margin-top: calc(2 * var(--u)); }
.hash { font-family: var(--display); font-size: calc(var(--hash) * var(--u)); line-height: 1.1; letter-spacing: .015em; color: var(--burgundy-ink); margin-top: calc(14 * var(--u)); }
.copy {
  display: inline-flex; align-items: center; justify-content: center; gap: calc(9 * var(--u)); margin-top: calc(16 * var(--u)); height: calc(42 * var(--u)); padding: 0 calc(22 * var(--u));
  border-radius: calc(21 * var(--u)); border: 1px solid #9a9fa5; background: linear-gradient(180deg, #fbf8f3, #efe7da); box-shadow: 0 1px 2px rgba(52, 30, 18, .18);
  font-family: var(--display); font-size: calc(12.5 * var(--u)); text-transform: uppercase; letter-spacing: .18em; color: var(--olive-deep); -webkit-appearance: none; appearance: none;
  cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .15s ease, filter .15s ease;
  visibility: hidden;          /* shown only once its script has arrived (class can-copy), so there is never a button that does nothing */
}
.can-copy .copy { visibility: inherit; }
.copy svg { width: calc(15 * var(--u)); height: calc(15 * var(--u)); }
.copy:active { transform: scale(.975); filter: brightness(.95); }
.copy:focus-visible { outline: 2px solid var(--burgundy-ink); outline-offset: 3px; }

/* ---------- end of the page: wax seal (decoration only) and the last bouquet ---------- */
.foot { position: relative; }
.seal {
  display: block; position: relative; z-index: 5; width: calc(var(--seal) * var(--u)); margin: calc(var(--seal) * var(--u) * -.5) auto 0;
  filter: drop-shadow(1px 2px 1.5px rgba(30, 6, 10, .5)) drop-shadow(3px 6px 6px rgba(30, 6, 10, .32));
}
.seal img { width: 100%; height: auto; }

/* ---------- computer layout: the two groups side by side, then the timeline card and the snap and share note side by side ---------- */
@media (min-width: 1100px) {
  .hello { max-width: 660px; margin: 0 auto; }
  .intro { margin-top: 12px; }
  .plates { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 44px; }
  .col h3 { margin-top: 16px; }
  .col p { margin-top: 6px; }
  .col .hue { font-size: 14px; margin-top: 9px; }
  .nowhite p { max-width: 560px; margin-top: 8px; }
  .nowhite .orn { margin-bottom: 26px; }
  .lower { display: grid; grid-template-columns: 452px 470px; column-gap: 62px; justify-content: center; align-items: center; margin-top: -30px; }
  .time { margin: 0; }
  .tcard .orn { margin: 16px 0 18px; }
  .line li { column-gap: 18px; }
  .dress .share { margin-left: 0; margin-right: 0; padding-left: 36px; padding-right: 36px; padding-bottom: 86px; align-self: end; }
  .pols { height: 300px; }
  .p1 { top: 18px; }
  .copy { height: 46px; font-size: 13.5px; margin-top: 20px; }
  .hash { margin-top: 18px; }
  .seal { left: 257px; }
}
@media (hover: hover) {
  .copy:hover { filter: brightness(1.03); }
}

/* ====================================================================================================
   Motion. Applies only when <html> has the class "anim", which the page adds itself when motion is allowed.
   Without it (motion switched off on the phone, or scripts blocked) everything above is simply shown, frames already open.
   Each piece plays once, by itself, when it scrolls into view. Only opacity, transform, a mask position and a clip ever change.
   Every animation ends exactly on the piece's normal style and then lets go of it ("backwards"), so the finished page is drawn
   exactly like the still one. Only the doors keep their last frame, because they end hidden.
   ==================================================================================================== */

/* waiting states */
.anim:not(.ready) .head, .anim:not(.ready) .attire { visibility: hidden; }
.anim [data-reveal]:not(.in) { visibility: hidden; }
.anim .arch:not(.in) ~ .wear { visibility: hidden; }
.anim .doors { display: block; }

/* arrival: the card settles, the crest rises, the title is written, the line under it eases in, the bouquet slides in, the paper rises */
.anim.ready .title { animation: a-card .6s var(--ease) backwards; }
.anim.ready .crest { animation: a-rise .45s var(--ease) .25s backwards; }
.anim.ready .tcopy h1 { animation: a-write .85s cubic-bezier(.45, .1, .3, 1) .35s backwards; }
.anim.ready .tlabel { animation: a-track .55s var(--ease) .85s backwards; }
.anim.ready .bq1 { transform-origin: 70% 80%; animation: a-bq1 .75s var(--ease) .3s backwards; }
.anim.ready .attire { animation: a-up .6s var(--ease) .2s backwards; }

/* the script lines that are "written": a soft edge sweeps across from left to right */
.anim .tcopy h1, .anim .note h2, .anim .tcard h2 {
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 45%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(90deg, #000 0%, #000 45%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-size: 222% 100%; mask-size: 222% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}

/* the opening words */
.anim .hello.in .lead { animation: a-rise .5s var(--ease) backwards; }
.anim .hello.in .intro { animation: a-rise .5s var(--ease) .14s backwards; }

/* each group's name: silver lines draw out, then the name is written */
.anim .hd.in .orn i { transform-origin: right center; animation: a-line .5s var(--ease) backwards; }
.anim .hd.in .orn i:last-child { transform-origin: left center; }
.anim .hd.in .orn b { animation: a-dia .4s var(--ease) backwards; }
.anim .hd.in h2 { animation: a-write .9s cubic-bezier(.45, .1, .3, 1) .12s backwards; }

/* each frame arrives shut, as a pair of doors held by the wax seal; the seal lifts away, the doors swing inward and fold out of
   sight, the people come forward and step over the frame's edge, then the colour swatches and what to wear appear */
.anim .arch.in { animation: a-settle .5s var(--ease) backwards; }
.anim .arch.in .lock { animation: a-unseal .45s cubic-bezier(.4, 0, .6, 1) .55s both; }
.anim .arch.in .leaf.l { animation: a-door-l 1.1s cubic-bezier(.45, .05, .35, 1) .75s both; }
.anim .arch.in .leaf.r { animation: a-door-r 1.1s cubic-bezier(.45, .05, .35, 1) .75s both; }
.anim .arch.in .leaf s { animation: a-shade 1.1s cubic-bezier(.45, .05, .35, 1) .75s both; }
.anim .arch.in .doors { animation: a-gone 0s linear 1.86s forwards; }   /* once open, the doors are gone for good */
.anim .arch.in .people { animation: a-people .85s var(--ease) 1s backwards; }
.anim .arch.in ~ .wear::before { transform-origin: center top; animation: a-rule .6s var(--ease) 1.5s backwards; }
.anim .arch.in ~ .wear .col { animation: a-rise .45s var(--ease) 1.55s backwards; }
.anim .arch.in ~ .wear .col + .col { animation-delay: 1.67s; }

/* the note about white */
.anim .nowhite.in .orn i { transform-origin: right center; animation: a-line .5s var(--ease) backwards; }
.anim .nowhite.in .orn i:last-child { transform-origin: left center; }
.anim .nowhite.in .orn b { animation: a-dia .4s var(--ease) backwards; }
.anim .nowhite.in .chip { animation: a-pop .45s var(--ease) .2s backwards; }
.anim .nowhite.in h3 { animation: a-rise .45s var(--ease) .32s backwards; }
.anim .nowhite.in p { animation: a-rise .45s var(--ease) .42s backwards; }

/* the timeline: the card settles, the title is written, the silver thread draws down and each time arrives in order */
.line li:nth-child(1) { --i: 0; } .line li:nth-child(2) { --i: 1; } .line li:nth-child(3) { --i: 2; } .line li:nth-child(4) { --i: 3; } .line li:nth-child(5) { --i: 4; }
.anim .time.in { animation: a-card .6s var(--ease) backwards; }
.anim .time.in .tcard h2 { animation: a-write .9s cubic-bezier(.45, .1, .3, 1) .2s backwards; }
.anim .time.in .tcard .orn i { transform-origin: right center; animation: a-line .5s var(--ease) .5s backwards; }
.anim .time.in .tcard .orn i:last-child { transform-origin: left center; }
.anim .time.in .tcard .orn b { animation: a-dia .4s var(--ease) .5s backwards; }
.anim .time.in .line::before { transform-origin: center top; animation: a-rule 1.1s cubic-bezier(.4, 0, .4, 1) .8s backwards; }
.anim .time.in .line .ic { animation: a-pop .4s var(--ease) backwards; animation-delay: calc(.8s + var(--i) * .24s); }
.anim .time.in .line time { animation: a-in-l .45s var(--ease) backwards; animation-delay: calc(.86s + var(--i) * .24s); }
.anim .time.in .line p { animation: a-in-r .45s var(--ease) backwards; animation-delay: calc(.86s + var(--i) * .24s); }

/* snap and share: the note rises, the two polaroids are dropped on one after the other, then the words */
.anim .share.in { animation: a-up .6s var(--ease) backwards; }
.anim .share.in .p1 { animation: a-drop1 .55s cubic-bezier(.3, .7, .3, 1) .3s backwards; }
.anim .share.in .p2 { animation: a-drop2 .55s cubic-bezier(.3, .7, .3, 1) .55s backwards; }
.anim .share.in h2 { animation: a-write .9s cubic-bezier(.45, .1, .3, 1) .75s backwards; }
.anim .share.in .say { animation: a-rise .45s var(--ease) 1.05s backwards; }
.anim .share.in .hash { animation: a-rise .45s var(--ease) 1.15s backwards; }
.anim .share.in .copy { animation: a-rise .45s var(--ease) 1.25s backwards; }

/* end of the page: the seal is pressed on, the last bouquet slides in */
.anim .foot.in .seal { animation: a-stamp .5s cubic-bezier(.5, 0, .3, 1) backwards; }
.anim .foot.in .bq2 { transform-origin: 30% 20%; animation: a-bq2 .75s var(--ease) .22s backwards; }

@keyframes a-card { from { opacity: 0; transform: translateY(-14px) scale(1.035); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes a-rise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes a-up { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes a-write { from { -webkit-mask-position: 100% 0; mask-position: 100% 0; } to { -webkit-mask-position: 0% 0; mask-position: 0% 0; } }
@keyframes a-track { from { opacity: 0; letter-spacing: .52em; padding-left: .52em; } to { opacity: 1; letter-spacing: .3em; padding-left: .3em; } }
@keyframes a-bq1 { from { opacity: 0; transform: translate(-16px, -12px) rotate(-8deg); } to { opacity: 1; transform: none; } }
@keyframes a-bq2 { from { opacity: 0; transform: translate(14px, 8px) rotate(7deg); } to { opacity: 1; transform: none; } }
@keyframes a-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes a-dia { from { opacity: 0; transform: rotate(45deg) scale(0); } to { opacity: 1; transform: rotate(45deg) scale(1); } }
@keyframes a-rule { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes a-pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
@keyframes a-in-l { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@keyframes a-in-r { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
@keyframes a-settle { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes a-unseal { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-14px) scale(1.18); } }
@keyframes a-door-l { 0% { transform: rotateY(0); opacity: 1; } 78% { transform: rotateY(80deg); opacity: 1; } 100% { transform: rotateY(90deg); opacity: 0; } }
@keyframes a-door-r { 0% { transform: rotateY(0); opacity: 1; } 78% { transform: rotateY(-80deg); opacity: 1; } 100% { transform: rotateY(-90deg); opacity: 0; } }
@keyframes a-gone { to { visibility: hidden; } }
@keyframes a-shade { from { opacity: 0; } to { opacity: .45; } }
/* until the doors are open the people stay inside the frame; then their shoes step over its edge */
@keyframes a-people {
  0% { opacity: 0; transform: translateX(-50%) translateY(calc(6 * var(--u))) scale(.985);
       -webkit-clip-path: inset(0 0 calc((var(--drop) + var(--frame)) * var(--u)) 0); clip-path: inset(0 0 calc((var(--drop) + var(--frame)) * var(--u)) 0); }
  65% { -webkit-clip-path: inset(0 0 calc((var(--drop) + var(--frame)) * var(--u)) 0); clip-path: inset(0 0 calc((var(--drop) + var(--frame)) * var(--u)) 0); }
  100% { opacity: 1; transform: translateX(-50%); -webkit-clip-path: inset(0 0 0 0); clip-path: inset(0 0 0 0); }
}
@keyframes a-drop1 { from { opacity: 0; transform: translate(-10px, -26px) rotate(-14deg) scale(1.06); } to { opacity: 1; transform: rotate(-7deg); } }
@keyframes a-drop2 { from { opacity: 0; transform: translate(10px, -26px) rotate(12deg) scale(1.06); } to { opacity: 1; transform: rotate(5.5deg); } }
@keyframes a-stamp { 0% { opacity: 0; transform: scale(1.42); } 55% { opacity: 1; transform: scale(.965); } 100% { opacity: 1; transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .anim *, .anim *::before { animation: none !important; visibility: visible !important; -webkit-mask-image: none !important; mask-image: none !important; }
  .anim .doors { display: none; }
}
