/* Remembering Gibson — "Monogram" design (B3) */
:root {
  --ink: #262626;
  --ink-2: #3D3D3D;
  --muted: #5C5C5C;
  --label: #4D4D4D;
  --accent: #2F4A3A;
  --accent-dark: #1E3226;
  --paper: #FFFFFF;
  --band: #F6F6F2;
  --rule: #D9D9D2;
  --rule-light: #E6E6E1;
  --field: #C7C7BF;
  --error: #A3241B;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: Lato, system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: #fff; padding: 10px 16px; z-index: 10; }
.skip:focus { left: 8px; }

.topnav { max-width: 1000px; margin: 0 auto; padding: 16px 24px; display: flex; flex-wrap: wrap; gap: 4px 36px; justify-content: center;
  font-size: 14px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; border-bottom: 1px solid var(--rule-light); }
.topnav a { color: var(--label); text-decoration: none; padding: 10px 0; }
.topnav a:hover { color: var(--accent); }

.wrap { max-width: 1000px; margin: 0 auto; }
.narrow { max-width: 760px; }
.center { text-align: center; }
.center-self { align-self: center; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.center.stack, .stack.center { align-items: center; }
.stack-sm { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 22px; align-items: center; }
.stack-xl { display: flex; flex-direction: column; gap: 32px; }

.section { padding: 88px 24px; }
.band { padding: 80px 24px; background: var(--band); }
#rsvp.band { padding-top: 0; }
.hero { padding: 80px 24px 88px; }

.monogram { color: var(--accent); }
.display { margin: 8px 0 0; font-family: var(--serif); font-weight: 400; font-size: clamp(42px, 6.5vw, 84px); line-height: 1.05; }
.dates { margin: 0; font-size: 18px; letter-spacing: .12em; color: var(--label); }
.eyebrow { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
.hero .eyebrow { line-height: 1.8; }
.roles { display: flex; flex-direction: column; gap: 2px; }
.eyebrow.traits { color: var(--label); font-weight: 400; }
.hero-photo { margin-top: 20px; width: 100%; max-width: 640px; aspect-ratio: 3 / 2; background: #F1F1EC; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 15px; overflow: hidden; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
/* With a real photo, show it whole at its own shape (portrait or landscape). */
.hero-photo.has-photo { aspect-ratio: auto; max-width: 440px; background: none; }
.hero-photo.has-photo img { height: auto; }
/* Wider screens: photo on the left, name and dates beside it, so his face is in view as soon as the page opens. */
@media (min-width: 900px) {
  .hero { padding: 56px 32px 72px; }
  .hero .wrap { max-width: 1000px; display: grid; grid-template-columns: 400px minmax(0, 1fr); column-gap: 64px; row-gap: 18px;
    grid-template-rows: 1fr auto auto auto auto 1fr;
    grid-template-areas: "photo ." "photo name" "photo dates" "photo roles" "photo tribute" "photo ."; }
  .hero .display { grid-area: name; margin: 0; font-size: clamp(44px, 4.4vw, 64px); }
  .hero .dates { grid-area: dates; }
  .hero .roles { grid-area: roles; }
  .hero .tribute { grid-area: tribute; }
  .hero .hero-photo { grid-area: photo; margin-top: 0; align-self: center; max-width: 400px; }
}
.tribute { margin: 12px 0 0; font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.6; color: var(--ink-2); max-width: 40ch; }
.tribute.small { font-size: 20px; color: var(--ink); max-width: 50ch; margin: 0; }

.h2 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 4.5vw, 42px); line-height: 1.2; }
.h2.left { text-align: left; }
#events .h2 { margin-bottom: 28px; }
.h3 { margin: 6px 0 0; font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.2; }
.lead { margin: 0; font-size: 18px; line-height: 1.75; color: var(--ink-2); max-width: 58ch; }
.muted { color: var(--muted); }
.sans { font-family: var(--sans); font-size: 15px; font-style: normal; }
.label { margin: 0 0 10px; padding: 0; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--label); }
.serif-q { margin: 0; font-family: var(--serif); font-size: 19px; line-height: 1.45; }
.serif-q.big { font-size: 26px; max-width: 30ch; }

.event { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 40px; padding: 32px 0; border-top: 1px solid var(--rule); }
.event:last-child { border-bottom: 1px solid var(--rule); }
.event-details { margin: 0; font-size: 18px; line-height: 1.7; }
.event-links { display: flex; flex-direction: column; gap: 2px; font-size: 16px; font-weight: 700; }
.event-links a { padding: 8px 0; }

.card { background: var(--paper); padding: 40px; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.program { margin-top: 8px; border-top: 1px solid var(--rule); padding-top: 18px; }
.program-list { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.program-list li { display: flex; gap: 16px; }
.program-list .time { min-width: 76px; font-weight: 700; color: var(--accent); }
#program-empty { margin: 0; color: var(--ink-2); }

.subtle-box { background: var(--band); padding: 22px 26px; }
.card .subtle-box { padding: 20px; }
.prompts { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; line-height: 1.6; color: var(--ink-2); }

/* Forms */
.form { display: flex; flex-direction: column; gap: 22px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--label); }
.field .hint, .hint { font-size: 15px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); line-height: 1.5; }
.narrow-field { max-width: 220px; }
input[type=text], input[type=email], input[type=url], input[type=number], textarea {
  font: 400 17px/1.5 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink);
  border: 1px solid var(--field); border-radius: 0; background: #fff; padding: 0 12px; min-height: 46px; width: 100%;
}
textarea { padding: 12px; resize: vertical; }
textarea.letter { min-height: 440px; padding: 18px; font-family: var(--serif); font-size: 18px; line-height: 1.8; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
input[type=file] { font: 400 15px var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink); padding: 10px 0; max-width: 100%; }
.upload { background: var(--band); padding: 18px; display: flex; flex-direction: column; gap: 18px; }
.rule-top { border-top: 1px solid var(--rule-light); padding-top: 22px; }
.choices { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; min-width: 0; }
.choices.col { flex-direction: column; flex-wrap: nowrap; gap: 4px; }
.choices legend { float: left; width: 100%; }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; font-size: 16px; cursor: pointer; }
.check.top { align-items: flex-start; line-height: 1.5; padding: 6px 0; }
.check.top input { margin-top: 5px; }
.check input { accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.form-error { margin: 0; padding: 12px 14px; border-left: 3px solid var(--error); background: #FBEFEE; color: var(--error); font-weight: 700; }
.progress { display: flex; gap: 12px; align-items: center; }
.progress progress { flex: 1; height: 10px; accent-color: var(--accent); }

.btn { min-height: 50px; padding: 0 36px; border: 1px solid var(--accent); font: 700 14px var(--sans); letter-spacing: .16em; text-transform: uppercase; cursor: pointer; }
.btn-solid { background: var(--accent); color: #fff; }
.btn-solid:hover { background: var(--accent-dark); }
.btn-outline { background: #fff; color: var(--accent); align-self: flex-start; }
.btn-outline:hover { background: var(--band); }
.btn:disabled { opacity: .6; cursor: progress; }
.done { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; padding: 24px 0; color: var(--accent); }
.done.center { align-items: center; }
.done p { color: var(--ink); }

.subscribe { width: 100%; text-align: left; }

/* Gallery */
.gallery { columns: 3 260px; column-gap: 24px; }
.gallery > * { break-inside: avoid; margin: 0 0 24px; background: #fff; }
.gallery figure { padding: 14px; }
.gallery figcaption, .gallery cite { display: block; margin-top: 10px; font-size: 15px; font-style: normal; color: var(--muted); }
.gallery blockquote { padding: 28px; margin-left: 0; margin-right: 0; }
.gallery blockquote p { margin: 0; font-family: var(--serif); font-style: italic; font-size: 21px; line-height: 1.5; white-space: pre-line; }

.footer { padding: 36px 24px 48px; text-align: center; font-size: 15px; color: var(--muted); }
.footer p { margin: 4px 0; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { padding: 48px 16px 56px; }
  .section, .band { padding-left: 16px; padding-right: 16px; }
  .section { padding-top: 56px; padding-bottom: 56px; }
  .band { padding-top: 56px; padding-bottom: 56px; }
  .card { padding: 24px 18px; }
  .topnav { gap: 0 20px; font-size: 12px; padding: 8px 16px; }
  .btn { width: 100%; }
}
