/* Main invitation page. Numbers are design pixels (see --u in site.css): first the phone design, then the computer design.
   The stationery pieces sit exactly where the approved mockups (and the user's Figma) have them.
   Inside a piece, sizes are in em: 1em is 1% of that piece's width, so a piece keeps its proportions at any size. */

@font-face { font-family: "Cormorant"; src: url("../fonts/Cormorant-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("../fonts/Cormorant-400i.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("../fonts/Cormorant-500i.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }

/* The computer design is 940 wide, so it starts at 980px. Tablets in between get the phone design at its largest size. */
@media (min-width: 760px) and (max-width: 979.98px) {
  .main { --u: calc(520px / 390); --wall: 440; }
}

.main { --sw: 390; --b1: 520; --b2: 330; --b3: 470; --olive: #474a28; }
@media (min-width: 980px) {
  .main { --sw: 940; --b1: 1040; --b2: 420; --b3: 1154; }
}
.mb { display: inline; } .dk { display: none; }
@media (min-width: 980px) { .mb { display: none; } .dk { display: inline; } }

.t-silver { color: #d9dcdf; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .t-silver { background: var(--silver-foil); -webkit-background-clip: text; background-clip: text; color: transparent; }
}
.hair { height: 1px; background: linear-gradient(90deg, rgba(139, 144, 150, 0), #9a9fa5 22%, #eef0f1 50%, #9a9fa5 78%, rgba(139, 144, 150, 0)); }
.hair-v { width: 1px; background: linear-gradient(180deg, rgba(139, 144, 150, 0), #a3a8ae 25%, #eef0f1 50%, #a3a8ae 75%, rgba(139, 144, 150, 0)); }
.hair.dark { filter: brightness(.82); }

/* layered shadows: a tight contact shadow plus a soft ambient one, light from the upper left */
.sh-paper { filter: drop-shadow(1px 1.5px 1px rgba(52, 30, 18, .30)) drop-shadow(4px 9px 10px rgba(52, 30, 18, .20)); }
.sh-lift  { filter: drop-shadow(1px 2px 1.5px rgba(52, 30, 18, .28)) drop-shadow(7px 14px 16px rgba(52, 30, 18, .24)); }
.sh-heavy { filter: drop-shadow(2px 3px 2px rgba(40, 28, 20, .34)) drop-shadow(10px 20px 24px rgba(40, 28, 20, .30)); }
.sh-flora { filter: drop-shadow(1px 2px 1.5px rgba(40, 24, 14, .26)) drop-shadow(5px 10px 9px rgba(40, 24, 14, .20)); }

/* ====================================================================================================
   The stage: every piece is placed from its own --x --y --w (design pixels) and --r (degrees).
   The three bands only give the stage its height; they take no part in the placement or the motion.
   ==================================================================================================== */
.stage { position: relative; width: calc(var(--sw) * var(--u)); margin: 0 auto; }
.band { display: block; }
.b1 { height: calc(var(--b1) * var(--u)); } .b2 { height: calc(var(--b2) * var(--u)); } .b3 { height: calc(var(--b3) * var(--u)); }

.p {
  position: absolute; display: block; left: calc(var(--x) * var(--u)); top: calc(var(--y) * var(--u)); width: calc(var(--w) * var(--u));
  z-index: var(--z, 1); transform: rotate(calc(var(--r, 0) * 1deg)); font-size: calc(var(--w) * var(--u) / 100);
}
.p picture { display: block; }
.p img.fill { position: relative; width: 100%; height: auto; }
a.p { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }

.envwrap { --x: 45; --y: 8.2; --w: 300; --z: 1; }
.sealt   { --x: 159; --y: 265; --w: 78; --z: 2; }
.inv     { --x: 146; --y: 359.9; --w: 220; --r: 8.7; --z: 3; }
.ovalf   { --x: 14; --y: 319.7; --w: 188; --z: 4; }
.bq-round     { --x: 14; --y: 271.6; --w: 120; --z: 6; }
.bq-hydrangea { --x: 291; --y: 492.4; --w: 84; --z: 6; }
.plaque  { --x: 16; --y: 526.1; --w: 178; --r: -1; --z: 5; }
.bq-calla { --x: 145; --y: 489; --w: 88; --r: -16; --z: 7; }
.locket  { --x: 207; --y: 605.6; --w: 180; --r: 38.5; --z: 4; }
.tray    { --x: 45; --y: 788; --w: 300; --r: 14.5; --z: 1; }
.envb    { --x: 27; --y: 867.2; --w: 256; --r: -10.8; --z: 2; }
.sealb   { --x: 132.5; --y: 950.5; --w: 67; --z: 3; }
.heart   { --x: 206; --y: 972; --w: 160; --r: 15; --z: 5; }
.pol2    { --x: 161; --y: 1095.8; --w: 126; --r: 3.4; --z: 4; }
.pol1    { --x: 67; --y: 1037; --w: 124; --r: -8; --z: 5; }
.bq-orchid { --x: 15; --y: 985.3; --w: 90; --z: 7; }
@media (min-width: 980px) {
  .envwrap { --x: 191.6; --y: 9.4; --w: 558.7; }
  .sealt   { --x: 404.4; --y: 486.9; --w: 146.2; }
  .inv     { --x: 379.1; --y: 673.4; --w: 494.4; }
  .ovalf   { --x: 50.7; --y: 583.4; --w: 422.3; }
  .bq-round     { --x: 54.9; --y: 483.9; --w: 250.1; }
  .bq-hydrangea { --x: 785.7; --y: 874.6; --w: 185.1; }
  .plaque  { --x: 162.4; --y: 1044.5; --w: 304; }
  .bq-calla { --x: 383.3; --y: 980; --w: 150.7; }
  .locket  { --x: 520.7; --y: 1125.1; --w: 378.7; }
  .tray    { --x: 186.4; --y: 1463.8; --w: 667.8; }
  .envb    { --x: 120.5; --y: 1640.3; --w: 568.4; }
  .sealb   { --x: 355.3; --y: 1825.4; --w: 149.4; }
  .heart   { --x: 583; --y: 1885.4; --w: 328.1; }
  .pol2    { --x: 449.2; --y: 2154; --w: 270.9; }
  .pol1    { --x: 240.7; --y: 2025.2; --w: 265.7; }
  .bq-orchid { --x: 115; --y: 1905.9; --w: 201.4; }
}

.p.seal { filter: drop-shadow(1px 2px 1.5px rgba(30, 6, 10, .5)) drop-shadow(3px 6px 6px rgba(30, 6, 10, .32)); }
.p.seal img { width: 100%; height: auto; }
.bq img { width: 100%; height: auto; }

/* a photograph sitting behind a frame */
.photo { position: absolute; overflow: hidden; background: #cfc6ba; }
.photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.92) contrast(1.02); }
.ovalf .photo { left: 18.5%; top: 19.5%; width: 62%; height: 63%; border-radius: 50%; }
.pol .photo { left: 6%; top: 6%; width: 88%; height: 74%; }

/* ---------- the open envelope: its back, the invitation paper, then the pocket in front of the paper ---------- */
.envwrap .clip { position: absolute; left: 0; right: 0; top: 0; bottom: 1%; overflow: hidden; }   /* keeps the paper inside the envelope while it is down in the pocket */
.frontw { position: absolute; top: 0; right: 0; bottom: 0; left: 0; filter: drop-shadow(0 -1.5px 2px rgba(20, 25, 5, .5)); }
.frontw img { width: 100%; height: 100%;
  -webkit-clip-path: polygon(-1.00% 41.80%, 30.58% 68.55%, 31.46% 69.22%, 32.34% 69.75%, 33.22% 70.12%, 34.10% 70.34%, 34.98% 70.42%, 64.65% 70.42%, 65.53% 70.35%, 66.41% 70.13%, 67.29% 69.77%, 68.17% 69.27%, 69.05% 68.63%, 101.00% 42.64%, 101.00% 101.00%, -1.00% 101.00%);
  clip-path: polygon(-1.00% 41.80%, 30.58% 68.55%, 31.46% 69.22%, 32.34% 69.75%, 33.22% 70.12%, 34.10% 70.34%, 34.98% 70.42%, 64.65% 70.42%, 65.53% 70.35%, 66.41% 70.13%, 67.29% 69.77%, 68.17% 69.27%, 69.05% 68.63%, 101.00% 42.64%, 101.00% 101.00%, -1.00% 101.00%); }

/* The invitation paper. --pu is 1% of the paper's width; the paper is 70% of the envelope's width. */
.paper {
  --pu: calc(var(--w) * var(--u) * .007);
  position: absolute; left: 15em; top: 5.966em; width: calc(var(--pu) * 100); height: calc(var(--pu) * 132); color: var(--ink);
  background: linear-gradient(172deg, #fdfbf6 0%, #f9f5ec 55%, #f5efe3 100%);
  box-shadow: 0 1px 1.5px rgba(52, 30, 18, .30), 0 6px 14px rgba(52, 30, 18, .22);
}
.paper::after {
  content: ""; position: absolute; top: calc(var(--pu) * 3.4); right: calc(var(--pu) * 3.4); bottom: calc(var(--pu) * 3.4); left: calc(var(--pu) * 3.4);
  pointer-events: none; border: 1px solid transparent;
  border-image: linear-gradient(115deg, #7d8288, #d5d8db 30%, #858a90 52%, #c9cdd1 74%, #7d8288) 1;
  outline: 1px solid rgba(125, 130, 136, .5); outline-offset: calc(var(--pu) * -1.25);
}
.paper > * { position: absolute; left: 0; right: 0; text-align: center; }
.paper .orn { display: flex; justify-content: center; align-items: center; gap: calc(var(--pu) * 1.3); }
.paper .orn i { display: block; width: calc(var(--pu) * 9.5); height: 1px; background: linear-gradient(90deg, rgba(125, 130, 136, 0), #8a8f95 40%, #b9bdc2); }
.paper .orn i:last-child { transform: scaleX(-1); }
.paper .orn b { display: block; width: calc(var(--pu) * 1.5); height: calc(var(--pu) * 1.5); border: 1px solid #8a8f95; transform: rotate(45deg); }
.paper .o1 { top: calc(var(--pu) * 8); } .paper .o2 { top: calc(var(--pu) * 73.2); }
.paper .lead { top: calc(var(--pu) * 12); font-family: var(--display); text-transform: uppercase; font-size: calc(var(--pu) * 4.9); letter-spacing: .2em; padding-left: .2em; line-height: 1.5; color: var(--olive-deep); }
.paper .couple { top: calc(var(--pu) * 29.5); left: calc(var(--pu) * 21); right: auto; width: calc(var(--pu) * 58); line-height: 0; }
.paper .couple img { width: 100%; height: auto; }
.paper .caps { top: calc(var(--pu) * 76.4); font-family: var(--display); text-transform: uppercase; font-size: calc(var(--pu) * 4); letter-spacing: .15em; padding-left: .15em; line-height: 1.2; color: var(--olive-deep); }
.paper .ital { top: calc(var(--pu) * 82.6); font-style: italic; font-weight: 500; font-size: calc(var(--pu) * 5); line-height: 1.26; color: #3d3429; white-space: nowrap; }
.paper .ital u { text-decoration: underline; text-decoration-thickness: max(1px, .05em); text-underline-offset: .2em; text-decoration-color: currentColor; text-decoration-skip-ink: auto; }
.paper .pcrest { top: calc(var(--pu) * 113); left: 50%; right: auto; width: calc(var(--pu) * 8); margin-left: calc(var(--pu) * -4); }
.paper .pcrest img { width: 100%; height: auto; }

/* ---------- maroon card: the verse, centred on the card itself ---------- */
.inv-copy { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 3.5em; text-align: center; }
.inv .vb { display: inline-flex; flex-direction: column; }
.inv .v { font-style: italic; font-weight: 500; font-size: 9.6em; line-height: .96; white-space: nowrap; text-align: center; color: var(--pearl); text-shadow: 0 .06em .1em rgba(30, 2, 8, .55); }
.inv .ref { font-family: var(--display); text-transform: uppercase; line-height: 1; white-space: nowrap; text-align: right; align-self: flex-end; font-size: 3.9em; letter-spacing: .08em; margin-right: -1.3em; margin-top: 1.05em; }
@media (min-width: 980px) {
  .inv-copy { padding: 0 4em; }
  .inv .v { font-size: 8.8em; }
  .inv .ref { font-size: 3.2em; letter-spacing: .3em; margin-right: -.3em; margin-top: 1.25em; }
}

/* ---------- save the date plaque: opens the ceremony and reception page ---------- */
.plaque-copy { position: absolute; top: 18.5%; right: 12%; bottom: 19.5%; left: 12%; display: flex; flex-direction: column; align-items: center; justify-content: space-between; color: var(--pearl); }
.plaque-copy span { display: block; }
.plaque-copy .std, .plaque-copy .at { font-family: var(--display); text-transform: uppercase; letter-spacing: .34em; padding-left: .34em; font-size: 5.3em; line-height: 1; color: #dfe2e4; }
.plaque-copy .dd { font-family: var(--display); font-size: 19em; line-height: .9; margin-top: .22em; }
.plaque-copy .month { font-family: var(--script); font-size: 25em; line-height: .8; margin-top: -.02em; white-space: nowrap; }
.plaque-copy .year { font-family: var(--display); font-size: 18em; line-height: .9; letter-spacing: .08em; padding-left: .08em; }
.plaque-copy .tab {
  font-family: var(--display); text-transform: uppercase; font-size: 4.5em; line-height: 1.22; letter-spacing: .04em; text-align: center; color: var(--olive-deep);
  background: linear-gradient(180deg, #fbf7f0, #efe6d8); padding: .8em 1.2em .68em; border-radius: 3em; white-space: nowrap;
  box-shadow: 0 0 0 .14em rgba(196, 200, 205, .9), .15em .35em .5em rgba(10, 14, 4, .45);
}
@media (min-width: 980px) {
  .plaque-copy .tab { font-size: 4.3em; letter-spacing: .06em; padding: .82em 1.5em .7em; }
}

/* ---------- red envelope: opens the dress code page. "Dress Code" / "& Timeline" / "Click Here", centred.
   The flap is too narrow above the seal for "Dress Code & Timeline" on one line, so "& Timeline" takes a second line, a little smaller.
   The label grows upward by exactly that line (5.64em), so "Click Here" keeps the place it had just above the seal. ---------- */
.env-copy { position: absolute; left: 0; right: 0; top: calc(27.6% - 5.64em); display: flex; flex-direction: column; align-items: center; color: var(--pearl); }
.env-copy span { display: block; }
.env-copy .t { font-family: var(--display); text-transform: uppercase; font-size: 6.64em; letter-spacing: .14em; padding-left: .14em; line-height: 1.1; text-align: center; }
.env-copy .t2 { font-family: var(--display); text-transform: uppercase; font-size: 4.9em; letter-spacing: .14em; padding-left: .14em; line-height: 1.1; margin-top: .05em; text-align: center; }
.env-copy .cta { font-family: var(--display); text-transform: uppercase; font-size: 4.1em; letter-spacing: .17em; padding-left: .17em; margin-top: .7em; line-height: 1; opacity: .82; }

/* ---------- lace heart: opens the entourage page ---------- */
.heart-copy { position: absolute; left: 0; right: 0; top: 28%; display: flex; flex-direction: column; align-items: center; color: var(--burgundy-ink); }
.heart-copy span { display: block; }
.heart-copy .t, .heart-copy .cta { -webkit-text-stroke: .018em currentColor; }
.heart-copy .t { font-family: var(--display); text-transform: uppercase; font-size: 7.4em; letter-spacing: .16em; padding-left: .16em; line-height: 1.06; text-align: center; }
.heart-copy .cta { font-family: var(--display); text-transform: uppercase; font-size: 5.2em; letter-spacing: .14em; padding-left: .14em; margin-top: 1.1em; }
@media (min-width: 980px) {
  .heart-copy { top: 30%; }
  .heart-copy .cta { font-size: 4.4em; letter-spacing: .2em; padding-left: .2em; margin-top: 1.5em; }
}

/* the pieces that open a page answer a press, and lift a little under a mouse.
   Their shadow sits on the picture, never on the piece that holds the words: Chrome skips drawing text inside an element
   that has both a transform (every piece is tilted) and a filter, so a shadow there made the words vanish while scrolling. */
a.p { transition: transform .25s var(--ease); }
a.p > picture { transition: filter .2s ease; }
a.p:active > picture.sh-paper { filter: brightness(.93) drop-shadow(1px 1.5px 1px rgba(52, 30, 18, .30)) drop-shadow(4px 9px 10px rgba(52, 30, 18, .20)); }
a.p:active > picture.sh-lift { filter: brightness(.93) drop-shadow(1px 2px 1.5px rgba(52, 30, 18, .28)) drop-shadow(7px 14px 16px rgba(52, 30, 18, .24)); }
a.p.seal:active { filter: brightness(.93) drop-shadow(1px 2px 1.5px rgba(30, 6, 10, .5)) drop-shadow(3px 6px 6px rgba(30, 6, 10, .32)); }   /* the seal holds no words */
a.p:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 4px; }
@media (hover: hover) {
  a.p:hover { transform: rotate(calc(var(--r, 0) * 1deg)) scale(1.018); }
  a.sealb:hover { transform: none; }
}

/* ====================================================================================================
   Cards under the stage: the Wedding Details list, Finer Details, and the day with its countdown.
   ==================================================================================================== */
.card {
  position: relative; margin: 0 auto; text-align: center; color: var(--ink);
  background: linear-gradient(165deg, #fcf9f3 0%, #f5eee2 100%);
  box-shadow: 1px 1.5px 1.5px rgba(52, 30, 18, .24), 5px 11px 14px rgba(52, 30, 18, .17);
}
.card::after {
  content: ""; position: absolute; top: 9px; right: 9px; bottom: 9px; left: 9px; 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;
}
@media (max-width: 979.98px) {
  .card::after { top: calc(9 * var(--u)); right: calc(9 * var(--u)); bottom: calc(9 * var(--u)); left: calc(9 * var(--u)); outline-offset: calc(3 * var(--u)); }
}
.card h2 { font-family: var(--script); font-weight: 400; color: var(--burgundy-ink); line-height: 1; }
.card .hair { margin-left: auto; margin-right: auto; }
.menu, .rules, .day { position: relative; width: calc(var(--sw) * var(--u)); margin: 0 auto; }

/* ---------- Wedding Details: the three pages again as plain buttons, with the red swans laid over the card's corner ---------- */
.menu { --pad-b: 26; --cw: 346; --pt: 47; --px: 24; --pb: 36; --h2: 46; --hw: 70; --hmt: 12; --hmb: 16; --rw: 298; --rh: 54; --rgap: 12; --rf: 12.8; --rls: .09em; --rpl: 24; --rpr: 20; --ag: 12; --aw: 21; --ah: 10;
  --swans: 174; --swr: -9; --swt: -66; z-index: 2; padding-bottom: calc(var(--pad-b) * var(--u)); }
@media (min-width: 980px) {
  .menu { --pad-b: 40; --cw: 680; --pt: 44; --px: 58; --pb: 54; --h2: 58; --hw: 90; --hmt: 15; --hmb: 22; --rw: 470; --rh: 62; --rgap: 14; --rf: 16; --rls: .13em; --rpl: 34; --rpr: 28; --ag: 16; --aw: 26; --ah: 12;
    --swans: 256; --swr: -22; --swt: -98; }
}
.menu .card { display: flex; flex-direction: column; align-items: center; width: calc(var(--cw) * var(--u)); padding: calc(var(--pt) * var(--u)) calc(var(--px) * var(--u)) calc(var(--pb) * var(--u)); }
.menu h2 { font-size: calc(var(--h2) * var(--u)); }
.menu .hair { width: calc(var(--hw) * var(--u)); margin-top: calc(var(--hmt) * var(--u)); margin-bottom: calc(var(--hmb) * var(--u)); }
.menu .swans { position: absolute; z-index: 3; width: calc(var(--swans) * var(--u)); right: calc(var(--swr) * var(--u)); top: calc(var(--swt) * var(--u)); transform: rotate(8deg);
  filter: drop-shadow(1px 1.5px 1px rgba(52, 30, 18, .32)) drop-shadow(4px 9px 10px rgba(52, 30, 18, .22)); }
.menu .swans img { width: 100%; height: auto; }
.menu .rows { width: calc(var(--rw) * var(--u)); max-width: 100%; }
.menu .row {
  display: flex; align-items: center; justify-content: space-between; position: relative; white-space: nowrap; text-decoration: none;
  height: calc(var(--rh) * var(--u)); border-radius: calc(var(--rh) * var(--u) / 2); margin-top: calc(var(--rgap) * var(--u));
  padding: 1px calc(var(--rpr) * var(--u)) 0 calc(var(--rpl) * var(--u)); gap: calc(var(--ag) * var(--u));
  font-family: var(--display); font-size: calc(var(--rf) * var(--u)); letter-spacing: var(--rls); text-transform: uppercase; color: var(--pearl);
  background: linear-gradient(180deg, #671422 0%, #490a15 100%);
  box-shadow: 0 0 0 1.5px rgba(206, 210, 214, .95), 0 2px 3px rgba(40, 10, 14, .4), 0 7px 14px rgba(40, 10, 14, .26);
  -webkit-tap-highlight-color: transparent; transition: transform .15s ease, filter .15s ease;
}
.menu .rows .row:first-child { margin-top: 0; }
.menu .row::after { content: ""; position: absolute; top: 5px; right: 5px; bottom: 5px; left: 5px; border-radius: 99px; border: 1px solid rgba(214, 218, 222, .42); }
.menu .row svg { flex: none; width: calc(var(--aw) * var(--u)); height: calc(var(--ah) * var(--u)); transition: transform .2s ease; }
.menu .row:active { transform: scale(.985); filter: brightness(.9); }
.menu .row:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 3px; }
@media (hover: hover) {
  .menu .row:hover { filter: brightness(1.14); }
  .menu .row:hover svg { transform: translateX(3px); }
}
@media (max-width: 979.98px) {
  .menu .row::after { top: calc(5 * var(--u)); right: calc(5 * var(--u)); bottom: calc(5 * var(--u)); left: calc(5 * var(--u)); }
}

/* ---------- Finer Details: the two guest rules ---------- */
.rules { --pad-b: 26; --cw: 346; --pt: 42; --px: 32; --pb: 44; --h2: 46; --hw: 70; --hmt: 14; --hmb: 24; --h3: 11.5; --pf: 16.5; --pmt: 9; padding-bottom: calc(var(--pad-b) * var(--u)); }
@media (min-width: 980px) {
  .rules { --pad-b: 40; --cw: 680; --pt: 46; --px: 58; --pb: 52; --h2: 58; --hw: 90; --hmt: 18; --hmb: 30; --h3: 13; --pf: 17.5; --pmt: 12; }
}
.rules .card { width: calc(var(--cw) * var(--u)); padding: calc(var(--pt) * var(--u)) calc(var(--px) * var(--u)) calc(var(--pb) * var(--u)); }
.rules h2 { font-size: calc(var(--h2) * var(--u)); }
.rules .hair { width: calc(var(--hw) * var(--u)); margin-top: calc(var(--hmt) * var(--u)); margin-bottom: calc(var(--hmb) * var(--u)); }
.rules h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: calc(var(--h3) * var(--u)); letter-spacing: .24em; padding-left: .24em; color: var(--olive-deep); line-height: 1.4; }
.rules p { font-weight: 400; font-size: calc(var(--pf) * var(--u)); line-height: 1.5; margin-top: calc(var(--pmt) * var(--u)); }
.rules .cols { display: flex; flex-direction: column; align-items: center; }
.rules .sep { width: calc(70 * var(--u)); height: 1px; margin: calc(22 * var(--u)) 0; background: linear-gradient(90deg, rgba(125, 130, 136, 0), #8d9298 25%, #c9cdd1 50%, #8d9298 75%, rgba(125, 130, 136, 0)); }
@media (min-width: 980px) {
  .rules .cols { display: grid; grid-template-columns: 1fr 1px 1fr; column-gap: 38px; align-items: stretch; }
  .rules .sep { width: 1px; height: auto; margin: 0; background: linear-gradient(180deg, rgba(125, 130, 136, 0), #8d9298 25%, #c9cdd1 50%, #8d9298 75%, rgba(125, 130, 136, 0)); }
}

/* ---------- the day and the countdown, on the maroon card ---------- */
.day { padding-bottom: calc(30 * var(--u)); }
.daycard { position: relative; width: calc(346 * var(--u)); margin: 0 auto; color: var(--pearl); }
.daycard .bg, .daycard .bg img { display: block; width: 100%; height: auto; }
.daycard .inner { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; align-items: center; padding-top: calc(50 * var(--u)); }
.daycard .left, .daycard .right { display: flex; flex-direction: column; align-items: center; }
.daycard .crest { width: calc(84 * var(--u)); height: auto; }
.daycard .label { display: block; font-family: var(--label); text-transform: uppercase; letter-spacing: .34em; font-size: calc(9 * var(--u)); line-height: 1.7; }
.daycard .right > .label { margin-top: calc(20 * var(--u)); }
.daycard .date { font-family: var(--display); text-transform: uppercase; text-align: center; line-height: 1.3; font-size: calc(23 * var(--u)); letter-spacing: .2em; padding-left: .2em; margin-top: calc(8 * var(--u)); }
.daycard .italic { font-style: italic; font-weight: 400; font-size: calc(16.5 * var(--u)); margin-top: calc(2 * var(--u)); opacity: .9; }
.daycard .right > .hair { width: calc(110 * var(--u)); margin: calc(20 * var(--u)) 0 calc(18 * var(--u)); }
.daycard .inner > .hair-v { display: none; }
.count { display: grid; grid-template-columns: 1fr 1px 1fr 1px 1fr 1px 1fr; align-items: start; width: calc(292 * var(--u)); }
.count .unit { display: flex; flex-direction: column; align-items: center; }
.count .n { display: block; font-family: var(--display); line-height: 1; font-variant-numeric: tabular-nums; font-size: calc(41 * var(--u)); min-height: 1em; }
.count .label { font-size: calc(8 * var(--u)); letter-spacing: .22em; padding-left: .22em; }
.count .hair-v { height: calc(36 * var(--u)); margin-top: calc(3 * var(--u)); }
.daycard .names { height: auto; opacity: .92; }
.daycard .names.n-d { display: none; }
.daycard .names.n-m { width: calc(112 * var(--u)); margin-top: calc(26 * var(--u)); }
html:not(.js) .count, html:not(.js) .daycard .right > .hair { display: none; }   /* the countdown cannot run without scripts */
@media (min-width: 980px) {
  .day { padding: 16px 0 76px; }
  .daycard { width: 680px; }
  .daycard .inner { display: grid; grid-template-columns: 250px 1px 1fr; align-items: center; padding: 0 34px 0 30px; }
  .daycard .crest { width: 112px; }
  .daycard .names.n-m { display: none; }
  .daycard .names.n-d { display: block; width: 128px; margin-top: 22px; }
  .daycard .inner > .hair-v { display: block; height: 250px; }
  .daycard .label { font-size: 9.5px; }
  .daycard .right > .label { margin-top: 0; }
  .daycard .date { font-size: 27px; letter-spacing: .22em; padding-left: .22em; margin-top: 10px; }
  .daycard .italic { font-size: 17.5px; margin-top: 3px; }
  .daycard .right > .hair { width: 120px; margin: 22px 0 20px; }
  .count { width: 350px; }
  .count .n { font-size: 50px; }
  .count .label { font-size: 8px; letter-spacing: .26em; padding-left: .26em; }
  .count .hair-v { height: 42px; margin-top: 4px; }
}

/* ====================================================================================================
   The first screen: the sealed envelope only. It shows on a guest's first visit (class "gate" on <html>, added by the
   page itself when scripts run) and the page behind it cannot be scrolled until the seal is tapped.
   --sh screen height, --sy where the seal sits, --ew the envelope's width, --ss the seal's size.
   The envelope is always wide enough that its top edge stays above the screen.
   ==================================================================================================== */
.landing {
  --sh: 100vh; --sy: calc(var(--sh) * .56); --ew: 266.67vw; --ss: 56vw; --hf: 12px; --hb: calc(var(--sh) * .0635);
  display: none; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 200; overflow: hidden; background: #474a28; touch-action: none;
}
@supports (height: 100svh) { .landing { --sh: 100svh; } }
@supports (width: max(1px, 2px)) {
  .landing { --ew: max(266.67vw, calc(var(--sy) * 2.12)); --ss: min(calc(var(--ew) * .21), calc(var(--sh) * .40)); --hf: clamp(11px, 3.08vw, 14px); }
}
@media (min-width: 760px) {
  .landing { --sy: calc(var(--sh) * .63); --ew: 112.5vw; --ss: 18.6vw; --hf: 14px; --hb: calc(var(--sh) * .071); }
  @supports (width: max(1px, 2px)) {
    .landing { --ew: max(112.5vw, calc(var(--sy) * 2.12)); --ss: min(calc(var(--ew) * .1654), calc(var(--sh) * .40)); }
  }
}
@media (max-height: 500px) {
  @supports (width: max(1px, 2px)) {
    .landing { --sy: calc(var(--sh) * .45); --ss: calc(var(--sh) * .36); --ew: max(112.5vw, calc(var(--sy) * 2.4)); }
  }
}
html.gate:not(.landed) .landing { display: block; }
html.gate, html.gate body { height: 100%; overflow: hidden; }

.landing .env { position: absolute; left: 50%; top: calc(var(--sy) - var(--ew) * .4954); width: var(--ew); margin-left: calc(var(--ew) / -2); }
.landing .env img { width: 42%; height: auto; margin: 0 auto; }     /* phones are sent only the middle of the envelope */
@media (min-width: 760px) { .landing .env img { width: 100%; } }
.landing .light { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none;
  background: radial-gradient(120% 70% at 18% 8%, rgba(255, 248, 225, .16), rgba(255, 248, 225, 0) 60%),
              radial-gradient(130% 95% at 50% 46%, rgba(0, 0, 0, 0) 55%, rgba(14, 16, 4, .42) 100%); }
/* "The Umbreros": the user's lettering in ivory ink, on the flap above the seal, like a sender's name (approved: mockup 28, B).
   Sized and placed in step with the envelope picture, so it keeps the same spot on the envelope at every screen size:
   its centre is .235 of the envelope's width above the seal, and it is .30 of that width wide (about 312px on a 390px phone).
   Placed with margins, not a transform, so its shadow filter never shares an element with a transform. */
.landing .sender { position: absolute; left: 50%; width: calc(var(--ew) * .30); margin-left: calc(var(--ew) * -.15); top: calc(var(--sy) - var(--ew) * .2622); pointer-events: none; }
.landing .sender img { width: 100%; height: auto; filter: drop-shadow(0 1px 1px rgba(10, 12, 2, .45)); }
@media (max-height: 500px) {   /* short screens, such as a phone turned sideways: the flap above the seal is narrow there */
  .landing .sender { width: calc(var(--ew) * .16); margin-left: calc(var(--ew) * -.08); top: calc(var(--sy) - var(--ew) * .1545); }
}
@media (max-height: 500px) and (orientation: portrait) {   /* a very small phone held upright: the ring reaches high, so the lettering goes into the wide part of the flap above it */
  .landing .sender { width: calc(var(--ew) * .40); margin-left: calc(var(--ew) * -.20); top: calc(var(--sy) - var(--ew) * .3563); }
}
.landing .ring { position: absolute; left: 50%; top: var(--sy); width: calc(var(--ss) * 1.34); height: calc(var(--ss) * 1.34); margin: calc(var(--ss) * -.67) 0 0 calc(var(--ss) * -.67); border-radius: 50%;
  border: 1px solid rgba(222, 226, 230, .62); box-shadow: 0 0 0 calc(var(--ss) * .085) rgba(222, 226, 230, .06); pointer-events: none; }
.landing .seal { position: absolute; left: 50%; top: var(--sy); width: var(--ss); height: var(--ss); margin: calc(var(--ss) / -2) 0 0 calc(var(--ss) / -2); padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent; -webkit-appearance: none; appearance: none;
  filter: drop-shadow(1px 3px 2px rgba(12, 14, 3, .55)) drop-shadow(5px 12px 14px rgba(12, 14, 3, .42)); }
.landing .seal img { width: 100%; height: auto; }
.landing .seal:focus-visible { outline: 2px solid #efe8dc; outline-offset: 6px; }
.landing .hint { position: absolute; left: 0; right: 0; bottom: var(--hb); text-align: center; color: #efe8dc; pointer-events: none;
  font-family: var(--display); text-transform: uppercase; font-size: var(--hf); letter-spacing: .34em; padding-left: .34em; text-shadow: 0 1px 2px rgba(10, 12, 2, .5); }
.landing .hint i { display: block; width: 44px; height: 1px; margin: 0 auto 14px; background: linear-gradient(90deg, rgba(222, 226, 230, 0), rgba(222, 226, 230, .8), rgba(222, 226, 230, 0)); }

/* while the sealed envelope is up, and during the one second pause after it opens, the paper is down in the pocket */
html.gate:not(.paper-up) .paper { transform: translateY(86%); }

/* ====================================================================================================
   Motion. Applies only when <html> has the class "anim", which the page adds itself when motion is allowed.
   Without it everything above is simply shown, and one tap on the seal goes straight to the finished page.
   Each piece plays once. Only opacity, transform, letter-spacing and a mask position ever change.
   ==================================================================================================== */

/* the opening: the seal is pressed, the sealed envelope dissolves, leaning in a little toward the seal, onto the open envelope
   already lying on the page. The other pieces settle around it during the one second pause, then the paper rises. */
.anim .landing .seal { transition: transform .18s ease; }
.anim .landing .ring { transition: transform .55s var(--ease), opacity .45s ease; }
.anim .landing .hint { transition: opacity .25s ease; }
.anim .landing .seal:active { transform: scale(.955); }
.anim.opening .landing .seal { transform: scale(.94); }
.anim.opening .landing .ring { transform: scale(1.28); opacity: 0; }
.anim.opening .landing .hint { opacity: 0; }
.anim.opening .landing { transform-origin: 50% var(--sy); animation: o-dissolve .8s cubic-bezier(.4, 0, .2, 1) both; pointer-events: none; }
.anim.gate.paper-up .paper { transition: transform 1.5s cubic-bezier(.3, .55, .2, 1); }
@keyframes o-dissolve { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(1.06); } }

/* the sealed envelope breathes very slightly so the eye goes to the seal */
.anim.gate:not(.opening) .landing .ring { animation: o-ring 2.8s ease-in-out infinite; }
@keyframes o-ring { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.045); opacity: .62; } }

/* waiting states */
.anim [data-reveal]:not(.in) { visibility: hidden; }
/* the open envelope and its seal never move: on a first visit they are what the sealed envelope dissolves onto */
/* (they carry no data-reveal, so they are never hidden and never animated) */

/* pieces of the stage: each piece settles the first time it is well on screen (above the bottom 12%), one after another,
   150ms apart (data-reveal-gap and data-reveal-line on <html>, see reveal.js). The motion is the same as the pieces that
   settle around the envelope after the seal is tapped. Bouquets and the red envelope's seal wait for what they rest on. */
.anim .p.in { animation: p-settle .75s var(--ease) backwards; }
.anim .p.bq.in { animation-name: p-flora; animation-duration: .85s; }
.anim .p.seal.in { animation-name: p-stamp; animation-duration: .5s; animation-timing-function: cubic-bezier(.5, 0, .3, 1); }
.anim .p.tray.in { animation-name: p-rise; animation-duration: .9s; }
.anim .p.locket.in { animation-name: p-swing; animation-duration: .95s; }
.bq-round { --fx: -16; --fr: -8; } .bq-hydrangea { --fx: 14; --fr: 7; } .bq-calla { --fx: 12; --fr: 9; } .bq-orchid { --fx: -14; --fr: -7; }

@keyframes p-settle { from { opacity: 0; transform: translateY(calc(18 * var(--u))) rotate(calc(var(--r, 0) * 1deg + 3.5deg)) scale(.965); } to { opacity: 1; transform: rotate(calc(var(--r, 0) * 1deg)); } }
@keyframes p-flora { from { opacity: 0; transform: translate(calc(var(--fx, 12) * var(--u)), calc(10 * var(--u))) rotate(calc(var(--r, 0) * 1deg + var(--fr, 7) * 1deg)); } to { opacity: 1; transform: rotate(calc(var(--r, 0) * 1deg)); } }
@keyframes p-stamp { 0% { opacity: 0; transform: scale(1.42); } 55% { opacity: 1; transform: scale(.965); } 100% { opacity: 1; transform: scale(1); } }
@keyframes p-rise { from { opacity: 0; transform: translateY(calc(26 * var(--u))) rotate(calc(var(--r, 0) * 1deg)); } to { opacity: 1; transform: rotate(calc(var(--r, 0) * 1deg)); } }
@keyframes p-swing { 0% { opacity: 0; transform: translateY(calc(-10 * var(--u))) rotate(calc(var(--r, 0) * 1deg - 14deg)); } 60% { opacity: 1; transform: rotate(calc(var(--r, 0) * 1deg + 3deg)); } 100% { opacity: 1; transform: rotate(calc(var(--r, 0) * 1deg)); } }

/* script headings are "written": a soft edge sweeps across from left to right. The padding gives the swashes room; the margins cancel it. */
.anim .card h2 {
  padding: .25em .3em .45em; margin: -.25em -.3em -.45em;
  -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;
}
.anim .in .card { animation: c-up .65s var(--ease) backwards; }
.anim .in .card h2 { animation: c-write .9s cubic-bezier(.45, .1, .3, 1) .25s backwards; }
.anim .in .card .hair { animation: c-line .5s var(--ease) .7s backwards; }
.anim .menu.in .swans { animation: c-swans .8s var(--ease) .45s backwards; }
.anim .menu.in .row { animation: c-row .5s var(--ease) backwards; }
.anim .menu.in .row:nth-child(1) { animation-delay: .8s; } .anim .menu.in .row:nth-child(2) { animation-delay: .92s; } .anim .menu.in .row:nth-child(3) { animation-delay: 1.04s; }
.anim .rules.in .rule { animation: c-row .55s var(--ease) .85s backwards; }
.anim .rules.in .rule:last-child { animation-delay: 1.05s; }
.anim .rules.in .sep { animation: c-fade .5s ease-out .95s backwards; }

.anim .day.in .daycard { animation: c-up .7s var(--ease) backwards; }
.anim .day.in .crest { animation: c-row .5s var(--ease) .3s backwards; }
.anim .day.in .right > .label { animation: c-fade .5s ease-out .5s backwards; }
.anim .day.in .date { animation: c-row .5s var(--ease) .6s backwards; }
.anim .day.in .italic { animation: c-fade .5s ease-out .75s backwards; }
.anim .day.in .right > .hair { animation: c-line .5s var(--ease) .85s backwards; }
.anim .day.in .count .unit { animation: c-row .5s var(--ease) backwards; }
.anim .day.in .count .unit:nth-child(1) { animation-delay: .95s; } .anim .day.in .count .unit:nth-child(3) { animation-delay: 1.05s; }
.anim .day.in .count .unit:nth-child(5) { animation-delay: 1.15s; } .anim .day.in .count .unit:nth-child(7) { animation-delay: 1.25s; }
.anim .day.in .count .hair-v { animation: c-fade .5s ease-out 1.2s backwards; }
.anim .day.in .names { animation: c-fade .7s ease-out 1.35s backwards; }

@keyframes c-up { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes c-write { from { -webkit-mask-position: 100% 0; mask-position: 100% 0; } to { -webkit-mask-position: 0% 0; mask-position: 0% 0; } }
@keyframes c-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes c-row { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@keyframes c-fade { from { opacity: 0; } }
@keyframes c-swans { 0% { opacity: 0; transform: translate(10px, -22px) rotate(21deg) scale(1.1); } 65% { opacity: 1; transform: rotate(6deg) scale(.99); } 100% { opacity: 1; transform: rotate(8deg); } }

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