@import url('fonts.css');

/* ==========================================================================
   Grace Church Stafford — site stylesheet
   ========================================================================== */

:root {
  /* Brand colours */
  --brand: #003AA5;
  --brand-bright: #2A62D8;
  --brand-deep: #00205E;
  --night: #0A1433;
  --accent: #F99B00;
  --accent-soft: #FFF1D6;

  /* Neutrals */
  --paper: #FAF7F1;
  --sky: #EDF2FC;
  --white: #ffffff;
  --ink: #131829;
  --muted: #555C70;
  --line: #E4DFD4;

  /* Type */
  --font-heading: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Figtree', system-ui, sans-serif;

  /* Spacing and shape */
  --wrap: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-space: clamp(4.5rem, 9vw, 8rem);
  --radius: 22px;
  --radius-sm: 12px;
  --shadow: 0 18px 40px -18px rgba(10, 20, 51, 0.35);
  --shadow-soft: 0 10px 30px -12px rgba(10, 20, 51, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 84px;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img,
video,
iframe {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  color: inherit;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 6.2vw, 5.25rem); line-height: 1.02; letter-spacing: -0.025em; }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
h3 { font-size: clamp(1.4rem, 2.2vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
  margin: 0 0 1.1em;
  text-wrap: pretty;
}

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--brand-bright);
}

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

strong {
  font-weight: 700;
}

.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;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: var(--night);
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Layout helpers ---------- */

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow {
  max-width: calc(820px + var(--gutter) * 2);
}

.section {
  padding-block: var(--section-space);
  position: relative;
}

.section--tight {
  padding-block: calc(var(--section-space) * 0.6);
}

.section--paper { background: var(--paper); }
.section--sky { background: var(--sky); }

.section--dark {
  background: var(--brand-deep);
  color: var(--white);
}

.section--brand {
  background: var(--brand);
  color: var(--white);
}

.section--dark a:not(.btn),
.section--brand a:not(.btn) {
  color: var(--white);
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head--center .title::after {
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.1rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
}

.eyebrow::before {
  content: '';
  width: 2rem;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.section--dark .eyebrow,
.section--brand .eyebrow,
.hero .eyebrow,
.page-hero .eyebrow {
  color: var(--accent);
}

.title {
  position: relative;
}

/* Hand-drawn underline beneath section titles (uses the site's underline artwork) */
.title::after {
  content: '';
  display: block;
  width: 7rem;
  height: 0.55rem;
  margin-top: 0.9rem;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 126.8 4.71'%3E%3Cpath d='M0,4.71C26.35,2.2,52.79.78,79.24.16c13.23-.2,26.5-.4,39.71.71,2.64.25,5.29.5,7.85,1.2-2.6-.49-5.25-.55-7.89-.67C80.06,1.14,38.89,4.03,0,4.71h0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 126.8 4.71'%3E%3Cpath d='M0,4.71C26.35,2.2,52.79.78,79.24.16c13.23-.2,26.5-.4,39.71.71,2.64.25,5.29.5,7.85,1.2-2.6-.49-5.25-.55-7.89-.67C80.06,1.14,38.89,4.03,0,4.71h0Z'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  transform-origin: left center;
}

.lead {
  font-size: clamp(1.15rem, 1.6vw, 1.3rem);
  line-height: 1.6;
  color: var(--muted);
}

.section--dark .lead,
.section--brand .lead,
.page-hero .lead {
  color: rgba(255, 255, 255, 0.82);
}

.accent-text {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}

/* Bible references within running text: set apart in the heading font so paragraphs read more easily */
.bible-ref {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 0.94em;
  color: var(--brand);
  opacity: 0.85;
}

.stack > * + * {
  margin-top: 1rem;
}

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

.btn {
  --btn-bg: var(--brand);
  --btn-fg: var(--white);
  --btn-border: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.6rem;
  border: 2px solid var(--btn-border);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.35s var(--ease), background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.35s var(--ease);
}

.btn::after {
  content: '→';
  font-weight: 400;
  transition: transform 0.35s var(--ease);
}

.btn:hover {
  color: var(--btn-fg);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn:hover::after {
  transform: translateX(4px);
}

.btn--accent {
  --btn-bg: var(--accent);
  --btn-fg: var(--night);
  --btn-border: var(--accent);
}

.btn--accent:hover {
  --btn-bg: #ffb02e;
  --btn-border: #ffb02e;
}

.btn--brand:hover {
  --btn-bg: var(--brand-bright);
  --btn-border: var(--brand-bright);
}

.btn--outline-light {
  --btn-bg: transparent;
  --btn-fg: var(--white);
  --btn-border: rgba(255, 255, 255, 0.55);
}

.btn--outline-light:hover {
  --btn-bg: var(--white);
  --btn-fg: var(--night);
  --btn-border: var(--white);
}

.btn--outline {
  --btn-bg: transparent;
  --btn-fg: var(--brand);
  --btn-border: var(--brand);
}

.btn--outline:hover {
  --btn-bg: var(--brand);
  --btn-fg: var(--white);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  text-decoration: none;
}

.text-link::after {
  content: '→';
  transition: transform 0.3s var(--ease);
}

.text-link:hover::after {
  transform: translateX(4px);
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  color: var(--white);
  background: rgba(0, 24, 72, 0.82);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: background-color 0.4s ease, box-shadow 0.4s ease, height 0.4s var(--ease);
}

.site-header.is-top {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}

.site-header.is-scrolled {
  --header-h: 70px;
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--white);
  text-decoration: none;
  flex-shrink: 0;
}

.brand__mark {
  width: 46px;
  transition: transform 0.5s var(--ease);
}

.brand__word {
  width: 118px;
}

.brand:hover .brand__mark {
  transform: rotate(-6deg) scale(1.05);
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__link {
  position: relative;
  display: block;
  padding: 0.55rem 0.85rem;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
}

.nav__link::after {
  content: '';
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.3rem;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.nav__link:hover,
.nav__link[aria-current='page'] {
  color: var(--white);
}

.nav__link:hover::after,
.nav__link[aria-current='page']::after {
  transform: scaleX(1);
}

.nav__cta {
  margin-left: 0.6rem;
  padding: 0.75rem 1.3rem;
  font-size: 0.95rem;
}

.nav-toggle {
  display: none;
  position: relative;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  cursor: pointer;
}

.nav-toggle span {
  position: absolute;
  left: 14px;
  right: 14px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.2s ease;
}

.nav-toggle span:nth-child(1) { top: 17px; }
.nav-toggle span:nth-child(2) { top: 23px; }
.nav-toggle span:nth-child(3) { top: 29px; }

.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
  .js .nav-toggle {
    display: block;
    z-index: 2;
  }

  .js .nav {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--night);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
  }

  .js .nav-open .nav {
    opacity: 1;
    visibility: visible;
  }

  .js .nav__list {
    flex-direction: column;
    gap: 0.5rem;
  }

  .js .nav__list li {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.5s var(--ease);
  }

  .js .nav-open .nav__list li {
    opacity: 1;
    transform: none;
  }

  .js .nav-open .nav__list li:nth-child(2) { transition-delay: 0.04s; }
  .js .nav-open .nav__list li:nth-child(3) { transition-delay: 0.08s; }
  .js .nav-open .nav__list li:nth-child(4) { transition-delay: 0.12s; }
  .js .nav-open .nav__list li:nth-child(5) { transition-delay: 0.16s; }
  .js .nav-open .nav__list li:nth-child(6) { transition-delay: 0.2s; }

  .js .nav__link {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 500;
  }

  .js .nav__cta {
    margin: 1rem 0 0;
    font-size: 1.05rem;
  }

  /* Without the script, the menu simply wraps below the logo */
  html:not(.js) .site-header {
    position: absolute;
    height: auto;
    padding-block: 0.75rem;
  }

  html:not(.js) .header-inner {
    flex-wrap: wrap;
  }

  html:not(.js) .nav__list {
    flex-wrap: wrap;
  }
}

body.menu-locked {
  overflow: hidden;
}

/* The blur would trap the full-screen menu inside the header bar, so drop it while open */
.site-header.nav-open {
  background: var(--night);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.nav-open .brand {
  position: relative;
  z-index: 2;
}

/* ---------- Home hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  background: var(--night);
  overflow: hidden;
  isolation: isolate;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(10, 20, 51, 0.55) 0%, rgba(10, 20, 51, 0) 30%),
    linear-gradient(90deg, rgba(0, 32, 94, 0.9) 0%, rgba(0, 32, 94, 0.55) 45%, rgba(0, 32, 94, 0.1) 100%),
    linear-gradient(0deg, rgba(10, 20, 51, 0.85) 0%, rgba(10, 20, 51, 0) 45%);
}

.hero__content {
  padding-top: calc(var(--header-h) + 3rem);
  padding-bottom: clamp(3.5rem, 8vh, 6rem);
}

.hero h1 {
  max-width: 15ch;
  margin-bottom: 1.5rem;
}

.hero__lead {
  max-width: 34rem;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  color: rgba(255, 255, 255, 0.85);
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  margin: 3rem 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  list-style: none;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
}

.hero__facts strong {
  display: block;
  color: var(--white);
  font-size: 1.05rem;
}

.scroll-cue {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(3.5rem, 8vh, 6rem);
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  color: var(--white);
  text-decoration: none;
  font-size: 1.3rem;
}

.scroll-cue:hover {
  color: var(--night);
  background: var(--white);
}

@media (max-width: 700px) {
  .scroll-cue {
    display: none;
  }
}

/* ---------- Inner page hero ---------- */

.page-hero {
  position: relative;
  padding: calc(var(--header-h) + clamp(4rem, 9vw, 7rem)) 0 clamp(4rem, 8vw, 6.5rem);
  color: var(--white);
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(42, 98, 216, 0.55) 0%, rgba(42, 98, 216, 0) 60%),
    radial-gradient(60% 90% at 0% 100%, rgba(249, 155, 0, 0.16) 0%, rgba(249, 155, 0, 0) 60%),
    var(--brand-deep);
  overflow: hidden;
  isolation: isolate;
}

.page-hero::after {
  content: '';
  position: absolute;
  right: -4%;
  bottom: -18%;
  z-index: -1;
  width: min(46vw, 520px);
  aspect-ratio: 333.76 / 261.31;
  background: url('images/logo-mark.svg') no-repeat center / contain;
  opacity: 0.06;
}

.page-hero h1 {
  max-width: 20ch;
}

.page-hero .lead {
  max-width: 38rem;
  margin-bottom: 0;
}

/* ---------- Split layouts ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}

.split--reverse .split__media {
  order: 2;
}

.split--top {
  align-items: start;
}

@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
  }

  .split--reverse .split__media {
    order: 0;
  }
}

.media {
  position: relative;
  margin: 0;
}

.media::before {
  content: '';
  position: absolute;
  inset: 1.5rem -1.5rem -1.5rem 1.5rem;
  z-index: 0;
  border-radius: var(--radius);
  background: var(--sky);
}

.media--accent::before {
  background: var(--accent-soft);
}

.media--left::before {
  inset: 1.5rem 1.5rem -1.5rem -1.5rem;
}

.section--paper .media::before { background: var(--white); }
.section--dark .media::before,
.section--brand .media::before { background: rgba(255, 255, 255, 0.08); }

.media__frame {
  position: relative;
  z-index: 1;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.media__frame img {
  width: 100%;
  aspect-ratio: var(--ratio, 4 / 3);
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}

.media:hover .media__frame img {
  transform: scale(1.04);
}

.lead + .media {
  margin-top: 2.5rem;
}

.media figcaption {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.section--dark .media figcaption { color: rgba(255, 255, 255, 0.7); }

@media (max-width: 860px) {
  .media::before {
    inset: 1rem -0.75rem -1rem 1rem;
  }

  .media--left::before {
    inset: 1rem 1rem -1rem -0.75rem;
  }
}

/* ---------- Service times ---------- */

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.service-card {
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.service-card h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
  font-size: 1.35rem;
}

.service-card__time {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand);
  white-space: nowrap;
}

.details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.45rem 1.25rem;
  margin: 0;
  font-size: 0.97rem;
}

.details dt {
  font-weight: 700;
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-top: 0.2em;
}

.details dd {
  margin: 0;
}

.section--dark .details dt,
.section--brand .details dt {
  color: var(--accent);
}

/* ---------- Info / address card ---------- */

.info-card {
  padding: clamp(1.75rem, 3vw, 2.5rem);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.info-card h3 {
  font-size: 1.4rem;
}

.info-card address {
  font-style: normal;
  font-size: 1.15rem;
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.note {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  font-size: 0.95rem;
  line-height: 1.55;
}

.note::before {
  content: '!';
  flex: none;
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--night);
  font-weight: 800;
  font-size: 0.85rem;
}

.w3w {
  margin: 1.25rem 0 0;
  font-weight: 600;
}

.w3w span {
  color: #E11F26;
  font-weight: 800;
}

/* ---------- Event cards (scrolling row) ---------- */

.track-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.track-head .section-head {
  margin-bottom: 0;
}

.track-controls {
  display: none;
  gap: 0.6rem;
}

.js .track-controls {
  display: flex;
}

.track-btn {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 2px solid var(--brand);
  border-radius: 50%;
  background: transparent;
  color: var(--brand);
  font-size: 1.2rem;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.3s var(--ease);
}

.track-btn:hover {
  background: var(--brand);
  color: var(--white);
  transform: scale(1.06);
}

.track-btn:disabled {
  opacity: 0.35;
  pointer-events: none;
}

.card-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, calc((100% - 3 * 1.5rem) / 3.25));
  gap: 1.5rem;
  margin: 0;
  padding: 0.5rem 0 2rem;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--brand) transparent;
}

.card-track > li {
  scroll-snap-align: start;
}

@media (max-width: 700px) {
  .card-track {
    grid-auto-columns: 82%;
  }
}

.event-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.event-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.event-card__img {
  position: relative;
  overflow: hidden;
}

.event-card__img img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 1s var(--ease);
}

.event-card:hover .event-card__img img {
  transform: scale(1.06);
}

.event-card__day {
  position: absolute;
  left: 1rem;
  top: 1rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--night);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.5rem 1.5rem 1.6rem;
}

.event-card h3 {
  font-size: 1.45rem;
  margin-bottom: 0.5rem;
}

.event-card p {
  color: var(--muted);
  font-size: 0.98rem;
}

.event-card .text-link {
  margin-top: auto;
}

/* ---------- Grid of cards ---------- */

.grid {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

.feature {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.5rem;
  align-items: start;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.feature img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

/* Keeps the top of a photo (someone's head) in view when it is cropped */
.feature img.focus-top {
  object-position: 50% 0;
}

.feature h3 {
  font-size: 1.35rem;
  margin: 0.4rem 0 0.6rem;
}

.feature p {
  font-size: 0.98rem;
  color: var(--muted);
}

.feature p:last-child {
  margin-bottom: 0;
}

@media (max-width: 560px) {
  .feature {
    grid-template-columns: 1fr;
  }

  .feature img {
    aspect-ratio: 16 / 10;
  }
}

.card {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
  border-color: transparent;
}

.card h3 {
  font-size: 1.35rem;
}

.card p {
  color: var(--muted);
  font-size: 0.98rem;
}

.card__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 1.25rem;
  border-radius: 14px;
  background: var(--sky);
  color: var(--brand);
}

.card__icon svg {
  width: 26px;
  height: 26px;
}

/* ---------- Testimonial ---------- */

.quote {
  margin: 0;
}

.quote blockquote {
  margin: 0 0 1.5rem;
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  line-height: 1.5;
  font-weight: 400;
}

.quote blockquote::before {
  content: '“';
  display: block;
  height: 0.55em;
  font-size: 4.5em;
  line-height: 1;
  color: var(--accent);
}

.quote blockquote p + p {
  margin-top: 1rem;
}

.quote figcaption {
  font-weight: 700;
}

/* ---------- Scripture band ---------- */

.scripture {
  position: relative;
  padding-block: clamp(6rem, 14vw, 10rem);
  color: var(--white);
  text-align: center;
  background: var(--night);
  overflow: hidden;
  isolation: isolate;
}

.scripture__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.scripture::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 32, 94, 0.82), rgba(10, 20, 51, 0.88));
}

.scripture__label {
  width: 190px;
  margin: 0 auto 2rem;
}

.scripture blockquote {
  max-width: 900px;
  margin: 0 auto;
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.35;
}

.scripture blockquote p {
  margin-bottom: 1.5rem;
}

.scripture sup {
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.45em;
  font-weight: 700;
  color: var(--accent);
  margin-right: 0.15em;
}

.scripture cite {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Call to action band ---------- */

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding: clamp(2.5rem, 5vw, 4rem);
  border-radius: calc(var(--radius) + 8px);
  color: var(--white);
  background:
    radial-gradient(70% 140% at 100% 0%, rgba(42, 98, 216, 0.9) 0%, rgba(42, 98, 216, 0) 70%),
    var(--brand);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.cta h2 {
  max-width: 20ch;
  margin: 0;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
}

.cta .btn-row {
  margin: 0;
}

/* ---------- People ---------- */

.person {
  display: flex;
  flex-direction: column;
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.person:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.person__photo {
  width: 120px;
  height: 120px;
  margin-bottom: 1.5rem;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 6px var(--sky);
}

.person__role {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
}

.person h3 {
  margin-bottom: 1rem;
}

.person p {
  font-size: 0.98rem;
  color: var(--muted);
}

/* ---------- Event detail sections ---------- */

.event-detail .details {
  margin-top: 1.75rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-sm);
  background: var(--sky);
}

.section--paper .event-detail .details {
  background: var(--white);
}

/* Two pictures side by side on top, the third full width below */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.gallery a:nth-child(3) {
  grid-column: 1 / -1;
}

.gallery a:nth-child(3) img {
  aspect-ratio: 16 / 9;
}

.gallery a {
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.gallery img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 1s var(--ease);
}

.gallery a:hover img {
  transform: scale(1.06);
}


/* ---------- FAQ ---------- */

.faq {
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.4rem 0;
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  flex: none;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--sky);
  color: var(--brand);
  font-family: var(--font-body);
  font-size: 1.35rem;
  font-weight: 500;
  transition: transform 0.4s var(--ease), background-color 0.3s ease, color 0.3s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
  background: var(--brand);
  color: var(--white);
}

.faq summary:hover {
  color: var(--brand);
}

.faq details p {
  margin: 0;
  padding: 0 3.5rem 1.5rem 0;
  color: var(--muted);
}

/* Opening animation: the answer area glides open and the text rises into place.
   Browsers without ::details-content support still get the text animation. */
@media (prefers-reduced-motion: no-preference) {
  .faq {
    interpolate-size: allow-keywords;
  }

  .faq details::details-content {
    block-size: 0;
    overflow: hidden;
    transition: block-size 0.5s var(--ease), content-visibility 0.5s allow-discrete;
  }

  .faq details[open]::details-content {
    block-size: auto;
  }

  .faq details[open] p {
    animation: answer-in 0.55s var(--ease) both;
  }

  .faq summary {
    transition: color 0.25s ease, padding-left 0.35s var(--ease);
  }

  .faq details[open] summary {
    color: var(--brand);
    padding-left: 0.5rem;
  }
}

@keyframes answer-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Contact ---------- */

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact-card h3 {
  margin-bottom: 0.4rem;
}

.contact-card p {
  margin: 0;
}

.contact-card a {
  font-weight: 700;
  word-break: break-word;
}

.big-email {
  display: inline-block;
  margin: 0.5rem 0 1.5rem;
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2.2vw, 1.7rem);
  font-weight: 500;
  color: var(--white);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  word-break: break-word;
}

.big-email:hover {
  color: var(--accent);
}

/* ---------- Contact form ---------- */

.contact-form {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field label {
  font-weight: 700;
  font-size: 0.95rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

.field textarea {
  resize: vertical;
  min-height: 9rem;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--white);
}

.contact-form .btn {
  justify-self: start;
}

.contact-form__note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.section--brand .contact-form a:not(.btn) {
  color: var(--brand);
}

/* Honeypot field: kept off-screen so only bots fill it in */
.contact-form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form__alt {
  margin: 1.75rem 0 0;
}

.contact-form__alt .big-email {
  margin-bottom: 0;
}

.map {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--sky);
}

.map iframe {
  width: 100%;
  height: clamp(320px, 45vw, 480px);
  border: 0;
}

/* ---------- Long-form text (handbook, testimony, privacy) ---------- */

.prose {
  max-width: 72ch;
  font-size: 1.08rem;
}

.prose h2 {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.prose h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.prose h3 {
  margin-top: 2.25rem;
  font-size: 1.4rem;
  color: var(--brand);
}

.prose ol,
.prose ul {
  padding-left: 1.5rem;
  margin: 0 0 1.25rem;
}

.prose li {
  margin-bottom: 0.6rem;
  padding-left: 0.35rem;
}

.prose li::marker {
  color: var(--brand);
  font-weight: 700;
}

.prose ol ol {
  list-style-type: lower-alpha;
  margin-top: 0.6rem;
}

.prose ol ol ol {
  list-style-type: lower-roman;
}

.prose li > p {
  margin-bottom: 0.5rem;
}

.prose strong {
  color: var(--ink);
}

.prose blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--accent);
  background: var(--paper);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.prose .dropcap::first-letter {
  float: left;
  margin: 0.08em 0.1em 0 0;
  font-family: var(--font-heading);
  font-size: 4.2em;
  font-weight: 600;
  line-height: 0.8;
  color: var(--brand);
}

.aside-note {
  font-size: 0.95rem;
  color: var(--muted);
}

/* Handbook: contents list beside the text */
.with-toc {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.toc {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--paper);
}

.toc p {
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.toc li {
  counter-increment: toc;
}

.toc a {
  display: flex;
  gap: 0.6rem;
  padding: 0.5rem 0;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
  text-decoration: none;
  color: var(--ink);
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--accent);
  font-weight: 800;
}

.toc a:hover,
.toc a.is-active {
  color: var(--brand);
}

@media (max-width: 900px) {
  .with-toc {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
  }
}

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

.site-footer {
  padding-top: clamp(4rem, 8vw, 6rem);
  color: rgba(255, 255, 255, 0.75);
  background: var(--night);
  font-size: 0.97rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
}

@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand .brand {
  margin-bottom: 1.5rem;
}

.site-footer h2 {
  margin-bottom: 1.1rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.footer-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-list li + li {
  margin-top: 0.55rem;
}

.site-footer address {
  font-style: normal;
  margin-bottom: 1rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-block: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   Motion — only for visitors who haven't asked for reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  /* Hero text rises in on page load */
  .hero__content > *,
  .page-hero .wrap > * {
    animation: rise 1s var(--ease) both;
  }

  .hero__content > :nth-child(2),
  .page-hero .wrap > :nth-child(2) { animation-delay: 0.12s; }
  .hero__content > :nth-child(3),
  .page-hero .wrap > :nth-child(3) { animation-delay: 0.24s; }
  .hero__content > :nth-child(4) { animation-delay: 0.36s; }
  .hero__content > :nth-child(5) { animation-delay: 0.48s; }

  .scroll-cue {
    animation: bob 2.4s ease-in-out infinite;
  }

  .page-hero::after {
    animation: drift 18s ease-in-out infinite alternate;
  }

  /* Scroll-in reveals: the script adds .reveal-ready to <html>, so content is
     never hidden if the script doesn't run. */
  .reveal-ready [data-reveal] {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
    transition-delay: calc(var(--d, 0) * 0.1s);
  }

  .reveal-ready [data-reveal='left'] { transform: translateX(-40px); }
  .reveal-ready [data-reveal='right'] { transform: translateX(40px); }
  .reveal-ready [data-reveal='zoom'] { transform: scale(0.94); }

  .reveal-ready [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }

  /* Underlines draw themselves in as titles appear */
  .reveal-ready .title::after {
    transform: scaleX(0);
    transition: transform 1s var(--ease) 0.35s;
  }

  .reveal-ready .is-visible .title::after,
  .reveal-ready .title.is-visible::after {
    transform: scaleX(1);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

@keyframes drift {
  from { transform: translate(0, 0) rotate(0deg); }
  to { transform: translate(-30px, -20px) rotate(-4deg); }
}

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