/* Invitation cards. One structure (see assets/js/card.js), sixteen designs keyed by data-design.
   Sizes are in container units so the same card works as a thumbnail and at full size. */

.inv-wrap { container-type: inline-size; width: 100%; }

.inv {
  --fit: 1;
  position: relative;
  aspect-ratio: 5 / 7;
  width: 100%;
  overflow: hidden;
  font-family: "Gentium Book Plus", Georgia, serif;
  font-size: calc(3.15cqi * var(--fit));
  line-height: 1.34;
  text-align: center;
  color: var(--c-ink);
  background: var(--c-paper);
  border-radius: 1px;
  box-shadow: 0 0.5px 0 rgb(30 33 48 / 0.08), 0 22px 44px -26px rgb(30 33 48 / 0.6);
}

.inv-frame {
  position: absolute;
  inset: 4.5cqi;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6cqi 7cqi;
  overflow: hidden;
}

.inv-body { display: flex; flex-direction: column; align-items: center; gap: 0.55em; width: 100%; }
.inv p { margin: 0; }
.inv-orn { width: 7cqi; flex: none; color: var(--c-accent); margin-bottom: 0.15em; }
.inv-orn svg { display: block; width: 100%; height: auto; }
.inv-intro { font-style: italic; max-width: 24em; }
.inv-names {
  font-family: var(--c-names-font);
  font-size: 3.1em;
  line-height: 1.04;
  color: var(--c-names, var(--c-ink));
  overflow-wrap: anywhere;
}
.inv-names .amp { display: block; font-size: 0.62em; line-height: 1.15; }
.inv-title { max-width: 22em; }
.inv-when { display: grid; gap: 0.1em; margin-top: 0.35em; }
.inv-when--formal p:first-child { font-size: 1.08em; }
.inv-when--formal p:nth-child(2) { font-size: 0.92em; }
.inv-when--formal p:nth-child(3) { font-style: italic; }
.inv-when--plain p:first-child { font-weight: 700; letter-spacing: 0.02em; }
.inv-venue-name { display: block; font-weight: 700; }
.inv-address { display: block; font-size: 0.9em; }
.inv-extra { font-style: italic; font-size: 0.92em; }
.inv-verse { margin: 0.35em 0 0; max-width: 21em; }
.inv-verse blockquote { margin: 0; font-style: italic; font-size: 0.88em; line-height: 1.4; }
.inv-verse figcaption { margin-top: 0.25em; font-size: 0.78em; letter-spacing: 0.06em; color: var(--c-soft); }
.inv-reply { margin-top: 0.15em; font-size: 0.78em; color: var(--c-soft); }
.inv-phone { white-space: nowrap; }

/* Dividers and the month | day | weekday date block (used by Rose arch). */
.inv-divider { flex: none; color: var(--c-accent); }
.inv-divider svg { display: block; width: 100%; height: auto; }
.inv-when--block { justify-items: center; gap: 0.3em; }
.inv-dateline {
  display: flex;
  align-items: stretch;
  padding-bottom: 0.3em;
  border-bottom: 1px solid currentColor;
  font-family: "Cinzel", serif;
  font-size: 1.3em;
  text-transform: uppercase;
}
.inv-dateline span { display: flex; align-items: center; padding: 0 0.6em; line-height: 1; }
.inv-dateline span + span { border-left: 1px solid currentColor; }
.inv-dateline span:nth-child(2) { font-size: 1.45em; }
.inv-year { padding-left: 0.4em; font-size: 1.35em; font-weight: 300; letter-spacing: 0.4em; line-height: 1.1; }
.inv-clock {
  padding: 0.25em 1.3em 0.2em;
  border-block: 1px solid currentColor;
  font-family: "Cinzel", serif;
  font-size: 0.9em;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Spaced capitals for the small lines (designs marked caps in designs.js). */
.inv--caps :is(.inv-intro, .inv-title, .inv-venue, .inv-extra, .inv-reply) {
  font-size: 0.78em;
  font-style: normal;
  letter-spacing: 0.15em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--c-ink);
}

/* Rose arch: a blossom archway on misty pink, plum lettering in caps and script. */
.inv[data-design="rose"] {
  --c-paper: #f6e2ea; --c-ink: #4a1d3f; --c-soft: #6e3d5e; --c-accent: #7a2f5c;
  --c-names-font: "Great Vibes", cursive;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  background:
    url("../img/blossom-arch.svg") center / 100% 100% no-repeat,
    radial-gradient(ellipse 62% 52% at 50% 52%, #fff7fa 0%, #f8e5ed 55%, #eac3d3 100%);
}
.inv[data-design="rose"] .inv-frame { inset: 25.5% 19% 11%; padding: 0; }
.inv[data-design="rose"] .inv-body { gap: 0.5em; }
.inv[data-design="rose"] .inv-names { font-size: 3.3em; line-height: 0.98; }
.inv[data-design="rose"] .inv-names .amp { font-size: 0.6em; }
.inv[data-design="rose"] .inv-divider--chevrons { width: 64%; }
.inv[data-design="rose"] .inv-divider--flourish { width: 70%; }
.inv[data-design="rose"] .inv-venue-name { font-weight: 700; }
.inv[data-design="rose"] .inv-address { font-size: 1em; }
.inv[data-design="rose"] .inv-verse blockquote { font-size: 0.95em; }
.inv[data-design="rose"] .inv-verse figcaption { font-family: "Cinzel", serif; font-size: 0.62em; letter-spacing: 0.16em; }

/* Painted designs: a picture fills the card and the words sit in the part of it left empty.
   --art is the large picture and --art-s the small one, used until the card is wider than a grid thumbnail.
   Each design's frame marks where its picture is empty; fit.js shrinks the words if they outgrow it. */
.inv--art {
  --art-size: cover;
  --art-at: center;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: calc(3.3cqi * var(--fit));
  background: var(--art-s) var(--art-at) / var(--art-size) no-repeat var(--c-paper);
}
@container (min-width: 330px) { .inv--art { background-image: var(--art); } }
/* Sharp phone and laptop screens need the large picture sooner. */
@media (min-resolution: 1.5dppx) {
  @container (min-width: 290px) { .inv--art { background-image: var(--art); } }
}
.inv--art .inv-frame { inset: 16% 14%; padding: 0; }
.inv--art .inv-verse blockquote { font-size: 0.95em; }
.inv--art .inv-verse figcaption { font-family: "Cinzel", serif; font-size: 0.62em; letter-spacing: 0.16em; }

/* Ivory: gold filigree frame, small cross, script names. */
.inv[data-design="ivory"] {
  --c-paper: #f8f0df; --c-ink: #2f2a20; --c-soft: #6f6650; --c-accent: #a9843c;
  --c-names-font: "Pinyon Script", cursive;
  --art: url("../img/cards/ivory.jpg"); --art-s: url("../img/cards/ivory-s.jpg"); --art-size: 100% 100%;
}
.inv[data-design="ivory"] .inv-frame { inset: 14% 17%; }
.inv[data-design="ivory"] .inv-orn { width: 5cqi; }
.inv[data-design="ivory"] .inv-names { font-size: 3.6em; }

/* Olive branch: watercolour olive branches arching over sage paper. */
.inv[data-design="olive"] {
  --c-paper: #eef0e2; --c-ink: #2e3a28; --c-soft: #5e6b52; --c-accent: #6b7f4e;
  --c-names-font: "Italiana", serif;
  --art: url("../img/cards/olive.jpg"); --art-s: url("../img/cards/olive-s.jpg");
}
.inv[data-design="olive"] .inv-frame { inset: 19% 17% 13%; }
.inv[data-design="olive"] .inv-names { font-size: 3.1em; letter-spacing: 0.01em; }

/* Chapel window: a parchment panel inside a stained-glass arch. */
.inv[data-design="lancet"] {
  --c-paper: #efe4c8; --c-ink: #22305f; --c-soft: #4d587f; --c-accent: #a9843c;
  --c-names-font: "Cinzel", serif;
  --art: url("../img/cards/lancet.jpg"); --art-s: url("../img/cards/lancet-s.jpg");
}
.inv[data-design="lancet"] .inv-frame { inset: 27% 24% 13%; }
.inv[data-design="lancet"] .inv-names { font-size: 2em; font-weight: 600; letter-spacing: 0.04em; line-height: 1.15; }

/* Easter lily: white lilies climbing the edge of white paper. */
.inv[data-design="lily"] {
  --c-paper: #fbfaf5; --c-ink: #33402f; --c-soft: #66735f; --c-accent: #7d8c7a;
  --c-names-font: "Cormorant Garamond", Georgia, serif;
  --art: url("../img/cards/lily.jpg"); --art-s: url("../img/cards/lily-s.jpg");
}
.inv[data-design="lily"] .inv-frame { inset: 17% 6% 30% 34%; }
.inv[data-design="lily"] .inv-names { font-size: 2.6em; font-style: italic; font-weight: 600; }

/* Dove: a dove with an olive sprig in a pale sky. */
.inv[data-design="dove"] {
  --c-paper: #e6eff6; --c-ink: #22384a; --c-soft: #4f6a80; --c-accent: #5d7f99;
  --c-names-font: "Great Vibes", cursive;
  --art: url("../img/cards/dove.jpg"); --art-s: url("../img/cards/dove-s.jpg");
}
.inv[data-design="dove"] .inv-frame { inset: 23% 14% 14%; }
.inv[data-design="dove"] .inv-names { font-size: 3.4em; }

/* Bethlehem star: the star over the town on a navy night. */
.inv[data-design="night"] {
  --c-paper: #0b1a3d; --c-ink: #efe6cf; --c-soft: #c9c0a8; --c-accent: #e3bd6a; --c-names: #f6e3ad;
  --c-names-font: "IM Fell English", Georgia, serif;
  --art: url("../img/cards/night.jpg"); --art-s: url("../img/cards/night-s.jpg");
}
.inv[data-design="night"] .inv-frame { inset: 23% 13% 15%; }
.inv[data-design="night"] .inv-names { font-size: 3.2em; font-style: italic; }

/* Holy family: a watercolour nativity at the foot of cream paper. */
.inv[data-design="manger"] {
  --c-paper: #f8ecd4; --c-ink: #4a3320; --c-soft: #7a5c3e; --c-accent: #b88a3a; --c-names: #7a4b22;
  --c-names-font: "Great Vibes", cursive;
  --art: url("../img/cards/manger.jpg"); --art-s: url("../img/cards/manger-s.jpg"); --art-at: center top;
}
.inv[data-design="manger"] .inv-frame { inset: 15% 13% 33%; }
.inv[data-design="manger"] .inv-names { font-size: 3.4em; }

/* Holly and berries: garlands top and bottom on ivory. */
.inv[data-design="holly"] {
  --c-paper: #f7eedb; --c-ink: #233b26; --c-soft: #55684f; --c-accent: #9c1f2b; --c-names: #9c1f2b;
  --c-names-font: "Playfair Display", Georgia, serif;
  --art: url("../img/cards/holly.jpg"); --art-s: url("../img/cards/holly-s.jpg");
}
.inv[data-design="holly"] .inv-frame { inset: 16% 13% 15%; }
.inv[data-design="holly"] .inv-names { font-size: 2.5em; font-style: italic; font-weight: 600; line-height: 1.1; }

/* Candlelight: candles and evergreens glowing on burgundy. */
.inv[data-design="candle"] {
  --c-paper: #3d0a12; --c-ink: #f6e9d2; --c-soft: #e0cba9; --c-accent: #f1d28a; --c-names: #f1d28a;
  --c-names-font: "Great Vibes", cursive;
  --art: url("../img/cards/candle.jpg"); --art-s: url("../img/cards/candle-s.jpg");
}
.inv[data-design="candle"] .inv-frame { inset: 7% 12% 35%; }
.inv[data-design="candle"] .inv-names { font-size: 3.5em; line-height: 1; }

/* Snowy chapel: a little church in the snow under a pale dusk sky. */
.inv[data-design="snow"] {
  --c-paper: #cfdff0; --c-ink: #1f3353; --c-soft: #3f5475; --c-accent: #1f3353;
  --c-names-font: "Cinzel", serif;
  --art: url("../img/cards/snow.jpg"); --art-s: url("../img/cards/snow-s.jpg"); --art-at: center top;
}
.inv[data-design="snow"] .inv-frame { inset: 7% 12% 29%; }
.inv[data-design="snow"] .inv-names { font-size: 2.1em; font-weight: 600; letter-spacing: 0.05em; line-height: 1.15; }

/* Poinsettia: red poinsettias with gold leaves in two corners. */
.inv[data-design="poinsettia"] {
  --c-paper: #f8eed9; --c-ink: #3a2a1f; --c-soft: #6f5a47; --c-accent: #a11622; --c-names: #a11622;
  --c-names-font: "Pinyon Script", cursive;
  --art: url("../img/cards/poinsettia.jpg"); --art-s: url("../img/cards/poinsettia-s.jpg");
}
.inv[data-design="poinsettia"] .inv-frame { inset: 21% 13%; }
.inv[data-design="poinsettia"] .inv-names { font-size: 3.6em; }

/* Evergreen gold: a gold pine garland on forest green. */
.inv[data-design="evergreen"] {
  --c-paper: #0e2f1d; --c-ink: #f3e7c4; --c-soft: #d9c998; --c-accent: #e8c873; --c-names: #e8c873;
  --c-names-font: "Cinzel", serif;
  --art: url("../img/cards/evergreen.jpg"); --art-s: url("../img/cards/evergreen-s.jpg"); --art-size: 100% 100%;
}
.inv[data-design="evergreen"] .inv-frame { inset: 24% 13% 12%; }
.inv[data-design="evergreen"] .inv-names { font-size: 2.2em; font-weight: 500; letter-spacing: 0.06em; line-height: 1.15; }

/* Three kings: the wise men crossing the dunes toward the star. */
.inv[data-design="magi"] {
  --c-paper: #1d4a5c; --c-ink: #fbf1dc; --c-soft: #f1e2c0; --c-accent: #ffe9b5; --c-names: #ffe9b5;
  --c-names-font: "Marcellus", serif;
  --art: url("../img/cards/magi.jpg"); --art-s: url("../img/cards/magi-s.jpg");
  text-shadow: 0 0 0.5em rgb(8 32 44 / 0.75), 0 0.05em 0.15em rgb(8 32 44 / 0.6);
}
.inv[data-design="magi"] .inv-frame { inset: 6% 19% 37% 12%; }
.inv[data-design="magi"] .inv-names { font-size: 2.6em; line-height: 1.1; }

/* Herald angels: gold angels with trumpets over pearl white. */
.inv[data-design="angels"] {
  --c-paper: #faf3e4; --c-ink: #4b3a22; --c-soft: #7d6a4a; --c-accent: #9a7430; --c-names: #9a7430;
  --c-names-font: "Great Vibes", cursive;
  --art: url("../img/cards/angels.jpg"); --art-s: url("../img/cards/angels-s.jpg");
}
.inv[data-design="angels"] .inv-frame { inset: 28% 14% 10%; }
.inv[data-design="angels"] .inv-names { font-size: 3.4em; }

/* Animated designs (films): the invitation is painted on a canvas by assets/js/film-player.js.
   In a grid the film is cropped to the card's shape; it keeps its words away from its top and bottom so nothing
   is lost. The maker's preview and the guest's page show the whole film (see maker.css and guest.css). */
@font-face {
  font-family: "Lobster"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/lobster-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Lobster"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/lobster-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
.inv--film { display: grid; place-items: start center; background: #b00a2c; }
/* Cropped to the card's shape, a little is trimmed from the top (the margin is a share of the width) and the
   rest from the bottom, where only the foot of the picture is. */
.inv-film { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; margin-top: -5%; }
.inv-film-toggle {
  position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 38px; height: 38px;
  color: #fff; background: rgb(40 0 8 / 0.55); border: 0; border-radius: 50%; cursor: pointer;
}
.inv-film-toggle:hover { background: rgb(40 0 8 / 0.75); }
.inv-film-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.inv-film-toggle svg { width: 14px; height: 14px; }
