/* family.css: the shared look for the Warkentine family records (mileswarkentine.com, ellawarkentine.com).
   2026-11-26 redesign around each site's mark (the initial, kept in a ring). Each page sets only its own
   colours in :root (--brand, --brand-deep, --gold); everything else is shared, so a fix here is a fix in both.
   Loaded after the page's own <style>, so it restyles the existing markup without changing the words. */

:root {
  --brand: #1F3349; --brand-deep: #14233A; --gold: #E3D3AE;   /* overridden per site */
  --on-brand: #ffffff;
  --on-brand-soft: rgba(255, 255, 255, 0.72);
  --card: #fbf9f4;
  --shadow: 0 1px 2px rgba(20, 20, 20, 0.04), 0 8px 24px rgba(20, 20, 20, 0.06);
  --radius: 14px;
  --bar-h: 58px;
}

/* Full-bleed bands inside the centred .page column, without changing the markup. */
.fam-bar, .mast, #guestbook, footer { box-shadow: 0 0 0 100vmax var(--bleed); clip-path: inset(0 -100vmax); background: var(--bleed); }

/* ── Gate: the mark first ─────────────────────────────────── */
.gate { background: var(--brand); color: var(--on-brand); }
.gate-mark { display: block; width: 104px; height: 104px; margin: 0 auto 1.8rem; border-radius: 24px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 18px 40px rgba(0, 0, 0, 0.28); }
.gate-title { color: var(--on-brand); font-size: clamp(2rem, 6vw, 2.6rem); }
.gate-sub { color: var(--on-brand-soft); }
.gate-btn { background: var(--gold); color: var(--brand-deep); border-radius: 999px; padding: 0.85rem 2.2rem;
  font-weight: 700; min-height: 44px; }
.gate-btn:hover, .gate-btn:focus-visible { background: #ffffff; color: var(--brand-deep); }
.gate noscript .gate-sub { color: var(--on-brand-soft); }

/* ── Page shell ───────────────────────────────────────────── */
.page { padding-top: 0; }
@media (min-width: 720px) { .page { padding-top: 0; } }

/* ── Sticky bar: the mark, the name, every section ────────── */
.fam-bar { --bleed: var(--brand); position: sticky; top: 0; z-index: 50; height: var(--bar-h);
  display: flex; align-items: center; gap: 1rem; color: var(--on-brand);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.fam-id { display: flex; align-items: center; gap: 0.6rem; color: var(--on-brand); text-decoration: none;
  font-family: 'Fraunces', Georgia, serif; font-weight: 500; font-size: 1.02rem; white-space: nowrap; min-height: 44px; }
.fam-id img { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18); }
.fam-links { display: flex; gap: 0.15rem; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0;
  mask-image: linear-gradient(90deg, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); }
.fam-links::-webkit-scrollbar { display: none; }
.fam-links a { color: var(--on-brand-soft); text-decoration: none; font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap;
  padding: 0 0.7rem; line-height: 44px; border-radius: 999px; }
.fam-links a:hover, .fam-links a:focus-visible { color: var(--on-brand); background: rgba(255, 255, 255, 0.08); }
.fam-cta { flex: none; background: var(--gold); color: var(--brand-deep); text-decoration: none; border-radius: 999px;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; padding: 0 1rem; line-height: 36px; }
.fam-cta:hover, .fam-cta:focus-visible { background: #fff; }
@media (max-width: 719px) {
  .fam-id span { display: none; }
  .fam-bar { gap: 0.6rem; }
}
section[id] { scroll-margin-top: calc(var(--bar-h) + 12px); }

/* ── Masthead: a brand band with the mark ─────────────────── */
.mast { --bleed: var(--brand); color: var(--on-brand); padding: 3.6rem 0 3.2rem; margin-bottom: 0;
  background-image: radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.07), transparent 60%); }
.mast-mark { display: block; width: 112px; height: 112px; margin: 0 auto 1.6rem; border-radius: 26px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 20px 44px rgba(0, 0, 0, 0.3); }
.mast .overline { color: var(--gold); }
.mast h1 { color: var(--on-brand); font-size: clamp(2.6rem, 8vw, 4.8rem); }
.mast .deck { color: var(--on-brand-soft); }
.mast .deck em, .mast strong { color: var(--on-brand); }
.mast .mast-jump a { color: var(--gold); }
.mast .dates { gap: 0.8rem; max-width: 600px; }
.date-block { background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius); padding: 1rem 1.1rem; }
.date-label { color: var(--gold); }
.date-value { color: var(--on-brand); }
.date-venue { color: var(--on-brand-soft); }
.status-chip, .countdown { background: var(--gold) !important; color: var(--brand-deep) !important; border: none !important;
  border-radius: 999px; padding: 0.55rem 1.2rem !important; font-weight: 700; }
.mast-horizon, .mast + .horizon { display: none; }

/* ── Sections ─────────────────────────────────────────────── */
section { padding: 3.6rem 0; border-bottom: none; position: relative; }
section + section::before, .horizon + section::before { content: ""; position: absolute; top: 0; left: 50%;
  width: 46px; height: 46px; transform: translate(-50%, -50%); border-radius: 50%;
  border: 2px solid var(--rule); background: var(--paper);
  box-shadow: inset 0 0 0 7px var(--paper), inset 0 0 0 9px var(--brand); opacity: 0.55; }
.section-num { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--brand); font-weight: 700; }
.section-num::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--brand);
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 7px var(--gold); flex: none; }
.section-title { font-size: clamp(1.9rem, 5vw, 2.7rem); color: var(--ink); }
p.lede { color: var(--ink-dim); }

/* Cards for the honour lists, the before/after callout and the tables */
.honors { gap: 0.9rem; }
.honor { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow); }
.honor-mark { border-left: none; padding: 0.2rem 0.7rem; border-radius: 999px; background: var(--brand); color: var(--on-brand); }
.transition { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.trans-side.after { background: var(--brand) !important; color: var(--on-brand); }
.trans-side.after .trans-label { color: var(--gold); }
.trans-side.after .trans-sub { color: var(--on-brand-soft); }
.trans-arrow { color: var(--brand); }
.ledger th { border-bottom-color: var(--brand); color: var(--brand); }

/* Timelines: a line with rings on it */
.altitude { position: relative; padding-left: 1.6rem; }
.altitude::before { content: ""; position: absolute; left: 7px; top: 0.6rem; bottom: 0.6rem; width: 2px; background: var(--rule); }
.rung { position: relative; border-bottom: none; }
.rung::before { content: ""; position: absolute; left: calc(-1.6rem + 1px); top: 1.05rem; width: 14px; height: 14px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--brand); }
.rung:first-child::before { background: var(--brand); }
.rung-alt { color: var(--brand); }

/* The map: nodes as rings on one line */
.map { gap: 0.6rem; }
.map .node { background: var(--card); border: 1px solid var(--rule); border-radius: 999px; padding: 0.45rem 0.95rem; box-shadow: var(--shadow); }
.map .node:last-child { background: var(--brand); color: var(--gold) !important; border-color: var(--brand); }
.map .node:last-child * { color: var(--gold); }
.map .arrow { color: var(--brand); }

/* ── Guestbook: a brand band ──────────────────────────────── */
#guestbook { --bleed: var(--brand-deep); color: var(--on-brand); padding: 4rem 0 4.4rem; }
#guestbook::before { display: none; }
#guestbook .section-num { color: var(--gold); }
#guestbook .section-num::before { border-color: var(--gold); box-shadow: inset 0 0 0 2px var(--brand-deep), inset 0 0 0 7px var(--gold); }
#guestbook .section-title { color: var(--on-brand); }
#guestbook .guest-intro { color: var(--on-brand-soft); }
#guestbook .guest-form label { color: var(--gold); }
#guestbook .guest-form input, #guestbook .guest-form textarea { background: rgba(255, 255, 255, 0.08); color: var(--on-brand);
  border-left: none; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 10px; }
#guestbook .guest-form input:focus, #guestbook .guest-form textarea:focus { background: rgba(255, 255, 255, 0.14); border-color: var(--gold); }
#guestbook .guest-submit { background: var(--gold); color: var(--brand-deep); border-radius: 999px; font-weight: 700; min-height: 44px; }
#guestbook .guest-submit:hover { background: #fff; }
#guestbook .guest-msg { color: var(--gold); }
#guestbook p, #guestbook em, #guestbook strong { color: var(--on-brand-soft); }
#guestbook + .horizon { display: none; }

/* ── Footer ───────────────────────────────────────────────── */
footer { --bleed: var(--brand-deep); color: var(--on-brand-soft); padding: 0.4rem 0 3rem; text-align: center; line-height: 2.2; }
footer img { display: block; margin: 0 auto 0.6rem; width: 34px; height: 34px; border-radius: 9px; opacity: 0.9; }
html { background: var(--brand-deep); }
body { background: var(--paper); }
footer a { color: var(--gold); }
.page { padding-bottom: 0 !important; }

/* Phone rhythm (2026-11-26): less dead air between sections, a smaller masthead mark. */
@media (max-width: 600px) {
  section { padding: 2.6rem 0; }
  section + section::before, .horizon + section::before { width: 34px; height: 34px;
    box-shadow: inset 0 0 0 5px var(--paper), inset 0 0 0 7px var(--brand); }
  .mast { padding: 2.4rem 0 2.4rem; }
  .mast-mark { width: 84px; height: 84px; border-radius: 20px; margin-bottom: 1.2rem; }
  #guestbook { padding: 3rem 0 3.4rem; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
