/* The labels that follow the box. Each is a collectible matchbox label in
   one of three colourways of the same inks, with a series mark that counts
   the labels the guest has actually been shown. */

.set {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto 40px;
  padding: 0 var(--gutter);
  scroll-margin-top: 16px;
}

/* ---------- the label: black box edge, inked field, keyline frame ---------- */
.card {
  --field: var(--red);
  --ink: var(--paper);
  --keyline: var(--paper);
  --accent: var(--black);

  margin: 0;
  padding: 0 2px 2px 0;
  background: var(--black);
  color: var(--ink);
}

.card--paper {
  --field: var(--paper);
  --ink: var(--black);
  --keyline: var(--red);
  --accent: var(--red);
}

.card--black {
  --field: var(--black);
  --ink: var(--paper);
  --keyline: var(--red);
  --accent: var(--red);

  padding: 0;
  outline: 2px solid var(--black);
}

.card-field {
  height: 100%;
  padding: 8px;
  background: var(--field);
}

.card-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  padding: 22px 20px 16px;
  border: 2px solid var(--keyline);
}

.card-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.series {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.card-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.25rem, 9vw, 3.5rem);
  font-stretch: 72%;
  font-weight: 900;
  line-height: 1.14;
  text-transform: uppercase;
  text-wrap: balance;
}

.card--paper .card-title {
  color: var(--red);
}

.card--red .card-title {
  text-shadow: var(--ghost);
}

.card-title--huge {
  font-size: clamp(3.25rem, 16vw, 6rem);
}

/* label art fills whatever a label has left once it stands beside its photo */
.card-art {
  display: none;
}

.art-roof,
.art-line {
  fill: none;
  stroke: var(--black);
  stroke-width: 6;
  stroke-linejoin: miter;
}

.art-roof {
  stroke-width: 9;
}

.art-wall {
  fill: var(--paper);
}

.art-door {
  fill: var(--black);
}

.art-stick {
  fill: var(--paper);
  stroke: var(--black);
  stroke-width: 3;
}

.art-head {
  fill: var(--black);
}

/* ---------- photos sit in a keyline well; a missing one prints a placeholder ---------- */
.card--photo .card-inner {
  padding: 12px 12px 10px;
}

.photo-well {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--red);
}

.card--photo.card--paper .photo-well,
.card--photo .photo-well {
  background: var(--black);
}

.photo-well img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 25%;
}

/* ---------- báo tin ---------- */
.card--families .card-inner {
  padding-right: 84px;
}

.side-print {
  position: absolute;
  top: 18px;
  right: 14px;
  bottom: 18px;
  overflow: hidden;
  color: var(--red);
  font-family: var(--display);
  font-size: 4rem;
  font-stretch: 62%;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  writing-mode: vertical-rl;
}

.families {
  display: grid;
  gap: 24px;
}

.family {
  display: grid;
  justify-items: start;
  gap: 8px;
}

.roof {
  width: 56px;
  height: 30px;
  overflow: visible;
}

.roof path {
  fill: none;
  stroke: var(--black);
  stroke-width: 4;
  stroke-linejoin: miter;
}

.roof rect {
  fill: var(--red);
}

.side-tag {
  margin: 0;
  padding: 3px 10px 2px;
  background: var(--black);
  color: var(--paper);
  font-family: var(--display);
  font-size: 1.25rem;
  font-stretch: 80%;
  font-weight: 900;
  line-height: 1.3;
  text-transform: uppercase;
}

.parents {
  font-size: 1.0625rem;
  line-height: 1.55;
}

.parents b {
  font-weight: 700;
}

.address {
  font-size: 0.9375rem;
  line-height: 1.45;
}

/* ---------- lễ vu quy and tiệc cưới ---------- */
.set--grid {
  display: grid;
  gap: 20px;
}

.time-badge {
  display: grid;
  place-items: center;
  width: 96px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--black);
  box-shadow: var(--trap);
  color: var(--paper);
  transform: rotate(-6deg);
}

.time-badge b {
  font-family: var(--display);
  font-size: 1.875rem;
  font-stretch: 85%;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.time-badge--inline {
  display: inline-grid;
  width: 72px;
  background: var(--red);
  box-shadow: none;
}

.time-badge--inline b {
  font-size: 1.375rem;
}

.venue-block {
  display: grid;
  gap: 4px;
}

.venue-run {
  font-family: var(--display);
  font-size: 2rem;
  font-stretch: 75%;
  font-weight: 900;
  line-height: 1.14;
  text-transform: uppercase;
}

.venue-run .venue {
  color: var(--black);
  font-size: inherit;
}

.venue-run .venue-label {
  font-size: inherit;
}

/* the venue's name stays whole: the run breaks before it, never inside it */
.venue-run .venue {
  display: inline-block;
}

.run-line {
  display: block;
}

.locked .tongue-art .art-lit,
body:not(.locked) .tongue-art .art-unlit {
  display: none;
}

.reception-invite {
  font-size: 1.0625rem;
  font-weight: 700;
}

.venue-label {
  font-size: 0.9375rem;
}

.venue {
  font-family: var(--display);
  font-size: 2rem;
  font-stretch: 75%;
  font-weight: 900;
  line-height: 1.08;
  text-transform: uppercase;
}

.venue--big {
  font-size: clamp(2.25rem, 9vw, 3rem);
}

.room {
  margin-top: -10px;
  font-weight: 700;
}

.when-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 0;
  background: var(--paper);
  color: var(--black);
  cursor: pointer;
  font: 700 1rem / 1.2 var(--text);
  text-decoration: none;
}

.btn:hover {
  background: var(--red);
  color: var(--paper);
}

.btn--solid {
  background: var(--black);
  color: var(--paper);
}

.calendar-note {
  font-weight: 700;
}

/* ---------- the month ---------- */
.calendar-year {
  color: var(--black);
}

.month {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px 2px;
  text-align: center;
}

.month .weekday {
  padding-bottom: 6px;
  border-bottom: 3px solid var(--black);
  font-size: 0.8125rem;
  font-weight: 700;
}

.month .day {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  font-family: var(--display);
  font-size: 1.25rem;
  font-stretch: 100%;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.month .day.is-wedding {
  position: relative;
  border-radius: 50%;
  background: var(--red);
  box-shadow: var(--ghost);
  color: var(--paper);
}

/* ---------- lịch trình ---------- */
.schedule {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.schedule li {
  display: grid;
  grid-template-columns: 5.2em 1fr;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-top: 2px solid var(--paper);
}

.schedule li:last-child {
  border-bottom: 2px solid var(--paper);
}

.schedule time {
  font-family: var(--display);
  font-size: 1.625rem;
  font-stretch: 100%;
  font-weight: 900;
  color: var(--black);
  font-variant-numeric: tabular-nums;
}

.schedule span {
  font-size: 1.0625rem;
  font-weight: 700;
}

/* ---------- cảm ơn: the box shut again ---------- */
.set--closing {
  max-width: 680px;
  padding-bottom: 96px;
}

.mini-box {
  display: flex;
  flex-direction: column;
}

.mini-drawer {
  position: relative;
  z-index: 1;
  margin: 0 18px -4px;
  padding: 6px 6px 0;
  background: var(--black);
}

/* shut, six tenths of the photo show; the other four tenths are a row that
   collapses (0fr) while the photo hangs over it. It starts open and slides in. */
.mini-drawer {
  display: grid;
  grid-template-rows: auto minmax(0, 0fr);
  overflow: hidden;
}

.mini-box.will-shut .mini-drawer {
  grid-template-rows: auto minmax(0, 1fr);
}

.mini-drawer::after {
  content: "";
  min-height: 0;
  aspect-ratio: 10 / 4.4;
}

.mini-drawer .photo-well {
  aspect-ratio: 10 / 6.6;
  overflow: visible;
}

.mini-drawer img {
  position: absolute;
  top: 0;
  left: 0;
  height: auto;
  aspect-ratio: 10 / 11;
  object-position: 50% 20%;
}

.card--closing {
  position: relative;
  z-index: 2;
}

.closing-message {
  font-family: var(--display);
  font-size: clamp(1.75rem, 7vw, 2.625rem);
  font-stretch: 82%;
  font-weight: 800;
  line-height: 1.12;
  text-shadow: var(--ghost);
  text-wrap: balance;
}

.closing-names {
  font-family: var(--display);
  font-size: 1.625rem;
  font-stretch: 75%;
  font-weight: 900;
  text-transform: uppercase;
}

.closing-names .amp {
  margin: 0 0.15em;
}

.closing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.closing-date {
  display: grid;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.seal {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.mark {
  flex: none;
  width: 72px;
  height: 72px;
}

.mark circle {
  fill: var(--black);
}

.mark rect {
  fill: var(--paper);
}

.mark-head {
  fill: var(--red);
  stroke: var(--paper);
  stroke-width: 2;
}

.seal:not([hidden]) + .mark {
  display: none;
}

.striker--mini {
  height: 22px;
  margin-top: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  .mini-drawer {
    transition: grid-template-rows 1.4s var(--ease-out);
  }
}

/* ---------- wider screens ---------- */
@media (min-width: 560px) {
  .families {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .set {
    margin-bottom: 72px;
  }

  .card-inner {
    padding: 30px 30px 20px;
  }

  .card--families .card-inner {
    padding-right: 140px;
  }

  .side-print {
    right: 20px;
    font-size: 7rem;
  }

  .families {
    gap: 48px;
  }

  .set--grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 28px;
  }

  .card--ceremony-photo {
    grid-column: 1 / 6;
  }

  .card--rite {
    grid-column: 6 / 13;
  }

  .card--reception {
    grid-column: 1 / 8;
  }

  .card--reception-photo {
    grid-column: 8 / 13;
  }

  .card--month {
    grid-column: 1 / 7;
  }

  .card--schedule {
    align-self: start;
    grid-column: 7 / 13;
  }

  /* a label missing its partner takes the whole row */
  #ceremony-photo[hidden] + .card--rite,
  .card--reception:has(+ #reception-photo[hidden]),
  .card--month:has(+ #schedule-frame[hidden]) {
    grid-column: 1 / -1;
  }

  .card-art {
    display: block;
    flex: 1 1 0;
    width: 100%;
    min-height: 0;
    max-height: 320px;
  }
}
