/* Blackwood General — structural styles.
   Palette + font tokens and atmospheric effects live in /themes/<theme>.css.
   Everything here reads tokens only, so a new theme file can swap the look. */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-body), system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}

img, svg { max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }
.invite-inner :focus-visible, .clipboard :focus-visible { outline-color: var(--bg); }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--cream); color: var(--bg); padding: 8px 12px; }
.skip-link:focus { left: 8px; }

.mono { font-family: var(--font-mono), ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }
.muted { color: var(--grey-light); }
.muted-dark { color: var(--grey); }
.eyebrow { margin: 0 0 6px; color: var(--grey-light); }
.h2 { font-family: var(--font-head), sans-serif; font-weight: 600; font-size: clamp(30px, 6.5vw, 44px); letter-spacing: .02em; line-height: 1.05; margin: 0 0 22px; text-transform: uppercase; }
.h3 { font-family: var(--font-head), sans-serif; font-weight: 500; font-size: 24px; letter-spacing: .03em; line-height: 1.1; margin: 0 0 12px; text-transform: uppercase; }

/* ---------- photographs ----------
   Every scene is an <img> inside .scene. The photo is darkened and desaturated,
   then a vignette (::before) and a still grain (::after) sit on top. Body copy
   never sits directly on a photo: it lives on a solid block or behind a gradient scrim. */
.scene { position: relative; overflow: hidden; background: var(--bg); isolation: isolate; }
.scene img {
  display: block; width: 100%; height: 100%; object-fit: cover; object-position: center;
  filter: saturate(var(--photo-sat, .72)) brightness(var(--photo-bright, .78)) contrast(1.04);
}
.scene::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, transparent 35%, rgba(var(--bg-rgb),.72) 100%);
}
.scene::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background-image: var(--grain-tile);
  background-size: 180px 180px;
  opacity: .16; mix-blend-mode: overlay;
}
/* a photo that fills a whole section, behind its content */
.scene-bg { position: absolute; inset: 0; z-index: 0; }
.scene-bg img { position: absolute; inset: 0; }
.block-photo { position: relative; isolation: isolate; }
.block-photo .block-inner { position: relative; z-index: 1; }

/* ---------- status strip ---------- */
.status-strip {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  padding: calc(8px + env(safe-area-inset-top)) 16px 8px;
  font-family: var(--font-mono), monospace; font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--grey-light);
  background: linear-gradient(to bottom, rgba(var(--bg-rgb),.92) 40%, transparent);
  pointer-events: none;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.status-strip.is-online .status-dot { background: var(--cream); box-shadow: 0 0 10px var(--cream); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: calc(120px + env(safe-area-inset-top)) 24px 110px;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg);
}
.hero-photo { position: absolute; inset: 0; z-index: 0; display: block; overflow: hidden; }
.hero-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%;
  filter: saturate(.85) brightness(1) contrast(1.04);
  transform-origin: 50% 35%;
}
/* the scrim is what makes the story legible: solid bg by the time the text arrives */
.hero-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(var(--bg-rgb),.12) 0%, rgba(var(--bg-rgb),0) 20%, rgba(var(--bg-rgb),.18) 52%, rgba(var(--bg-rgb),.82) 80%, var(--bg) 94%),
    radial-gradient(90% 50% at 50% 100%, rgba(var(--bg-rgb),.45), transparent 70%);
}
.hero-grain {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: var(--grain-tile); background-size: 180px 180px; opacity: .14; mix-blend-mode: overlay;
}
.hero-inner { position: relative; z-index: 2; max-width: 620px; margin: 0 auto; width: 100%; text-shadow: 0 1px 16px rgba(var(--bg-rgb),.95), 0 0 3px rgba(var(--bg-rgb),.95); }
/* a soft pool of dark behind the story so every line clears 4.5:1 even where the photo is brightest */
.hero-inner::before {
  content: ""; position: absolute; inset: -30px -40px -40px; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 60%, rgba(var(--bg-rgb),.7) 22%, rgba(var(--bg-rgb),.42) 58%, transparent 100%);
}
.hero-loading { margin: 0; }

.hero-title { margin: 0 0 4px; font-family: var(--font-head), sans-serif; font-weight: 700; font-size: clamp(38px, 10vw, 74px); line-height: 1; letter-spacing: .03em; text-transform: uppercase; }
.hero-title .emoji { font-size: .78em; vertical-align: 0.06em; margin-right: .14em; color: var(--cream); font-family: "Apple Symbols", "Segoe UI Symbol", "Noto Sans Symbols", var(--font-body), sans-serif; font-variant-emoji: text; filter: grayscale(1) brightness(1.15); }
.hero-subtitle { margin: 0 0 28px; font-family: var(--font-head), sans-serif; font-weight: 400; font-size: clamp(22px, 5.6vw, 34px); letter-spacing: .28em; text-transform: uppercase; color: var(--grey-light); }
.hero-rule { height: 1px; background: var(--line-strong); margin: 0 0 22px; }

.story-line { margin: 0 0 14px; font-size: clamp(18px, 4.6vw, 22px); line-height: 1.45; max-width: 34ch; }
.story-line.story-gap { margin-top: 26px; }
.story-line.story-date { font-family: var(--font-mono), monospace; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--grey-light); margin-bottom: 26px; max-width: none; }
.nowrap { white-space: nowrap; }
.story-line.story-date .tag { display: inline-block; border: 1px solid var(--line-strong); padding: 2px 6px; margin-right: 10px; color: var(--grey-light); background: rgba(var(--bg-rgb),.5); }
.story-line.story-last { color: var(--cream); font-weight: 500; }
.story-line .t { font-family: var(--font-mono), monospace; font-size: .85em; letter-spacing: .06em; color: var(--grey-light); }

.reveal { opacity: 0; animation: reveal 1s ease-out forwards; animation-delay: calc(var(--i, 0) * .42s); }
@keyframes reveal { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.hero.done .reveal, .hero.done .hero-continue { animation: none; opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal, .hero-continue { animation: none !important; opacity: 1 !important; transform: none !important; } }

.skip-btn {
  position: absolute; top: calc(52px + env(safe-area-inset-top)); right: 16px; z-index: 5;
  background: rgba(var(--bg-rgb),.55); border: 1px solid var(--line-strong); color: var(--grey-light);
  font-family: var(--font-mono), monospace; font-size: 11px; letter-spacing: .14em;
  min-height: 44px; padding: 0 16px; cursor: pointer;
}
.hero.done .skip-btn { display: none; }

.hero-continue {
  position: absolute; left: 0; right: 0; bottom: 28px; z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-decoration: none; color: var(--grey-light); opacity: 0;
  animation: reveal 1s ease-out forwards; animation-delay: var(--continue-delay, 5s);
  min-height: 44px;
}
.hero-continue .chev { width: 12px; height: 12px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); }

/* ---------- invitation: the invitation card ---------- */
.invite {
  position: relative; isolation: isolate;
  /* on phones the lamp hangs in the top of the section, the paper sits under it */
  padding: clamp(170px, 50vw, 260px) 16px 56px;
  background: var(--bg);
}
.scene-lamp { --photo-bright: .9; }
.scene-lamp img { object-position: 50% 0; }
.scene-lamp::before {
  background:
    radial-gradient(90% 40% at 50% 10%, transparent 30%, rgba(var(--bg-rgb),.5) 70%, rgba(var(--bg-rgb),.85) 100%),
    linear-gradient(to bottom, rgba(var(--bg-rgb),.15), rgba(var(--bg-rgb),.35) 30%, rgba(var(--bg-rgb),.7) 60%, var(--bg));
}
.invite-inner {
  position: relative; z-index: 1;
  max-width: 1040px; margin: 0 auto;
  background: var(--cream); color: var(--bg);
  padding: 26px 20px 30px;
  box-shadow: 0 30px 70px rgba(0,0,0,.65), 0 0 0 1px rgba(232,226,212,.25), 0 0 90px rgba(232,226,212,.10);
}
.invite-inner::before {
  content: ""; position: absolute; inset: 8px; pointer-events: none;
  border: 1px solid rgba(var(--bg-rgb),.3);
}
.invite-inner::after {
  content: ""; position: absolute; inset: 8px; pointer-events: none;
  background:
    radial-gradient(circle at 6px 6px, rgba(var(--bg-rgb),.7) 0 2.4px, rgba(var(--bg-rgb),.22) 3px, transparent 4.2px),
    radial-gradient(circle at calc(100% - 6px) 6px, rgba(var(--bg-rgb),.7) 0 2.4px, rgba(var(--bg-rgb),.22) 3px, transparent 4.2px),
    radial-gradient(circle at 6px calc(100% - 6px), rgba(var(--bg-rgb),.7) 0 2.4px, rgba(var(--bg-rgb),.22) 3px, transparent 4.2px),
    radial-gradient(circle at calc(100% - 6px) calc(100% - 6px), rgba(var(--bg-rgb),.7) 0 2.4px, rgba(var(--bg-rgb),.22) 3px, transparent 4.2px);
}
.invite-tag {
  display: inline-block; margin: 0 0 22px;
  border: 1.5px solid var(--bg); padding: 5px 10px; color: var(--bg);
  font-weight: 500;
}
.invite-grid { display: grid; gap: 28px; }

.invite-date { display: flex; flex-direction: column; font-family: var(--font-head), sans-serif; text-transform: uppercase; line-height: .92; }
.d-weekday { font-weight: 500; font-size: clamp(36px, 11vw, 74px); letter-spacing: .04em; color: var(--green); }
.d-month-day { font-weight: 700; font-size: clamp(60px, 18vw, 150px); letter-spacing: -.005em; }
.d-year { font-weight: 500; font-size: clamp(36px, 11vw, 74px); letter-spacing: .08em; color: var(--green); }

.invite-time { margin: 0 0 18px; font-size: clamp(15px, 4.2vw, 19px); font-weight: 500; letter-spacing: .12em; color: var(--bg); }
.invite-place { margin: 0; font-family: var(--font-head), sans-serif; font-size: clamp(28px, 7.4vw, 40px); font-weight: 600; text-transform: uppercase; letter-spacing: .02em; line-height: 1; }
.invite-address { margin: 8px 0 18px; font-size: clamp(18px, 4.8vw, 22px); line-height: 1.3; white-space: pre-line; }
.invite-hosted { margin: 0 0 26px; font-size: 18px; line-height: 1.4; }
.invite-hosted .mono { color: var(--green); }
.invite-hosted span:not(.mono) { font-family: var(--font-head), sans-serif; font-size: 24px; text-transform: uppercase; letter-spacing: .04em; }
.invite-actions { display: flex; flex-direction: column; gap: 10px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px;
  font-family: var(--font-head), sans-serif; font-size: 18px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; border: 1.5px solid currentColor; background: transparent;
  transition: background .18s ease, color .18s ease, opacity .18s ease;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:disabled { opacity: .45; cursor: default; }
.btn-lg { min-height: 60px; font-size: 21px; }
.btn-primary { background: var(--bg); color: var(--cream); border-color: var(--bg); }
.btn-primary:hover { background: var(--surface); }
.btn-ghost { color: var(--bg); border-color: var(--bg); }
.btn-ghost:hover { background: rgba(var(--bg-rgb),.06); }
.block .btn-primary { background: var(--cream); color: var(--bg); border-color: var(--cream); }
.block .btn-primary:hover { background: #fff; }
.block .btn-ghost { color: var(--cream); border-color: var(--line-strong); }
.block .btn-ghost:hover { border-color: var(--cream); }
.btn-sm { min-height: 44px; font-size: 15px; padding: 0 16px; }

/* ---------- blocks ---------- */
.block { padding: 56px 20px; border-top: 1px solid var(--line); scroll-margin-top: 52px; }
.block-inner { max-width: 760px; margin: 0 auto; }

.note { font-size: 15px; color: var(--grey-light); margin: 8px 0 0; }
.note.error { color: var(--cream); border-left: 3px solid var(--red); padding-left: 10px; }
.note.ok { border-left: 3px solid var(--green); padding-left: 10px; }

/* ---------- photo bands: a wide strip of photograph that fades into the block below ---------- */
.band { position: relative; height: clamp(200px, 52vw, 340px); margin: -56px -20px 30px; overflow: hidden; }
.band .scene { position: absolute; inset: 0; }
.band .scene img { position: absolute; inset: 0; }
.band .scene::before {
  background:
    linear-gradient(to bottom, rgba(var(--bg-rgb),.35), transparent 30%, rgba(var(--bg-rgb),.35) 60%, var(--bg) 100%),
    radial-gradient(120% 90% at 50% 45%, transparent 35%, rgba(var(--bg-rgb),.6) 100%);
}
.band-tag {
  position: absolute; left: 20px; bottom: 18px; z-index: 3;
  font-size: 10px; color: var(--grey-light); letter-spacing: .18em;
  padding: 5px 8px; border: 1px solid var(--line-strong); background: rgba(var(--bg-rgb),.72);
}
.band-plastic .scene img { object-position: 50% 45%; }

/* ---------- RSVP ---------- */
.block-rsvp { border-top: 0; }
.rsvp-card { background: var(--surface); border: 1px solid var(--line); padding: 22px 18px 24px; }
.rsvp-for { margin: 0 0 4px; color: var(--grey-light); }
.rsvp-household { margin: 0 0 18px; font-family: var(--font-head), sans-serif; font-size: clamp(28px, 7vw, 40px); text-transform: uppercase; letter-spacing: .03em; line-height: 1.05; }
.rsvp-status { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 0 0 22px; padding: 10px 12px; border: 1px dashed var(--line-strong); color: var(--grey-light); }
.rsvp-status b { font-weight: 500; color: var(--cream); }

.member { padding: 16px 0; border-top: 1px solid var(--line); }
.member:first-of-type { border-top: 0; padding-top: 4px; }
.member-name { display: block; font-family: var(--font-head), sans-serif; font-size: 22px; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 10px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg button {
  min-height: 56px; padding: 0 10px; cursor: pointer;
  background: transparent; border: 1.5px solid var(--line-strong); color: var(--grey-light);
  font-family: var(--font-head), sans-serif; font-size: 16px; letter-spacing: .1em; text-transform: uppercase;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.seg button:hover { border-color: var(--cream); color: var(--cream); }
.seg button[aria-pressed="true"].yes { background: var(--cream); color: var(--bg); border-color: var(--cream); }
.seg button[aria-pressed="true"].no { background: transparent; color: var(--cream); border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }

.plus { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.plus .field { margin-top: 10px; }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; font-size: 16px; }
.check input { width: 24px; height: 24px; accent-color: var(--cream); margin: 0; }

.field { display: block; margin-top: 16px; }
.field span.label { display: block; margin-bottom: 6px; color: var(--grey-light); }
.input, .textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  background: var(--bg); color: var(--cream); border: 1px solid var(--line-strong);
  font-family: var(--font-body), sans-serif; font-size: 17px; border-radius: 0;
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.input::placeholder, .textarea::placeholder { color: var(--grey); }
.input:focus, .textarea:focus { border-color: var(--cream); outline: none; }

.rsvp-actions { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.rsvp-find p { margin: 0 0 14px; max-width: 52ch; }
.inline-form { display: flex; flex-direction: column; gap: 10px; }

/* ---------- party details: one photograph per section ---------- */
.block-details { padding-bottom: 0; }
.block-details .block-inner .h2 { margin-bottom: 30px; }
.sections { max-width: 1040px; margin: 0 auto; }
.section { position: relative; margin: 0 -20px; border-top: 1px solid var(--line); }
.section-media { position: relative; overflow: hidden; isolation: isolate; }
.section-media .scene { aspect-ratio: 4 / 3; max-height: 420px; }
.section-media .scene img { position: absolute; inset: 0; }
/* fade the bottom of every section photo into the solid block the copy sits on */
.section-media .scene::before {
  background:
    linear-gradient(to bottom, rgba(var(--bg-rgb),.18), transparent 25%, rgba(var(--bg-rgb),.25) 55%, rgba(var(--bg-rgb),.9) 85%, var(--bg) 100%),
    radial-gradient(120% 90% at 50% 40%, transparent 40%, rgba(var(--bg-rgb),.55) 100%);
}
.section-head {
  position: absolute; left: 20px; right: 20px; bottom: 16px; z-index: 3;
  display: flex; align-items: flex-end; gap: 14px;
}
.section-head .h3 { margin: 0; font-size: clamp(28px, 7.6vw, 40px); font-weight: 600; text-shadow: 0 1px 14px rgba(var(--bg-rgb),.95), 0 0 2px rgba(var(--bg-rgb),.95); }
.section-head .num { position: absolute; right: 0; bottom: 6px; color: var(--grey-light); font-size: 11px; text-shadow: 0 1px 8px rgba(var(--bg-rgb),.95); }
.picto {
  flex: 0 0 auto; width: 44px; height: 44px; padding: 5px;
  color: var(--cream); fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
  background: rgba(var(--bg-rgb),.72); border: 1px solid var(--line-strong);
}
.picto .plate { stroke-opacity: .45; }
.section-body { padding: 22px 20px 34px; background: var(--bg); }
.section-body p { margin: 0 0 12px; white-space: pre-line; max-width: 58ch; }
.section-body p.lead { font-family: var(--font-head), sans-serif; font-size: 22px; text-transform: uppercase; letter-spacing: .03em; line-height: 1.2; white-space: pre-line; }
.section-body .btn { margin-top: 6px; }
.link { color: var(--cream); text-decoration-color: var(--line-strong); text-underline-offset: 3px; word-break: break-word; }
.link:hover { text-decoration-color: var(--cream); }

/* ---------- playa name + suggestions ---------- */
.playa-note { margin: 0 0 14px; color: var(--grey-light); font-size: 15px; max-width: 52ch; }
.member .playa { display: block; margin-top: 10px; }
.member .playa .label { display: block; margin-bottom: 6px; color: var(--grey-light); }
.refer { margin-top: 14px; }
.refer p { margin: 0 0 12px; }
.refer-form { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 640px) { .refer-form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: stretch; } }

/* ---------- video embed ---------- */
.video-embed { position: relative; aspect-ratio: 16 / 9; margin: 6px 0 16px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-credit { max-width: 58ch; }
.section-tile .scene { aspect-ratio: 16 / 7; --photo-bright: .6; }

/* the notice plate: on the dress-code section it is riveted straight onto the coats photograph */
.sign {
  display: block; margin: 4px 0 20px; padding: 18px 18px 16px;
  background: var(--cream); color: var(--bg);
  border: 3px solid var(--bg); outline: 1px solid var(--cream); outline-offset: 2px;
  font-family: var(--font-head), sans-serif; font-weight: 700; text-transform: uppercase;
  font-size: clamp(30px, 8.6vw, 52px); letter-spacing: .04em; line-height: .98;
  box-shadow: var(--sign-shadow);
  white-space: pre-line; max-width: none;
  position: relative; padding-top: 22px; padding-bottom: 22px;
}
.sign::after {
  content: ""; position: absolute; inset: 7px; pointer-events: none;
  border: 1px solid rgba(var(--bg-rgb),.32);
  background:
    radial-gradient(circle at 5px 5px, rgba(var(--bg-rgb),.78) 0 2.2px, rgba(var(--bg-rgb),.28) 2.8px, transparent 4px),
    radial-gradient(circle at calc(100% - 5px) 5px, rgba(var(--bg-rgb),.78) 0 2.2px, rgba(var(--bg-rgb),.28) 2.8px, transparent 4px),
    radial-gradient(circle at 5px calc(100% - 5px), rgba(var(--bg-rgb),.78) 0 2.2px, rgba(var(--bg-rgb),.28) 2.8px, transparent 4px),
    radial-gradient(circle at calc(100% - 5px) calc(100% - 5px), rgba(var(--bg-rgb),.78) 0 2.2px, rgba(var(--bg-rgb),.28) 2.8px, transparent 4px);
}
.sign::before { content: "NOTICE"; display: block; font-family: var(--font-mono), monospace; font-weight: 500; font-size: 11px; letter-spacing: .2em; color: var(--red); margin-bottom: 8px; }
.section-media .sign {
  position: absolute; left: 20px; right: 20px; top: 50%; z-index: 4; margin: 0;
  transform: translateY(-58%) rotate(-1.2deg);
  font-size: clamp(26px, 7.4vw, 44px); padding: 16px 16px 14px;
}
.section-media .sign::before { margin-bottom: 6px; }
.section-dress .scene { aspect-ratio: 4 / 3.4; }
.section-dress .scene img { object-position: 50% 30%; }

/* ---------- comment thread ---------- */
.thread { margin-top: 18px; }
.thread.compact { border-left: 2px solid var(--line); padding-left: 14px; margin-top: 8px; }
.thread-form { display: grid; gap: 10px; }
.thread-form .row { display: grid; grid-template-columns: 1fr; gap: 10px; }
.thread-list { list-style: none; margin: 18px 0 0; padding: 0; }
.thread-list li { padding: 12px 0; border-top: 1px solid var(--line); }
.thread-list .who { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.thread-list .name { font-family: var(--font-head), sans-serif; font-size: 17px; text-transform: uppercase; letter-spacing: .04em; }
.thread-list .when { color: var(--grey); white-space: nowrap; }
.thread-list .body { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.thread-empty { color: var(--grey); margin: 16px 0 0; }
.thread-toggle { background: transparent; border: 0; padding: 0; min-height: 44px; color: var(--grey-light); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- updates ---------- */
.update { padding: 22px 0 26px; border-top: 1px solid var(--line); }
.update:first-child { border-top: 0; padding-top: 0; }
.update-date { color: var(--grey-light); margin: 0 0 8px; }
.update-body { white-space: pre-line; margin: 0; max-width: 58ch; }

/* ---------- roster: cream clipboards left on the gurney ---------- */
.block-guests { padding-top: 64px; padding-bottom: 72px; }
.scene-gurney { --photo-bright: .6; }
.scene-gurney img { object-position: 50% 60%; }
.scene-gurney::before {
  background:
    linear-gradient(to bottom, var(--bg), rgba(var(--bg-rgb),.55) 30%, rgba(var(--bg-rgb),.45) 60%, var(--bg) 100%),
    radial-gradient(120% 90% at 50% 50%, transparent 30%, rgba(var(--bg-rgb),.7) 100%);
}
.block-guests .eyebrow, .block-guests .h2 { text-shadow: 0 1px 12px rgba(var(--bg-rgb),.95), 0 0 2px rgba(var(--bg-rgb),.95); }
.roster { display: grid; gap: 22px; }
.clipboard {
  position: relative; background: var(--cream); color: var(--bg);
  padding: 34px 18px 20px; margin-top: 10px;
  box-shadow: 0 18px 40px rgba(0,0,0,.6), inset 0 0 0 1px rgba(var(--bg-rgb),.12);
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, rgba(var(--bg-rgb),.08) 31px 32px);
  background-position: 0 14px;
}
.clipboard::before {
  content: ""; position: absolute; left: 50%; top: -10px; width: 96px; height: 24px; transform: translateX(-50%);
  background: var(--bg); border: 1px solid rgba(232,226,212,.35); border-radius: 3px 3px 2px 2px;
  box-shadow: 0 4px 10px rgba(0,0,0,.5);
}
.clipboard::after {
  content: ""; position: absolute; left: 50%; top: -3px; width: 34px; height: 7px; transform: translateX(-50%);
  background: var(--grey-light); border-radius: 0 0 3px 3px;
}
.roster-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--bg); }
.roster-head .h3 { margin: 0; font-size: 20px; }
.roster-count { font-family: var(--font-head), sans-serif; font-size: 34px; line-height: 1; font-weight: 600; }
.clipboard.yes .roster-count { color: var(--bg); }
.clipboard.no .roster-count { color: var(--red); }
.clipboard.wait .roster-count { color: var(--green); }
.roster-list { list-style: none; margin: 0; padding: 0; columns: 1; font-family: var(--font-mono), ui-monospace, monospace; font-size: 15px; letter-spacing: .02em; }
.roster-list li { padding: 5px 0 6px; border-bottom: 1px dotted rgba(var(--bg-rgb),.3); break-inside: avoid; line-height: 21px; }
.roster-list li:last-child { border-bottom: 0; }
.roster-list .guest-of { color: rgba(var(--bg-rgb),.72); font-size: 13px; }
.roster-hidden { color: rgba(var(--bg-rgb),.72); margin: 0; }
.clipboard .note { color: rgba(var(--bg-rgb),.8); }

/* ---------- board: CRT terminal on its cart ---------- */
.scene-crt { --photo-bright: .55; }
.scene-crt img { object-position: 50% 50%; }
.scene-crt::before {
  background:
    linear-gradient(to bottom, var(--bg), rgba(var(--bg-rgb),.5) 30%, rgba(var(--bg-rgb),.55) 70%, var(--bg) 100%),
    radial-gradient(120% 90% at 50% 50%, transparent 30%, rgba(var(--bg-rgb),.7) 100%);
}
.block-board .eyebrow, .block-board .h2 { text-shadow: 0 1px 12px rgba(var(--bg-rgb),.95), 0 0 2px rgba(var(--bg-rgb),.95); }
.block-board { padding-top: 64px; padding-bottom: 72px; }

/* ---------- footer ---------- */
.footer { padding: 40px 20px 40px; border-top: 1px solid var(--line); text-align: center; color: var(--grey); }
.footer p { margin: 0; line-height: 1.8; }
.crest { display: block; width: 118px; height: 118px; margin: 0 auto 18px; opacity: .5; }
.crest-text { font-family: var(--font-head), sans-serif; font-size: 12.5px; letter-spacing: .22em; text-transform: uppercase; }


/* ---------- CRT terminal bezel around the board and bulletins ---------- */
.crt {
  position: relative; overflow: hidden;
  padding: 20px 16px 36px; border-radius: 14px;
  background: var(--bg); border: 1px solid var(--line-strong);
  box-shadow: 0 0 0 6px var(--surface), 0 0 0 7px var(--line), 0 30px 60px rgba(0,0,0,.6), inset 0 0 52px rgba(0,0,0,.55);
  margin: 6px 7px 0;
}
.crt::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 2px, rgba(0,0,0,.28) 2px 3px);
  opacity: .35; border-radius: inherit;
}
.crt-label { position: absolute; right: 12px; bottom: 9px; display: inline-flex; align-items: center; gap: 6px; font-size: 9.5px; color: var(--grey); z-index: 3; pointer-events: none; }
.crt-label i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }

/* ---------- nav ---------- */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--surface); border-top: 1px solid var(--line-strong);
  padding-bottom: env(safe-area-inset-bottom);
  transition: transform .3s ease, opacity .3s ease;
}
.nav a {
  display: flex; align-items: center; justify-content: center; min-height: 56px;
  font-family: var(--font-head), sans-serif; font-size: 15px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--grey-light); text-decoration: none;
}
.nav a[hidden] { display: none; }
.nav a.active { color: var(--cream); box-shadow: inset 0 3px 0 var(--cream); }
body.intro .nav { transform: translateY(110%); opacity: 0; }
@media (prefers-reduced-motion: reduce) { body.intro .nav { transform: none; opacity: 1; } }

/* ---------- tablet ---------- */
@media (min-width: 640px) {
  .invite-actions { flex-direction: row; flex-wrap: wrap; }
  .thread-form .row { grid-template-columns: 220px 1fr; }
  .inline-form { flex-direction: row; }
  .inline-form .input { flex: 1; }
  .rsvp-actions { flex-direction: row; }
  .roster-list { columns: 2; column-gap: 24px; }
  .invite-inner { padding: 34px 32px 40px; }
}

/* ---------- desktop ---------- */
@media (min-width: 900px) {
  body { padding-bottom: 0; font-size: 18px; }
  .status-strip { padding-top: 12px; }
  .nav {
    top: 0; bottom: auto; left: auto; right: 24px;
    grid-auto-flow: column; grid-auto-columns: auto; gap: 4px;
    background: transparent; border: 0; padding: 8px 0 0;
  }
  .nav a { min-height: 44px; padding: 0 14px; font-size: 14px; background: rgba(23,29,26,.85); border: 1px solid var(--line); }
  .nav a.active { box-shadow: none; border-color: var(--cream); }
  body.intro .nav { transform: translateY(-120%); }

  .hero { padding: 160px 40px 130px; justify-content: center; }
  .hero-inner { max-width: 760px; }
  .hero-photo img { object-position: 50% 50%; }
  .hero-scrim {
    background:
      linear-gradient(to bottom, rgba(var(--bg-rgb),.15) 0%, rgba(var(--bg-rgb),.05) 25%, rgba(var(--bg-rgb),.3) 58%, rgba(var(--bg-rgb),.9) 84%, var(--bg) 100%),
      linear-gradient(to right, rgba(var(--bg-rgb),.35), transparent 35%, transparent 65%, rgba(var(--bg-rgb),.35));
  }
  .crt { padding: 26px 24px 40px; }

  .invite { padding: 140px 40px 120px; }
  .scene-lamp img { object-position: 50% 20%; }
  .invite-inner { padding: 56px 60px 64px; }
  .invite-grid { grid-template-columns: 1.15fr 1fr; align-items: center; gap: 56px; }
  .invite-details { border-left: 1.5px solid var(--bg); padding-left: 48px; }

  .block { padding: 80px 40px; }
  .band { height: 360px; margin: -80px -40px 40px; }
  .band-tag { left: 40px; bottom: 26px; }

  /* details: photograph on one side, copy on the other, alternating */
  .section { margin: 0; display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; border-top: 1px solid var(--line); }
  .section-media { min-height: 420px; }
  .section-media .scene { position: absolute; inset: 0; aspect-ratio: auto; max-height: none; height: 100%; }
  .section-dress .scene { aspect-ratio: auto; }
  .section-media .scene::before {
    background:
      linear-gradient(to bottom, rgba(var(--bg-rgb),.15), transparent 30%, rgba(var(--bg-rgb),.15) 60%, rgba(var(--bg-rgb),.85) 100%),
      radial-gradient(120% 90% at 50% 45%, transparent 35%, rgba(var(--bg-rgb),.55) 100%);
  }
  .section:nth-child(even) .section-media { order: 2; }
  .section-head { left: 28px; right: 28px; bottom: 26px; }
  .section-head .h3 { font-size: 40px; }
  .section-body { padding: 48px 48px 56px; display: flex; flex-direction: column; justify-content: center; }
  .section-media .sign { left: 28px; right: 28px; font-size: 40px; }
  .section-tile .scene { aspect-ratio: auto; }

  .roster { grid-template-columns: repeat(3, 1fr); gap: 26px; }
  .roster-list { columns: 1; }
  .clipboard { padding: 36px 20px 22px; }
}

@media (min-width: 1200px) {
  .block-details .sections { max-width: 1100px; }
}
