/* ==========================================================================
   Guard the Flock — v2 design layer
   Direction: "Dawn over the fold" — calm, pastoral, trustworthy.
   Deep shepherd-navy for trust, warm parchment for warmth, burnished gold
   as a quiet highlight, crimson reserved for urgent help only.
   Loaded after the base styles so it overrides them without touching content.
   ========================================================================== */

:root {
  --bg:          #F6F1E8;
  --bg-alt:      #EDE5D6;
  --surface:     #FBF8F2;
  --fg:          #18202E;
  --fg-muted:    #586174;
  --accent:      #1F3A5F;   /* shepherd navy */
  --accent-soft: #E1E8F1;
  --gold:        #B07D2E;
  --gold-soft:   #F3E6CC;
  --urgent:      #A3243A;
  --urgent-deep: #7E1A2C;
  --border:      #DDD3C2;
  --card-bg:     #FFFDF9;
  --link:        #1F3A5F;
  --ink:         #0F1A2B;
  --shadow-sm:   0 1px 2px rgba(24,32,46,.05), 0 2px 8px rgba(24,32,46,.05);
  --shadow-md:   0 2px 4px rgba(24,32,46,.04), 0 12px 32px -8px rgba(24,32,46,.14);
  --shadow-lg:   0 30px 60px -20px rgba(15,26,43,.35);
  --radius:      14px;
  --f-display:   'Fraunces', 'Lora', Georgia, serif;
  --f-body:      'Source Serif 4', 'Lora', Georgia, serif;
  --f-ui:        'Figtree', system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E141F; --bg-alt: #151D2B; --surface: #131B28; --fg: #ECE6DA; --fg-muted: #A3AABA;
    --accent: #9DBBE3; --accent-soft: #1A2840; --gold: #D9AE62; --gold-soft: #2A2214;
    --urgent: #D9566C; --urgent-deep: #B23A50; --border: #253041; --card-bg: #121A27; --link: #A9C4EA; --ink: #070B12;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.3); --shadow-md: 0 12px 32px -8px rgba(0,0,0,.5);
  }
}
:root[data-theme="dark"] {
  --bg: #0E141F; --bg-alt: #151D2B; --surface: #131B28; --fg: #ECE6DA; --fg-muted: #A3AABA;
  --accent: #9DBBE3; --accent-soft: #1A2840; --gold: #D9AE62; --gold-soft: #2A2214;
  --urgent: #D9566C; --urgent-deep: #B23A50; --border: #253041; --card-bg: #121A27; --link: #A9C4EA; --ink: #070B12;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3); --shadow-md: 0 12px 32px -8px rgba(0,0,0,.5);
}

/* ── Base ─────────────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-ui);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1200px 600px at 100% 0%, color-mix(in srgb, var(--gold) 7%, transparent), transparent 60%),
    var(--bg);
}
::selection { background: var(--gold-soft); color: var(--fg); }
h1, h2, h3, h4 { font-family: var(--f-display); letter-spacing: -0.01em; font-optical-sizing: auto; }
a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--gold); }
.eyebrow {
  font-family: var(--f-ui); font-size: .72rem; letter-spacing: .16em;
  color: var(--gold); font-weight: 700;
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .7; }
.page-wrap { max-width: 820px; }

/* ── Top bar (brand + theme) ───────────────────────────────────────────── */
.v2-topbar {
  position: absolute; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 48px);
  pointer-events: none;
}
.v2-brand {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-display); font-weight: 600; font-size: 1.05rem;
  color: #FBF6EC; text-decoration: none; letter-spacing: .01em;
}
.v2-brand svg { width: 28px; height: 28px; }
.v2-brand:hover { color: #fff; }
.theme-toggle {
  top: 16px; right: clamp(16px, 4vw, 48px);
  background: rgba(255,255,255,.14); color: #FBF6EC;
  border: 1px solid rgba(255,255,255,.28);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: none; font-family: var(--f-ui);
}
.theme-toggle:hover { background: rgba(255,255,255,.24); color: #fff; border-color: rgba(255,255,255,.5); }
body.v2-scrolled .theme-toggle,
body:not(.landing-mode) .theme-toggle {
  background: var(--card-bg); color: var(--fg-muted); border-color: var(--border); box-shadow: var(--shadow-sm);
}

/* ── Hero ─────────────────────────────────────────────────────────────── */
.site-header {
  position: relative;
  margin-inline: calc(50% - 50vw);
  padding: clamp(110px, 16vh, 160px) clamp(20px, 6vw, 64px) clamp(150px, 20vh, 200px);
  border-bottom: 0;
  color: #FBF6EC;
  isolation: isolate;
  overflow: hidden;
  background: var(--ink);
}
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url("assets/hero-golden.jpg") center 45% / cover no-repeat;
  transform: scale(1.04);
  animation: v2-drift 24s ease-in-out infinite alternate;
}
.site-header::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(10,18,32,.86) 0%, rgba(10,18,32,.62) 45%, rgba(10,18,32,.15) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 22%);
}
@keyframes v2-drift { to { transform: scale(1.1) translate(-1.5%, -1%); } }
@media (prefers-reduced-motion: reduce) { .site-header::before { animation: none; } }
.site-header > * { max-width: 820px; margin-inline: auto; }
.site-header .eyebrow { color: #E8C887; margin-bottom: 18px; display: flex; max-width: 820px; }
.site-header h1 {
  font-size: clamp(2.8rem, 7vw, 5rem); font-weight: 500; line-height: 1.02;
  letter-spacing: -0.025em; color: #FFFBF3;
}
.site-header h1 em { font-style: italic; color: #E8C887; font-weight: 400; }
.site-header p {
  font-family: var(--f-body); font-style: normal;
  color: rgba(251,246,236,.82); font-size: 1.12rem; max-width: 820px;
}
.site-header p strong {
  display: block; font-family: var(--f-display); font-weight: 400; font-style: italic;
  font-size: clamp(1.25rem, 2.6vw, 1.6rem); line-height: 1.35; color: #FFFBF3; max-width: 30ch;
}
.site-header p:not(.eyebrow):last-of-type { padding-right: clamp(0px, calc(100% - 62ch), 320px); }

/* Compact header once the reader is inside the guide */
body:not(.landing-mode) .site-header {
  padding-block: 92px 56px;
}
body:not(.landing-mode) .site-header h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); }
body:not(.landing-mode) .site-header p:not(.eyebrow) { display: none; }
body:not(.landing-mode) .site-header p:has(strong) { display: block; }
body:not(.landing-mode) .site-header p strong { font-size: 1.1rem; }

/* ── Landing: path chooser ─────────────────────────────────────────────── */
.landing { position: relative; z-index: 2; margin-top: clamp(-120px, -14vh, -90px); padding-block: 0 56px; }
.landing-intro {
  font-family: var(--f-ui); font-size: .95rem; color: rgba(251,246,236,.9);
  max-width: 60ch; margin-bottom: 18px; font-weight: 500;
}
.path-cards { gap: 18px; counter-reset: path; }
.path-card {
  counter-increment: path;
  position: relative; padding: 28px 24px 24px; border-radius: var(--radius);
  background: var(--card-bg); border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s, border-color .25s;
  gap: 10px;
}
.path-card::before {
  content: "0" counter(path);
  position: absolute; top: 22px; right: 22px;
  font-family: var(--f-display); font-size: .9rem; font-style: italic; color: var(--fg-muted); opacity: .6;
}
.path-card:hover, .path-card:focus-visible {
  transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}
.path-card .path-icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 0; margin-bottom: 6px;
}
.path-card .path-icon svg { width: 24px; height: 24px; }
.path-card .path-title { font-family: var(--f-display); font-size: 1.3rem; font-weight: 500; line-height: 1.2; }
.path-card .path-desc { font-size: .92rem; line-height: 1.55; }
.path-card .path-cta {
  font-family: var(--f-ui); font-size: .85rem; font-weight: 700; color: var(--accent);
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
}
.path-card .path-cta::after { content: ""; }
.path-card:hover .path-cta { gap: 10px; }
.path-card[data-path="respond"] {
  background: linear-gradient(180deg, color-mix(in srgb, var(--urgent) 6%, var(--card-bg)), var(--card-bg));
  border-color: color-mix(in srgb, var(--urgent) 35%, var(--border));
}
.path-card[data-path="respond"] .path-icon { background: color-mix(in srgb, var(--urgent) 12%, transparent); color: var(--urgent); }
.path-card[data-path="respond"] .path-cta { color: var(--urgent); }
.landing-alt { margin-top: 26px; font-size: .95rem; }
.landing-alt button { color: var(--accent); text-underline-offset: 4px; }

/* Trust strip + what's inside */
.v2-trust {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px;
  margin: 44px 0 0; background: var(--border); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.v2-trust div { background: var(--surface); padding: 18px 18px 16px; }
.v2-trust b { display: block; font-family: var(--f-display); font-weight: 500; font-size: 1.05rem; color: var(--fg); margin-bottom: 2px; }
.v2-trust span { font-size: .84rem; color: var(--fg-muted); line-height: 1.45; display: block; }
.v2-verse {
  margin: 48px auto 0; max-width: 46ch; text-align: center;
  font-family: var(--f-display); font-style: italic; font-weight: 400;
  font-size: clamp(1.25rem, 2.6vw, 1.6rem); line-height: 1.4; color: var(--fg);
}
.v2-verse cite { display: block; margin-top: 12px; font-family: var(--f-ui); font-style: normal; font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 700; }

/* ── Navigation ───────────────────────────────────────────────────────── */
.nav-tabs {
  margin-top: -28px; position: sticky; top: 10px; z-index: 30;
  flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
  gap: 2px; padding: 6px; border: 1px solid var(--border);
  border-radius: 999px; background: color-mix(in srgb, var(--card-bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: var(--shadow-md);
}
.nav-tabs::-webkit-scrollbar { display: none; }
.nav-tab {
  flex: 0 0 auto; border: 0 !important; background: transparent; border-radius: 999px;
  font-family: var(--f-ui); font-size: .84rem; font-weight: 600; color: var(--fg-muted);
  padding: 8px 14px; white-space: nowrap; transition: background .2s, color .2s;
}
.nav-tab:hover { background: var(--bg-alt); color: var(--fg); }
.nav-tab.active, .nav-tab[aria-selected="true"] {
  background: var(--accent) !important; color: var(--card-bg) !important; box-shadow: 0 4px 14px -4px color-mix(in srgb, var(--accent) 60%, transparent);
}
.nav-tab[data-tab="respond"] { color: var(--urgent); }
.nav-tab[data-tab="respond"].active { background: var(--urgent) !important; color: #fff !important; }
.nav-start-here { color: var(--gold) !important; border: 0 !important; }
.nav-start-here:hover { background: var(--gold-soft) !important; color: var(--gold) !important; }
@media (max-width: 640px) {
  .nav-tabs { flex-wrap: wrap; border-radius: 18px; }
}

/* ── Sections ─────────────────────────────────────────────────────────── */
.section { padding-block: 56px 32px; border-bottom: 0; }
.section.active { animation: v2-rise .45s cubic-bezier(.2,.7,.2,1) both; }
@keyframes v2-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .section.active { animation: none; } }
.sec-head {
  font-family: var(--f-display); font-weight: 500; font-size: clamp(1.7rem, 3.6vw, 2.35rem);
  line-height: 1.15; letter-spacing: -0.02em; border-bottom: 0; padding-bottom: 0; margin: 10px 0 26px;
}
.sec-sub, .section h3 { font-family: var(--f-display); font-weight: 500; font-size: 1.45rem !important; letter-spacing: -0.01em; }
.section h3.sec-sub { padding-top: 8px; }
.tab-toc {
  background: transparent !important; border: 0 !important; padding: 0 !important; gap: 8px; margin-bottom: 36px;
}
.tab-toc a {
  font-family: var(--f-ui); font-size: .82rem; font-weight: 600; text-decoration: none;
  color: var(--accent) !important; background: var(--accent-soft);
  padding: 7px 14px; border-radius: 999px; transition: background .2s, transform .2s;
}
.tab-toc a:hover { background: color-mix(in srgb, var(--accent) 18%, var(--accent-soft)); transform: translateY(-1px); }

.pull-quote {
  border-left: 0 !important; position: relative; padding: 28px 32px 28px 64px !important;
  background: var(--surface); border-radius: var(--radius); margin: 32px 0 !important;
  font-family: var(--f-display) !important; font-size: 1.3rem !important; line-height: 1.5 !important; color: var(--fg) !important;
  box-shadow: inset 0 0 0 1px var(--border);
}
.pull-quote::before {
  content: "\201C"; position: absolute; left: 20px; top: 6px;
  font-family: var(--f-display); font-size: 4.5rem; color: var(--gold); line-height: 1;
}

.card, .silence-card, .pattern-card, .test-card, .resource-item, .case-item, .faq-item, .study-session, .gov-area, .layer-toggle {
  border-radius: var(--radius) !important; border-color: var(--border) !important;
  background: var(--card-bg); box-shadow: var(--shadow-sm);
  transition: box-shadow .25s, transform .25s, border-color .25s;
}
.card:hover, .silence-card:hover, .pattern-card:hover, .test-card:hover, .resource-item:hover {
  box-shadow: var(--shadow-md); transform: translateY(-2px);
}
.card { padding: 22px 22px 20px; border-top: 3px solid var(--gold) !important; }
.card .card-label { font-family: var(--f-display); font-size: 1.05rem; font-weight: 600; color: var(--fg); text-transform: none; letter-spacing: 0; }
.card-grid { gap: 16px; }

.banner { border-radius: var(--radius); border-left-width: 4px; padding: 18px 22px; }
.banner.safe { background: color-mix(in srgb, var(--safe-border) 7%, var(--card-bg)); }
.warn-box { border-radius: var(--radius) !important; box-shadow: var(--shadow-sm); }

/* Triage cards: keep numbers inline, only the heading line breaks */
.triage-item { border-radius: 12px !important; padding: 16px 16px 14px !important; font-family: var(--f-ui) !important; background: var(--card-bg) !important; }
.triage-item strong { display: inline !important; margin: 0 !important; }
.triage-item .ti-label + strong { display: block !important; margin-bottom: 4px !important; font-size: .95rem; }

.research-reading { border-radius: var(--radius) !important; border-left-color: var(--gold) !important; background: var(--surface) !important; padding: 20px 22px !important; }

.layer-toggle { padding: 18px 20px; }
.layer-toggle-label { font-family: var(--f-display); font-weight: 500; font-size: 1.2rem; }

.case-filter-btn { border-radius: 999px !important; font-family: var(--f-ui); }

hr { border-top-color: var(--border) !important; }

/* ── Help button ─────────────────────────────────────────────────────── */
.help-now-btn {
  background: var(--urgent); box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--urgent) 70%, transparent);
  font-family: var(--f-ui); padding: 12px 18px 12px 14px; bottom: 22px; right: 22px;
}
.help-now-btn:hover { background: var(--urgent-deep); transform: translateY(-1px); }
.help-now-btn::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 0 rgba(255,255,255,.7); animation: v2-pulse 2.2s infinite;
}
.help-now-btn > span[aria-hidden] { display: none; }
@keyframes v2-pulse { 70% { box-shadow: 0 0 0 9px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }

/* ── Footer ───────────────────────────────────────────────────────────── */
footer {
  margin-inline: calc(50% - 50vw); margin-top: 48px;
  padding: 56px clamp(20px, 6vw, 64px) 72px;
  background: var(--ink); color: rgba(236,230,218,.7);
}
footer > * { max-width: 680px; margin-inline: auto; }
footer > p:first-child { font-family: var(--f-display); font-size: 1.2rem; color: #F3EBDD; }
footer a { color: #E8C887; }
body.landing-mode footer { margin-top: 0; }

/* Mobile */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header { padding-top: 96px; padding-bottom: 130px; }
  .site-header::after { background: linear-gradient(180deg, rgba(10,18,32,.55), rgba(10,18,32,.85) 60%, var(--bg) 100%); }
  .landing { margin-top: -96px; }
  .v2-brand span { display: none; }
  .pull-quote { padding: 24px 20px 20px 48px !important; font-size: 1.15rem !important; }
  .pull-quote::before { left: 12px; font-size: 3.4rem; }
}
.landing-intro{display:none}


/* Menu: no fade, wraps so every tab is visible and clickable */
.nav-tabs{-webkit-mask-image:none!important;mask-image:none!important;flex-wrap:wrap;justify-content:center;overflow:visible;border-radius:22px;row-gap:4px}
