/*
Theme Name: Quentin Willson Memorial
Template: twentytwentyfive
Description: Memorial site for Quentin Willson (1957–2025). Child theme of Twenty Twenty-Five with a life & career timeline.
Version: 1.0.2
Text Domain: quentin-memorial
*/

/* ---------- General ---------- */
.site-logo-signature img { mix-blend-mode: multiply; }
.qw-kicker { text-transform: uppercase; letter-spacing: .18em; font-size: .78rem; font-weight: 600; }
.qw-dates { font-family: var(--wp--preset--font-family--vollkorn); font-style: italic; }
.wp-block-image img { border-radius: 2px; }
.wp-element-caption { color: var(--wp--preset--color--accent-3); }

/* Hero cover: text sits on a dark gradient so it stays readable over the photo */
.qw-hero .wp-block-cover__background { background: linear-gradient(90deg, rgba(18,16,12,.88) 0%, rgba(18,16,12,.55) 45%, rgba(18,16,12,0) 75%) !important; opacity: 1 !important; }
.qw-hero h1 { text-wrap: balance; }

/* Chapter cards */
.qw-card { background: var(--wp--preset--color--base); border: 1px solid var(--wp--preset--color--accent-4); height: 100%; }
.qw-card .wp-block-image { margin: 0; }
.qw-card .wp-block-image img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.qw-card a { text-decoration: none; }
.qw-card a:hover { text-decoration: underline; }

/* ---------- Timeline ----------
   .qw-timeline  wrapper (draws the vertical rail)
   .qw-era       era heading
   .qw-event     one entry: .qw-event__date + .qw-event__body          */
.qw-timeline { position: relative; --rail: 11rem; }
.qw-timeline::before { content: ""; position: absolute; top: .5rem; bottom: .5rem; left: var(--rail); width: 2px; background: var(--wp--preset--color--accent-4); }
.qw-timeline > * { position: relative; }
.qw-era { margin-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--30) !important; padding-left: calc(var(--rail) + 2.5rem); }
.qw-era:first-child { margin-top: 0 !important; }
.qw-era::before { content: ""; position: absolute; left: calc(var(--rail) - .6rem); top: .35em; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: var(--wp--preset--color--accent-1); box-shadow: 0 0 0 6px var(--wp--preset--color--base); }
.qw-era h2 { margin: 0; }
.qw-era p { margin: .25rem 0 0; color: var(--wp--preset--color--accent-3); }
.qw-event { display: grid; grid-template-columns: var(--rail) 1fr; column-gap: 2.5rem; margin-block: 0 var(--wp--preset--spacing--40) !important; }
.qw-event::before { content: ""; position: absolute; left: calc(var(--rail) - .35rem); top: .55rem; width: .8rem; height: .8rem; border-radius: 50%; background: var(--wp--preset--color--base); border: 2px solid var(--wp--preset--color--accent-1); }
.qw-event__date { grid-column: 1; margin: 0 !important; padding-right: 1.5rem; text-align: right; font-family: var(--wp--preset--font-family--vollkorn); font-size: 1.15rem; line-height: 1.5; color: var(--wp--preset--color--accent-1); font-weight: 600; }
.qw-event__body { grid-column: 2; margin: 0 !important; padding-left: .25rem; }
.qw-event__body > :first-child { margin-top: 0; }
.qw-event__body h3 { margin: 0 0 .4rem; }
.qw-event__body p { margin: 0 0 .6rem; }
.qw-event__body .wp-block-image, .qw-event__body .wp-block-embed { margin-top: 1rem; max-width: 36rem; }
.qw-event--final .qw-event__date, .qw-event--final h3 { color: var(--wp--preset--color--contrast); }
.qw-event--final::before { background: var(--wp--preset--color--contrast); border-color: var(--wp--preset--color--contrast); }

@media (max-width: 781px) {
  .qw-timeline { --rail: 0rem; padding-left: 1.75rem; }
  .qw-timeline::before { left: .45rem; }
  .qw-era { padding-left: 0; }
  .qw-era::before { left: -1.9rem; width: 1.1rem; height: 1.1rem; }
  .qw-event { grid-template-columns: 1fr; }
  .qw-event::before { left: -1.65rem; top: .4rem; }
  .qw-event__date { text-align: left; padding: 0; font-size: 1rem; }
  .qw-event__body { grid-column: 1; padding: 0; }
}

/* Tributes */
.qw-tributes .wp-block-comment-template { list-style: none; padding: 0; }
.qw-tributes .wp-block-comment-template li { background: var(--wp--preset--color--accent-5); padding: 1.5rem 1.75rem; margin-bottom: 1.25rem; border-left: 3px solid var(--wp--preset--color--accent-1); }
.qw-tributes .comment-form textarea { min-height: 10rem; }
.qw-tributes .comment-form-cookies-consent { font-size: .85rem; }
.qw-note { font-size: .9rem; color: var(--wp--preset--color--accent-3); }

/* Footer */
.qw-footer a { color: inherit; }

/* Keep hero text off the viewport edge and aligned with the wide content column */
.qw-hero .wp-block-cover__inner-container { padding-inline: max(var(--wp--style--root--padding-left, 1.5rem), calc((100% - var(--wp--style--global--wide-size, 1240px)) / 2)); }
.qw-hero .wp-block-cover__inner-container > .wp-block-group { margin-left: 0 !important; }

/* Transparent PNG cut-outs (book covers, portrait, logos): never crop, no frame */
.wp-block-image.is-cutout img { border-radius: 0; background: none; }
.qw-card .wp-block-image.is-cutout img { object-fit: contain; padding: 1.25rem; }
.qw-event__body .wp-block-image.is-cutout { max-width: 15rem; }
.wp-block-columns .wp-block-image.is-cutout img { max-height: 340px; width: auto; margin-inline: auto; }
