/*
Theme Name: Palmer Memorial
Description: A small, code-maintained memorial information site for Michael Palmer.
Version: 1.0.0
Requires PHP: 7.4
Text Domain: palmer-memorial
*/
:root {
    --canvas: #faf8f5;
    --paper: #fff;
    --ink: #1f2421;
    --body: #404743;
    --muted: #5a635e;
    --green: #3a5243;
    --earth: #8c5e43;
    --line: #e8e2d5;
    --wash: #f4f0e8;
    --serif: 'Lora', Georgia, serif;
    --sans: 'Plus Jakarta Sans', Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--body); font: 400 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--ink); }
a { color: var(--green); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: #263c2e; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--earth); outline-offset: 4px; }
button { font: inherit; cursor: pointer; }
.icon { display: block; flex-shrink: 0; }
.earth-border { height: 6px; background: linear-gradient(90deg, var(--green), var(--earth), var(--green)); opacity: .8; }
.site-container { max-width: 1152px; padding: 80px 48px; margin: 0 auto; }
.memorial-grid { display: grid; grid-template-columns: minmax(0, 400fr) minmax(0, 592fr); gap: 64px; align-items: start; }
.portrait-frame { background: var(--paper); padding: 11px; border: 1px solid rgba(232,226,213,.8); border-radius: 16px; box-shadow: 0 1px 2px #0000000d; }
.portrait { display: block; width: 100%; height: auto; aspect-ratio: 2/3; object-fit: cover; border-radius: 12px; background: var(--line); }
.identity { padding-top: 28px; text-align: center; }
h1 { font-size: 36px; line-height: 40px; letter-spacing: -.9px; }
.lifespan { margin-top: 8px; font-size: 18px; line-height: 28px; letter-spacing: .45px; color: var(--muted); }
.botanical-divider { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 20px 0 16px; }
.botanical-divider::before, .botanical-divider::after { content: ''; height: 1px; width: 40px; background: var(--line); }
.dedication { font-size: 14px; line-height: 20px; max-width: 320px; margin-inline: auto; color: var(--ink); }
.obituary { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.obituary-mobile { display: none; }
.obituary h2 { font-size: 24px; line-height: 32px; margin-bottom: 20px; }
.obituary p { font-size: 15px; line-height: 26px; margin-top: 16px; }
.donation { margin-top: 16px; font-size: 14px; line-height: 24px; }
.donation a { font-weight: 600; }
.schedule { min-width: 0; }
.schedule-header { border-bottom: 1px solid var(--line); padding: 6px 0 21px; margin-bottom: 32px; }
.schedule-eyebrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.eyebrow { text-transform: uppercase; color: var(--earth); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 1.2px; }
.schedule-header h2 { font-size: 30px; line-height: 36px; margin-top: 6px; }
.memorial-date { display: flex; align-items: center; gap: 8px; color: var(--green); font-weight: 500; font-size: 18px; line-height: 28px; margin-top: 6px; }
.family-schedule-badge { display: inline-flex; align-items: center; gap: 4px; border: 1px solid #5f796933; border-radius: 99px; background: #ebf0ec; padding: 3px 11px; font-size: 12px; line-height: 16px; font-weight: 500; color: #283b2f; }
.event-list { display: flex; flex-direction: column; gap: 32px; }
.event-card { border: 1px solid rgba(232,226,213,.9); border-radius: 12px; background: var(--paper); padding: 28px; box-shadow: 0 1px 2px #0000000d; }
.event-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--wash); padding-bottom: 14px; margin-bottom: 16px; }
.event-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.event-header h3 { font-size: 24px; line-height: 32px; }
.event-time { display: inline-flex; align-items: center; gap: 6px; background: var(--wash); border-radius: 6px; padding: 4px 12px; margin-top: 3px; font-size: 14px; line-height: 20px; font-weight: 600; color: #2d3330; white-space: nowrap; flex-shrink: 0; }
.event-content { display: flex; align-items: flex-start; flex-direction: column; gap: 16px; }
.event-content > p { width: 100%; }
.detail-row { display: flex; align-items: baseline; gap: 10px; }
.detail-row > :first-child { flex-shrink: 0; }
.detail-row strong { color: var(--ink); font-weight: 500; }
.detail-row em { color: var(--muted); }
.tbd { background: var(--canvas); border: 1px solid #e8e2d5b3; border-radius: 4px; padding: 3px 9px; font-size: 14px; line-height: 20px; color: #2d3330; font-weight: 500; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; border-radius: 8px; font-size: 14px; line-height: 20px; font-weight: 500; text-decoration: none; max-width: 100%; min-height: 44px; text-align: center; }
.button-primary { color: white; background: var(--green); box-shadow: 0 1px 2px #0000000d; margin-top: 4px; }
.button-primary:hover { background: #2c4034; color: white; }
.button-secondary { background: var(--wash); color: var(--ink); border: 1px solid #d9d0be; padding: 9px 16px; }
.button-secondary:hover { background: #eae3d7; }
.location-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.detail-label { text-transform: uppercase; font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .6px; margin-bottom: 2px; }
.location-name, .meeting-spot { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink); }
.meeting-spot { display: flex; align-items: center; gap: 4px; font-weight: 600; color: var(--green); }
.direction-icon { display: inline-block; position: relative; width: 16px; height: 16px; }
.direction-icon img:first-child { position: absolute; top: 1.33px; left: 2px; }
.direction-icon img:last-child { position: absolute; top: 4.66px; left: 5.33px; }
.external-icon { display: inline-flex; width: 14px; height: 14px; align-items: center; justify-content: center; }
.park-map { width: 100%; padding-top: 16px; border-top: 1px solid var(--wash); }
.map-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.map-heading h4 { font-size: 12px; line-height: 16px; letter-spacing: .6px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.map-heading a { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; font-weight: 500; text-decoration: none; min-height: 28px; }
.map-preview { display: block; position: relative; background: #fff; border: 1px solid #d9d0be; border-radius: 8px; overflow: hidden; }
.park-map-image { display: block; width: 100%; height: auto; aspect-ratio: 529.34/360; max-height: 360px; object-fit: contain; }
.family-view .park-map-image { aspect-ratio: 529.34/320; max-height: 320px; }
.map-hint { position: absolute; right: 8px; bottom: 8px; background: #fffffff0; border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 1px 2px #0000000d; padding: 5px 10px; color: var(--body); font-size: 11px; line-height: 24px; }
.map-note { margin-top: 8px; font-size: 12px; line-height: 16px; font-style: italic; }
.family-event { background: linear-gradient(115deg, #fff, #f8faf9); border-color: #5f796933; box-shadow: none; }
.family-event .event-time { background: #ebf0ec; border: 1px solid #5f796933; color: #283b2f; }
.family-event .event-header { border: 0; padding-bottom: 0; }
.family-event .event-header h3 { font-size: 23px; }
.memorial-footer { margin-top: 96px; padding-top: 32px; border-top: 1px solid var(--line); text-align: center; }
.memorial-footer p { font: italic 400 14px/20px var(--serif); color: var(--muted); }
.memorial-footer small { display: block; font-size: 12px; line-height: 16px; color: var(--muted); margin-top: 8px; }
.map-dialog { max-width: min(900px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--canvas); color: var(--body); }
.map-dialog::backdrop { background: #1f2421b3; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.dialog-header h2 { font-size: 24px; }
.map-close { background: white; color: var(--green); border: 1px solid var(--line); padding: 8px 12px; min-height: 44px; border-radius: 6px; white-space: nowrap; }
.map-close span { font-size: 22px; margin-left: 8px; }
.map-dialog > p { margin-block: 12px; }
.map-dialog > img { display: block; width: auto; max-width: 100%; max-height: 65dvh; margin: 16px auto; object-fit: contain; }
body:has(.map-dialog[open]) { overflow: hidden; }
.screen-reader-text, .skip-link:not(:focus) { position: absolute; height: 1px; width: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: absolute; top: 12px; left: 12px; z-index: 10; padding: 12px 20px; background: white; color: var(--green); }
.fallback-page { min-height: 70vh; }
.fallback-page p { margin-top: 24px; }
@media (max-width: 1100px) and (min-width: 900px) {
    .site-container { padding-inline: 32px; }
    .memorial-grid { gap: 40px; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
    .event-card { padding: 22px; }
    .event-header { flex-wrap: wrap; }
    .lifespan { font-size: 15px; }
}
@media (max-width: 899px) {
    .site-container { max-width: 680px; padding: 40px 24px; }
    .memorial-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
    .portrait-frame { max-width: 400px; margin-inline: auto; }
    .obituary-desktop { display: none; }
    .obituary-mobile { display: block; margin-top: 0; }
    .obituary p { font-size: 16px; line-height: 28px; }
    .memorial-footer { margin-top: 56px; }
    .event-list { gap: 24px; }
}
@media (max-width: 479px) {
    .site-container { padding: 28px 20px 40px; }
    h1 { font-size: 32px; }
    .lifespan { font-size: 15px; letter-spacing: 0; }
    .event-card { padding: 20px; }
    .event-header { flex-wrap: wrap; gap: 8px; }
    .event-header h3, .family-event .event-header h3 { font-size: 22px; line-height: 30px; }
    .event-time { margin-top: 0; }
    .schedule-header h2 { font-size: 28px; }
    .memorial-date { font-size: 15px; }
    .location-grid { grid-template-columns: 1fr; gap: 12px; }
    .address-row { flex-direction: column; gap: 4px; }
    .map-heading { align-items: flex-start; flex-direction: column; }
    .map-heading a { min-height: 36px; }
    .button-primary { width: 100%; padding-inline: 12px; }
    .map-hint { padding: 3px 6px; font-size: 10px; line-height: 18px; }
    .dialog-header { gap: 12px; }
    .dialog-header h2 { font-size: 18px; }
    .map-dialog { padding: 16px; }
}

/* Livestream availability and the ceremony's paired actions. */
.livestream-notice { margin-top: 20px; padding: 18px 20px; border: 1px solid #5f796933; border-radius: 8px; background: #ebf0ec; }
.livestream-notice h3 { font: 600 16px/24px var(--sans); color: var(--green); margin-bottom: 6px; }
.livestream-notice p { font-size: 14px; line-height: 24px; }
.livestream-notice a { font-weight: 600; }
.event-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; width: 100%; }
.event-actions .button-primary { margin-top: 0; }

.livestream-details { margin-top: 0; font-size: 14px; line-height: 24px; }

.reception-menu { width: 100%; margin: 0; }
.reception-menu figcaption { margin-bottom: 8px; font-weight: 600; color: var(--ink); }
.reception-menu a { display: block; font-size: 14px; }
.reception-menu img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; }
.reception-menu a > span { display: inline-block; padding-top: 8px; }
