/* ==========================================================================
   In Loving Memory — shared stylesheet

   Typography
     Cormorant Garamond  — the name, headings, and the italic lines of
                           remembrance. An old-style face with the air of an
                           engraved memorial card.
     Lora                — everything meant to be read at length. Sturdy,
                           generous x-height, comfortable at size.

   Both are served from this site, so there are no third-party requests and
   nothing about a visitor is shared with anyone.
   ========================================================================== */

/* --- Typefaces ---------------------------------------------------------- */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-latin.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: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, 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;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-italic-latin.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: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/cormorant-garamond-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, 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;
}
@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/lora-latin.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: 'Lora';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/lora-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, 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;
}

/* --- Design tokens ------------------------------------------------------
   Light throughout, deliberately. There is no dark mode: this should feel
   like paper in daylight, not a screen at night.                          */
:root {
  --paper:      #f8f4ed;
  --ink:        #22252a;
  --ink-soft:   #494d53;
  --accent:     #2f5d50;
  --accent-dark:#1d4038;
  --accent-tint:#e6efeb;
  --gold:       #a8873f;   /* ornament — too faint to read as text */
  --gold-ink:   #63491a;   /* the same colour, dark enough to read */
  --line:       #ddd3c1;
  --line-soft:  #ece5d8;
  --focus:      #a8451a;

  /* The page closes on a deep green — the same hue as the band above it,
     taken right down, so the foot of the page feels finished rather than
     simply run out. */
  --footer-bg:   #1b3d35;
  --footer-ink:  #cfdcd6;
  --footer-link: #ecd9a8;

  --display: 'Cormorant Garamond', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --body:    'Lora', Georgia, 'Times New Roman', serif;

  --measure: 32rem;
  --tap:     3rem;
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  /* A percentage, not a pixel value, so a reader who has already enlarged
     type in their own browser keeps that rather than having it overridden. */
  font-size: 125%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.75;
  background-color: var(--paper);
  /* A soft wash of light from above. */
  background-image: radial-gradient(120% 55% at 50% -8%, rgba(168, 135, 63, .11), transparent 70%);
  background-attachment: fixed;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 .4em;
  text-wrap: balance;
}
h2 { font-size: clamp(1.75rem, 4.5vw, 2.2rem); }

p { margin: 0 0 1.1em; max-width: var(--measure); }

a { color: var(--accent-dark); text-underline-offset: .18em; }
a:hover { color: var(--focus); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

/* --- Layout ------------------------------------------------------------- */
.wrap { width: min(100% - 2.5rem, 40rem); margin-inline: auto; }
/* Wider than the reading column, so the two events can sit abreast. */
.wrap--wide { width: min(100% - 2.5rem, 52rem); }
main { padding-bottom: 5rem; }
.section { margin-top: 4rem; }

/* --- Ornaments ---------------------------------------------------------- */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  width: min(100%, 18rem);
  margin: 3rem auto;
  color: var(--gold);
}
.ornament::before, .ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, currentColor);
}
.ornament::after { background: linear-gradient(to left, transparent, currentColor); }
.ornament svg { flex: none; display: block; }
.ornament--tight { margin: 2rem auto; width: min(100%, 11rem); }

/* --- Hero --------------------------------------------------------------- */
.hero { text-align: center; padding: 4rem 0 0; }
.hero p { margin-inline: auto; }

/* The line that names them, doubling as the way back to the memorial page.
   No underline at rest, as a masthead rather than a link in a sentence, but
   plainly one on hover and to the keyboard. */
.wordmark {
  display: inline-block;
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.35rem;
  /* Ordinary leading, with the height that makes it a comfortable target
     coming from the padding — a tap-sized line-height throws the two lines
     far apart when it wraps on a phone. */
  line-height: 1.35;
  min-height: var(--tap);
  letter-spacing: .05em;
  color: var(--accent-dark);
  text-decoration: none;
  padding: .6rem .5rem;
  /* Set well clear of what follows: it is the head of the page, not the first
     line of it. */
  margin-bottom: 3rem;
  text-wrap: balance;
}
.wordmark:hover { color: var(--focus); text-decoration: underline; text-underline-offset: .2em; }

.hero__eyebrow {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.55rem;
  letter-spacing: .06em;
  color: var(--accent);
  margin: 0 0 2rem;
  max-width: none;
}

/* An arched frame — the shape of a chapel window. */
.portrait {
  width: min(17rem, 66vw);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  margin: 0 auto 2.25rem;
  border-radius: 48% 48% 3px 3px / 34% 34% 2px 2px;
  box-shadow: 0 2px 4px rgba(60, 48, 28, .07), 0 14px 40px rgba(60, 48, 28, .10);
}

.hero__name {
  font-size: clamp(2.7rem, 10vw, 4.1rem);
  line-height: 1.05;
  letter-spacing: .01em;
  margin: 0 0 .75rem;
}

.hero__dates {
  font-family: var(--display);
  font-variant-numeric: lining-nums;
  font-size: 1.45rem;
  letter-spacing: .04em;
  color: var(--ink-soft);
  margin: 0 auto;
  max-width: none;
}
.hero__dates .sep { padding: 0 .55rem; color: var(--gold); }
.hero__dates time { white-space: nowrap; }

.hero__note { margin-top: 1.75rem; }

/* --- The line beneath the name ------------------------------------------
   Not a quotation any more, so it is a plain paragraph rather than a
   blockquote, and carries no attribution. The ornament follows it. */
.epitaph {
  margin: 3rem auto 0;
  max-width: 30rem;
  text-align: center;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.4rem, 3.6vw, 1.75rem);
  line-height: 1.5;
  color: var(--ink);
  text-wrap: balance;
}

/* --- Section headings --------------------------------------------------- */
.eyebrow {
  display: block;
  font-family: var(--body);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin: 0 0 .6rem;
  max-width: none;
}

/* --- The order of the day ----------------------------------------------
   Set like a printed programme: centred, unboxed, one thing under another. */
.events { display: grid; }
.event { text-align: center; }

/* Stacked on a phone and parted only by a hairline, not an ornament: the two
   events are one thing, and the RSVP beneath belongs to both of them. An
   ornament here read as a section break and made the button look as though it
   applied to the celebration alone. */
.event + .event {
  margin-top: 2.75rem;
  padding-top: 2.75rem;
  border-top: 1px solid var(--line-soft);
}

/* The reply covers the whole day, so it must sit further from the events than
   they sit from each other — otherwise it reads as belonging to the second
   one alone, which is exactly the wrong hierarchy. */
.events + .actions { margin-top: 3.5rem; }

/* Side by side once there is room, parted by an upright hairline. */
@media (min-width: 900px) {
  .events { grid-template-columns: 1fr 1fr; }
  .event { padding-inline: 2.75rem; }
  .event + .event {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    border-left: 1px solid var(--line-soft);
  }
}

.event h2 {
  font-size: clamp(1.9rem, 5vw, 2.35rem);
  margin: 0 0 1.1rem;
}

.event dl { margin: 0; }
.event dd { margin: 0 auto .9rem; max-width: var(--measure); }
.event dd:last-child { margin-bottom: 0; }

.event .when {
  font-family: var(--display);
  font-variant-numeric: lining-nums;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}
.event .where { font-size: 1.02rem; line-height: 1.6; }
.event .aside {
  font-style: italic;
  color: var(--ink-soft);
  font-size: .95rem;
}

/* The address is the link — a pin beside it says where it goes, and the
   underline says it is a link, so neither meaning rests on the icon alone. */
.where a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: var(--tap);
  font-weight: 600;
  text-align: left;
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
}
.where .pin { flex: none; color: var(--gold-ink); }
.where a:hover .pin { color: var(--focus); }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: .5rem 1.85rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-family: var(--body);
  font-size: .86rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--ghost { background: transparent; color: var(--accent-dark); }
.btn--ghost:hover { background: var(--accent-tint); color: var(--accent-dark); }
.btn--danger { background: transparent; border-color: #9e3b3b; color: #8a2b2b; }
.btn--danger:hover { background: #9e3b3b; border-color: #9e3b3b; color: #fff; }
/* A quieter button: sentence case, not the small caps of the ones that
   carry the page. Used for the optional upload beside a required Send. */
.btn--plain { text-transform: none; letter-spacing: .01em; font-size: .95rem; }
.btn--small { min-height: 2.6rem; padding: .35rem 1.2rem; font-size: .8rem; }
.btn--block { width: 100%; }

.actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.75rem; }
.actions--center { justify-content: center; }
.actions--spaced { margin-top: 3rem; }

/* --- Quiet notices ------------------------------------------------------ */
/* Set as a line of italic text rather than a coloured box. */
.notice {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink-soft);
  margin: 0 auto;
  max-width: var(--measure);
}

/* --- A band across the page ---------------------------------------------
   The invitation to share a memory sits on its own ground, edge to edge, so
   it reads as a thing apart from the details of the day without being boxed
   in. main is full width and each section carries its own .wrap, so this
   needs no viewport-width trickery and cannot cause sideways scrolling. */
.band {
  margin-top: 5rem;
  padding: 4rem 0 4.5rem;
  /* The same parchment, deeper — a shade of the page rather than a colour
     set against it. */
  background-image: linear-gradient(180deg, #f2ebdf 0%, #eae1d0 100%);
  border-top: 1px solid rgba(168, 135, 63, .35);
  border-bottom: 1px solid rgba(168, 135, 63, .35);
}
.band p { margin-inline: auto; }

/* The band runs to the foot of the page, so the space main normally leaves
   below its content would show as a stripe of bare parchment beneath it. */
.ends-with-band { padding-bottom: 0; }

/* The band no longer carries a large heading, so its one line of invitation
   has to hold the section on its own. */
.band__lead {
  font-family: var(--display);
  font-size: clamp(1.35rem, 3.4vw, 1.65rem);
  line-height: 1.45;
  color: var(--ink);
  max-width: 28rem;
  margin-top: .25rem;
  text-wrap: balance;
}

/* The ghost button's usual hover tint is the band's own ground, which would
   make it disappear; on the band it lifts to parchment instead. */
.band .btn--ghost:hover { background: var(--paper); }

/* --- Forms -------------------------------------------------------------- */
.field { margin-bottom: 2rem; }

/* :not(.choice) — a tickbox's own label is a flex row, and must not be turned
   into a block-level heading by this rule. */
.field > label:not(.choice),
.fieldset__legend,
.field-label {
  display: block;
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: .3rem;
}

.hint {
  display: block;
  color: var(--ink-soft);
  font-size: .88rem;
  line-height: 1.6;
  margin: 0 0 .7rem;
  max-width: var(--measure);
}
.hint--tight { margin-top: .5rem; }

input[type="text"],
input[type="password"],
input[type="number"],
textarea {
  width: 100%;
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
  padding: .65rem .1rem;
  min-height: var(--tap);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
textarea {
  border: 1px solid var(--line);
  padding: .8rem .9rem;
  min-height: 9.5rem;
  resize: vertical;
  line-height: 1.7;
}
input:hover, textarea:hover { border-color: var(--ink-soft); }
input:focus, textarea:focus { border-color: var(--accent); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #9e3b3b; }

/* A headcount is one or two digits; a full-width box invites a phone number. */
input[type="number"] { max-width: 7rem; font-variant-numeric: lining-nums; }

/* Plus and minus either side of the number, each a full-sized target. */
.stepper { display: flex; align-items: center; gap: .9rem; }
.stepper input[type="number"] {
  width: 4.5rem;
  max-width: none;
  text-align: center;
  font-family: var(--display);
  font-size: 1.6rem;
  padding: .35rem 0;
}
.stepper__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: var(--tap);
  height: var(--tap);
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: transparent;
  color: var(--accent-dark);
  font-family: var(--body);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.stepper__btn:hover:not(:disabled) { background: var(--accent); color: var(--paper); }
.stepper__btn:disabled { opacity: .3; cursor: not-allowed; }

fieldset { border: 0; padding: 0; margin: 0 0 2rem; }
.choices { display: grid; gap: .3rem; }
/* Marked by a gilt rule when chosen, rather than boxed. */
.choice {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  padding: 1rem .9rem;
  border-left: 3px solid var(--line);
  cursor: pointer;
}
.choice:hover { border-left-color: var(--accent); background: rgba(230, 239, 235, .5); }
.choice input { width: 1.35rem; height: 1.35rem; margin: .3rem 0 0; flex: none; accent-color: var(--accent); }
.choice:has(input:checked) { border-left-color: var(--gold); background: var(--accent-tint); }
.choice__title { display: block; font-weight: 600; }
.choice__desc  { display: block; color: var(--ink-soft); font-size: .88rem; line-height: 1.6; }

.filefield { display: grid; gap: .85rem; justify-items: start; }

/* The file input is hidden but still focusable, so the ring has to show on the
   label that stands in for it. */
.filepick { cursor: pointer; }
#photo:focus-visible + .filepick { outline: 3px solid var(--focus); outline-offset: 3px; }

.preview { display: none; align-items: center; gap: 1.1rem; }
.preview[data-shown="true"] { display: flex; }
.preview img { width: 6rem; height: 6rem; object-fit: cover; flex: none; border-radius: 2px; }

/* A quiet link rather than a second button competing with the picker. */
.linkbtn {
  border: 0;
  background: none;
  padding: .25rem 0;
  font-family: var(--body);
  font-size: .92rem;
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: .2em;
  cursor: pointer;
}
.linkbtn:hover { color: var(--focus); }

/* The count is an aside, not part of the label. */
.counter {
  margin: .4rem 0 0;
  max-width: none;
  text-align: right;
  font-size: .82rem;
  font-variant-numeric: lining-nums;
  color: var(--ink-soft);
}

.optional { font-family: var(--body); font-size: .9rem; font-weight: 400; color: var(--ink-soft); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Status messages (announced to screen readers via aria-live).
   A rule in the margin, not a coloured panel. */
.status-msg {
  margin-bottom: 1.75rem;
  padding: 0 0 .25rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: .92rem;
  letter-spacing: .04em;
}
.status-msg:empty { display: none; }
.status-msg[data-tone="ok"],
.status-msg[data-tone="error"],
.status-msg[data-tone="busy"] {
  padding: .35rem 0 .35rem 1.1rem;
  border-left: 3px solid var(--line);
  text-align: left;
  color: var(--ink);
  font-size: 1rem;
  letter-spacing: normal;
}
.status-msg[data-tone="ok"]    { border-left-color: var(--accent); }
.status-msg[data-tone="error"] { border-left-color: #9e3b3b; }
.status-msg[data-tone="busy"]  { border-left-color: var(--gold); }
.status-msg strong {
  display: block;
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 600;
}

.note { margin: 1.75rem auto 0; text-align: center; }

/* --- Guestbook ----------------------------------------------------------
   A book of condolences: one entry after another, parted by a hairline. */
.entries { list-style: none; margin: 0; padding: 0; }

.entry { position: relative; min-width: 0; padding: 2.25rem 0; }
.entry + .entry { border-top: 1px solid var(--line-soft); }
.entry:first-child { padding-top: .5rem; }

/* Capped in both directions: a single photograph should sit within the page,
   not fill it, however large the original was. */
.entry__photo {
  max-width: min(100%, 24rem);
  max-height: 20rem;
  width: auto;
  margin-bottom: 1.4rem;
  box-shadow: 0 1px 3px rgba(60, 48, 28, .08), 0 8px 24px rgba(60, 48, 28, .08);
}

/* Visitors' words can contain a very long web address or an unbroken run of
   characters; these must wrap rather than stretch the page sideways. */
.entry__message, .entry__by, .entry__by strong { overflow-wrap: anywhere; }

.entry__message {
  font-size: 1.05rem;
  line-height: 1.8;
  white-space: pre-wrap;
  margin: 0 0 1.1rem;
  max-width: var(--measure);
}

.entry__by { margin: 0; color: var(--ink-soft); font-size: .88rem; letter-spacing: .04em; }
.entry__by strong {
  display: block;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
}

.tag {
  display: inline-block;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  color: var(--ink-soft);
}
.tag::before { content: "— "; }
.tag--pending { color: var(--gold-ink); }
.tag--private { color: #3f4870; }
.tag--live    { color: var(--accent); }

.empty { text-align: center; color: var(--ink-soft); padding: 3rem 1rem; }
.empty p { margin-inline: auto; }
.empty strong { font-family: var(--display); font-size: 1.5rem; color: var(--ink); }

/* --- Replies to the invitation ------------------------------------------ */
.totals {
  font-family: var(--display);
  font-variant-numeric: lining-nums;
  font-size: 1.3rem;
  text-align: center;
  color: var(--ink);
  margin: 0 0 1.75rem;
  max-width: none;
}
.rsvp__facts {
  font-family: var(--display);
  font-variant-numeric: lining-nums;
  font-size: 1.25rem;
  margin: .1rem 0 .25rem;
}
.rsvp__contact { color: var(--ink-soft); font-size: .95rem; margin: 0 0 .35rem; overflow-wrap: anywhere; }

/* --- Admin tabs --------------------------------------------------------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 1rem;
}
.tabs button {
  min-height: var(--tap);
  padding: 0 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  font-family: var(--body);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  cursor: pointer;
}
.tabs button:hover { border-color: var(--accent); color: var(--accent-dark); }
.tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* --- Docked action ------------------------------------------------------
   A single button held at the foot of the window, so it stays in reach
   however far down someone has read. */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: .8rem 0 calc(.8rem + env(safe-area-inset-bottom, 0px));
  background: rgba(248, 244, 237, .94);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
/* display:flex, not the button's usual inline-flex — auto side margins cannot
   centre an inline-level box. */
.dock .btn { display: flex; max-width: 22rem; margin-inline: auto; }

/* The page must end clear of the bar rather than behind it. */
.has-dock { padding-bottom: 6rem; }

/* --- Footer ------------------------------------------------------------- */
.footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  padding: 3rem 0 3.25rem;
  font-size: .92rem;
  text-align: center;
}
.footer p { margin-inline: auto; }
.footer a {
  display: inline-block;
  min-height: var(--tap);
  line-height: var(--tap);
  padding-inline: .6rem;
  color: var(--footer-link);
  text-underline-offset: .2em;
}
.footer a:hover { color: #fff; }

/* --- Utilities ---------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  min-height: 0;          /* a min-height elsewhere would otherwise win */
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.center { text-align: center; }
.center p { margin-inline: auto; }
.page-title { font-size: clamp(2.1rem, 6vw, 2.9rem); }
.hero--compact { padding-bottom: 0; }
.hero--snug    { padding-bottom: 1rem; }
.hero--tight   { padding-bottom: .5rem; }

/* --- A quiet arrival ---------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .hero__eyebrow, .portrait, .hero__name, .hero__dates {
    animation: rise .9s cubic-bezier(.22, .61, .36, 1) both;
  }
  .portrait    { animation-delay: .1s; }
  .hero__name  { animation-delay: .2s; }
  .hero__dates { animation-delay: .3s; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* --- Print -------------------------------------------------------------- */
@media print {
  :root { --paper: #fff; --ink: #000; --ink-soft: #333; --line: #999; --gold: #888; }
  body { background: #fff; }
  .footer, .actions, .dock, form, .tabs { display: none !important; }
  body { font-size: 11pt; }
  .event, .entry { break-inside: avoid; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; word-break: break-all; }
}
