/* Bible Games Project — styles shared by every page.
   Same type, spacing, buttons and motion as the supporter page; colours complement the flame logo. */

@font-face { font-family: "Cormorant Garamond"; src: url("/assets/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("/assets/fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("/assets/fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  /* Palette (see AGENTS.md). Crimson carries white text; amber carries dark text. */
  --crimson: #b3142e;
  --crimson-hover: #c8203b;
  --crimson-dark: #8f1024;
  --crimson-deep: #5e0a18;
  --crimson-night: #3a0710;
  --amber: #f5a524;
  --amber-soft: #ffd9a0;
  --flame: linear-gradient(90deg, #e8083a 0%, #f05a0a 55%, #f8a818 100%);

  --ink: #1a0b0d;
  --ink-soft: #2a1a1c;
  --paper: #faf7f4;
  --sand: #f1ebe4;
  --stone: #8a7f7a;
  --line: #e8ddd3;
  --text: #2b2224;
  --text-muted: #6b5f60;
  --text-light: #f4ede6;
  --white: #ffffff;

  /* Names used by the donate page styles. */
  --red-900: var(--crimson-night);
  --red-800: var(--crimson-deep);
  --red-700: var(--crimson-dark);
  --red-600: var(--crimson);
  --red-500: var(--crimson-hover);
  --gold: var(--amber);

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 14px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --header-h: 4.5rem;
  --section-y: clamp(4rem, 9vw, 7rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.08; letter-spacing: -0.01em; margin: 0; }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
p { margin: 0; }
a { color: var(--crimson-dark); }

.container { width: min(1120px, 100% - 3rem); margin-inline: auto; }
.container--narrow { width: min(46rem, 100% - 3rem); }

.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.1rem; }
.eyebrow--red { color: var(--crimson); }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: .7rem 1.1rem; border-radius: 10px;
  background: var(--amber); color: var(--ink); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 1rem; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .7rem;
  padding: 1.05rem 1.9rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-family: var(--sans); font-weight: 600; font-size: 1rem; line-height: 1.3; letter-spacing: .01em;
  text-align: center; text-decoration: none;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background-color .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--ease); }
a.btn:hover svg, a.btn:focus-visible svg { transform: translateX(4px); }
a.btn:hover { transform: translateY(-2px); }
a.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--amber); outline-offset: 4px; }

.btn--primary { background: var(--crimson); color: var(--white); box-shadow: 0 10px 30px -10px rgba(179, 20, 46, .7), inset 0 1px 0 rgba(255,255,255,.14); }
.btn--primary:hover { background: var(--crimson-hover); box-shadow: 0 16px 40px -10px rgba(200, 32, 59, .8), inset 0 1px 0 rgba(255,255,255,.18); }
.btn--light { background: var(--white); color: var(--crimson-dark); box-shadow: 0 12px 34px -10px rgba(0,0,0,.5); }
.btn--light:hover { box-shadow: 0 18px 44px -10px rgba(0,0,0,.6); }
/* On photos and dark sections. */
.btn--outline { color: var(--white); border-color: rgba(255,255,255,.45); background: rgba(26,11,13,.25); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.btn--outline:hover { border-color: var(--white); background: rgba(26,11,13,.4); }
/* On light sections. */
.section--paper .btn--outline, .section--sand .btn--outline { color: var(--crimson-dark); border-color: var(--crimson); background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.section--paper .btn--outline:hover, .section--sand .btn--outline:hover { background: #fbf1f0; }
/* A label that looks like a button but is not a link ("Coming soon"). */
.btn--soon { color: var(--text-muted); border: 1.5px dashed #cdbfb4; background: transparent; cursor: default; }
.section--night .btn--soon, .section--image .btn--soon { color: rgba(255,255,255,.7); border-color: rgba(255,255,255,.35); }

/* ---------- Header ---------- */

.topbar { background: var(--crimson-night); color: rgba(244,237,230,.82); font-size: .8rem; line-height: 1.5; text-align: center; }
.topbar p { padding: .55rem 0; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(26, 11, 13, .94);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  color: var(--text-light);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--flame); opacity: .85; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: .65rem; flex: none; color: var(--white); text-decoration: none; white-space: nowrap; }
.brand img { width: 2.4rem; height: 2.4rem; }
.brand span { font-family: var(--serif); font-weight: 600; font-size: 1.45rem; letter-spacing: .01em; }
.brand:focus-visible { outline: 3px solid var(--amber); outline-offset: 4px; border-radius: 6px; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; align-items: center; justify-content: flex-end; gap: .1rem; }
.site-nav a {
  display: block; padding: .42rem .45rem; border-radius: 999px; white-space: nowrap;
  color: rgba(244,237,230,.82); font-size: .79rem; font-weight: 600; text-decoration: none;
  transition: color .25s var(--ease), background-color .25s var(--ease);
}
.site-nav a:hover { color: var(--white); background: rgba(255,255,255,.07); }
.site-nav a[aria-current="page"] { color: var(--amber); }
.site-nav a:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.site-nav .site-nav__donate { margin-left: .3rem; padding: .5rem 1rem; background: var(--crimson); color: var(--white); box-shadow: inset 0 1px 0 rgba(255,255,255,.14); }
.site-nav .site-nav__donate:hover { background: var(--crimson-hover); }
.site-nav .site-nav__donate[aria-current="page"] { color: var(--white); }

.menu-toggle {
  display: none; align-items: center; gap: .5rem;
  padding: .55rem .95rem; border: 1.5px solid rgba(255,255,255,.3); border-radius: 999px;
  background: transparent; color: var(--white); font: 600 .9rem var(--sans); cursor: pointer;
}
.menu-toggle svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.menu-toggle .icon-close { display: none; }
.nav-open .menu-toggle .icon-open { display: none; }
.nav-open .menu-toggle .icon-close { display: block; }
.menu-toggle:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

@media (max-width: 1180px) {
  .site-header__inner { flex-wrap: wrap; padding: .6rem 0; }
  .js .menu-toggle { display: inline-flex; }
  .site-nav { width: 100%; }
  .site-nav ul { justify-content: flex-start; flex-wrap: wrap; }
  .js .site-nav { display: none; }
  .js .nav-open .site-nav { display: block; padding-bottom: 1rem; }
  .js .nav-open .site-nav ul { flex-direction: column; align-items: stretch; }
  .js .nav-open .site-nav a { padding: .8rem 1rem; font-size: 1rem; border-radius: 12px; }
  .js .nav-open .site-nav .site-nav__donate { margin: .5rem 0 0; text-align: center; }
}

/* ---------- Page hero ---------- */

.page-hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center;
  min-height: clamp(28rem, 72vh, 44rem);
  padding: clamp(4rem, 9vw, 6.5rem) 0;
  background: var(--ink); color: var(--white); text-align: center;
}
.page-hero__media { position: absolute; inset: 0; z-index: -2; }
.page-hero__media img, .page-hero__media video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: var(--focus, 50% 50%);
  transform-origin: 50% 60%;
  animation: slow-zoom 28s var(--ease) both;
}
.page-hero__shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(26,11,13,.55) 0%, rgba(26,11,13,.25) 70%),
    linear-gradient(180deg, rgba(26,11,13,.45) 0%, rgba(26,11,13,.15) 35%, rgba(26,11,13,.35) 70%, rgba(26,11,13,.85) 100%);
}
.page-hero__content { display: flex; flex-direction: column; align-items: center; }
.page-hero__content > * { max-width: 52rem; text-shadow: 0 2px 24px rgba(0,0,0,.55); }
.hero-line--1 { font-family: var(--serif); font-weight: 600; font-size: clamp(2.7rem, 6.2vw, 5.2rem); line-height: 1.04; }
.hero-line--2 { margin-top: .5rem; font-family: var(--serif); font-weight: 500; font-size: clamp(1.5rem, 3.2vw, 2.4rem); line-height: 1.2; color: var(--amber-soft); }
.hero-line--3 { margin-top: 1.3rem; max-width: 40rem; font-family: var(--sans); font-weight: 400; font-size: clamp(1.02rem, 1.6vw, 1.22rem); line-height: 1.6; letter-spacing: 0; color: rgba(255,255,255,.9); }
.hero-line--3 em, .hero-line em { font-style: normal; }
.page-hero .btn { margin-top: 2.2rem; }
.js-reveal .page-hero__content .reveal:nth-child(2) { animation-delay: .12s; }
.js-reveal .page-hero__content .reveal:nth-child(3) { animation-delay: .26s; }
.js-reveal .page-hero__content .reveal:nth-child(4) { animation-delay: .4s; }

/* Animated media (old GIFs): a still image, with the light video faded in when it can play. */
.media { position: relative; overflow: hidden; }
.media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s var(--ease); }
.media video.is-playing { opacity: 1; }
.page-hero__media video { opacity: 0; transition: opacity .8s var(--ease); }
.page-hero__media video.is-playing { opacity: 1; }

/* ---------- Sections ---------- */

.section { position: relative; padding: var(--section-y) 0; }
.section--paper { background: var(--paper); }
.section--sand { background: var(--sand); }
.section--night { background: var(--ink); color: rgba(244,237,230,.86); overflow: hidden; }
.section--night::before {
  content: ""; position: absolute; left: 50%; top: 0; width: min(1100px, 140%); aspect-ratio: 2 / 1;
  transform: translate(-50%, -40%); pointer-events: none;
  background: radial-gradient(ellipse, rgba(179,20,46,.35) 0%, rgba(179,20,46,0) 65%);
}
.section--night .container { position: relative; }
.section--image { isolation: isolate; overflow: hidden; color: var(--white); background: var(--ink); }
.section__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.section--image::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(26,11,13,.78), rgba(26,11,13,.66) 50%, rgba(26,11,13,.8)); }
.section--image .container { position: relative; }

.flow > * + * { margin-top: 1.15rem; }
.flow > h2, .flow > h3 { margin-top: 2.6rem; }
.flow > :first-child { margin-top: 0; }
.flow > h2 + *, .flow > h3 + * { margin-top: 1.1rem; }
.flow > .cards, .flow > .gallery, .flow > .figure, .flow > .yt, .flow > .actions, .flow > .social { margin-top: 2.4rem; }

.section h2 { color: var(--ink); }
.section h3 { font-size: clamp(1.7rem, 3vw, 2.2rem); color: var(--ink); }
.section--night h2, .section--night h3, .section--image h2, .section--image h3 { color: var(--white); }
.section strong { font-weight: 600; color: var(--ink); }
.section--night strong, .section--image strong { color: var(--white); }
.is-center { text-align: center; }
.lead { font-size: clamp(1.1rem, 1.8vw, 1.28rem); line-height: 1.65; }
/* A bold lead paragraph used as a small title on the old site ("Featured Christian Games"). */
.lead--title { font-family: var(--serif); font-size: clamp(1.9rem, 3.6vw, 2.6rem); line-height: 1.2; }
.section--night .lead--title { font-family: var(--sans); font-size: clamp(1.1rem, 1.8vw, 1.28rem); line-height: 1.65; }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.list li { position: relative; padding-left: 1.6rem; }
.list li::before { content: ""; position: absolute; left: .2rem; top: .62em; width: .5rem; height: .5rem; border-radius: 50%; background: var(--crimson); box-shadow: 0 0 0 4px rgba(179,20,46,.12); }
.section--night .list li::before, .section--image .list li::before { background: var(--amber); box-shadow: 0 0 0 4px rgba(245,165,36,.18); }

.figure { margin-inline: auto; border-radius: 18px; overflow: hidden; box-shadow: 0 30px 60px -32px rgba(60, 14, 20, .55); }
.figure--square { max-width: 28rem; }
.figure img { width: 100%; transition: transform 1.2s var(--ease); }
.figure a:hover img { transform: scale(1.03); }
.figure a { display: block; }
.figure a:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem; }

/* ---------- Cards ---------- */

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(3, 1fr); justify-content: center; }
.cards--2 { grid-template-columns: repeat(2, minmax(0, 22rem)); }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.cards--1 { grid-template-columns: minmax(0, 24rem); }
.card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--white); border: 1px solid #ece4dc; border-radius: 18px;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 26px 50px -28px rgba(90, 20, 26, .45); }
.card__media { display: block; aspect-ratio: 1; overflow: hidden; background: var(--ink-soft); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.card:hover .card__media img { transform: scale(1.04); }
a.card__media:focus-visible { outline: 3px solid var(--amber); outline-offset: -3px; }
.card__body { display: flex; flex-direction: column; gap: .9rem; flex: 1; justify-content: flex-end; padding: 1.2rem 1.2rem 1.4rem; }
.card__body .btn { width: 100%; padding: .9rem 1.2rem; font-size: .92rem; }
/* The title is after the button in the page (as on the old site) but shown above it. */
.card__title { order: -1; font-size: 1.65rem; color: var(--ink); text-align: center; }
.section .card__title { font-size: 1.65rem; }

/* ---------- Gallery ---------- */

.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); box-shadow: 0 18px 36px -24px rgba(60, 14, 20, .5); }
.gallery figcaption { margin-top: .7rem; text-align: center; font-family: var(--serif); font-weight: 600; font-size: 1.35rem; line-height: 1.2; color: var(--ink); }

/* ---------- YouTube (loads only when played) ---------- */

.yt { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #000; box-shadow: 0 30px 60px -32px rgba(60, 14, 20, .6); }
.yt a, .yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .9; color: transparent; transition: opacity .4s var(--ease), transform 1.2s var(--ease); }
.yt a:hover img { opacity: 1; transform: scale(1.03); }
.yt__play {
  position: absolute; left: 50%; top: 50%; width: 4.6rem; height: 4.6rem; margin: -2.3rem 0 0 -2.3rem;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--crimson); color: var(--white); box-shadow: 0 14px 40px -10px rgba(0,0,0,.7);
  transition: transform .35s var(--ease), background-color .35s var(--ease);
}
.yt__play svg { width: 1.7rem; height: 1.7rem; margin-left: .2rem; fill: currentColor; }
.yt a:hover .yt__play { transform: scale(1.08); background: var(--crimson-hover); }
.yt a:focus-visible { outline: 3px solid var(--amber); outline-offset: -3px; }

/* ---------- Social ---------- */

.social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; }
.social a {
  display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%;
  background: rgba(255,255,255,.08); color: var(--white); border: 1px solid rgba(255,255,255,.16);
  transition: background-color .3s var(--ease), transform .3s var(--ease), color .3s var(--ease);
}
.social a:hover { background: var(--amber); color: var(--ink); transform: translateY(-2px); }
.social a:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.social svg { width: 1.25rem; height: 1.25rem; fill: currentColor; }
.section--paper .social a, .section--sand .social a { background: var(--white); color: var(--ink); border-color: var(--line); }

/* ---------- Footer ---------- */

.site-footer { position: relative; background: var(--ink); color: rgba(244,237,230,.62); font-size: .9rem; padding: 3.5rem 0 max(2rem, env(safe-area-inset-bottom)); }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--flame); opacity: .85; }
.site-footer__top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 2rem; }
.site-footer .brand span { font-size: 1.6rem; }
.site-footer__contact { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.site-footer__mail { color: var(--amber); font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(245,165,36,.4); }
.site-footer__mail:hover { border-color: var(--amber); }
.site-footer .social { justify-content: flex-start; }
.site-footer__nav ul { list-style: none; margin: 2.2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem 1.8rem; }
.site-footer__nav a { color: rgba(244,237,230,.8); font-weight: 600; text-decoration: none; transition: color .25s var(--ease); }
.site-footer__nav a:hover { color: var(--white); }
.site-footer a:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 3px; }
.site-footer__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.1); font-size: .82rem; color: rgba(244,237,230,.5); }

/* ---------- Not found ---------- */

.not-found { text-align: center; }
.not-found .btn { margin-top: 2rem; }

/* ---------- Reveal on scroll ---------- */

/* An animation (not a transition) so cards keep their own hover transitions afterwards. */
.js-reveal .reveal { opacity: 0; animation-duration: 1s; animation-timing-function: var(--ease); animation-fill-mode: backwards; }
.js-reveal .reveal.is-visible { opacity: 1; animation-name: reveal-in; }
@keyframes reveal-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.card.reveal:nth-child(3n+2), .gallery .reveal:nth-child(4n+2) { animation-delay: .08s; }
.card.reveal:nth-child(3n), .gallery .reveal:nth-child(4n+3) { animation-delay: .16s; }
.gallery .reveal:nth-child(4n) { animation-delay: .24s; }

@keyframes slow-zoom { from { transform: scale(1.12); } to { transform: scale(1); } }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .cards, .cards--4 { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  body { font-size: 1rem; }
  .container, .container--narrow { width: calc(100% - 2.5rem); }
  .topbar { font-size: .74rem; }
  .brand span { font-size: 1.3rem; }
  .brand img { width: 2.1rem; height: 2.1rem; }
  .page-hero { min-height: 26rem; }
  .page-hero .btn { width: 100%; }
  .cards, .cards--2, .cards--4 { grid-template-columns: 1fr; gap: 1.1rem; }
  .card.reveal:nth-child(n), .gallery .reveal:nth-child(n) { animation-delay: 0s; }
  .gallery { gap: .9rem; }
  .gallery figcaption { font-size: 1.15rem; }
  .actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
