/* ==========================================================================
   Jon Bunch — jonbunch.com
   Stylesheet. Plain CSS, no build step. Organized in sections:
   1. Design tokens      5. Buttons & links     9. Family gallery
   2. Reset & base       6. Header & nav       10. Faith page
   3. Type & layout      7. Hero & sections    11. Search / modals
   4. Utilities          8. Cards & carousel   12. Footer, misc, print
   ========================================================================== */

/* -------------------------------------------------------------------------
   1. Design tokens
   ------------------------------------------------------------------------- */
:root{
  /* Palette — warm ink & paper instead of another navy/blue template */
  --ink:            #1c1a16;
  --ink-soft:       #3a352c;
  --paper:          #faf6ee;
  --paper-dim:      #f1ead9;
  --paper-line:     #e4d9c2;
  --accent:         #bf5b2e;   /* terracotta */
  --accent-ink:     #7c3b1c;
  --accent-soft:    #f1d9c6;
  --evergreen:      #33513f;   /* faith accent */
  --evergreen-soft: #d9e6dc;
  --gold:           #a9812f;   /* faith highlight */
  --gold-soft:      #efe2bd;
  --rose:           #a8425a;   /* family accent */
  --rose-soft:      #f3dbe1;
  --white:          #fffdf9;
  --danger:         #b3261e;
  --success:        #2f6b3f;

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Work Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.92rem);
  --step-0:  clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1:  clamp(1.2rem, 1.1rem + 0.45vw, 1.4rem);
  --step-2:  clamp(1.44rem, 1.3rem + 0.7vw, 1.8rem);
  --step-3:  clamp(1.9rem, 1.6rem + 1.4vw, 2.6rem);
  --step-4:  clamp(2.4rem, 1.9rem + 2.4vw, 3.6rem);
  --step-5:  clamp(3rem, 2.2rem + 3.8vw, 5rem);

  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs:  0.75rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.25rem;
  --space-xl:  3.5rem;
  --space-2xl: 5.5rem;
  --space-3xl: 8rem;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --container: 74rem;
  --container-narrow: 46rem;

  --ease: cubic-bezier(.22,.68,0,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --dur-fast: 160ms;
  --dur-med: 420ms;
  --dur-slow: 900ms;

  --shadow-sm: 0 1px 2px rgba(28,26,22,.06), 0 1px 1px rgba(28,26,22,.04);
  --shadow-md: 0 12px 28px -12px rgba(28,26,22,.22);
  --shadow-lg: 0 24px 60px -20px rgba(28,26,22,.3);

  --bg: var(--paper);
  --bg-raised: var(--white);
  --bg-dim: var(--paper-dim);
  --text: var(--ink);
  --text-soft: var(--ink-soft);
  --border: var(--paper-line);
  color-scheme: light;
}

:root[data-theme="dark"]{
  --bg: #17140f;
  --bg-raised: #211d16;
  --bg-dim: #1d1a14;
  --text: #f3ecdd;
  --text-soft: #cfc4ad;
  --border: #3a3327;
  --paper-line: #3a3327;
  --accent-soft: #3d2a1c;
  --evergreen-soft: #223229;
  --gold-soft: #372e17;
  --rose-soft: #3a232a;
  --white: #211d16;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.5);
  --shadow-md: 0 14px 30px -14px rgba(0,0,0,.6);
  --shadow-lg: 0 26px 60px -20px rgba(0,0,0,.7);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg: #17140f; --bg-raised: #211d16; --bg-dim: #1d1a14;
    --text: #f3ecdd; --text-soft: #cfc4ad; --border: #3a3327; --paper-line: #3a3327;
    --accent-soft: #3d2a1c; --evergreen-soft: #223229; --gold-soft: #372e17; --rose-soft: #3a232a;
    --white: #211d16;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.5);
    --shadow-md: 0 14px 30px -14px rgba(0,0,0,.6);
    --shadow-lg: 0 26px 60px -20px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}

/* -------------------------------------------------------------------------
   2. Reset & base
   ------------------------------------------------------------------------- */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--dur-med) var(--ease), color var(--dur-med) var(--ease);
  background-image:
    radial-gradient(1200px 620px at 12% -8%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, color-mix(in srgb, var(--evergreen) 7%, transparent), transparent 55%);
  background-attachment: fixed;
}
img, svg, video, canvas{ display: block; max-width: 100%; height: auto; }
img{ background: var(--bg-dim); }
/* Defensive default so a bare, un-sized icon <svg> (a missed class, a
   forgotten wrapper) renders at a sane inline size instead of a browser's
   ~300px intrinsic default. Any more specific rule below still wins. */
svg{ width: 1.15em; height: 1.15em; flex: none; }
a{ color: inherit; text-decoration: none; }
ul, ol{ margin: 0; padding: 0; list-style: none; }
h1,h2,h3,h4,h5,p,figure,blockquote{ margin: 0; }
button, input, textarea, select{ font: inherit; color: inherit; }
button{ background: none; border: none; cursor: pointer; }
input, textarea{ background: var(--bg-raised); }
::selection{ background: var(--accent); color: var(--white); }

h1,h2,h3,h4{
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--text);
}
h2{ font-size: var(--step-3); }
h3{ font-size: var(--step-2); }
h4{ font-size: var(--step-1); font-weight: 600; }
.lede{ font-size: var(--step-1); color: var(--text-soft); max-width: 46ch; }

/* Visible, generous focus ring everywhere — never suppressed */
:focus-visible{
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
a:focus-visible, button:focus-visible{ outline-offset: 4px; }

.skip-link{
  position: fixed;
  top: -60px; left: var(--space-sm);
  z-index: 1000;
  background: var(--ink);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus{ top: var(--space-sm); }

/* -------------------------------------------------------------------------
   3. Layout
   ------------------------------------------------------------------------- */
.wrap{
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-md);
}
.wrap--narrow{ max-width: var(--container-narrow); }
section{ padding-block: var(--space-2xl); position: relative; }
section.tight{ padding-block: var(--space-xl); }
.section-head{ max-width: 42rem; margin-bottom: var(--space-lg); }
.eyebrow{
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.eyebrow::before{
  content: "";
  width: 2.2em; height: 2px;
  background: currentColor;
  opacity: .6;
}
:root[data-theme="dark"] .eyebrow, :root:not([data-theme="light"]) .eyebrow{ color: var(--gold); }
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .eyebrow{ color: var(--gold); } }

/* Grid/flex items default to min-width:auto per spec, which lets nested
   content (a long label, a button pinned with margin-left:auto, a nested
   grid several levels down) force its track wider than the container —
   the classic Grid/Flexbox "blowout" that causes horizontal page scroll on
   narrow phones. Rather than chase every nesting level individually, every
   element is made shrinkable by default; this only lowers the auto-computed
   minimum size floor inside a flex/grid parent, so it never overrides an
   element's own explicit width (the search input's fixed width, icon
   sizing, etc. are unaffected). */
*{ min-width: 0; }
svg{ min-width: auto; } /* icons keep their own intrinsic sizing */

.grain{ position: relative; }
.grain::after{
  content:"";
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: .035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] .grain::after, :root:not([data-theme="light"]) .grain::after{ mix-blend-mode: overlay; opacity: .06; }

/* -------------------------------------------------------------------------
   4. Utilities
   ------------------------------------------------------------------------- */
.visually-hidden{
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
/* .reveal content is visible by default — this is real page content, not
   decoration, so a script that fails to load must never hide it. Only once
   main.js confirms it is running (adding .js to <html>) do we arm the
   hidden-until-scrolled-into-view state; the observer then adds
   .is-visible. See the no-js fallback block near the footer rules. */
.reveal{ opacity: 1; transform: none; }
.js .reveal{ opacity: 0; transform: translateY(24px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.js .reveal.is-visible{ opacity: 1; transform: none; }
.reveal-stagger > *{ transition-delay: calc(var(--i, 0) * 70ms); }
@media (prefers-reduced-motion: reduce){
  .js .reveal{ opacity: 1; transform: none; }
}

/* -------------------------------------------------------------------------
   5. Buttons & links
   ------------------------------------------------------------------------- */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  padding: 0.9em 1.5em;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.01em;
  border: 1.5px solid transparent;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  min-height: 44px;
}
.btn:hover{ transform: translateY(-2px); }
.btn:active{ transform: translateY(0); }
.btn-primary{ background: var(--ink); color: var(--white); }
.btn-primary:hover{ background: var(--accent); box-shadow: var(--shadow-md); }
.btn-accent{ background: var(--accent); color: var(--white); }
.btn-accent:hover{ background: var(--accent-ink); box-shadow: var(--shadow-md); }
.btn-outline{ background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover{ border-color: var(--ink); background: var(--bg-raised); }
:root[data-theme="dark"] .btn-outline:hover, :root:not([data-theme="light"]) .btn-outline:hover{ border-color: var(--gold); }
.btn-ghost{ background: transparent; color: var(--accent-ink); padding-inline: 0.4em; }
:root[data-theme="dark"] .btn-ghost, :root:not([data-theme="light"]) .btn-ghost{ color: var(--gold); }
.btn-ghost:hover{ text-decoration: underline; }
.btn[disabled]{ opacity: .55; cursor: not-allowed; transform: none; }
.btn svg{ width: 1.1em; height: 1.1em; flex: none; }

.link-underline{
  position: relative;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1.5px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size var(--dur-med) var(--ease-out);
  padding-bottom: 2px;
}
.link-underline:hover, .link-underline:focus-visible{ background-size: 100% 1.5px; }

/* -------------------------------------------------------------------------
   6. Header & nav
   ------------------------------------------------------------------------- */
.site-header{
  position: sticky; top: 0; z-index: 100;
  padding-block: var(--space-sm);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
  transition: background var(--dur-med) var(--ease), border-color var(--dur-med) var(--ease), padding var(--dur-med) var(--ease), backdrop-filter var(--dur-med) var(--ease);
}
.site-header.is-scrolled{
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
  padding-block: 0.55rem;
}
.nav-row{ display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); }
.wordmark{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: 0.55rem;
}
.wordmark .dot{ color: var(--accent); }
.nav-links{ display: flex; align-items: center; gap: var(--space-lg); }
.nav-links a{
  position: relative;
  font-weight: 500;
  font-size: var(--step--1);
  padding: 0.4rem 0.1rem;
}
.nav-links a::after{
  content:""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px;
  background: var(--accent);
  transition: right var(--dur-med) var(--ease-out);
}
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after{ right: 0; }
.nav-links a[aria-current="page"]{ color: var(--accent-ink); }
:root[data-theme="dark"] .nav-links a[aria-current="page"], :root:not([data-theme="light"]) .nav-links a[aria-current="page"]{ color: var(--gold); }
.nav-tools{ display: flex; align-items: center; gap: var(--space-2xs); }
.icon-btn{
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  color: var(--text-soft);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.icon-btn:hover{ background: var(--bg-dim); color: var(--text); }
.icon-btn svg{ width: 20px; height: 20px; }
.icon-btn .icon-sun{ display: none; }
:root[data-theme="dark"] .icon-btn .icon-moon, :root:not([data-theme="light"]) .icon-btn .icon-moon{ display: none; }
:root[data-theme="dark"] .icon-btn .icon-sun, :root:not([data-theme="light"]) .icon-btn .icon-sun{ display: block; }

.hamburger{ display: none; }
.mobile-panel{
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  display: flex; flex-direction: column;
  padding: var(--space-md);
  transform: translateY(-8px);
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out), visibility 0s var(--dur-med);
}
.mobile-panel.is-open{ opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.mobile-panel-head{ display: flex; justify-content: space-between; align-items: center; }
.mobile-panel nav{ margin-top: var(--space-xl); display: flex; flex-direction: column; gap: var(--space-sm); }
.mobile-panel nav a{
  font-family: var(--font-display);
  font-size: var(--step-3);
  opacity: 0; transform: translateX(-14px);
  transition: opacity var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 60ms);
}
.mobile-panel.is-open nav a{ opacity: 1; transform: none; }
.mobile-panel-foot{ margin-top: auto; padding-top: var(--space-lg); border-top: 1px solid var(--border); font-size: var(--step--1); color: var(--text-soft); }
.mobile-panel-foot a{ color: var(--accent-ink); font-weight: 600; }

@media (max-width: 62rem){
  .nav-links{ display: none; }
  .hamburger{
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 50%;
  }
  .hamburger:hover{ background: var(--bg-dim); }
  .hamburger .bars{ position: relative; width: 20px; height: 14px; }
  .hamburger .bars span{
    position: absolute; left: 0; width: 100%; height: 2px; background: currentColor; border-radius: 2px;
    transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease), top var(--dur-fast) var(--ease);
  }
  .hamburger .bars span:nth-child(1){ top: 0; }
  .hamburger .bars span:nth-child(2){ top: 6px; }
  .hamburger .bars span:nth-child(3){ top: 12px; }
  .hamburger[aria-expanded="true"] .bars span:nth-child(1){ top: 6px; transform: rotate(45deg); }
  .hamburger[aria-expanded="true"] .bars span:nth-child(2){ opacity: 0; }
  .hamburger[aria-expanded="true"] .bars span:nth-child(3){ top: 6px; transform: rotate(-45deg); }
}

/* No-JS fallback: hide controls that do nothing without a script, and show
   a plain link list in their place so narrow-viewport visitors always have
   a way to navigate (the JS-driven hamburger panel needs main.js to open). */
.noscript-nav{ display: none; }
.no-js .hamburger,
.no-js [data-search-trigger],
.no-js [data-theme-toggle]{ display: none; }
@media (max-width: 62rem){
  .no-js .noscript-nav{
    display: flex; flex-wrap: wrap; gap: 1rem;
    padding-block: var(--space-sm); margin-top: var(--space-2xs);
    border-top: 1px solid var(--border);
    font-size: var(--step--1); font-weight: 600;
  }
}

.scroll-progress{
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--accent); z-index: 101;
  transition: width 60ms linear;
}

.crumbs{
  font-size: var(--step--1); color: var(--text-soft);
  padding-top: var(--space-md);
  display: flex; gap: 0.5em; align-items: center;
}
.crumbs a{ color: var(--text-soft); }
.crumbs a:hover{ color: var(--accent-ink); }
.crumbs [aria-current]{ color: var(--text); font-weight: 600; }

/* -------------------------------------------------------------------------
   7. Hero
   ------------------------------------------------------------------------- */
.hero{
  padding-top: clamp(2.5rem, 4vw, 4.5rem);
  padding-bottom: var(--space-2xl);
  overflow: clip;
  position: relative;
}
.hero-blob{
  position: absolute; z-index: 0; pointer-events: none;
  width: min(58rem, 90vw); aspect-ratio: 1;
  top: -18%; right: -18%;
  filter: blur(60px);
  opacity: .55;
  background:
    radial-gradient(closest-side, color-mix(in srgb, var(--accent) 55%, transparent), transparent 70%),
    radial-gradient(closest-side at 70% 70%, color-mix(in srgb, var(--evergreen) 45%, transparent), transparent 72%);
  animation: drift 26s ease-in-out infinite alternate;
}
@keyframes drift{
  0%{ transform: translate(0,0) scale(1); }
  100%{ transform: translate(-4%, 4%) scale(1.08); }
}
@media (prefers-reduced-motion: reduce){ .hero-blob{ animation: none; } }

.hero-grid{
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: var(--space-2xl);
  align-items: center;
}
.hero-copy .eyebrow{ margin-bottom: var(--space-sm); }
.hero-title{
  font-size: var(--step-5);
  margin-bottom: var(--space-md);
}
.hero-title em{
  font-style: italic; color: var(--accent-ink); font-weight: 500;
}
:root[data-theme="dark"] .hero-title em, :root:not([data-theme="light"]) .hero-title em{ color: var(--gold); }
.hero-title .word{ display: inline-block; opacity: 0; transform: translateY(0.4em); filter: blur(6px); animation: word-in 620ms var(--ease-out) forwards; animation-delay: calc(var(--i,0) * 55ms); }
@keyframes word-in{ to{ opacity: 1; transform: none; filter: blur(0); } }
@media (prefers-reduced-motion: reduce){ .hero-title .word{ opacity: 1; transform: none; filter: none; animation: none; } }
.hero-text{ font-size: var(--step-1); color: var(--text-soft); max-width: 42ch; margin-bottom: var(--space-lg); }
.hero-ctas{ display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-bottom: var(--space-lg); }
.hero-facts{ display: flex; flex-wrap: wrap; gap: var(--space-lg); }
.hero-fact{ display: flex; align-items: center; gap: 0.6em; font-size: var(--step--1); color: var(--text-soft); }
.hero-fact strong{ color: var(--text); font-weight: 700; }
.hero-fact svg{ width: 1.2em; height: 1.2em; color: var(--accent); flex: none; }

.hero-visual{ position: relative; }
.hero-photo-frame{
  position: relative; border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-lg);
  border: 6px solid var(--bg-raised);
  transform: rotate(1.2deg);
  transition: transform var(--dur-med) var(--ease-out);
  will-change: transform;
}
.hero-photo-frame:hover{ transform: rotate(0deg) scale(1.015); }
.hero-photo-frame img{ width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.hero-badge{
  position: absolute; bottom: -1.1rem; left: -1.4rem;
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  padding: 0.9rem 1.1rem;
  display: flex; align-items: center; gap: 0.7rem;
  max-width: 15rem;
}
.hero-badge svg{ width: 2rem; height: 2rem; color: var(--accent); flex: none; }
.hero-badge strong{ display: block; font-size: var(--step--1); }
.hero-badge span{ font-size: 0.78rem; color: var(--text-soft); }

.scroll-cue{
  position: absolute; left: 50%; bottom: -2.2rem; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  font-size: 0.7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-soft);
}
.scroll-cue .line{ width: 1px; height: 28px; background: linear-gradient(var(--text-soft), transparent); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue{ 0%,100%{ opacity: .2; } 50%{ opacity: 1; } }
@media (prefers-reduced-motion: reduce){ .scroll-cue .line{ animation: none; opacity: .6; } }

@media (max-width: 60rem){
  .hero-grid{ grid-template-columns: 1fr; gap: var(--space-xl); }
  .hero-visual{ order: -1; max-width: 22rem; margin-inline: auto; }
  .hero-badge{ left: 0.5rem; }
}

/* -------------------------------------------------------------------------
   8. Explore destinations / cards / stats / services / carousel
   ------------------------------------------------------------------------- */
.explore{ display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.explore-card{
  position: relative;
  min-height: 22rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: var(--white);
  isolation: isolate;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--space-lg);
  transition: box-shadow var(--dur-med) var(--ease-out);
  box-shadow: var(--shadow-sm);
}
.explore-card::before{
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: var(--card-bg, none);
  background-size: cover; background-position: center;
  background-color: var(--card-tint, var(--ink));
  transform: scale(1.06);
  transition: transform 900ms var(--ease-out);
}
.explore-card::after{
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, color-mix(in srgb, var(--card-tint,var(--ink)) 10%, transparent) 0%, color-mix(in srgb, var(--card-tint,var(--ink)) 88%, black 18%) 78%);
  opacity: .92;
  transition: opacity var(--dur-med) var(--ease);
}
.explore-card:hover{ box-shadow: var(--shadow-lg); }
.explore-card:hover::before{ transform: scale(1.12); }
.explore-card:focus-within{ box-shadow: var(--shadow-lg); }
.explore-card[data-tint="repair"]{ --card-tint: #21344a; }
.explore-card[data-tint="family"]{ --card-tint: #5c2436; }
.explore-card[data-tint="faith"]{ --card-tint: #223229; }
.explore-icon{
  width: 3rem; height: 3rem; border-radius: 50%;
  background: rgba(255,255,255,.14); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-md);
  font-size: 1.4rem;
}
.explore-card h3{ color: var(--white); margin-bottom: 0.5rem; }
.explore-desc{
  color: rgba(255,255,255,.86);
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height var(--dur-med) var(--ease-out), opacity var(--dur-med) var(--ease-out), margin var(--dur-med) var(--ease-out);
}
.explore-card:hover .explore-desc,
.explore-card:focus-within .explore-desc,
.explore-card.is-open .explore-desc{ max-height: 8rem; opacity: 1; margin-top: 0.6rem; }
.explore-cta{
  margin-top: var(--space-md);
  display: inline-flex; align-items: center; gap: 0.5em;
  font-weight: 600; font-size: var(--step--1);
  color: var(--white);
}
.explore-cta svg{ width: 1.1em; height: 1.1em; transition: transform var(--dur-fast) var(--ease-out); }
.explore-card:hover .explore-cta svg{ transform: translateX(4px); }
.explore-link-cover{ position: absolute; inset: 0; }

@media (max-width: 60rem){
  .explore{ grid-template-columns: 1fr; }
  .explore-card{ min-height: 16rem; }
  .explore-card .explore-desc{ max-height: none; opacity: 1; margin-top: .6rem; overflow: visible; } /* content reachable without hover on touch */
}

/* About / stats */
.about-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2xl); align-items: start; }
.about-copy p + p{ margin-top: 1em; }
.stat-row{ display: grid; grid-template-columns: repeat(3,1fr); gap: var(--space-md); margin-top: var(--space-lg); }
.stat{
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-sm); text-align: center;
}
.stat-num{ font-family: var(--font-display); font-size: var(--step-3); color: var(--accent-ink); display: block; }
:root[data-theme="dark"] .stat-num, :root:not([data-theme="light"]) .stat-num{ color: var(--gold); }
.stat-label{ font-size: var(--step--1); color: var(--text-soft); }
@media (max-width: 60rem){ .about-grid{ grid-template-columns: 1fr; gap: var(--space-lg); } }

/* Services */
.service-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); }
.service-card{
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: var(--space-md); display: flex; flex-direction: column; gap: 0.6rem;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.service-card:hover, .service-card:focus-within{ transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--accent); }
.service-icon{ font-size: 1.6rem; }
.service-card p{ color: var(--text-soft); font-size: var(--step--1); flex: 1; }
.service-card a{ font-weight: 600; font-size: var(--step--1); color: var(--accent-ink); }
:root[data-theme="dark"] .service-card a, :root:not([data-theme="light"]) .service-card a{ color: var(--gold); }
@media (max-width: 60rem){ .service-grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 30rem){ .service-grid{ grid-template-columns: 1fr; } }

/* Family preview strip (masonry-ish) */
.preview-strip{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-xs);
}
.preview-strip a{ display:block; border-radius: var(--radius-md); overflow: hidden; position: relative; aspect-ratio: 3/4; }
.preview-strip a:nth-child(2){ margin-top: 1.4rem; }
.preview-strip a:nth-child(4){ margin-top: 2.4rem; }
.preview-strip img{ width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-med) var(--ease-out); }
.preview-strip a:hover img{ transform: scale(1.08); }
@media (max-width: 60rem){ .preview-strip{ grid-template-columns: repeat(3,1fr); } .preview-strip a:nth-child(4),.preview-strip a:nth-child(5){ display:none; } }
@media (max-width: 30rem){ .preview-strip{ grid-template-columns: repeat(2,1fr); } .preview-strip a:nth-child(3){ display:none; } }

/* Testimonial carousel */
.testimonial-wrap{ position: relative; max-width: 46rem; margin-inline: auto; }
.testimonial-track{ overflow: hidden; }
.testimonial-list{ display: flex; transition: transform var(--dur-slow) var(--ease-out); }
.testimonial{
  flex: 0 0 100%;
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--space-lg); text-align: center;
}
.stars{ color: var(--gold); letter-spacing: 0.15em; margin-bottom: var(--space-sm); font-size: 1.1rem; }
.testimonial blockquote{ font-family: var(--font-display); font-size: var(--step-1); line-height: 1.5; }
.testimonial figcaption{ margin-top: var(--space-md); display: flex; align-items: center; justify-content: center; gap: 0.7rem; }
.avatar-badge{
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.testimonial-controls{ display: flex; justify-content: center; align-items: center; gap: var(--space-md); margin-top: var(--space-md); }
.testimonial-dots{ display: flex; gap: 0.5rem; }
.testimonial-dots button{ width: 9px; height: 9px; border-radius: 50%; background: var(--border); transition: background var(--dur-fast), transform var(--dur-fast); }
.testimonial-dots button[aria-current="true"]{ background: var(--accent); transform: scale(1.3); }
.testimonial-arrow{ width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
.testimonial-arrow:hover{ background: var(--bg-dim); }

/* CTA band */
.cta-band{
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--ink), #2c261c 60%, var(--accent-ink));
  color: var(--white);
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
}
.cta-band h2{ color: var(--white); }
.cta-band p{ color: rgba(255,255,255,.8); margin-top: 0.6rem; }
.cta-band .hero-ctas{ justify-content: center; margin-top: var(--space-lg); margin-bottom: 0; }
.cta-band .btn-outline{ border-color: rgba(255,255,255,.4); color: var(--white); }
.cta-band .btn-outline:hover{ border-color: var(--white); background: rgba(255,255,255,.08); }

/* Contact form */
.contact-panel{
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: var(--space-2xl);
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--space-xl); align-items: start;
}
.contact-quick{ display: flex; flex-direction: column; gap: var(--space-md); }
.quick-row{ display: flex; align-items: center; gap: 0.8rem; }
.quick-row svg{ width: 1.4rem; height: 1.4rem; color: var(--accent); flex: none; }
.copy-btn{ margin-left: auto; font-size: 0.78rem; color: var(--text-soft); border: 1px solid var(--border); border-radius: 999px; padding: 0.25rem 0.7rem; }
.copy-btn:hover{ border-color: var(--accent); color: var(--accent-ink); }

/* ---------- Click-to-reveal contact info (deters address-scraping bots) ---------- */
/* No-JS: the real tel:/mailto: link just shows normally, same as any other link —
   revealing-on-click is a JS enhancement, never a way to hide real content. */
.reveal-contact{ display: inline-flex; align-items: center; }
.quick-row.reveal-contact{ display: flex; }
.js .reveal-contact .reveal-value{ display: none; }
.js .reveal-contact.is-revealed .reveal-value{ display: inline-flex; align-items: center; gap: 0.4em; }
.reveal-contact .reveal-btn{ display: none; }
.js .reveal-contact .reveal-btn{ display: inline-flex; }
.js .reveal-contact.is-revealed .reveal-btn{ display: none; }
.reveal-btn:not(.btn){
  align-items: center; gap: 0.4em; font: inherit; font-size: 0.85em; color: var(--text-soft);
  background: none; border: 1px solid var(--border); border-radius: 999px;
  padding: 0.3em 0.85em; cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.reveal-btn:not(.btn):hover, .reveal-btn:not(.btn):focus-visible{ border-color: var(--accent); color: var(--accent-ink); }
.reveal-btn svg{ width: 1em; height: 1em; flex: none; }
.quick-row.reveal-contact .copy-btn.reveal-value{ margin-left: auto; }
.field{ margin-bottom: var(--space-sm); }
.field label{ display: block; font-size: var(--step--1); font-weight: 600; margin-bottom: 0.35rem; }
.field input, .field textarea{
  width: 100%; padding: 0.8rem 0.9rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); transition: border-color var(--dur-fast) var(--ease);
}
.field input:focus, .field textarea:focus{ border-color: var(--accent); }
.field textarea{ min-height: 8rem; resize: vertical; }
.field-error{ color: var(--danger); font-size: 0.82rem; margin-top: 0.3rem; display: none; }
.field.has-error input, .field.has-error textarea{ border-color: var(--danger); }
.field.has-error .field-error{ display: block; }
.hp-field{ position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status{ margin-top: var(--space-sm); font-size: var(--step--1); display: none; align-items: center; gap: 0.5em; border-radius: var(--radius-sm); padding: 0.7rem 0.9rem; }
.form-status.is-visible{ display: flex; }
.form-status.ok{ background: var(--evergreen-soft); color: var(--evergreen); }
.form-status.err{ background: #f4dedb; color: var(--danger); }
.btn-loading .btn-label{ visibility: hidden; }
.btn-loading{ position: relative; }
.btn-loading::after{
  content: ""; position: absolute; width: 1.1em; height: 1.1em; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  animation: spin 700ms linear infinite;
}
@keyframes spin{ to{ transform: rotate(360deg); } }
@media (max-width: 60rem){ .contact-panel{ grid-template-columns: 1fr; padding: var(--space-lg); } }

/* -------------------------------------------------------------------------
   9. Family gallery
   ------------------------------------------------------------------------- */
.gallery-hero{ position: relative; border-radius: var(--radius-lg); overflow: hidden; margin-top: var(--space-md); box-shadow: var(--shadow-md); }
.gallery-hero img{ width: 100%; max-height: 26rem; object-fit: cover; }
.gallery-hero::after{ content:""; position: absolute; inset:0; background: linear-gradient(0deg, rgba(20,17,12,.55), transparent 55%); }
.gallery-hero-text{ position: absolute; left: var(--space-lg); bottom: var(--space-lg); color: var(--white); }
.gallery-hero-text h1{ color: var(--white); }

.gallery-controls{
  display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; justify-content: space-between;
  margin-block: var(--space-lg);
}
.chip-group{ display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip{
  border: 1.5px solid var(--border); border-radius: 999px; padding: 0.5rem 1.1rem; font-size: var(--step--1); font-weight: 600;
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.chip[aria-pressed="true"]{ background: var(--ink); color: var(--white); border-color: var(--ink); }
.chip:hover{ border-color: var(--accent); }
.gallery-meta{ font-size: var(--step--1); color: var(--text-soft); display: flex; align-items: center; gap: var(--space-sm); }
.gallery-search{ position: relative; }
.gallery-search input{
  padding: 0.6rem 0.9rem 0.6rem 2.2rem; border: 1.5px solid var(--border); border-radius: 999px; font-size: var(--step--1);
  background: var(--bg-raised); width: 13rem;
}
.gallery-search svg{ position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%); width: 1rem; height: 1rem; color: var(--text-soft); }

.gallery-section-title{ display: flex; align-items: baseline; gap: 0.7rem; margin-block: var(--space-lg) var(--space-sm); scroll-margin-top: 6rem; }
.gallery-section-title .count{ font-size: var(--step--1); color: var(--text-soft); font-weight: 500; }

.gallery-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  grid-auto-flow: dense;
  gap: var(--space-xs);
}
.gallery-item{
  position: relative; border-radius: var(--radius-md); overflow: hidden;
  aspect-ratio: 1;
  background: var(--bg-dim);
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-med) var(--ease-out);
}
.gallery-item.span-tall{ grid-row: span 2; aspect-ratio: auto; }
.gallery-item.span-wide{ grid-column: span 2; aspect-ratio: 2/1; }
@media (max-width: 26rem){
  /* Keep a 2-column grid even on the narrowest phones instead of
     collapsing to one giant scrolling column of full-width photos. */
  .gallery-grid{ grid-template-columns: repeat(2, 1fr); }
  .gallery-item.span-tall{ aspect-ratio: 1/1.7; }
}
.gallery-item img{ width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-med) var(--ease-out); }
.gallery-item:hover img, .gallery-item:focus-visible img{ transform: scale(1.07); }
.gallery-item button{ position: absolute; inset: 0; width: 100%; height: 100%; }
.gallery-item .tag{
  position: absolute; top: 0.5rem; left: 0.5rem;
  font-size: 0.68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 0.2rem 0.55rem; border-radius: 999px; color: var(--white);
  background: rgba(20,17,12,.55); backdrop-filter: blur(3px);
}
.gallery-item[data-child="jayden"] .tag{ background: color-mix(in srgb, var(--rose) 78%, black 10%); }
.gallery-item[data-child="christian"] .tag{ background: color-mix(in srgb, var(--evergreen) 78%, black 10%); }
.gallery-item.is-hidden{ display: none; }
.gallery-empty{ display: none; text-align: center; padding: var(--space-2xl) 0; color: var(--text-soft); }
.gallery-empty.is-visible{ display: block; }

/* Lightbox */
.lightbox{
  position: fixed; inset: 0; z-index: 300;
  background: rgba(14,12,9,.94);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity var(--dur-med) var(--ease);
}
.lightbox.is-open{ opacity: 1; visibility: visible; }
.lightbox-figure{ max-width: min(90vw, 62rem); max-height: 82vh; text-align: center; }
.lightbox-figure img{ max-height: 74vh; width: auto; margin-inline: auto; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.lightbox-cap{ color: #f3ecdd; margin-top: var(--space-sm); font-size: var(--step--1); display: flex; gap: 1rem; justify-content: center; align-items: center; }
.lightbox-close, .lightbox-prev, .lightbox-next{
  position: absolute; color: #fff; width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.08);
  transition: background var(--dur-fast);
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover{ background: rgba(255,255,255,.18); }
.lightbox-close{ top: 1.2rem; right: 1.2rem; }
.lightbox-prev{ left: 1.2rem; top: 50%; transform: translateY(-50%); }
.lightbox-next{ right: 1.2rem; top: 50%; transform: translateY(-50%); }
.lightbox-close svg, .lightbox-prev svg, .lightbox-next svg{ width: 22px; height: 22px; }
@media (max-width: 40rem){
  .lightbox-prev{ left: 0.4rem; } .lightbox-next{ right: 0.4rem; }
  .lightbox-close{ top: 0.5rem; right: 0.5rem; }
}

/* -------------------------------------------------------------------------
   10. Faith page
   ------------------------------------------------------------------------- */
.verse-quote{
  font-family: var(--font-display); font-style: italic;
  font-size: var(--step-2); line-height: 1.4; color: var(--text);
  max-width: 42rem; margin-block: var(--space-md);
  border-left: 3px solid var(--gold); padding-left: var(--space-md);
}
.verse-quote cite{ display: block; font-style: normal; font-size: var(--step--1); color: var(--text-soft); margin-top: 0.6rem; font-weight: 600; }

.belief-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.belief-card{
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: var(--space-md); cursor: pointer;
}
.belief-card:hover, .belief-card:focus-within{ border-color: var(--evergreen); }
.belief-head{ display: flex; align-items: center; gap: 0.8rem; width: 100%; text-align: left; }
.belief-head .service-icon{ flex: none; }
.belief-head h3{ font-size: var(--step-1); flex: 1; }
.belief-head svg{ width: 1.2rem; height: 1.2rem; transition: transform var(--dur-fast) var(--ease); flex: none; color: var(--text-soft); }
.belief-card[aria-expanded="true"] .belief-head svg{ transform: rotate(180deg); }
/* Belief text is real content — readable by default. Only collapse it into
   an accordion once JS confirms it can also expand it again. */
.belief-body{ color: var(--text-soft); font-size: var(--step--1); margin-top: 0.8rem; }
.js .belief-body{ max-height: 0; overflow: hidden; margin-top: 0; transition: max-height var(--dur-med) var(--ease-out), margin var(--dur-med); }
.js .belief-card[aria-expanded="true"] .belief-body{ max-height: 12rem; margin-top: 0.8rem; }
@media (max-width: 60rem){ .belief-grid{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 34rem){ .belief-grid{ grid-template-columns: 1fr; } }

.church-card{
  display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-md); align-items: center;
  background: var(--evergreen-soft); border-radius: var(--radius-lg); padding: var(--space-lg);
}
.church-icon{ font-size: 2.2rem; }
@media (max-width: 40rem){ .church-card{ grid-template-columns: 1fr; text-align: center; } }

.romans-road{ position: relative; max-width: 44rem; margin-inline: auto; }
.romans-line{
  position: absolute; left: 1.4rem; top: 0.5rem; bottom: 0.5rem; width: 2px;
  background: var(--border);
}
.romans-line-fill{
  position: absolute; left: 1.4rem; top: 0.5rem; width: 2px; height: 0%;
  background: var(--gold);
  transition: height 120ms linear;
}
.romans-step{ position: relative; padding-left: 4rem; padding-bottom: var(--space-xl); }
.romans-step:last-child{ padding-bottom: 0; }
.romans-num{
  position: absolute; left: 0; top: 0; width: 2.9rem; height: 2.9rem; border-radius: 50%;
  background: var(--bg-raised); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; color: var(--text-soft);
  transition: border-color var(--dur-med), color var(--dur-med), background var(--dur-med);
}
.romans-step.is-active .romans-num{ border-color: var(--gold); color: var(--accent-ink); background: var(--gold-soft); }
.romans-ref{ font-weight: 700; color: var(--accent-ink); font-size: var(--step--1); text-transform: uppercase; letter-spacing: .04em; }
:root[data-theme="dark"] .romans-ref, :root:not([data-theme="light"]) .romans-ref{ color: var(--gold); }
.romans-verse{ font-family: var(--font-display); font-style: italic; font-size: var(--step-1); margin-block: 0.5rem; }
.romans-note{ color: var(--text-soft); font-size: var(--step--1); }
.romans-progress{ font-size: var(--step--1); color: var(--text-soft); margin-bottom: var(--space-sm); }

.prayer-card{
  background: var(--gold-soft); border-radius: var(--radius-lg); padding: var(--space-xl);
  max-width: 40rem; margin-inline: auto; text-align: center;
}
.prayer-text{ font-family: var(--font-display); font-style: italic; font-size: var(--step-1); line-height: 1.6; }
.prayer-actions{ display: flex; gap: var(--space-sm); justify-content: center; margin-top: var(--space-md); flex-wrap: wrap; }

.resource-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-sm); }
.resource-card{
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: var(--space-md); display: flex; flex-direction: column; gap: 0.3rem;
  transition: transform var(--dur-fast), border-color var(--dur-fast);
}
.resource-card:hover{ transform: translateY(-3px); border-color: var(--evergreen); }
.resource-card .rname{ font-weight: 700; display: flex; align-items: center; gap: 0.5rem; }
.resource-card .rdesc{ font-size: 0.82rem; color: var(--text-soft); }
@media (max-width: 60rem){ .resource-grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 30rem){ .resource-grid{ grid-template-columns: 1fr; } }

/* -------------------------------------------------------------------------
   11. Search modal / back to top
   ------------------------------------------------------------------------- */
.search-modal{
  position: fixed; inset: 0; z-index: 400;
  background: rgba(14,12,9,.55);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: min(14vh, 8rem);
  opacity: 0; visibility: hidden; transition: opacity var(--dur-fast) var(--ease);
}
.search-modal.is-open{ opacity: 1; visibility: visible; }
.search-panel{
  width: min(38rem, 92vw); background: var(--bg-raised); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
  transform: translateY(-10px); transition: transform var(--dur-fast) var(--ease-out);
}
.search-modal.is-open .search-panel{ transform: none; }
.search-input-row{ display: flex; align-items: center; gap: 0.7rem; padding: var(--space-md); border-bottom: 1px solid var(--border); }
.search-input-row svg{ width: 1.2rem; height: 1.2rem; color: var(--text-soft); flex: none; }
.search-input-row input{ flex: 1; border: none; background: transparent; font-size: var(--step-1); }
.search-input-row input:focus{ outline: none; }
.search-input-row kbd{ font-size: 0.72rem; border: 1px solid var(--border); border-radius: 4px; padding: 0.1rem 0.4rem; color: var(--text-soft); }
.search-results{ max-height: 22rem; overflow-y: auto; padding: 0.5rem; }
.search-result{ display: block; padding: 0.8rem 0.9rem; border-radius: var(--radius-sm); }
.search-result:hover, .search-result.is-active{ background: var(--bg-dim); }
.search-result .sr-page{ font-size: 0.72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-ink); font-weight: 700; }
:root[data-theme="dark"] .search-result .sr-page, :root:not([data-theme="light"]) .search-result .sr-page{ color: var(--gold); }
.search-result .sr-title{ font-weight: 600; margin-top: 0.15rem; }
.search-result .sr-snip{ font-size: 0.85rem; color: var(--text-soft); margin-top: 0.15rem; }
.search-result mark{ background: var(--gold-soft); color: var(--accent-ink); border-radius: 2px; }
.search-empty{ padding: var(--space-lg); text-align: center; color: var(--text-soft); }

.back-to-top{
  position: fixed; right: var(--space-md); bottom: var(--space-md); z-index: 90;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--ink); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity var(--dur-fast), transform var(--dur-fast), visibility var(--dur-fast);
}
.back-to-top.is-visible{ opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover{ background: var(--accent); }

/* -------------------------------------------------------------------------
   12. Footer, misc, print
   ------------------------------------------------------------------------- */
.site-footer{ border-top: 1px solid var(--border); padding-block: var(--space-2xl) var(--space-lg); margin-top: var(--space-2xl); }
.footer-grid{ display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--space-lg); }
.footer-brand .wordmark{ margin-bottom: 0.6rem; }
.footer-brand p{ color: var(--text-soft); font-size: var(--step--1); max-width: 24rem; }
.footer-contact{ margin-top: var(--space-sm); display: flex; flex-direction: column; gap: 0.4rem; font-size: var(--step--1); }
.footer-social{ display: flex; gap: 0.6rem; margin-top: var(--space-sm); }
.footer h5{ font-size: var(--step--1); text-transform: uppercase; letter-spacing: .06em; margin-bottom: var(--space-sm); color: var(--text-soft); }
.footer-links{ display: flex; flex-direction: column; gap: 0.55rem; font-size: var(--step--1); }
.footer-links a:hover{ color: var(--accent-ink); }
.footer-bottom{
  margin-top: var(--space-xl); padding-top: var(--space-md); border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  font-size: 0.82rem; color: var(--text-soft);
}
.credit-script{
  font-family: "Fraunces", serif; font-style: italic; font-weight: 600;
  color: var(--accent);
}
@media (max-width: 60rem){ .footer-grid{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 30rem){ .footer-grid{ grid-template-columns: 1fr; } }

.section-tint-family{ background: color-mix(in srgb, var(--rose-soft) 55%, transparent); }
.section-tint-faith{ background: color-mix(in srgb, var(--evergreen-soft) 55%, transparent); }

.error-page{ min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: var(--space-md); }
.error-code{ font-family: var(--font-display); font-size: clamp(4rem,14vw,8rem); color: var(--accent-soft); line-height: 1; }

/* ---------- 404 glitch digits ---------- */
.glitch-digit{ display: inline-block; cursor: default; }
.glitch-digit:hover, .glitch-digit:focus-visible{ animation: glitch 340ms steps(2, end) 2; }
@keyframes glitch{
  0%   { transform: translate(0,0); color: var(--accent-soft); }
  20%  { transform: translate(-4px, 3px); color: var(--rose); }
  40%  { transform: translate(4px, -3px); color: var(--gold); }
  60%  { transform: translate(-3px, -2px); color: var(--evergreen); }
  80%  { transform: translate(3px, 2px); color: var(--accent); }
  100% { transform: translate(0,0); color: var(--accent-soft); }
}
@media (prefers-reduced-motion: reduce){
  .glitch-digit:hover, .glitch-digit:focus-visible{ animation: none; color: var(--accent); }
}

/* ---------- 404 "while you're here" extras ---------- */
.error-extra{ display: flex; flex-direction: column; align-items: center; gap: var(--space-xl); margin: 0 0 var(--space-2xl); }
.no-js .bug-game{ display: none; }

.bug-game{
  width: 100%; max-width: 38rem; background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: var(--space-lg); text-align: center; box-shadow: var(--shadow-sm);
}
.bug-game-head h2{ font-size: var(--step-2); margin: 0.15em 0 0.4em; }
.bug-screen{
  position: relative; margin: var(--space-md) auto 0; width: 100%; height: 220px;
  background: var(--ink); border-radius: var(--radius-md); overflow: hidden;
  box-shadow: inset 0 0 0 6px var(--ink-soft), var(--shadow-md);
}
.bug-empty-state{ color: var(--paper-line); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: var(--step--1); margin: 0; }
.bug{
  position: absolute; width: 2.5rem; height: 2.5rem; display: flex; align-items: center; justify-content: center;
  background: none; border: none; padding: 0.4rem; cursor: pointer; color: var(--gold-soft); line-height: 0;
  animation: bug-wiggle 2.4s ease-in-out infinite;
  transition: color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.bug svg{ width: 100%; height: 100%; filter: drop-shadow(0 2px 4px rgba(0,0,0,.45)); }
.bug:hover, .bug:focus-visible{ color: var(--white); transform: scale(1.18); }
.bug:focus-visible{ outline: 2px solid var(--gold); outline-offset: 3px; }
@keyframes bug-wiggle{
  0%,100%{ transform: translate(0,0) rotate(0deg); }
  25%{ transform: translate(2px,-3px) rotate(-6deg); }
  50%{ transform: translate(-2px,2px) rotate(4deg); }
  75%{ transform: translate(3px,3px) rotate(-3deg); }
}
@media (prefers-reduced-motion: reduce){ .bug{ animation: none; } }
.bug.is-squashed{ animation: squash 320ms var(--ease-out) forwards; pointer-events: none; }
@keyframes squash{ to{ transform: scale(0) rotate(25deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce){ .bug.is-squashed{ animation: none; opacity: 0; } }

.bug-game-foot{ display: flex; flex-direction: column; align-items: center; gap: var(--space-sm); margin-top: var(--space-md); }
.bug-score{ font-weight: 600; color: var(--text-soft); margin: 0; }
.bug-win-msg{ position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: var(--space-md);
  font-family: var(--font-display); font-size: var(--step-1); color: var(--white); background: rgba(28,26,22,.55); margin: 0; }

.confetti-piece{ position: absolute; top: -10px; width: 8px; height: 14px; opacity: 0.9; animation: confetti-fall 1400ms ease-in forwards; }
@keyframes confetti-fall{ to{ transform: translateY(240px) rotate(360deg); opacity: 0; } }

.tip-jar{
  width: 100%; max-width: 30rem; text-align: center; padding: var(--space-md) var(--space-lg);
  border: 1px dashed var(--border); border-radius: var(--radius-lg);
}
.tip-text{ font-family: var(--font-display); font-style: italic; font-size: var(--step-1); margin: 0.6em 0 var(--space-sm); min-height: 2.4em; }
.no-js .tip-jar button{ display: none; }

@media print{
  .site-header, .mobile-panel, .back-to-top, .scroll-progress, .search-modal, .hero-blob, .icon-btn, .hamburger{ display: none !important; }
  body{ background: #fff; color: #000; }
  a{ color: #000; text-decoration: underline; }
  section{ padding-block: 1rem; }
}

@media (max-width: 40rem){
  .about-grid, .contact-panel{ gap: var(--space-lg); }
}
