/* allentegenkamp.com — design system.
   Structure and type system carried over from cathymaynard.com ("Bold Garden
   Editorial"). Palette sampled 2026-08-20 from Rachelle's "A Life Well Played"
   watercolour: billiard-felt navy, mountain-lake blue, paper cream, antique gold.
   Contrast (WCAG): navy/paper 11.6:1, gold/navy 5.5:1, paper/pop 5.7:1. */
:root {
  --bg: #f2ede2;
  --bg-bright: #fbf8f1;
  --fg: #14304b;
  --fg-soft: #4a5a68;
  --accent: #285878;
  --accent-deep: #1a405a;
  --pop: #34688c;
  --gold: #c4a262;
  --hairline: #d8d1c2;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.2rem;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent-deep); }
.frame { position: relative; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- masthead: the family's "A Life Well Played" artwork on billiard-felt navy ---------- */
.masthead { position: relative; background: var(--fg); color: var(--bg); padding: 2.2rem 1.5rem 0; overflow: hidden; }
.masthead-inner { max-width: 62rem; margin: 0 auto; position: relative; z-index: 2; text-align: left; }
.hero { max-width: 54rem; margin: 0 auto; }
.hero img { display: block; width: 100%; height: auto; border: 10px solid var(--bg-bright); outline: 1px solid rgba(0, 0, 0, 0.35); box-shadow: 0 26px 50px -22px rgba(0, 0, 0, 0.7); }
@media (max-width: 900px) { .masthead { padding-top: 1.2rem; } .hero img { border-width: 6px; } }
.eyebrow { font-size: 0.8rem; letter-spacing: 0.42em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.4rem; }
h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 640;
  font-variation-settings: "opsz" 144, "SOFT" 60;
  font-size: clamp(3rem, 11vw, 7.2rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
  max-width: 12ch;
}
.subname { font-family: "Fraunces", Georgia, serif; font-style: italic; font-weight: 400; font-size: clamp(1.05rem, 2.6vw, 1.45rem); color: #e6ddc9; margin-top: 1rem; }
.dates { display: inline-block; margin: 1.6rem 0 3rem; padding: 0.5rem 1.1rem; border: 1px solid var(--gold); color: var(--gold); font-size: 0.95rem; letter-spacing: 0.22em; }

/* nameplate: name + dates sit under the portrait, on paper (the family's order: art → portrait → name → story) */
.nameplate { padding: 2.4rem 1.5rem 0; }
.nameplate-inner { max-width: 62rem; margin: 0 auto; }
.nameplate .eyebrow { color: var(--accent-deep); margin-bottom: 1rem; }
.nameplate h1 { color: var(--fg); }
.nameplate .subname { color: var(--fg-soft); margin-top: 0.7rem; }
.nameplate .dates { border-color: var(--accent-deep); color: var(--accent-deep); margin: 1.4rem 0 0; }
/* Hook for a large motif bleeding off the masthead edge (unused; kept for a future SVG motif). */
.masthead .masthead-art { position: absolute; right: -14rem; top: -10rem; width: 42rem; height: 42rem; z-index: 1; opacity: 0.9; }
@media (max-width: 900px) {
  .masthead .masthead-art { width: 18rem; height: 18rem; right: -8rem; top: -7rem; opacity: 0.3; }
  .dates { font-size: 0.8rem; letter-spacing: 0.12em; }
}

/* portrait sits half in the dark band, half out */
.portrait-band { background: linear-gradient(to bottom, var(--fg) 0 52%, var(--bg) 52% 100%); padding: 2.5rem 1.5rem 0; }
.portrait-wrap { max-width: 62rem; margin: 0 auto; }
.portrait { display: block; width: min(340px, 82%); height: auto; border: 10px solid var(--bg-bright); outline: 1px solid var(--hairline); box-shadow: 0 26px 50px -22px rgba(20, 48, 75, 0.55); }
.portrait-caption { font-family: "Fraunces", Georgia, serif; font-style: italic; color: var(--fg-soft); font-size: 1.02rem; margin-top: 0.9rem; }

/* ---------- shared section chrome ---------- */
.section { max-width: 46rem; margin: 0 auto; padding: 3.6rem 1.5rem 0; position: relative; }
.kicker { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.8rem; }
.kicker::after { content: ""; flex: 1; height: 2px; background: var(--pop); }
.kicker span { font-size: 0.8rem; letter-spacing: 0.38em; text-transform: uppercase; color: var(--accent-deep); white-space: nowrap; }
.section h2 { font-family: "Fraunces", Georgia, serif; font-weight: 620; font-size: 2.4rem; margin-bottom: 0.4rem; }
.note { font-size: 0.98rem; color: var(--fg-soft); font-style: italic; margin-bottom: 2rem; }

/* ---------- obituary ---------- */
.obituary p + p { margin-top: 1.25rem; }
.obituary p:first-of-type::first-letter { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 3.6em; float: left; line-height: 0.8; padding-right: 0.1em; color: var(--pop); }
.pull { display: block; font-family: "Fraunces", Georgia, serif; font-style: italic; font-weight: 450; font-size: 1.6rem; line-height: 1.35; color: var(--accent-deep); border-left: 4px solid var(--pop); padding-left: 1.2rem; margin: 1.8rem 0 0.4rem; }
.obituary .source-link { text-align: center; font-size: 0.95rem; margin-top: 1.4rem; }
.tribute { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; align-items: center; max-width: 34rem; margin: 2.8rem auto 0; }
.tribute img { display: block; width: 100%; height: auto; aspect-ratio: 207 / 182; object-fit: cover; border: 5px solid var(--bg-bright); outline: 1px solid var(--hairline); }

/* ---------- action buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.actions a, .btn { flex: 1 1 15rem; max-width: 19rem; text-align: center; text-decoration: none; font-family: inherit; font-size: 1.1rem; font-weight: 500; padding: 1.05rem 1.4rem; cursor: pointer; transition: transform 160ms ease, background-color 160ms ease; }
.actions .view, .btn-primary { background: var(--pop); color: var(--bg-bright); font-weight: 600; border: 2px solid var(--pop); }
.actions .view:hover, .btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); transform: translateY(-2px); }
.actions .share, .btn-secondary { border: 2px solid var(--pop); color: var(--accent-deep); background: transparent; }
.actions .share:hover, .btn-secondary:hover { background: rgba(52, 104, 140, 0.08); transform: translateY(-2px); }
.actions-hint { text-align: center; font-size: 0.98rem; color: var(--fg-soft); margin-top: 1rem; font-style: italic; }

/* ---------- guestbook ---------- */
.guestbook { display: flex; flex-direction: column; }
.guestbook .kicker { order: 0; }
.guestbook h2 { order: 0; }
.guestbook .note { order: 1; }
.guestbook .gb-recent { order: 2; }
.guestbook .gb-toggle { order: 3; }
.guestbook .gb-thread { order: 4; }
.guestbook.gb-collapsed .gb-list, .guestbook.gb-collapsed .gb-count { display: none; }
.guestbook:not(.gb-collapsed) .gb-recent { display: none; }
.gb-recent { max-width: 36rem; }
.gb-recent-item, .gb-entry { border-left: 3px solid var(--gold); padding: 0.2rem 0 0.2rem 1.1rem; margin-bottom: 1.2rem; }
.gb-recent-item .who, .gb-entry .who { font-weight: 600; font-size: 1.02rem; }
.gb-recent-item .when, .gb-entry .when { color: var(--fg-soft); font-size: 0.9rem; font-style: italic; margin-left: 0.45rem; }
.gb-recent-item p, .gb-entry p { margin-top: 0.15rem; font-size: 1.05rem; line-height: 1.5; white-space: pre-line; }
.gb-toggle { display: block; margin: 1.4rem 0 0; padding: 0.85rem 1.6rem; font-family: inherit; font-size: 1.02rem; color: var(--accent-deep); background: transparent; border: 2px solid var(--pop); cursor: pointer; align-self: start; transition: background-color 160ms ease; }
.gb-toggle:hover { background: rgba(52, 104, 140, 0.08); }
.gb-thread { margin-top: 2rem; }
.gb-count { font-family: "Fraunces", Georgia, serif; font-size: 1.2rem; margin-bottom: 1.2rem; }
.gb-form { margin-top: 1.5rem; max-width: 36rem; }
.gb-form label, .form label { display: block; font-size: 0.95rem; color: var(--fg-soft); margin: 1rem 0 0.3rem; }
.gb-form input[type="text"], .gb-form textarea, .form input[type="text"], .form textarea {
  width: 100%; font-family: inherit; font-size: 1rem; color: var(--fg); background: var(--bg-bright);
  border: 1px solid var(--hairline); border-radius: 0; padding: 0.6rem 0.8rem;
}
.gb-form textarea, .form textarea { min-height: 7rem; resize: vertical; }
.gb-form .hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.gb-form button, .form button { margin-top: 1rem; font-family: inherit; font-size: 1rem; font-weight: 600; background: var(--pop); color: var(--bg-bright); border: 2px solid var(--pop); border-radius: 0; padding: 0.7rem 1.5rem; cursor: pointer; transition: background-color 160ms ease; }
.gb-form button:hover, .form button:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.gb-form button[disabled], .form button[disabled] { opacity: 0.6; cursor: default; }
.gb-status, .form-status { margin-top: 1rem; font-style: italic; color: var(--fg-soft); }
.gb-status.error, .form-status.error { color: #8a2b1d; font-style: normal; }
.turnstile-slot { margin-top: 1rem; min-height: 65px; }

.actions a:focus-visible, .gb-toggle:focus-visible, a:focus-visible, button:focus-visible,
input:focus-visible, textarea:focus-visible { outline: 3px solid var(--fg); outline-offset: 2px; }
footer a:focus-visible { outline-color: var(--gold); }

/* ---------- decorative margins (desktop only; motifs supplied in Phase 4) ---------- */
.margin-art { position: absolute; top: 0; width: 8.5rem; height: 100%; pointer-events: none; z-index: 0; }
.margin-art.left { left: max(0.5rem, calc(50% - 45rem)); }
.margin-art.right { right: max(0.5rem, calc(50% - 45rem)); }
.margin-art svg { position: absolute; width: 5.6rem; height: auto; stroke: var(--pop); opacity: 0.85; }
.margin-art.left svg { left: 0; }
.margin-art.right svg { right: 0.5rem; }
.margin-art .art-1 { top: 46rem; } .margin-art .art-2 { top: 95rem; } .margin-art .art-3 { top: 150rem; }
@media (max-width: 1180px) { .margin-art { display: none; } }
.divider-art { display: none; }
@media (max-width: 1180px) {
  .divider-art { display: flex; justify-content: center; margin: 3rem 0 -0.8rem; }
  .divider-art svg { width: 3.2rem; height: auto; stroke: var(--pop); opacity: 0.9; }
}

footer { margin-top: 4.5rem; background: var(--fg); color: #d6cfbf; text-align: center; padding: 2.6rem 1.5rem; font-size: 0.95rem; letter-spacing: 0.06em; }
footer a { color: var(--gold); }
footer .donation { font-size: 1.02rem; }
footer .signoff-line { margin-top: 1.4rem; }
footer .site-nav { margin-top: 1.4rem; font-size: 0.9rem; }
footer .site-nav a + a { margin-left: 1rem; }

.reveal { animation: rise 1s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none !important; }
  .actions a, .gb-toggle, .btn { transition: none !important; }
}

/* ---------- print: the obituary as a keepsake (carried from cathymaynard.com) ---------- */
@media print {
  @page { margin: 18mm 16mm; }
  body { background: #fff; color: #000; font-size: 11pt; line-height: 1.5; overflow-x: visible; }
  .margin-art, .divider-art, .no-print, .guestbook, .masthead-art, .masthead, footer .site-nav { display: none !important; }
  .nameplate { padding: 0.6rem 0 0; }
  .nameplate .eyebrow, .nameplate h1, .nameplate .subname { color: #000; }
  .eyebrow { color: #000; font-size: 8pt; letter-spacing: 0.3em; margin-bottom: 0.5rem; }
  h1 { font-size: 30pt; line-height: 1.02; max-width: none; }
  .subname { color: #000; font-size: 11.5pt; margin-top: 0.3rem; }
  .nameplate .dates, .dates { border: 1px solid #000; color: #000; font-size: 8.5pt; letter-spacing: 0.16em; margin: 0.7rem 0 1.2rem; padding: 0.22rem 0.65rem; }
  .portrait-band { background: #fff; padding: 0; }
  .portrait { width: 62mm; border: 1px solid #999; outline: none; box-shadow: none; break-inside: avoid; }
  .portrait-caption { color: #000; font-size: 9.5pt; margin-top: 0.35rem; }
  .section { max-width: none; padding: 0; margin: 0; }
  .kicker { margin: 1.3rem 0 0.7rem; }
  .kicker span { color: #000; }
  .kicker::after { background: #000; height: 1px; }
  .obituary p { orphans: 3; widows: 3; }
  .obituary p + p { margin-top: 0.65rem; }
  .obituary p:first-of-type::first-letter { color: #000; }
  .pull { color: #000; border-left: 2px solid #000; font-size: 13pt; margin: 0.9rem 0 0.4rem; break-inside: avoid; }
  a { color: #000; text-decoration: underline; }
  footer a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8.5pt; word-break: break-word; }
  footer { margin-top: 1.5rem; background: #fff; color: #000; padding: 0.9rem 0 0; border-top: 1px solid #000; letter-spacing: normal; break-inside: avoid; }
  footer a { color: #000; }
  .reveal { animation: none !important; }
}
