/* ==========================================================================
   Lifeline Community Fellowship — 2026 refresh
   One shared stylesheet. Colors come from the logo (crimson + navy).
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("../font/archivo-var.woff2") format("woff2-variations"),
       url("../font/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../font/archivo-var-italic.woff2") format("woff2-variations"),
       url("../font/archivo-var-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Color */
  --crimson: #b01933;
  --crimson-deep: #8c1228;
  --crimson-tint: #fbeef0;
  --navy: #141c3b;
  --navy-soft: #26305a;
  --ink: #1a1d2b;
  --muted: #5a6074;
  --line: #dfe1e8;
  --mist: #f1f2f6;
  --paper: #ffffff;

  /* Type */
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --step--1: clamp(.83rem, .8rem + .15vw, .9rem);
  --step-0: clamp(1rem, .96rem + .2vw, 1.0625rem);
  --step-1: clamp(1.2rem, 1.1rem + .45vw, 1.375rem);
  --step-2: clamp(1.5rem, 1.3rem + .9vw, 1.9rem);
  --step-3: clamp(2rem, 1.6rem + 1.8vw, 2.9rem);
  --step-4: clamp(2.8rem, 1.9rem + 4.2vw, 5.4rem);

  /* Layout */
  --wrap: 1180px;
  --gutter: clamp(1rem, 3vw, 2rem);
  --space: clamp(3.5rem, 2.5rem + 4vw, 6.5rem);
  --radius: 6px;
  --site-header-h: 92px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--site-header-h) + 1rem); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.1; font-weight: 750; letter-spacing: -.01em; }
h2 { font-size: var(--step-3); font-stretch: 75%; font-weight: 800; letter-spacing: -.005em; }
h3 { font-size: var(--step-1); }
:focus-visible { outline: 3px solid var(--crimson); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 2000; background: var(--navy); color: #fff; padding: .6rem 1rem; border-radius: var(--radius); }
.skip-link:focus { top: 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.band { padding: var(--space) 0; }
.band--mist { background: var(--mist); }
.band--navy { background: var(--navy); color: #e8eaf3; }
.band--navy h2, .band--navy h3 { color: #fff; }

.lede { font-size: var(--step-1); line-height: 1.5; color: var(--muted); max-width: 38em; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 2.25rem; }
.section-head h2 { margin: 0; }
.section-head p { margin: .35rem 0 0; color: var(--muted); max-width: 34em; }
.text-link { font-weight: 650; color: var(--crimson); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .25em; text-decoration-color: color-mix(in srgb, var(--crimson) 35%, transparent); }
.text-link:hover { text-decoration-color: var(--crimson); }
.band--navy .text-link { color: #fff; text-decoration-color: rgba(255,255,255,.4); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.4rem;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.1;
  border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn--primary { background: var(--crimson); color: #fff; }
.btn--primary:hover { background: var(--crimson-deep); }
.btn--outline { border-color: currentColor; color: var(--ink); }
.btn--outline:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: var(--crimson-tint); }
.btn--ghost-light { border-color: rgba(255,255,255,.7); color: #fff; }
.btn--ghost-light:hover { background: #fff; color: var(--navy); border-color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: var(--site-header-h); }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { width: auto; height: 76px; object-fit: contain; }
.nav { display: none; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .25rem; }
.nav li { position: relative; }
.nav a { display: block; padding: .55rem .7rem; font-weight: 600; font-size: .98rem; text-decoration: none; color: var(--ink); border-radius: var(--radius); }
.nav a:hover { color: var(--crimson); }
.nav a[aria-current="page"] { color: var(--crimson); box-shadow: inset 0 -2px 0 var(--crimson); border-radius: 0; }
.nav .has-sub > a::after { content: ""; display: inline-block; width: .38em; height: .38em; margin-left: .45em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-.2em) rotate(45deg); }
.nav .sub {
  position: absolute; top: 100%; left: 0; min-width: 200px;
  display: block; padding: .5rem; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 14px 30px -12px rgba(20,28,59,.28);
  opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.nav .sub li { width: 100%; }
.nav .has-sub:hover .sub, .nav .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
.nav .btn { margin-left: .75rem; min-height: 42px; padding: .55rem 1.2rem; color: #fff; }
.nav .btn:hover { color: #fff; }

.menu-toggle {
  display: inline-flex; align-items: center; gap: .55rem;
  min-height: 44px; padding: .5rem .9rem;
  font: inherit; font-weight: 700; color: var(--navy);
  background: none; border: 2px solid var(--line); border-radius: 999px; cursor: pointer;
}
.menu-toggle .bars, .menu-toggle .bars::before, .menu-toggle .bars::after { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .2s ease; }
.menu-toggle .bars::before, .menu-toggle .bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle .bars::before { top: -6px; }
.menu-toggle .bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

.mobile-nav {
  position: fixed; inset: var(--site-header-h) 0 0 0; z-index: 999;
  background: #fff; overflow-y: auto;
  padding: 1rem var(--gutter) 2.5rem;
  transform: translateY(-8px); opacity: 0; visibility: hidden;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.mobile-nav.is-open { opacity: 1; visibility: visible; transform: none; }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav > ul > li { border-bottom: 1px solid var(--line); }
.mobile-nav a { display: block; padding: 1rem 0; font-size: 1.25rem; font-weight: 700; font-stretch: 85%; text-decoration: none; }
.mobile-nav a[aria-current="page"] { color: var(--crimson); }
.mobile-nav .sub { padding: 0 0 .75rem 1rem; }
.mobile-nav .sub a { padding: .5rem 0; font-size: 1.05rem; font-weight: 550; color: var(--muted); font-stretch: 100%; }
.mobile-nav .btn { display: flex; margin-top: 1.5rem; font-size: 1.1rem; }
body.menu-open { overflow: hidden; }

@media (min-width: 1100px) {
  .nav { display: block; }
  .menu-toggle, .mobile-nav { display: none; }
}

/* ---------- Hero ---------- */
.home-hero {
  position: relative; isolation: isolate; color: #fff;
  background: var(--navy);
  padding: clamp(3.5rem, 7vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}
.home-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url("../images/indexbible.jpg") center 40% / cover no-repeat;
}
.home-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(20,28,59,.94) 0%, rgba(20,28,59,.82) 45%, rgba(20,28,59,.55) 100%),
    linear-gradient(0deg, rgba(20,28,59,.6), transparent 40%);
}
.home-hero .wrap { display: grid; gap: 2.5rem; align-items: end; }
.hero-theme { margin: 0 0 1.25rem; font-size: var(--step-0); font-weight: 600; color: #f4c9d0; }
.home-hero h1 {
  margin: 0;
  font-size: var(--step-4);
  font-weight: 850;
  font-stretch: 62%;
  line-height: .9;
  letter-spacing: -.01em;
  text-transform: uppercase;
}
.home-hero h1 > span { display: block; }
.home-hero h1 .amp { color: #ff8a9b; }
.hero-tagline { margin: 1.4rem 0 0; font-size: var(--step-1); font-stretch: 110%; font-weight: 400; color: #dfe3f2; max-width: 30em; }
.home-hero .btn-row { margin-top: 2rem; }

.live-pill {
  display: inline-flex; align-items: center; gap: .55rem;
  margin: 0 0 1.25rem; padding: .45rem 1rem;
  border-radius: 999px; background: var(--crimson); color: #fff;
  font-weight: 700; font-size: .95rem; text-decoration: none;
}
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: livePulse 1.4s ease-in-out infinite; flex-shrink: 0; }
@keyframes livePulse { 50% { opacity: .3; transform: scale(.75); } }

.service-card {
  background: #fff; color: var(--ink);
  border-radius: var(--radius);
  padding: 1.6rem 1.6rem 1.4rem;
  border-top: 5px solid var(--crimson);
  max-width: 420px;
}
.service-card h2 { font-size: var(--step-2); font-stretch: 75%; margin: 0 0 1rem; }
.service-card dl { margin: 0 0 1.25rem; display: grid; gap: .85rem; }
.service-card dl div { display: grid; grid-template-columns: 1.4rem 1fr; gap: .65rem; align-items: start; }
.service-card dt { padding-top: .15rem; color: var(--crimson); }
.service-card dt svg { width: 1.2rem; height: 1.2rem; display: block; }
.service-card dd { margin: 0; line-height: 1.4; }
.service-card dd strong { display: block; font-size: 1.1rem; }
.service-card dd span { color: var(--muted); font-size: var(--step--1); }
.service-card .btn-row { gap: .6rem; }
.service-card .btn { flex: 1 1 auto; }

@media (min-width: 900px) {
  .home-hero .wrap { grid-template-columns: 1.5fr 1fr; gap: 3rem; }
  .service-card { justify-self: end; width: 100%; }
}

/* ---------- Welcome ---------- */
.welcome { display: grid; gap: 2.5rem; align-items: center; }
.welcome-photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; }
.welcome-photo img { width: 100%; height: 100%; object-fit: cover; }
.welcome h2 { max-width: 14ch; }
.welcome blockquote {
  margin: 1.5rem 0; padding: 0 0 0 1.25rem;
  border-left: 4px solid var(--crimson);
  font-size: var(--step-1); font-style: italic; line-height: 1.5; color: var(--ink);
}
@media (min-width: 860px) { .welcome { grid-template-columns: 1.1fr 1fr; gap: 4rem; } }

/* ---------- Tiles (start here, ministries) ---------- */
.tiles { display: grid; gap: 2rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.tile { position: relative; display: flex; flex-direction: column; }
.tile-media { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--line); margin-bottom: 1rem; }
.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile:hover .tile-media img { transform: scale(1.04); }
.tile h3 { margin: 0 0 .35rem; font-size: var(--step-1); }
.tile h3 a { text-decoration: none; }
.tile h3 a::after { content: ""; position: absolute; inset: 0; }
.tile:hover h3 a { color: var(--crimson); }
.tile p { margin: 0; color: var(--muted); font-size: .98rem; }

.ministries { grid-template-columns: repeat(2, 1fr); gap: 1.75rem 1.25rem; }
@media (min-width: 640px) { .ministries { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .ministries { grid-template-columns: repeat(6, 1fr); } }
.ministries .tile-media { aspect-ratio: 1 / 1; margin-bottom: .75rem; }
.ministries .tile h3 { font-size: 1.15rem; margin-bottom: .1rem; }
.ministries .tile p { font-size: .92rem; }

/* ---------- Watch (live + sermons) ---------- */
.watch { display: grid; gap: 2.5rem; }
@media (min-width: 960px) { .watch { grid-template-columns: 1fr 1.25fr; gap: 3.5rem; align-items: start; } }
.live-module {
  background: var(--navy-soft); border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.live-module .live-pre { margin: 0 0 .25rem; color: #c3c9e3; font-weight: 600; }
.live-module h3 { font-size: var(--step-2); font-stretch: 75%; margin: 0 0 1.25rem; }
.live-countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin: 0 0 1.5rem; }
.live-countdown > div { background: rgba(255,255,255,.07); border-radius: var(--radius); padding: .8rem .4rem .7rem; text-align: center; }
.live-countdown .num { font-size: var(--step-3); font-weight: 800; font-stretch: 70%; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.live-countdown .lbl { margin-top: .35rem; font-size: .82rem; color: #c3c9e3; }
.live-embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; margin-bottom: 1.5rem; }
.live-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.live-module .note { margin: 1rem 0 0; font-size: var(--step--1); color: #c3c9e3; }

.sermons h3.sermons-title { font-size: var(--step-1); margin: 0 0 1rem; color: #fff; }
.sermon-list { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; gap: 1rem; }
.sermon { position: relative; display: grid; grid-template-columns: 168px 1fr; gap: 1rem; align-items: center; }
.sermon-thumb { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: rgba(255,255,255,.08); }
.sermon-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sermon h4 { margin: 0 0 .3rem; font-size: 1.05rem; line-height: 1.3; color: #fff; font-weight: 650; }
.sermon h4 a { text-decoration: none; }
.sermon h4 a::after { content: ""; position: absolute; inset: 0; }
.sermon:hover h4 { text-decoration: underline; text-underline-offset: .2em; }
.sermon time { font-size: var(--step--1); color: #c3c9e3; }
.sermon--loading .sermon-thumb { animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { 50% { opacity: .5; } }
@media (max-width: 520px) { .sermon { grid-template-columns: 120px 1fr; } .sermon h4 { font-size: .98rem; } }

/* ---------- Events widget (rendered by js/home-events-widget.js) ---------- */
#home-upcoming-events .he-layout { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { #home-upcoming-events .he-layout { grid-template-columns: 1.3fr 1fr; gap: 2.5rem; align-items: start; } }
.he-featured { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.he-featured-media { position: relative; aspect-ratio: 16 / 9; background: var(--mist); overflow: hidden; }
.he-featured-media img { width: 100%; height: 100%; object-fit: cover; }
.he-featured-media--gradient { background: linear-gradient(135deg, var(--navy), var(--navy-soft)); display: grid; place-items: center; }
.he-featured-media--gradient { aspect-ratio: 16 / 5; }
.he-featured-icon { display: none; }
.he-featured-body { padding: 1.5rem; }
.he-ministry-tag { display: inline-block; margin-bottom: .6rem; font-size: .88rem; font-weight: 700; color: var(--crimson); }
.he-featured-title { font-size: var(--step-2); font-stretch: 80%; margin: 0 0 .75rem; }
.he-featured-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; margin-bottom: .9rem; }
.he-meta-item { font-size: .95rem; color: var(--muted); font-weight: 550; }
.he-featured-desc { color: var(--muted); margin: 0 0 1.25rem; }
.he-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.he-btn { display: inline-flex; align-items: center; min-height: 44px; padding: .55rem 1.2rem; border-radius: 999px; font-weight: 700; font-size: .95rem; text-decoration: none; border: 2px solid transparent; }
.he-btn--primary { background: var(--crimson); color: #fff; }
.he-btn--primary:hover { background: var(--crimson-deep); }
.he-btn--secondary { border-color: var(--line); color: var(--ink); }
.he-btn--secondary:hover { border-color: var(--ink); }
.he-badge { display: inline-block; font-size: .8rem; font-weight: 700; border-radius: 999px; padding: .2rem .65rem; }
.he-badge--urgent { position: absolute; top: .9rem; left: .9rem; background: var(--crimson); color: #fff; }
.he-badge--small { background: var(--crimson-tint); color: var(--crimson-deep); margin-bottom: .3rem; }
.he-sidebar { display: flex; flex-direction: column; }
.he-sidebar-heading { display: none; }
.he-card:first-of-type { padding-top: 0; }
.he-card { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.he-card-date { flex-shrink: 0; width: 56px; padding: .45rem 0 .4rem; text-align: center; border-radius: var(--radius); background: var(--navy); color: #fff; display: flex; flex-direction: column; }
.he-card-day { font-size: 1.5rem; font-weight: 800; font-stretch: 70%; line-height: 1; }
.he-card-month { font-size: .72rem; font-weight: 600; letter-spacing: .04em; color: #c3c9e3; margin-top: .2rem; }
.he-card-body { min-width: 0; }
.he-card-title { margin: 0 0 .2rem; font-size: 1.05rem; line-height: 1.3; }
.he-card-meta { display: flex; align-items: center; gap: .4rem; font-size: .9rem; color: var(--muted); }
.he-ministry-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.he-card-time { font-size: .9rem; color: var(--muted); }
.he-view-all { margin-top: 1.25rem; font-weight: 650; color: var(--crimson); text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 2px; align-self: flex-start; }
.he-empty { padding: 2.5rem 1.5rem; text-align: center; background: #fff; border-radius: var(--radius); border: 1px dashed var(--line); color: var(--muted); }

/* ---------- Prayer & Give ---------- */
.split { display: grid; gap: 1.5rem; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; gap: 2rem; } }
.callout { padding: clamp(1.75rem, 4vw, 2.75rem); border-radius: var(--radius); background: var(--navy-soft); display: flex; flex-direction: column; align-items: flex-start; }
.callout--crimson { background: var(--crimson); }
.callout h2 { font-size: var(--step-3); margin-bottom: .4rem; }
.callout p { color: #e3e6f2; max-width: 30em; }
.callout--crimson p { color: #fbe3e7; }
.callout .btn { margin-top: .5rem; }
.store-badges { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; align-items: center; }
.store-badges p { width: 100%; margin: 0; font-size: var(--step--1); }
.store-badges img { height: 44px; width: auto; }

/* ---------- Visit ---------- */
.visit { display: grid; gap: 2rem; }
@media (min-width: 860px) { .visit { grid-template-columns: 1fr 1.4fr; gap: 3.5rem; align-items: stretch; } }
.visit-info dl { margin: 1.5rem 0 2rem; display: grid; gap: 1.25rem; }
.visit-info dt { font-size: var(--step--1); font-weight: 650; color: var(--muted); margin-bottom: .15rem; }
.visit-info dd { margin: 0; font-size: var(--step-1); line-height: 1.4; }
.visit-info dd a { text-decoration-color: var(--line); text-underline-offset: .2em; }
.visit-info dd a:hover { color: var(--crimson); }
.map { border-radius: var(--radius); overflow: hidden; min-height: 340px; background: var(--line); }
.map iframe { display: block; width: 100%; height: 100%; min-height: 340px; border: 0; }

/* ---------- LifeGroups band ---------- */
.groups-band { background: var(--crimson); color: #fff; padding: clamp(3rem, 6vw, 5rem) 0; }
.groups-band .wrap { display: grid; gap: 1.5rem 3rem; align-items: center; }
.groups-band h2 { color: #fff; margin: 0 0 .5rem; }
.groups-band p { margin: 0; color: #fbe3e7; max-width: 36em; font-size: var(--step-1); line-height: 1.5; }
@media (min-width: 860px) { .groups-band .wrap { grid-template-columns: 1fr auto; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c3c9e3; padding: 4rem 0 2rem; font-size: .98rem; }
.footer-grid { display: grid; gap: 2.5rem 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.footer-brand img { width: 84px; height: 84px; background: #fff; border-radius: 50%; padding: 4px; margin-bottom: 1rem; }
.footer-brand p { max-width: 26em; }
.site-footer h2 { font-size: 1.05rem; font-stretch: 100%; font-weight: 700; color: #fff; margin: 0 0 .9rem; letter-spacing: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: .2em; }
.footer-bottom { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; font-size: var(--step--1); }
.footer-bottom p { margin: 0; }

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

/* Live-mode text injected into the service card by the countdown script */
.service-card .sb-live { font-weight: 700; color: var(--crimson); }
.service-card #sbWhen .live-dot { background: var(--crimson); }

/* ==========================================================================
   Installed app (PWA) — keep clear of the iPhone status bar & home indicator
   ========================================================================== */
.site-header { padding-top: env(safe-area-inset-top, 0px); }
.site-header .wrap { padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.mobile-nav { top: calc(var(--site-header-h) + env(safe-area-inset-top, 0px)); padding-bottom: calc(2.5rem + env(safe-area-inset-bottom, 0px)); }
.site-footer { padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px)); }
html { scroll-padding-top: calc(var(--site-header-h) + env(safe-area-inset-top, 0px) + 1rem); }

/* ==========================================================================
   Motion
   1. One page-load sequence in the hero.
   2. Gentle reveals as sections scroll into view (browsers that support it).
   3. Small responses to what people do: header shadow, countdown tick, hovers.
   ========================================================================== */

/* Header gains a shadow once the page scrolls */
.site-header { transition: box-shadow .25s ease; }
.site-header.is-scrolled { box-shadow: 0 8px 24px -16px rgba(20,28,59,.35); }

/* 1. Hero load sequence */
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes lineUp { from { transform: translateY(105%); } to { transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes settle { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(32px); } to { opacity: 1; transform: none; } }
@keyframes ampSpin { from { opacity: 0; transform: rotate(-25deg) scale(.6); } to { opacity: 1; transform: none; } }

.home-hero::before { animation: settle 14s cubic-bezier(.2,.7,.2,1) both; }
.home-hero h1 > span { overflow: hidden; padding-bottom: .04em; }
.home-hero h1 > span > .line { display: inline-block; animation: lineUp .9s cubic-bezier(.2,.8,.2,1) both; }
.home-hero h1 > span:nth-child(1) > .line { animation-delay: .15s; }
.home-hero h1 > span:nth-child(2) > .line { animation-delay: .3s; }
.home-hero h1 > span:nth-child(3) > .line { animation-delay: .45s; }
.home-hero h1 .amp { display: inline-block; animation: ampSpin .7s cubic-bezier(.3,1.4,.5,1) 1s both; }
.hero-theme { animation: fadeIn .6s ease .05s both; }
.hero-tagline { animation: rise .7s ease .75s both; }
.home-hero .btn-row { animation: rise .7s ease .9s both; }
.service-card { animation: slideIn .8s cubic-bezier(.2,.8,.2,1) 1s both; }
@media (max-width: 899px) { .service-card { animation-name: rise; } }

/* 2. Scroll reveals (progressive: content is fully visible where unsupported) */
@supports (animation-timeline: view()) {
  @keyframes reveal { from { opacity: 0; transform: translateY(36px); } to { opacity: 1; transform: none; } }
  .section-head, .welcome-photo, .welcome > div:last-child, .tile, .live-module, .sermons,
  #home-upcoming-events, .callout, .visit-info, .map, .groups-band .wrap > * {
    animation: reveal linear both;
    animation-timeline: view();
    animation-range: entry 5% cover 28%;
  }
  .tile:nth-child(2) { animation-range: entry 10% cover 32%; }
  .tile:nth-child(3) { animation-range: entry 15% cover 36%; }
  .tile:nth-child(4) { animation-range: entry 20% cover 40%; }
  .ministries .tile:nth-child(5) { animation-range: entry 25% cover 44%; }
  .ministries .tile:nth-child(6) { animation-range: entry 30% cover 48%; }
}

/* 3. Responses */
@keyframes tick { from { transform: translateY(-35%); opacity: .2; } to { transform: none; opacity: 1; } }
.live-countdown .num.tick { animation: tick .35s cubic-bezier(.2,.8,.2,1); }
.btn { transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease; }
@media (hover: hover) { .btn:hover { transform: translateY(-2px); } }
.btn:active { transform: translateY(0) scale(.98); }
.he-card { transition: transform .2s ease; }
@media (hover: hover) { .he-card:hover { transform: translateX(4px); } }

@media (prefers-reduced-motion: reduce) {
  .home-hero::before, .home-hero h1 > span > .line, .home-hero h1 .amp, .hero-theme, .hero-tagline, .home-hero .btn-row, .service-card,
  .section-head, .welcome-photo, .welcome > div:last-child, .tile, .live-module, .sermons,
  #home-upcoming-events, .callout, .visit-info, .map, .groups-band .wrap > *, .live-countdown .num.tick {
    animation: none !important;
  }
  .btn:hover, .he-card:hover { transform: none; }
}

/* Give button stays white-on-crimson even when it's the current page */
.nav a.btn[aria-current="page"], .mobile-nav a.btn[aria-current="page"] { color: #fff; box-shadow: none; border-radius: 999px; }

/* Footer: opt-in for notifications (shown only where the browser supports it and nobody has answered yet) */
.footer-notify { font: inherit; font-weight: 650; color: #fff; background: none; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: .4rem .9rem; margin-right: 1rem; cursor: pointer; }
.footer-notify:hover { background: rgba(255,255,255,.1); }

/* Keep the footer identical on every page, whatever older page styles say */
.site-footer .footer-brand { font-size: inherit; font-weight: 400; color: inherit; margin: 0; font-stretch: 100%; }
.site-footer .footer-brand p { font-size: .98rem; font-weight: 400; line-height: 1.6; color: #c3c9e3; max-width: 26em; margin: 0; }
.site-footer .footer-bottom { max-width: none; margin: 3rem 0 0; text-align: left; color: #c3c9e3; }
.site-footer .footer-bottom p { margin: 0; }
.site-footer h2::after { content: none; }

/* Smaller header on phones, logo still large enough to read */
@media (max-width: 600px) {
  :root { --site-header-h: 76px; }
  .brand img { height: 62px; }
}

/* Church name beside the logo, so it's readable even where the badge is small */
.brand { gap: .7rem; text-decoration: none; color: var(--navy); }
.brand-name { display: flex; flex-direction: column; font-size: 1.45rem; font-weight: 850; font-stretch: 70%; line-height: .95; letter-spacing: .005em; text-transform: uppercase; color: var(--navy); }
.brand-name span { font-size: .8rem; font-weight: 650; font-stretch: 100%; letter-spacing: .01em; text-transform: none; color: var(--crimson); margin-top: .25rem; }
@media (min-width: 1100px) and (max-width: 1279px) { .brand-name { display: none; } }
@media (max-width: 360px) { .brand-name span { display: none; } }
