/* ==========================================================================
   James Kawalya Ministries — immersive experience styles
   1. Tokens  2. Base  3. Deck/scene engine  4. HUD  5. Sections  6. Motion
   ========================================================================== */

/* 1. Tokens ------------------------------------------------------------- */
:root {
  --blue: #026fbf;
  --blue-soft: #4aa8ec;
  --orange: #f29633;
  --ink: #05080f;
  --navy: #071427;
  --navy-2: #0c1e38;
  --paper: #f4f7fb;
  --line: rgba(255, 255, 255, 0.14);
  --muted: rgba(233, 240, 250, 0.62);
  --ease: cubic-bezier(0.76, 0, 0.24, 1);
  --dur: 900ms;
  --pad: clamp(1.25rem, 4vw, 4.5rem);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
}

/* 2. Base --------------------------------------------------------------- */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

html.js, html.js body { height: 100%; overflow: hidden; }
html, body { max-width: 100%; overflow-x: clip; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 999;
  padding: 0.6rem 1rem; background: var(--orange); color: #10 0a00;
  color: #180d00; border-radius: 999px; transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Typography ------------------------------------------------------------ */
.display {
  font-family: "Montserrat", "Manrope", sans-serif;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin: 0;
  font-size: clamp(2.6rem, 9vw, 8.5rem);
}
.display--sm { font-size: clamp(2rem, 6vw, 5rem); }
.eyebrow {
  font-size: clamp(0.74rem, 1.25vw, 0.92rem);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--orange);
  margin: 0 0 1.2rem;
  font-weight: 700;
}
.lede {
  max-width: 46ch;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.7vw, 1.32rem);
  line-height: 1.7;
}
.rule {
  width: 64px; height: 2px; background: var(--orange);
  margin: 1.5rem 0; border: 0;
}

/* Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.7rem;
  padding: 1rem 1.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.86rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  transition: transform 260ms var(--ease), background 260ms, border-color 260ms, color 260ms;
}
.btn:hover { transform: translateY(-2px) scale(1.02); border-color: var(--orange); }
.btn--solid { background: var(--orange); border-color: var(--orange); color: #180d00; }
.btn--solid:hover { background: #ffb257; }
.btn--blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.1); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 2rem; }

/* 3. Deck / scene engine ------------------------------------------------ */
.deck { position: relative; }

html.js .deck {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.scene {
  position: relative;
  min-height: 100dvh;
  width: 100%;
}

html.js .scene {
  position: absolute;
  inset: 0;
  height: 100%;
  transform: translate3d(0, 100%, 0);
  transition: transform var(--dur) var(--ease), opacity 700ms var(--ease), filter 700ms var(--ease);
  will-change: transform;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
html.js .scene.is-near { visibility: visible; }
html.js .scene.is-active {
  transform: translate3d(0, 0, 0);
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform var(--dur) var(--ease);
  will-change: transform;
}
html:not(.js) .track { flex-direction: column; }

.panel {
  flex: 0 0 100%;
  width: 100%;
  min-height: 100dvh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding:
    calc(var(--pad) + var(--safe-t) + 3.6rem)
    calc(var(--pad) + var(--safe-r))
    calc(var(--pad) + var(--safe-b) + 4rem)
    calc(var(--pad) + var(--safe-l));
  overflow: hidden;
}
html.js .panel { min-height: 0; height: 100%; }

/* Cinematic backgrounds */
.bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  z-index: -2;
  transform: scale(1.06);
  transition: transform 4s var(--ease), opacity 900ms ease;
}
html.js .bg:not(.bg-loaded) { opacity: 0; }
.is-active .bg { transform: scale(1); }
.panel::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, rgba(5, 8, 15, 0.94) 0%, rgba(5, 8, 15, 0.62) 45%, rgba(5, 8, 15, 0.35) 100%),
    radial-gradient(120% 90% at 80% 10%, rgba(2, 111, 191, 0.28), transparent 60%);
}
.panel--plain::after {
  background: radial-gradient(90% 70% at 20% 20%, rgba(2, 111, 191, 0.22), transparent 65%),
    linear-gradient(160deg, rgba(6, 15, 30, 0.95) 0%, rgba(4, 9, 18, 0.86) 55%, rgba(4, 9, 18, 0.92) 100%);
}
.panel--night::after {
  background: radial-gradient(70% 60% at 50% 40%, rgba(2, 111, 191, 0.28), transparent 70%),
    linear-gradient(180deg, rgba(3, 6, 16, 0.9) 0%, rgba(7, 20, 39, 0.88) 100%);
}
.bg--soft { filter: saturate(0.9) blur(1px); opacity: 0.85; }

.panel-inner { position: relative; max-width: 1200px; width: 100%; margin: 0 auto; }

/* Panel counter */
.panel-tag {
  position: absolute;
  bottom: calc(var(--pad) + var(--safe-b));
  left: calc(var(--pad) + var(--safe-l));
  font-size: 0.66rem; letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--muted);
}

/* 4. HUD ---------------------------------------------------------------- */
.hud {
  position: fixed; z-index: 40;
  top: calc(var(--safe-t) + 1rem);
  left: calc(var(--safe-l) + 1.1rem);
  right: calc(var(--safe-r) + 1.1rem);
  display: flex; align-items: center; justify-content: space-between;
  pointer-events: none;
}
.hud > * { pointer-events: auto; }

.logo { display: flex; align-items: center; gap: 0.7rem; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--blue), #013c6b);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-family: "Montserrat", sans-serif; font-weight: 800; font-size: 0.82rem;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 30px -12px rgba(2, 111, 191, 0.9);
}
.logo-text { font-size: 0.62rem; letter-spacing: 0.3em; text-transform: uppercase; line-height: 1.5; }
.logo-text b { display: block; font-weight: 800; }
.logo-text span { color: var(--orange); }

.menu-btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.6rem 1.05rem; border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(8, 14, 26, 0.5); backdrop-filter: blur(10px);
  font-size: 0.66rem; letter-spacing: 0.28em; text-transform: uppercase; font-weight: 700;
  transition: border-color 250ms, transform 250ms var(--ease);
}
.menu-btn:hover { border-color: var(--orange); transform: translateY(-1px); }
.menu-btn i { display: block; width: 16px; height: 1px; background: currentColor; position: relative; }
.menu-btn i::before, .menu-btn i::after {
  content: ""; position: absolute; left: 0; width: 16px; height: 1px; background: currentColor;
}
.menu-btn i::before { top: -5px; } .menu-btn i::after { top: 5px; }

/* Vertical rail (desktop) */
.rail {
  position: fixed; z-index: 40; right: calc(var(--safe-r) + 1rem); top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 0.55rem;
}
.rail button {
  display: flex; align-items: center; gap: 0.55rem;
  font-size: 0.6rem; letter-spacing: 0.2em; color: var(--muted);
  padding: 0.15rem 0.2rem;
}
.rail .dot {
  width: 7px; height: 7px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  transition: all 320ms var(--ease);
}
.rail .num { opacity: 0; transform: translateX(6px); transition: all 320ms var(--ease); }
.rail button:hover .num, .rail button[aria-current="true"] .num { opacity: 1; transform: none; }
.rail button[aria-current="true"] .dot {
  background: var(--orange); border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(242, 150, 51, 0.18);
  height: 20px; border-radius: 999px;
}
.rail button[aria-current="true"] { color: #fff; }

/* Horizontal pager */
.pager {
  position: fixed; z-index: 40;
  bottom: calc(var(--safe-b) + 1.1rem);
  left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.5rem 0.85rem; border-radius: 999px;
  background: rgba(8, 14, 26, 0.55); border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  transition: opacity 400ms;
}
.pager[hidden] { display: none; }
.pager .bars { display: flex; gap: 5px; }
.pager .bar { width: 22px; height: 3px; border-radius: 2px; background: rgba(255,255,255,0.25); transition: background 300ms; }
.pager .bar.on { background: var(--orange); }
.pager .label { font-size: 0.6rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--muted); }
.pager .arrow { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; }
.pager .arrow:hover { border-color: var(--orange); }

/* Menu overlay */
.menu {
  position: fixed; inset: 0; z-index: 60;
  background: linear-gradient(160deg, #04070e 0%, #071427 60%, #02101f 100%);
  display: grid; grid-template-rows: auto 1fr;
  padding: calc(var(--safe-t) + 1.2rem) var(--pad) calc(var(--safe-b) + 1.5rem);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 750ms var(--ease);
  overflow-y: auto;
}
.menu[hidden] { display: none; }
.menu.is-open { clip-path: inset(0 0 0 0); }
.menu-top { display: flex; justify-content: flex-end; }
.menu-list { display: grid; gap: 0.2rem; align-content: center; margin: 0; padding: 0; list-style: none; }
.menu-list li { overflow: hidden; }
.menu-list button {
  display: flex; align-items: baseline; gap: 1rem; width: 100%;
  padding: 0.35rem 0;
  font-family: "Montserrat", sans-serif; font-weight: 800; text-transform: uppercase;
  font-size: clamp(1.3rem, 4vw, 2.6rem); letter-spacing: -0.02em;
  color: rgba(244, 247, 251, 0.55);
  transform: translateY(110%);
  transition: color 300ms, transform 700ms var(--ease);
}
.menu.is-open .menu-list button { transform: none; }
.menu-list button:hover, .menu-list button[aria-current="true"] { color: #fff; }
.menu-list button:hover .idx { color: var(--orange); }
.menu-list .idx { font-size: 0.7rem; letter-spacing: 0.2em; color: var(--blue-soft); font-weight: 700; }

/* 5. Section specifics -------------------------------------------------- */
/* Home */
#s-home .bg {
  filter: saturate(0.94) brightness(0.92);
  background-position: center center;
}
#s-home .bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 14, 0.7) 0%, rgba(2, 6, 14, 0.5) 34%, rgba(2, 6, 14, 0.14) 68%, rgba(2, 6, 14, 0.04) 100%),
    linear-gradient(0deg, rgba(2, 6, 14, 0.58) 0%, transparent 46%);
}
.home-inner { text-align: left; max-width: 720px; }
@media (max-width: 640px) {
  #s-home .bg { background-position: 62% center; }
}
.home-title {
  font-size: clamp(2.7rem, 8.5vw, 7.5rem);
  letter-spacing: -0.03em;
  text-shadow: 0 6px 40px rgba(2, 6, 14, 0.6);
}
.home-title span { display: block; }
.home-title-accent::after {
  content: "";
  display: block;
  width: clamp(56px, 7vw, 96px);
  height: 4px;
  margin-top: 0.55rem;
  background: var(--orange);
  border-radius: 999px;
  box-shadow: 0 0 22px rgba(242, 150, 51, 0.55);
}
.home-sub {
  margin-top: 1.6rem; max-width: 44ch;
  font-size: clamp(1.1rem, 1.7vw, 1.35rem); line-height: 1.7;
  letter-spacing: 0.02em; color: rgba(244, 247, 251, 0.88); font-weight: 500;
  text-transform: none;
}
.home-inner .eyebrow { color: var(--orange); }
.home-inner .btn-row { margin-top: 2.4rem; }
.home-affiliates {
  position: absolute;
  right: calc(var(--pad) + var(--safe-r));
  top: calc(var(--safe-t) + 6.3rem);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.8rem);
}
.home-affiliates img {
  display: block;
  width: auto;
  height: clamp(62px, 9vw, 108px);
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(2, 6, 14, 0.55));
}
.home-affiliates img:last-child { height: clamp(38px, 5.8vw, 68px); }
@media (max-width: 720px) {
  #s-home .bg::after {
    background:
      linear-gradient(90deg, rgba(2, 6, 14, 0.64) 0%, rgba(2, 6, 14, 0.38) 62%, rgba(2, 6, 14, 0.08) 100%),
      linear-gradient(0deg, rgba(2, 6, 14, 0.62) 0%, transparent 52%);
  }
  .home-affiliates {
    right: calc(var(--safe-r) + 1rem);
    top: calc(var(--safe-t) + 5.2rem);
    gap: 0.7rem;
  }
  .home-affiliates img { height: 54px; }
  .home-affiliates img:last-child { height: 34px; }
}

/* Floating WhatsApp button (pairs with the Tawk bubble bottom-right) */
.wa-float {
  position: fixed; left: calc(var(--safe-l, 0px) + 1.1rem); bottom: calc(var(--safe-b, 0px) + 1.1rem);
  z-index: 60;
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; background: #25d366;
  box-shadow: 0 12px 30px -8px rgba(37, 211, 102, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  transition: transform 300ms var(--ease), box-shadow 300ms;
}
.wa-float:hover { transform: translateY(-4px) scale(1.05); box-shadow: 0 18px 38px -8px rgba(37, 211, 102, 0.7); }
.wa-float .wa-tip {
  position: absolute; left: calc(100% + 0.7rem); top: 50%; transform: translateY(-50%) translateX(-6px);
  white-space: nowrap; font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: #eaf4ff; background: rgba(2, 6, 14, 0.85); border: 1px solid var(--line);
  padding: 0.4rem 0.7rem; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: opacity 250ms, transform 250ms var(--ease);
}
.wa-float:hover .wa-tip, .wa-float:focus-visible .wa-tip { opacity: 1; transform: translateY(-50%) translateX(0); }
@media (max-width: 640px) {
  .wa-float { width: 48px; height: 48px; bottom: calc(var(--safe-b, 0px) + 0.9rem); left: calc(var(--safe-l, 0px) + 0.9rem); }
}
.enter-hint {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--safe-b) + 4.6rem);
  display: grid; justify-items: center; gap: 0.6rem;
  font-size: 0.62rem; letter-spacing: 0.4em; text-transform: uppercase; color: var(--muted);
}
.hint-dot {
  width: 26px; height: 42px; border-radius: 999px; border: 1px solid var(--line);
  position: relative;
}
.hint-dot::after {
  content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 4px;
  margin-left: -2px; border-radius: 50%; background: var(--orange);
  animation: hintUp 2s var(--ease) infinite;
}
@keyframes hintUp {
  0% { transform: translateY(18px); opacity: 0; }
  40% { opacity: 1; }
  100% { transform: translateY(0); opacity: 0; }
}

/* Grids & cards */
.grid { display: grid; gap: 1rem; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.card {
  border: 1px solid var(--line); border-radius: 18px;
  padding: 1.4rem; background: rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(10px);
  transition: transform 400ms var(--ease), border-color 300ms, background 300ms;
}
.card:hover { transform: translateY(-6px); border-color: rgba(242, 150, 51, 0.55); background: rgba(255,255,255,0.08); }
.card h3 { margin: 0 0 0.5rem; font-size: 1.12rem; letter-spacing: 0.04em; text-transform: uppercase; }
.card p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.65; }
.card .meta { display: block; font-size: 0.72rem; letter-spacing: 0.28em; color: var(--blue-soft); margin-bottom: 0.8rem; }

.media-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.media-card .thumb {
  aspect-ratio: 16 / 9; background-size: cover; background-position: center;
  border-bottom: 1px solid var(--line);
}
.media-card .body { padding: 1.1rem 1.2rem 1.3rem; }

/* Camp playlist cards (The Word) */
.playlist-card { display: flex; flex-direction: column; }
.playlist-card .thumb--yt {
  position: relative; aspect-ratio: 16 / 9;
  background-size: cover; background-position: center;
  border-bottom: 1px solid var(--line);
  background-color: var(--navy);
}
.playlist-card .thumb--yt::after {
  content: "▶"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; color: #fff; background: rgba(5, 8, 15, 0.34);
  opacity: 0; transition: opacity 320ms var(--ease);
}
.playlist-card:hover .thumb--yt::after,
.playlist-card:focus-visible .thumb--yt::after { opacity: 1; }
.thumb-badge {
  position: absolute; right: 8px; bottom: 8px;
  font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: #fff; background: rgba(5, 8, 15, 0.72);
  padding: 2px 8px; border-radius: 6px;
}
.camp-playlists .playlist-card .body { padding: 0.9rem 1.1rem 1.1rem; }
.camp-playlists .playlist-card h3 { font-size: 0.98rem; }

/* Camp schedule and map pin */
.camp-facts {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(260px, 1.3fr);
  gap: 1rem;
  width: min(100%, 760px);
  margin-top: 1.4rem;
}
.camp-facts > div,
.location-pin {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 12, 25, 0.68);
  backdrop-filter: blur(12px);
}
.camp-facts > div { padding: 1rem 1.15rem; }
.camp-facts .meta,
.location-pin .meta { display: block; margin-bottom: 0.45rem; color: var(--orange); font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; }
.camp-facts strong { display: block; font-family: "Montserrat", sans-serif; font-size: 1rem; text-transform: uppercase; }
.camp-facts small { display: block; margin-top: 0.35rem; color: var(--muted); font-size: 0.82rem; line-height: 1.45; }
.camp-location-inner { width: min(100%, 920px); }
.location-pin {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  width: min(100%, 720px);
  margin-top: 1.5rem;
  padding: clamp(1.1rem, 2.4vw, 2rem);
}
.location-pin__mark {
  display: grid;
  place-items: center;
  width: clamp(60px, 8vw, 90px);
  aspect-ratio: 1;
  border-radius: 50%;
  color: var(--ink);
  background: var(--orange);
  font-size: clamp(2rem, 4vw, 3.2rem);
}
.location-pin h3 { margin: 0; font-family: "Montserrat", sans-serif; font-size: clamp(1.1rem, 2vw, 1.6rem); text-transform: uppercase; }
.location-pin p { margin: 0.45rem 0 1rem; color: var(--muted); line-height: 1.55; }

/* Dedicated Books section */
.books-panel {
  justify-content: flex-start;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(circle at 78% 14%, rgba(242, 150, 51, 0.13), transparent 34%),
    linear-gradient(145deg, var(--navy-2), var(--ink) 72%);
}
.books-inner { margin: auto; width: min(100%, 1320px); padding-block: 0.4rem; }
.books-grid {
  display: grid;
  gap: clamp(0.8rem, 1.5vw, 1.35rem);
  margin-top: 1.25rem;
}
.books-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.books-grid--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.book-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: 0 24px 50px -38px rgba(2, 111, 191, 0.75);
  transition: transform 350ms var(--ease), border-color 300ms, background 300ms;
}
.book-card:hover { transform: translateY(-5px); border-color: rgba(242, 150, 51, 0.6); background: rgba(255, 255, 255, 0.075); }
.book-card > img,
.book-placeholder {
  width: 100%;
  height: clamp(220px, 36vh, 360px);
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  background: rgba(2, 8, 18, 0.72);
  box-shadow: 0 18px 38px -18px rgba(0, 0, 0, 0.9);
}
.book-copy { width: 100%; padding: 1rem 1.1rem 1.15rem; }
.book-copy h3 {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-size: clamp(0.8rem, 1.15vw, 1.05rem);
  line-height: 1.35;
  text-transform: uppercase;
}
.book-price { margin: 0.9rem 0 0; color: var(--orange); font-size: clamp(0.8rem, 1vw, 0.96rem); font-weight: 700; }
.book-price span { color: var(--muted); font-weight: 400; }
.book-price--contact { color: var(--blue-soft); }
.book-placeholder {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.1rem;
  color: var(--paper);
  background:
    linear-gradient(155deg, rgba(242, 150, 51, 0.28), transparent 42%),
    linear-gradient(145deg, var(--blue), var(--navy) 68%);
  border: 1px solid rgba(242, 150, 51, 0.45);
}
.book-placeholder span,
.book-placeholder small { color: var(--orange); font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase; }
.book-placeholder strong { font-family: "Montserrat", sans-serif; font-size: clamp(0.8rem, 1.2vw, 1.1rem); line-height: 1.25; text-transform: uppercase; }
.book-card--cta { border-color: rgba(242, 150, 51, 0.5); background: rgba(242, 150, 51, 0.06); }
.book-cta {
  height: 100%;
  min-height: clamp(220px, 36vh, 360px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.4rem 1.3rem;
  color: var(--paper);
  background:
    linear-gradient(155deg, rgba(242, 150, 51, 0.22), transparent 45%),
    linear-gradient(145deg, var(--blue), var(--navy) 68%);
}
.book-cta .eyebrow { color: var(--orange); }
.book-cta strong { font-family: "Montserrat", sans-serif; font-size: clamp(1rem, 1.6vw, 1.45rem); line-height: 1.25; text-transform: uppercase; }
.book-cta p { margin: 0; color: var(--muted); font-size: clamp(0.85rem, 1vw, 0.98rem); line-height: 1.45; }
.book-cta .btn { align-self: stretch; margin-top: 0.4rem; width: 100%; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; text-align: center; padding-left: 0.8rem; padding-right: 0.8rem; }

@media (max-width: 1100px) {
  .books-grid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .books-grid--four .book-card > img,
  .books-grid--four .book-placeholder { height: clamp(150px, 24vh, 225px); }
}

@media (max-width: 720px) {
  .books-grid--three,
  .books-grid--four { grid-template-columns: 1fr; }
  .books-inner { margin: 0 auto; }
  .book-card { display: grid; grid-template-columns: 105px 1fr; align-items: center; }
  .book-card > img,
  .book-placeholder { height: 148px; }
  .book-card--cta { display: flex; grid-template-columns: none; }
  .book-cta { min-height: 200px; }
  .book-cta .btn { font-size: 0.78rem; padding: 0.6rem 0.7rem; }
  .book-copy { padding: 0.85rem 1rem; }
  .books-inner .display--sm { font-size: clamp(1.5rem, 7vw, 2.2rem); }
  .camp-facts { grid-template-columns: 1fr; gap: 0.6rem; margin-top: 1rem; }
  .camp-facts > div { padding: 0.8rem 0.9rem; }
  .location-pin { grid-template-columns: 54px 1fr; padding: 1rem; }
  .location-pin__mark { width: 54px; }
}

/* Worship TV */
.tv {
  position: relative; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--line);
  background: #01060d;
  aspect-ratio: 16 / 9; width: min(100%, 780px);
  box-shadow: 0 40px 90px -40px rgba(2, 111, 191, 0.7);
}
.tv video { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.tv .scan {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,0.045) 0 1px, transparent 1px 4px);
}
.tv-bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap;
  padding: 0.7rem 0.9rem;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 14, 0.92));
  font-size: 0.62rem; letter-spacing: 0.24em; text-transform: uppercase;
}
.live {
  display: inline-flex; align-items: center; gap: 0.45rem;
  color: #fff; background: #c62222; padding: 0.28rem 0.6rem; border-radius: 4px; font-weight: 800;
}
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.6s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.15; } }
.tv-bar .now { color: var(--muted); }
.tv-ctrl { margin-left: auto; display: flex; gap: 0.45rem; }
.tv-ctrl button {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 0.8rem;
}
.tv-ctrl button:hover { border-color: var(--orange); }
.tv-layout { display: grid; gap: 2rem; grid-template-columns: minmax(240px, 1fr) minmax(280px, 1.2fr); align-items: center; }

/* 1000 days */
.thousand {
  font-family: "Montserrat", sans-serif; font-weight: 800;
  font-size: clamp(6rem, 26vw, 22rem); line-height: 0.8; letter-spacing: -0.05em;
  background: linear-gradient(180deg, #fff 0%, var(--orange) 55%, rgba(242,150,51,0.2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 20px 60px rgba(242, 150, 51, 0.25));
}
.is-active .thousand { animation: thousandIn 1400ms var(--ease) both; }
@keyframes thousandIn {
  0% { transform: scale(1.5); opacity: 0; letter-spacing: 0.3em; filter: blur(18px); }
  100% { transform: scale(1); opacity: 1; letter-spacing: -0.05em; filter: blur(0); }
}
.thousand-sub { margin-top: -0.4rem; }

/* Prayer particles */
.particles { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.particles span {
  position: absolute; bottom: -10%;
  width: 3px; height: 3px; border-radius: 50%;
  background: rgba(242, 150, 51, 0.75);
  filter: blur(0.4px);
  animation: rise linear infinite;
}
@keyframes rise {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  15% { opacity: 0.9; }
  100% { transform: translateY(-115vh) scale(1.3); opacity: 0; }
}

/* Portrait */
.about-layout { display: grid; gap: 2.2rem; grid-template-columns: minmax(260px, 1fr) minmax(260px, 1.1fr); align-items: center; }
.portrait {
  position: absolute; right: calc(var(--pad) + var(--safe-r)); bottom: 0; z-index: 0;
  height: 88dvh; width: auto; max-width: 46vw; object-fit: contain; object-position: bottom;
  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.75));
}
.about-layout > div { position: relative; z-index: 1; }
#s-about .panel-inner { position: static; }

/* Connect */
.links { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.6rem; }
.links a,
.links button {
  padding: 0.9rem 1.4rem; border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase;
  background: transparent; color: inherit; font-family: inherit; cursor: pointer;
  transition: transform 250ms var(--ease), border-color 250ms, background 250ms;
}
.links a:hover,
.links button:hover { transform: translateY(-3px); border-color: var(--blue-soft); background: rgba(2, 111, 191, 0.18); }

/* Contact cards: keep long emails inside the card */
.card h3 a, .card p a { color: inherit; }
.card h3, .card p { overflow-wrap: anywhere; word-break: break-word; }
#s-connect .card h3 { font-size: 1rem; letter-spacing: 0.02em; text-transform: none; }
#s-connect .card p { font-size: 0.92rem; line-height: 1.65; }

/* Loader */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; text-align: center;
  background: radial-gradient(70% 60% at 50% 45%, #0a1b31 0%, #03060d 70%);
  transition: opacity 700ms var(--ease), visibility 700ms;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader-mark {
  font-family: "Montserrat", sans-serif; font-weight: 800;
  font-size: clamp(3rem, 12vw, 7rem); letter-spacing: 0.06em;
  animation: markIn 900ms var(--ease) both;
}
@keyframes markIn { from { opacity: 0; transform: scale(0.8); filter: blur(12px); } to { opacity: 1; } }
.loader-line { margin-top: 1rem; font-size: 0.66rem; letter-spacing: 0.4em; text-transform: uppercase; color: var(--muted); min-height: 1.2em; }
.loader-bar { margin-top: 1.6rem; width: min(220px, 50vw); height: 2px; background: rgba(255,255,255,0.14); overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 0; background: var(--orange); transition: width 400ms linear; }

/* Progressive text reveal on active scene */
html.js .is-active .reveal { animation: revealUp 900ms var(--ease) both; }
html.js .is-active .reveal:nth-child(2) { animation-delay: 90ms; }
html.js .is-active .reveal:nth-child(3) { animation-delay: 180ms; }
html.js .is-active .reveal:nth-child(4) { animation-delay: 270ms; }
html.js .is-active .reveal:nth-child(5) { animation-delay: 360ms; }
@keyframes revealUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

/* 6. Transition variants ------------------------------------------------ */
html.js .scene[data-tx="zoom"].is-active .panel-inner { animation: txZoom 1100ms var(--ease) both; }
@keyframes txZoom { from { transform: scale(1.12); opacity: 0; } to { transform: none; opacity: 1; } }

html.js .scene[data-tx="pan"].is-active .panel-inner { animation: txPan 900ms var(--ease) both; }
@keyframes txPan { from { transform: translateX(8vw); opacity: 0; } to { transform: none; opacity: 1; } }

html.js .scene[data-tx="broadcast"].is-active .panel-inner { animation: txBroadcast 800ms var(--ease) both; }
@keyframes txBroadcast {
  0% { transform: scaleY(0.02) scaleX(1.1); opacity: 0.2; filter: brightness(3); }
  55% { transform: scaleY(1) scaleX(1); filter: brightness(1.4); }
  100% { transform: none; opacity: 1; filter: none; }
}

html.js .scene[data-tx="light"].is-active .panel-inner { animation: txLight 1200ms var(--ease) both; }
@keyframes txLight { from { opacity: 0; filter: blur(20px) brightness(2.4); } to { opacity: 1; filter: none; } }

html.js .scene[data-tx="fade"].is-active .panel-inner { animation: txFade 1200ms ease both; }
@keyframes txFade { from { opacity: 0; } to { opacity: 1; } }

/* Sweep flash used between scenes */
.sweep {
  position: fixed; inset: 0; z-index: 50; pointer-events: none;
  background: linear-gradient(120deg, transparent, rgba(2, 111, 191, 0.5), rgba(242, 150, 51, 0.35), transparent);
  opacity: 0; transform: translateX(-100%);
}
.sweep.run { animation: sweep 800ms var(--ease); }
@keyframes sweep {
  0% { opacity: 0.9; transform: translateX(-100%); }
  100% { opacity: 0; transform: translateX(100%); }
}

/* Cursor (desktop pointer only) */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 90; pointer-events: none;
  width: 28px; height: 28px; margin: -14px 0 0 -14px; border-radius: 50%;
  border: 1px solid rgba(242, 150, 51, 0.75);
  transition: transform 160ms ease-out, opacity 200ms, background 200ms;
  opacity: 0;
}
.cursor.on { opacity: 1; }
.cursor.hot { transform: scale(1.9); background: rgba(242, 150, 51, 0.14); }
@media (pointer: coarse) { .cursor { display: none; } }

/* Responsive ------------------------------------------------------------ */
@media (max-width: 900px) {
  .rail { display: none; }
  .tv-layout, .about-layout { grid-template-columns: 1fr; gap: 1.2rem; }
  .portrait { position: static; height: auto; max-width: 100%; max-height: 38dvh; width: 100%; }
  .panel { justify-content: flex-end; padding-bottom: calc(var(--pad) + var(--safe-b) + 5.5rem); }
  #s-about .panel { justify-content: flex-start; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-top: calc(var(--safe-t) + 4.5rem); }
  #s-about .about-layout { grid-template-columns: 1fr; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { padding: 1.1rem; border-radius: 14px; }
  .panel-tag { display: none; }
}

@media (max-width: 560px) {
  .grid--3 { grid-template-columns: 1fr; }
  .grid--3.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logo-text { display: none; }
  .camps-rhythm .card {
    display: grid;
    grid-template-columns: 82px 1fr;
    align-items: center;
    column-gap: 0.85rem;
  }
  .camps-rhythm .card .meta { grid-row: 1 / 3; margin: 0; }
  .camps-rhythm .card h3 { margin: 0 0 0.25rem; }
}

@media (max-height: 460px) and (orientation: landscape) {
  .panel { justify-content: center; padding-block: calc(var(--safe-t) + 3.2rem) calc(var(--safe-b) + 3.5rem); }
  .display { font-size: clamp(1.8rem, 7vh, 3.4rem); }
  .lede { font-size: 0.95rem; }
  .enter-hint { bottom: calc(var(--safe-b) + 3.6rem); }
}

/* Reduced motion --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .bg { transform: none; }
}

/* Toast notice */
.notice {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-b) + 5.5rem);
  transform: translate(-50%, 20px);
  z-index: 80;
  max-width: min(90vw, 420px);
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(7, 20, 39, 0.9);
  backdrop-filter: blur(10px);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-align: center;
  color: var(--paper);
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms var(--ease), transform 300ms var(--ease), visibility 300ms;
}
.notice.on { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* Card buttons (giving) */
button.card { text-align: left; width: 100%; font: inherit; }
button.card--link { cursor: pointer; color: inherit; }
button.card--link .card-cta {
  display: inline-block; margin-top: 0.9rem; padding: 0.65rem 1.3rem; border-radius: 999px;
  font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 600;
  color: var(--ink); background: var(--orange); border: 1px solid transparent;
  transition: background 0.3s ease, transform 0.3s ease;
}
button.card--link:hover .card-cta, button.card--link:focus-visible .card-cta { background: #ffb257; transform: translateX(4px); }

/* Contact section fits small screens without clipping */
@media (max-width: 560px) {
  #s-connect .panel { justify-content: flex-start; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  #s-connect .grid--3.compact { grid-template-columns: 1fr; gap: 0.6rem; }
  #s-connect .display--sm { font-size: clamp(1.5rem, 7vw, 2rem); }
  #s-connect .lede { font-size: 0.95rem; }
  #s-connect .card { padding: 0.9rem; }
  #s-connect .card h3 { font-size: 0.92rem; }
  #s-connect .card p { font-size: 0.88rem; }
  #s-connect .links { margin-top: 1rem; gap: 0.45rem; }
  #s-connect .links a, #s-connect .links button { padding: 0.65rem 1rem; font-size: 0.72rem; letter-spacing: 0.14em; }
}

/* Long content panels stay fully visible on phones */
@media (max-width: 560px) {
  .display--sm { font-size: clamp(1.5rem, 6.6vw, 2.1rem); }
  .lede { font-size: 0.95rem; }
  .home-sub { font-size: 1rem; }
  .grid--3.compact { gap: 0.6rem; }
  .card { padding: 0.9rem; }
  .card h3 { font-size: 0.95rem; }
  .card p { font-size: 0.88rem; }
  .btn { font-size: 0.78rem; padding: 0.8rem 1.3rem; }
  .rule { margin: 0.8rem 0; }
  .btn-row { margin-top: 1rem; }
}

/* Sermon cards go side-by-side on phones so the panel fits one screen */
@media (max-width: 560px) {
  .media-card { flex-direction: row; align-items: stretch; }
  .media-card .thumb { width: 38%; min-height: 84px; height: auto; flex: none; }
  .media-card .body { padding: 0.75rem 0.9rem; }
}

/* Payment embeds (PayPal hosted + donate buttons) */
.pay-embeds {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: flex-start;
  max-width: 640px;
}
.pay-embeds > div { min-width: 240px; }

/* Giving panels: keep Stripe / PayPal widgets fully reachable on short screens */
#s-give .panel { justify-content: flex-start; overflow-y: auto; -webkit-overflow-scrolling: touch; }
#s-give .panel-inner { margin: auto; padding-block: 0.5rem; }

@media (max-height: 820px) {
  #s-give .display--sm { font-size: clamp(1.4rem, 3.4vw, 2rem); }
  #s-give .lede { font-size: 0.98rem; margin-top: 0.5rem; }
  #s-give .rule { margin: 0.6rem 0; }
  #s-give .pay-embeds { margin-top: 0.9rem; gap: 0.9rem; }
  #s-give .eyebrow { margin-bottom: 0.2rem; }
}

@media (max-width: 560px) {
  #s-give .pay-embeds { max-width: 100%; }
  #s-give .pay-embeds > div { min-width: 0; width: 100%; }
}
