:root {
  --navy: #1c2440;
  --navy-deep: #141a30;
  --white: #fdfdfb;
  --bone: #f7f4ee;
  --ink: #1d1d1f;

  --serif: "EB Garamond", "Garamond", "Times New Roman", serif;
  --script: "Allura", "Snell Roundhand", "Segoe Script", cursive;

  /* Fit the width on phones and the height on laptops. */
  --card-w: min(100% - 2rem, 36rem, max(20rem, (100vh - 6rem) * 0.66));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 5vw, 3.5rem) 0;
  background:
    radial-gradient(ellipse at 50% 35%, var(--navy) 0%, var(--navy-deep) 100%)
    fixed;
  color: var(--ink);
  font-family: var(--serif);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* White card layer */
.card {
  width: var(--card-w);
  padding: clamp(0.45rem, 1.6vw, 0.7rem);
  background: var(--white);
  /* Everything inside sizes in cqi so the card scales like print. */
  container-type: inline-size;
  box-shadow:
    0 1px 2px rgb(0 0 0 / 0.25),
    0 12px 40px rgb(0 0 0 / 0.35);
  animation: rise 1.6s cubic-bezier(0.33, 0, 0.15, 1) 0.2s both;
}

/* Bone paper layer */
.card__paper {
  position: relative;
  aspect-ratio: 5 / 7.2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10cqi 8cqi;
  background-color: var(--bone);
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.04), 0 1px 3px rgb(0 0 0 / 0.12);
  text-align: center;
}

/* Subtle paper grain */
.card__paper::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.3 0 0 0 0 0.22 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.06;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.card__paper > * {
  position: relative;
  margin: 0;
}

.card__thistle {
  display: block;
  width: 52cqi;
  margin-bottom: 6.5cqi;
}

.card__thistle img {
  display: block;
  width: 100%;
  height: auto;
}

.card__title {
  font-size: 4.6cqi;
  font-weight: 600;
  letter-spacing: 0.24em;
  margin-right: -0.24em; /* re-centre tracked caps */
  text-transform: uppercase;
  line-height: 1.2;
}

.card__lead {
  margin-top: 4.5cqi;
  font-size: max(0.66rem, 2.3cqi);
  font-weight: 500;
  letter-spacing: 0.2em;
  margin-right: -0.2em;
  text-transform: uppercase;
}

.card__names {
  margin-top: 2.5cqi;
  font-family: var(--script);
  font-weight: 400;
  font-size: 10.5cqi;
  line-height: 1.15;
  white-space: nowrap;
}

.card__names .amp {
  font-size: 0.82em;
  padding: 0 0.04em;
}

.card__detail {
  margin-top: 3.5cqi;
  display: flex;
  flex-direction: column;
  gap: 2.4cqi;
  font-size: max(0.68rem, 2.5cqi);
  font-weight: 500;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.card__detail > * {
  margin-right: -0.17em;
}

.card__venue {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgb(29 29 31 / 0.3);
  text-underline-offset: 0.35em;
  transition: text-decoration-color 0.2s ease;
}

.card__venue:hover,
.card__venue:focus-visible {
  text-decoration-color: currentColor;
}

.card__venue:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 0.4em;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card {
    animation: none;
  }
}

@media print {
  body {
    background: none;
  }
  .card {
    box-shadow: none;
  }
}
