/* =========================================================
   StoneShield Ministries — Design Tokens
   Palette:
     --ink        #101E2E   deep navy, primary text / night sky
     --shield     #1F4E79   steady service blue, primary brand
     --stone      #7C8A93   quarried gray, secondary text / borders
     --ember      #D98E3F   dusk/dawn ember, warmth + compassion accent
     --dawn       #F6F3EC   warm parchment white, alt background
     --watch-navy #0B1622   deepest navy, footer / night sections
   Type:
     Display: 'Zilla Slab'   — masonry-solid, structural (the "Stone")
     Body:    'Public Sans'  — humane, clear, easy on tired eyes
     Utility: 'IBM Plex Mono' — dispatch/badge labels, small caps eyebrows
   Signature: "The Watch Line" — a dusk-to-dawn gradient hairline that
   marks every section threshold, echoing a shift that never fully ends,
   plus badge-shaped eyebrow labels borrowed from patch/dispatch vernacular.
   ========================================================= */

:root {
  --ink: #101E2E;
  --shield: #1F4E79;
  --shield-light: #336699;
  --stone: #7C8A93;
  --stone-light: #C9D0D4;
  --ember: #D98E3F;
  --ember-light: #F0B872;
  --dawn: #F6F3EC;
  --watch-navy: #0B1622;

  --font-display: 'Zilla Slab', Georgia, serif;
  --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --radius: 4px;
}

/* -------------------- base -------------------- */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background-color: #fff;
  font-size: 1.05rem;
  line-height: 1.7;
}

h1, h2, h3, h4, h5, .display-font {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

a { color: var(--shield); text-decoration: none; }
a:hover { color: var(--ember); }

::selection { background: var(--ember-light); color: var(--ink); }

/* visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--ember);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.container-narrow { max-width: 860px; }

/* -------------------- signature: the watch line -------------------- */
.watch-line {
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, var(--watch-navy) 0%, var(--shield) 45%, var(--ember) 100%);
  border: 0;
  margin: 0;
  opacity: 0.9;
}

.watch-line-thin {
  height: 2px;
  background: linear-gradient(90deg, var(--shield) 0%, var(--ember) 100%);
  border: 0;
  width: 72px;
  margin: 0.75rem 0 1.5rem;
  border-radius: 2px;
}

/* -------------------- eyebrow / patch badge -------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--shield);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.7rem 0.3rem 0.55rem;
  border: 1px solid var(--shield);
  border-radius: 3px;
  background: rgba(31, 78, 121, 0.05);
  position: relative;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ember);
  flex-shrink: 0;
}

.eyebrow--light {
  color: var(--dawn);
  border-color: rgba(246, 243, 236, 0.45);
  background: rgba(246, 243, 236, 0.08);
}

/* -------------------- navbar -------------------- */
.ss-navbar {
  background: var(--ink);
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  transition: padding 0.25s ease, box-shadow 0.25s ease;
}

.ss-navbar.scrolled {
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.ss-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff !important;
  letter-spacing: 0.01em;
}

.ss-brand svg { flex-shrink: 0; }
.ss-brand .brand-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: var(--ember-light);
  font-weight: 400;
  text-transform: uppercase;
  margin-top: 1px;
}

.ss-navbar .nav-link {
  color: rgba(255,255,255,0.82);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.5rem 0.9rem !important;
  position: relative;
}

.ss-navbar .nav-link.active,
.ss-navbar .nav-link:hover {
  color: #fff;
}

.ss-navbar .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.15rem;
  height: 2px;
  background: var(--ember);
  border-radius: 2px;
}

.btn-ember {
  background: var(--ember);
  border: 1px solid var(--ember);
  color: var(--ink);
  font-weight: 600;
  padding: 0.55rem 1.3rem;
  border-radius: 3px;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow .2s ease;
}
.btn-ember:hover {
  background: var(--ember-light);
  border-color: var(--ember-light);
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(217,142,63,0.35);
}

.btn-outline-shield {
  border: 1px solid var(--shield);
  color: var(--shield);
  font-weight: 600;
  padding: 0.55rem 1.3rem;
  border-radius: 3px;
  background: transparent;
}
.btn-outline-shield:hover { background: var(--shield); color: #fff; }

.btn-outline-light-line {
  border: 1px solid rgba(255,255,255,0.5);
  color: #fff;
  font-weight: 600;
  padding: 0.55rem 1.3rem;
  border-radius: 3px;
  background: transparent;
}
.btn-outline-light-line:hover { background: rgba(255,255,255,0.12); color: #fff; border-color:#fff;}

/* -------------------- hero -------------------- */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--watch-navy) 0%, var(--ink) 55%, var(--shield) 100%);
  color: #fff;
  overflow: hidden;
  padding-top: 5.5rem;
  padding-bottom: 6rem;
}

/* faint starfield / night texture layered over the gradient */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 78% 12%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1px 1px at 38% 32%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 88% 28%, rgba(255,255,255,0.6), transparent),
    radial-gradient(1px 1px at 22% 8%, rgba(255,255,255,0.45), transparent),
    radial-gradient(1px 1px at 62% 22%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 8% 40%, rgba(255,255,255,0.35), transparent);
  background-repeat: no-repeat;
  pointer-events: none;
  opacity: 0.9;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background:
    radial-gradient(ellipse at 75% 100%, rgba(217,142,63,0.32), transparent 55%),
    radial-gradient(ellipse at 25% 100%, rgba(31,78,121,0.45), transparent 60%);
  pointer-events: none;
}

/* subtle thin-line motif across the hero base (a respectful nod to the responders we serve) */
.hero-watch-strip {
  display: flex;
  height: 3px;
  width: 100%;
  border-radius: 2px;
  overflow: hidden;
  opacity: 0.95;
}
.hero-watch-strip span { flex: 1; }

.hero h1 {
  color: #fff;
  font-size: clamp(2.1rem, 4.4vw, 3.5rem);
  line-height: 1.1;
}

.hero .lead {
  color: rgba(255,255,255,0.86);
  font-size: 1.15rem;
  max-width: 42rem;
}

/* crisis line — surfaced prominently because people in crisis land here */
.hero-crisis {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(217,142,63,0.14);
  border: 1px solid rgba(217,142,63,0.55);
  border-radius: 6px;
  padding: 0.55rem 0.9rem;
  margin-bottom: 1.5rem;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.hero-crisis:hover { background: rgba(217,142,63,0.24); border-color: var(--ember); }
.hero-crisis svg { color: var(--ember-light); flex-shrink: 0; }
.hero-crisis .hero-crisis-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(246,243,236,0.7);
  display: block;
  line-height: 1.1;
}
.hero-crisis .hero-crisis-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  letter-spacing: 0.02em;
}

/* inline trust microcopy under the CTAs */
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.75rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.14);
}
.hero-trust .trust-item { display: flex; align-items: center; gap: 0.55rem; }
.hero-trust svg { color: var(--ember); flex-shrink: 0; }
.hero-trust .trust-num {
  font-family: var(--font-display);
  font-weight: 700;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1;
}
.hero-trust .trust-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(246,243,236,0.62);
  line-height: 1.2;
}

/* crest artwork (right column) */
.hero-shield-art {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
}

.hero-crest {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 24px 50px rgba(0,0,0,0.5));
}

.hero-crest .ray { transform-origin: 50% 50%; }
.hero-crest .rotate-slow {
  transform-origin: 50% 50%;
  animation: hero-rotate 90s linear infinite;
}
@keyframes hero-rotate { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .hero-crest .rotate-slow { animation: none; }
}

/* -------------------- resources page -------------------- */
.qr-frame {
  display: inline-block;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--stone-light);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(16,30,46,0.08);
  line-height: 0;
}
.qr-frame img { width: 240px; height: 240px; display: block; }
.qr-caption {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--stone);
  margin-top: 0.9rem;
  text-align: center;
  max-width: 240px;
  line-height: 1.5;
}

.resource-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.resource-step .step-num {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--shield);
  color: #fff;
  font-family: var(--font-mono);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.resource-step h4 { font-size: 1.02rem; margin-bottom: 0.2rem; }
.resource-step p { font-size: 0.93rem; color: #4b5a66; margin-bottom: 0; }

/* -------------------- page header (interior pages) -------------------- */
.page-header {
  background: linear-gradient(135deg, var(--ink) 0%, var(--shield) 130%);
  color: #fff;
  padding: 3.75rem 0 3rem;
}
.page-header h1 { color: #fff; }
.page-header .lead { color: rgba(255,255,255,0.82); }

/* -------------------- sections -------------------- */
section { padding: 5rem 0; }
.section-alt { background: var(--dawn); }
.section-navy { background: var(--watch-navy); color: rgba(255,255,255,0.9); }
.section-navy h2, .section-navy h3 { color: #fff; }

.section-heading .eyebrow { margin-bottom: 1rem; }

/* -------------------- cards -------------------- */
.pillar-card {
  background: #fff;
  border: 1px solid var(--stone-light);
  border-radius: var(--radius);
  padding: 2.1rem 1.8rem;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color .2s ease;
  position: relative;
}
.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(16,30,46,0.1);
  border-color: var(--shield-light);
}
.pillar-card .pillar-icon {
  width: 52px; height: 52px;
  margin-bottom: 1.25rem;
  color: var(--shield);
}
.pillar-card h3 { font-size: 1.2rem; margin-bottom: 0.6rem; }
.pillar-card p { color: #4b5a66; font-size: 0.97rem; margin-bottom: 0; }

/* shield-shaped number badge, used for a true sequence (get involved steps) */
.step-shield {
  width: 46px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 52px;
}
.step-shield svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.step-shield span { position: relative; z-index: 1; color: #fff; }

/* -------------------- verse / quote card -------------------- */
.verse-card {
  border-left: 4px solid var(--ember);
  background: var(--dawn);
  padding: 2rem 2.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.verse-card blockquote {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 0.75rem;
}
.verse-card cite {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone);
  font-style: normal;
}

/* -------------------- stat strip -------------------- */
.stat-strip { border-top: 1px solid var(--stone-light); border-bottom: 1px solid var(--stone-light); }
.stat {
  text-align: center;
  padding: 2.25rem 1rem;
  border-right: 1px solid var(--stone-light);
}
.stat:last-child { border-right: 0; }
.stat .num {
  font-family: var(--font-display);
  font-size: 2.1rem;
  color: var(--shield);
  font-weight: 700;
  display: block;
}
.stat .label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
}

/* -------------------- person / bio card -------------------- */
.bio-card {
  display: flex;
  gap: 1.5rem;
  padding: 2rem;
  background: #fff;
  border: 1px solid var(--stone-light);
  border-radius: var(--radius);
  align-items: flex-start;
}
.avatar-mark {
  width: 84px;
  height: 84px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--shield), var(--ink));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  border: 3px solid var(--ember);
}
.bio-card h3 { margin-bottom: 0.15rem; font-size: 1.25rem; }
.bio-card .role { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ember); display:block; margin-bottom: 0.85rem; }
.bio-card p { color: #4b5a66; font-size: 0.96rem; }

/* founder headshot variant of the bio card */
.bio-card--photo { align-items: flex-start; }
.bio-photo {
  width: 130px;
  flex-shrink: 0;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  border: 3px solid var(--ember);
  background: var(--dawn);
}

/* comfort-assistant (dog) mini cards */
.companion-card {
  background: var(--dawn);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  height: 100%;
  border: 1px solid var(--stone-light);
}
.companion-photo {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 0.9rem;
  border: 3px solid var(--ember);
  background: #fff;
  display: block;
}
.companion-card h4 { font-size: 1.05rem; margin-bottom: 0.15rem; }
.companion-card .tag { font-family: var(--font-mono); font-size: 0.68rem; color: var(--stone); letter-spacing: 0.08em; text-transform: uppercase; display:block; margin-bottom: .75rem;}
.companion-card p { font-size: 0.9rem; color: #4b5a66; margin-bottom: 0; }

/* -------------------- timeline / involvement steps -------------------- */
.involve-row { display: flex; gap: 1.25rem; padding: 1.75rem 0; border-bottom: 1px solid var(--stone-light); }
.involve-row:last-child { border-bottom: 0; }
.involve-row h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.involve-row p { color: #4b5a66; margin-bottom: 0; }

/* -------------------- donate panel -------------------- */
.donate-panel {
  background: var(--ink);
  color: #fff;
  border-radius: 6px;
  padding: 2.75rem;
  position: relative;
  overflow: hidden;
}
.donate-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 90% 10%, rgba(217,142,63,0.28), transparent 55%);
}
.donate-panel > * { position: relative; }
.donate-panel h2 { color: #fff; }
.fine-print {
  font-size: 0.78rem;
  color: var(--stone);
  line-height: 1.6;
}
.section-alt .fine-print, .section-navy .fine-print { color: rgba(255,255,255,0.55); }

/* paypal donation form inside the donate panel */
.donate-form { margin: 0; }
.btn-ember .btn-icon {
  vertical-align: -4px;
  margin-right: 0.4rem;
  display: inline-block;
}
.paypal-badges {
  display: block;
  max-width: 220px;
  width: 100%;
  height: auto;
  margin: 0.9rem auto 0;
}

/* -------------------- forms -------------------- */
.form-control, .form-select {
  border: 1px solid var(--stone-light);
  border-radius: 3px;
  padding: 0.7rem 0.9rem;
  font-size: 0.97rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--shield);
  box-shadow: 0 0 0 3px rgba(31,78,121,0.15);
}
.form-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

/* contact info card */
.contact-info-card {
  background: var(--watch-navy);
  color: #fff;
  border-radius: 6px;
  padding: 2.25rem;
}
.contact-info-card h3 { color: #fff; font-size: 1.1rem; }
.contact-info-card .item { display:flex; gap: 0.9rem; margin-bottom: 1.4rem; align-items:flex-start; }
.contact-info-card .item svg { flex-shrink:0; color: var(--ember); margin-top: 3px; }
.contact-info-card .item a { color: #fff; }
.contact-info-card .item a:hover { color: var(--ember-light); }
.contact-info-card .item small { display:block; color: rgba(255,255,255,0.55); font-size: 0.72rem; letter-spacing: .06em; text-transform: uppercase; font-family: var(--font-mono); margin-bottom: 3px;}

.social-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
}
.social-chip:hover { background: var(--ember); border-color: var(--ember); color: var(--ink); }

/* -------------------- footer -------------------- */
.ss-footer {
  background: var(--watch-navy);
  color: rgba(255,255,255,0.65);
  padding: 3.5rem 0 1.75rem;
  font-size: 0.92rem;
}
.ss-footer h5 { color: #fff; font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 1.1rem; }
.ss-footer a { color: rgba(255,255,255,0.65); }
.ss-footer a:hover { color: var(--ember); }
.ss-footer .brand-line { display:flex; align-items:center; gap:0.6rem; color:#fff; font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 0.9rem;}
.ss-footer hr { border-color: rgba(255,255,255,0.12); margin: 2.25rem 0 1.5rem; }
.ss-footer .fine { font-size: 0.78rem; color: rgba(255,255,255,0.42); }

/* back to top */
#backToTop {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--ember);
  color: var(--ink);
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
  z-index: 1030;
}
#backToTop.show { display: flex; }

/* -------------------- utility -------------------- */
.text-shield { color: var(--shield) !important; }
.text-ember { color: var(--ember) !important; }
.text-stone { color: var(--stone) !important; }
.bg-dawn { background: var(--dawn); }
.badge-soft {
  background: rgba(31,78,121,0.08);
  color: var(--shield);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.6rem;
  border-radius: 3px;
}

/* reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 767.98px) {
  .stat { border-right: 0; border-bottom: 1px solid var(--stone-light); }
  .stat:last-child { border-bottom: 0; }
  .bio-card { flex-direction: column; }
  section { padding: 3.5rem 0; }
}
