/* California Widows Sons sites (hub, chapters, foundations). Brand from the patches:
   black, gold and red. Light tokens on :root; dark tokens twice (device setting and
   the header toggle). The header and footer stay black in both modes, like the patches. */
:root {
  color-scheme: light;
  --bg: #f2ece0;          /* warm parchment, not white */
  --bg-alt: #e6dcc8;
  --card: #fbf7ef;
  --ink: #1a1714;
  --muted: #4f473d;
  --line: #cfc2a9;
  --head: #1a1714;        /* headings */
  --link: #8f1a12;
  --accent: #a11d14;      /* red from the patches, darkened for text contrast */
  --gold: #f2c230;
  --gold-ink: #141210;
  --primary: #1a1714;
  --primary-ink: #f6d55c;
  --black: #111010;
  --foot-ink: #e7e0d2;
  --foot-link: #f6d55c;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #141312; --bg-alt: #1d1b19; --card: #23201d; --ink: #ede6d8; --muted: #bdb3a2; --line: #3a352f;
    --head: #f6d55c; --link: #f6d55c; --accent: #ff8a7a; --primary: #f2c230; --primary-ink: #141210;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141312; --bg-alt: #1d1b19; --card: #23201d; --ink: #ede6d8; --muted: #bdb3a2; --line: #3a352f;
  --head: #f6d55c; --link: #f6d55c; --accent: #ff8a7a; --primary: #f2c230; --primary-ink: #141210;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.15; color: var(--head); font-family: "Arial Black", "Helvetica Neue", Impact, system-ui, sans-serif; letter-spacing: .01em; }
h2 { font-size: clamp(26px, 3.2vw, 36px); margin: 0 0 .6em; }
h3 { font-size: 21px; margin: .3em 0 .4em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--gold-ink); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 800px; margin: 0 auto; padding: 0 20px; }
.narrow-left { max-width: 780px; }
.center { text-align: center; }
.center-row { justify-content: center; }
section { padding: 64px 0; }
section.alt { background: var(--bg-alt); }
.lead { font-size: 20px; }
.note { color: var(--muted); font-size: 16px; }
.eyebrow { margin: 0 0 6px; font-weight: 800; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }

/* Header (black in both modes) */
header.site { background: var(--black); color: #f3ecdc; border-bottom: 4px solid var(--gold); position: sticky; top: 0; z-index: 5; }
.bar { display: flex; align-items: center; gap: 14px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; padding: 8px 0; text-decoration: none; color: #fff; }
.brand > img:not(.brand-flag) { display: block; width: 300px; }
.brand-flag { width: 54px; height: 54px; border-radius: 10px; object-fit: contain; background: #000; }
.brand-text strong { display: block; font-family: "Arial Black", Impact, system-ui, sans-serif; font-size: 20px; line-height: 1.1; color: var(--gold); }
.brand-text small { display: block; font-size: 14px; color: #e9e0cd; letter-spacing: .04em; }
.nav { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; }
.nav a { color: #f3ecdc; text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { background: #2a2622; }
.nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--gold); border-radius: 0; }
.theme-btn { display: none; place-items: center; width: 42px; height: 42px; padding: 0; background: none; color: #f3ecdc; border: 1px solid #5a5248; border-radius: 999px; cursor: pointer; order: 3; }
.js .theme-btn { display: grid; }
.theme-btn:hover { background: #2a2622; }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-btn .i-sun { display: block; } :root:not([data-theme="light"]) .theme-btn .i-moon { display: none; } }
.menu-btn { display: none; font: inherit; font-weight: 600; background: none; color: #f3ecdc; border: 1px solid #5a5248; border-radius: 8px; padding: 7px 14px; cursor: pointer; order: 2; }
@media (max-width: 960px) {
  .bar { flex-wrap: wrap; }
  .brand > img:not(.brand-flag) { width: 220px; }
  .js .menu-btn { display: block; }
  .nav { order: 4; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 12px; }
  .js .nav:not(.open) { display: none; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--gold); }
}
@media (max-width: 420px) { .brand > img:not(.brand-flag) { width: 170px; } .bar { gap: 8px; } .brand-text strong { font-size: 17px; } .brand-flag { width: 44px; height: 44px; } }

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; text-decoration: none; padding: 12px 24px; border-radius: 999px; border: 2px solid transparent; cursor: pointer; }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { filter: brightness(1.15); }
.btn-gold { background: var(--gold); color: var(--gold-ink); }
.btn-gold:hover { background: #ffd451; }
.btn-light { background: rgba(0,0,0,.35); color: #fff; border-color: #fff; }
.btn-light:hover { background: rgba(255,255,255,.18); }
.btn-outline { background: transparent; color: var(--head); border-color: var(--head); }
.btn-outline:hover { background: var(--bg-alt); }

/* Hero */
.hero { position: relative; padding: 0; color: #fff; background: #111; overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,9,8,.55), rgba(10,9,8,.82)); }
.hero-inner { position: relative; z-index: 1; text-align: center; padding: 110px 20px 100px; }
.hero h1 { color: #fff; font-size: clamp(34px, 6vw, 64px); margin: 6px 0; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.hero .kicker { margin: 0; font-size: clamp(16px, 2.2vw, 22px); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.hero .where { margin: 4px 0 0; font-size: clamp(18px, 2.4vw, 24px); color: #f3ecdc; }
.hero .btns { justify-content: center; margin-top: 30px; }
.hero-chapter .hero-inner { padding: 70px 20px 80px; }
.hero-flag { display: block; width: 200px; margin: 0 auto 18px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.hero-flag.flag-none { background: #000; padding: 30px 14px; }
.hero-slim { background: var(--black); }
.hero-slim::after { display: none; }
.hero-slim .hero-inner { padding: 56px 20px 60px; }
.hero-mark { width: 260px; display: block; margin: 0 auto 14px; }

/* Content blocks */
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 28px; } }
.emblem { width: 420px; }
.art { width: 420px; border-radius: var(--radius); box-shadow: 0 12px 30px rgba(0,0,0,.28); }
figure { margin: 0; }
figcaption { color: var(--muted); font-size: 16px; margin-top: 10px; }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding-left: 30px; margin-bottom: 8px; }
.checks li::before { content: ""; position: absolute; left: 4px; top: .5em; width: 12px; height: 12px; background: var(--gold); border: 2px solid var(--head); transform: rotate(45deg); }
.prose h2 { margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }
.prose li { margin-bottom: .5em; }
.prose h3 { margin-top: 1.4em; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 10px 0; }
summary { font-weight: 700; cursor: pointer; }
details p { margin: 10px 0 0; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tiles { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.tiles.big { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
.tile { display: block; text-align: center; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 14px 16px; height: 100%; transition: transform .15s; }
.tile:hover { transform: translateY(-3px); border-color: var(--gold); }
.tile .flag { display: block; border-radius: 10px; margin-bottom: 10px; background: #000; }
.tile strong { display: block; font-size: 17px; line-height: 1.25; color: var(--head); }
.tile span { display: block; color: var(--muted); font-size: 15px; }
@media (prefers-reduced-motion: reduce) { .tile { transition: none; } .tile:hover { transform: none; } }

.cards { display: grid; gap: 20px; margin-top: 24px; }
.cards.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card > svg { color: var(--accent); }
.card p:last-child { margin-bottom: 0; }

.officers { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.officer { text-align: center; }
.avatar { display: block; width: 140px; height: 140px; object-fit: cover; border-radius: 50%; margin: 0 auto 12px; border: 3px solid var(--gold); background: #000; }
.avatar-icon { object-fit: contain; padding: 18px; }
.officer strong { display: block; font-family: "Arial Black", Impact, system-ui, sans-serif; font-size: 20px; color: var(--head); }
.officer span { display: block; color: var(--muted); font-size: 15px; }

.products { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.product { display: flex; flex-direction: column; padding: 16px; }
.product img { border-radius: 10px; display: block; background: #fff; }
.product h3 { font-size: 18px; flex: 1; }
.product .btn { padding: 10px 16px; font-size: 16px; }

/* Band */
.band { background: var(--black); color: #f3ecdc; border-top: 4px solid var(--gold); }
.band h2 { color: var(--gold); }
.band p { margin: 0; }
.band a:not(.btn) { color: var(--foot-link); }
.band-inner { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.band .btns { margin-top: 0; }
.band-card .facts { margin: 0; }
.band-card .facts svg { color: var(--gold); }

/* Page head */
.page-head { background: var(--black); color: #fff; padding: 50px 0 44px; border-bottom: 4px solid var(--gold); }
.page-head h1 { color: var(--gold); margin: 0; font-size: clamp(32px, 5vw, 50px); }
.page-head p { margin: 10px 0 0; font-size: 20px; color: #efe6d2; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.facts { list-style: none; padding: 0; margin: 0 0 20px; }
.facts li { display: flex; gap: 14px; margin-bottom: 18px; }
.facts svg { flex: none; color: var(--accent); margin-top: 4px; }
.facts strong { display: block; }

/* Footer (black in both modes) */
footer.site { background: var(--black); color: var(--foot-ink); padding: 56px 0 28px; font-size: 16px; border-top: 4px solid var(--gold); }
footer.site a { color: var(--foot-link); }
footer.site h2 { color: #fff; font-size: 18px; font-family: inherit; margin: 0 0 12px; }
footer.site ul { list-style: none; padding: 0; margin: 0; }
footer.site li { margin-bottom: 8px; }
footer .two { columns: 2; column-gap: 20px; }
footer .two li { break-inside: avoid; }
footer .cols { display: grid; gap: 32px; grid-template-columns: 1.3fr 1fr 1.4fr 1.2fr; }
@media (max-width: 900px) { footer .cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { footer .cols { grid-template-columns: 1fr; } }
.foot-mark { display: block; width: 170px; margin-bottom: 12px; }
.foot-flag { display: block; width: 110px; border-radius: 10px; margin-bottom: 12px; }
.fine { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.18); margin-top: 36px; padding-top: 18px; color: #d4ccbb; font-size: 15px; }
.h3 { font-size: 21px; margin: .3em 0 .4em; }
.nw { white-space: nowrap; }
/* Keep the logo, theme toggle and menu on one row on phones */
@media (max-width: 960px) {
  .brand { min-width: 0; flex: 1 1 0; }
  .brand-text span { min-width: 0; }
  .theme-btn { order: 2; } .menu-btn { order: 3; }
}
