:root {
  --font-display: "Libre Bodoni", Georgia, serif;
  --font-text: "Source Sans 3", system-ui, sans-serif;

  --ink: #000;
  --accent: #ff18a3;

  /* Fluid between a 360px and 1440px viewport. */
  --step-greeting: clamp(1.5rem, 1.06rem + 1.94vw, 2.25rem);
  --step-body: clamp(1rem, 0.93rem + 0.32vw, 1.125rem);
  --step-meta: 0.875rem;

  --gutter: clamp(1.75rem, 0.44rem + 5.83vw, 6.25rem);
  --measure: 34ch;
}

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

body { margin: 0; }
p, h1 { margin: 0; }

/* Fixed <img>, not a CSS background: iOS Safari ignores `background-attachment:
   fixed`, and a background can't pick a variant from srcset. */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Scrim under the type, so a photo swap can't cost legibility. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(120% 90% at 100% 0%, #ffffff8c, #ffffff38 45%, #ffffff00 72%);
}

/* Type sits in the photo's quiet upper-right corner. */
.nameplate {
  display: grid;
  justify-items: end;
  gap: 1.25rem;
  padding: var(--gutter);
  text-align: right;
  text-wrap: pretty;
  font-family: var(--font-display);
  color: var(--ink);
}

.date {
  font-family: var(--font-text);
  font-size: var(--step-meta);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #000000b3;
}

.greeting {
  font-size: var(--step-greeting);
  font-weight: 500;
  line-height: 1.15;
}

.bodycopy {
  font-family: var(--font-text);
  font-size: var(--step-body);
  line-height: 1.5;
  max-inline-size: var(--measure);
}

.links {
  font-size: var(--step-body);
  line-height: 1.6;
}

/* Underlined at rest — hover colour alone reaches neither touch nor keyboard. */
a {
  color: var(--ink);
  text-decoration: underline 1px #00000059;
  text-underline-offset: 0.2em;
  transition: color 160ms ease, text-decoration-color 160ms ease,
              text-decoration-thickness 160ms ease;
}

a:hover, a:focus-visible {
  color: var(--accent);
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  a { transition: none; }
}

@media (prefers-contrast: more) {
  body::before { background: #ffffffb8; }
  a { text-decoration-color: currentColor; }
}

@media print {
  .backdrop, body::before { display: none; }
  .nameplate { justify-items: start; text-align: left; padding: 0; }
}
