@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800;900&display=swap");

:root {
  --blue: #00c1de;
  --blue-dark: #0082ca;
  --purple: #8a1a9b;
  --fuchsia: #c028b9;
  --black: #222222;
  --gray-dark: #54565a;
  --gray-light: #bbbbbb;
  --gray-tint: #f6f7f9;
  --white: #ffffff;

  --gradient-brand: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 33%, var(--purple) 66%, var(--fuchsia) 100%);
  --gradient-blue: linear-gradient(135deg, var(--blue), var(--blue-dark));
  --gradient-dark: linear-gradient(180deg, rgba(34, 34, 34, 0.15), rgba(34, 34, 34, 0.85));

  --font-heading: "Montserrat", sans-serif;
  --font-body: "Montserrat", sans-serif;

  --container: 1160px;
  --radius: 999px;
  --radius-card: 20px;

  --section-pad: clamp(64px, 9vw, 128px);

  /* Semantic theme tokens (light = default). Components that are
     deliberately dark regardless of site theme — footer, info-strip,
     quicklinks-strip, .section--dark, photo-overlay text on hero/cards —
     reference the literal --black/--white/--gray-* tokens directly above,
     not these, so a dark-mode toggle never double-inverts them. */
  --bg: var(--white);
  --bg-tint: var(--gray-tint);
  --surface: var(--white);
  --text: var(--black);
  --text-muted: var(--gray-dark);
  --text-subtle: var(--gray-light);
  --border-soft: rgba(0, 0, 0, 0.06);
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.12);
  --header-bg: rgba(255, 255, 255, 0.92);
  /* Brand buttons stay solid black in both themes (locked convention) — this
     just adds a visible ring around them on dark backgrounds so they don't
     read as a void. Transparent in light mode = no visual change at all. */
  --btn-primary-border: transparent;
}

[data-theme="dark"] {
  --bg: #16181c;
  --bg-tint: #1e2126;
  --surface: #1e2126;
  --text: #f1f1f2;
  --text-muted: #b7bac1;
  --text-subtle: #888d97;
  --border-soft: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.18);
  --header-bg: rgba(20, 22, 26, 0.85);
  --btn-primary-border: rgba(255, 255, 255, 0.4);
}

/* Theme transition — deliberately scoped to just body/header, not every
   themed component: several components below (.card, .card--photo,
   .accordion-item) already declare their own `transition` shorthand for
   hover effects, and a second `transition` rule on the same element doesn't
   merge with the first — it replaces it, silently killing those hover
   transitions. Body+header covers the main visible "theme fade" moment
   without that risk. */
body,
.site-header {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
  body,
  .site-header {
    transition: none;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* Never break a word with a hyphen at the line wrap — always move the
     whole word down instead, everywhere on the site. */
  -webkit-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* Inline text links within body copy (not nav/footer/buttons) */
section p a,
section li a {
  font-weight: 700;
  color: var(--blue-dark);
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 900;
  line-height: 1.05;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }

p {
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0 0 1em;
  max-width: 62ch;
}

.eyebrow {
  display: inline-block;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.8rem;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.75em;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-pad) 0;
}

.section--tint {
  background: var(--bg-tint);
}

/* Dark section — gives a section (e.g. discipleship identity) a
   deliberately different visual environment from the light sections around
   it, echoing .info-strip/.quicklinks-strip's black elsewhere on the site
   rather than inventing a new dark treatment. */
.section--dark {
  background: var(--black);
  color: rgba(255, 255, 255, 0.85);
}

.section--dark h2,
.section--dark h3 {
  color: var(--white);
}

.section--dark p {
  color: rgba(255, 255, 255, 0.72);
}

.section--dark .badge {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

/* Four numbered culture "drivers" — introduced as a distinct row beneath
   the discipleship split, revealed on scroll same as everything else. */
.drivers-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.driver-item {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.driver-num {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 0.9rem;
  color: var(--blue);
}

.driver-label {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--white);
}

@media (max-width: 900px) {
  .drivers-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1.5rem;
  }
}

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

.driver-item:nth-child(2) { transition-delay: 0.08s; }
.driver-item:nth-child(3) { transition-delay: 0.16s; }
.driver-item:nth-child(4) { transition-delay: 0.24s; }

.next-step-row:nth-child(2) { transition-delay: 0.06s; }
.next-step-row:nth-child(3) { transition-delay: 0.12s; }
.next-step-row:nth-child(4) { transition-delay: 0.18s; }

.section-head {
  max-width: 640px;
  margin-bottom: 3rem;
}

.section-head p {
  max-width: 60ch;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.9em 1.8em;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--black);
  color: var(--white);
  border-color: var(--btn-primary-border);
}

.btn-primary:hover {
  background: var(--blue-dark);
}

.hero .btn-primary {
  border-color: rgba(255, 255, 255, 0.85);
}

.hero .btn-primary:hover {
  border-color: var(--blue-dark);
}

.btn-outline {
  background: transparent;
  border-color: var(--text);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--blue-dark);
  color: var(--blue-dark);
}

.btn-outline-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--white);
}

.btn-outline-light:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.12);
}

.btn-sm {
  padding: 0.6em 1.3em;
  font-size: 0.85rem;
}

.btn-accent {
  background: var(--blue);
  color: var(--white);
}

.btn-accent:hover {
  background: var(--blue-dark);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.site-header .logo {
  display: inline-flex;
}

.site-header .logo img {
  height: 34px;
}

/* The default logo's wordmark is near-black — invisible on a dark header.
   Swap to the white variant (already used successfully in the footer) via
   plain CSS display toggling on [data-theme], not a JS-driven src swap, so
   the correct logo is already right the instant the theme-init script
   above sets the attribute — no flash, no dependency on main.js timing. */
.logo-img--dark {
  display: none;
}

[data-theme="dark"] .logo-img--light {
  display: none;
}

[data-theme="dark"] .logo-img--dark {
  display: block;
}

/* Dark mode toggle */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: none;
  cursor: pointer;
  color: var(--text);
  flex-shrink: 0;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.theme-toggle:hover {
  border-color: var(--blue-dark);
  color: var(--blue-dark);
}

.theme-toggle-icon {
  width: 18px;
  height: 18px;
}

.theme-toggle-icon--moon {
  display: none;
}

[data-theme="dark"] .theme-toggle-icon--sun {
  display: none;
}

[data-theme="dark"] .theme-toggle-icon--moon {
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-weight: 700;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--blue-dark);
}

.nav-links .external::after {
  content: "↗";
  font-size: 0.7em;
  margin-left: 0.2em;
  vertical-align: super;
  opacity: 0.6;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.82rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--text);
  border-radius: 50%;
  cursor: pointer;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
}

.nav-toggle span {
  width: 16px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.is-active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.site-nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 99;
  flex-direction: column;
  padding: calc(84px + 2rem) 24px 2rem;
  gap: 1.5rem;
  overflow-y: auto;
}

.site-nav-mobile.is-open {
  display: flex;
}

body.nav-open {
  overflow: hidden;
}

.site-nav-mobile a {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.4rem;
}

.site-nav-mobile .btn {
  align-self: flex-start;
  margin-top: 1rem;
}

/* Hero */

.hero {
  position: relative;
  min-height: 84vh;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  background-size: cover;
  background-position: center;
  /* .hero-bg's scale(1.08) (for parallax headroom) visually extends past
     the section's own box; without this it inflates the page's horizontal
     scrollable area site-wide, not just within the hero. */
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-dark);
  z-index: 1;
}

/* Extra-dark overlay for heroes that need stronger text contrast (e.g. a
   busy or bright photo) without changing every hero site-wide. */
.hero--darker::before {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.88));
}

.hero .container {
  position: relative;
  padding-bottom: 72px;
  z-index: 2;
  /* .hero is display:flex, making this its flex item — flex items default
     to min-width:auto, which blocks normal text wrapping and lets long
     headings overflow past the viewport edge instead of shrinking. */
  min-width: 0;
}

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

/* Mosaic of real cover-art tiles used as a hero background (e.g. RightNow
   Media page), same stacking role as .hero-video. */
.hero-mosaic {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
  overflow: hidden;
}

.hero-mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 700px) {
  .hero-mosaic {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
  }
  .hero-mosaic img:nth-child(n+7) {
    display: none;
  }
}

/* Orange-tinted dark overlay, for heroes built from busy/bright imagery
   (e.g. third-party screenshots or cover art) that need brand-colored
   contrast rather than plain black. */
.hero--orange::before {
  background: linear-gradient(160deg, rgba(210, 88, 21, 0.6), rgba(90, 34, 8, 0.9));
}

.hero-content {
  max-width: 720px;
}

.hero p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.15rem;
  max-width: 50ch;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.hero--compact {
  min-height: 46vh;
}

/* Homepage hero only — an oversized, cinematic treatment. Distinct from the
   plain .hero used on every interior page, which stays untouched. */
.hero--epic {
  min-height: 94vh;
}

.hero--epic h1 {
  font-size: clamp(3rem, 8vw, 6.8rem);
  max-width: 17ch;
}

.hero--epic .hero-content {
  max-width: 820px;
}

/* Background photo layer, separate from .hero itself, so it can move
   independently (subtle parallax) from the text/CTAs stacked on top of it.
   Scaled up 8% at rest so a small scroll-driven translate never exposes an
   edge. JS-driven; with no JS it simply sits still — never breaks. */
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
  transform: scale(1.08);
  transition: opacity 0.5s ease;
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg {
    transform: none;
  }
}

/* Masked line reveal — a line of text rises out of an overflow-hidden mask
   rather than simply fading. Reuses the same IntersectionObserver/.reveal
   trigger as the rest of the site (see main.js); .is-visible is added once,
   on first scroll into view. */
.mask-reveal {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}

.mask-reveal > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.mask-reveal.is-visible > span {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .mask-reveal > span {
    transform: none;
    transition: none;
  }
}

/* Triangle accents */

.triangle-accent--solid {
  position: absolute;
  z-index: 1;
  width: min(46vw, 520px);
  aspect-ratio: 1 / 1.08;
  background: var(--gradient-brand);
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  opacity: 0.5;
  mix-blend-mode: screen;
  pointer-events: none;
}

.triangle-accent--outline {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

/* Hero scroll indicator */

.hero-scroll {
  position: absolute;
  left: 28px;
  bottom: 48px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  writing-mode: vertical-rl;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.hero-scroll .dots {
  writing-mode: horizontal-tb;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-scroll .dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.hero-scroll .dots span:first-child {
  background: var(--white);
}

/* Diagonal section transition */

.section-diagonal {
  position: relative;
  clip-path: polygon(0 48px, 100% 0, 100% 100%, 0 100%);
  margin-top: -48px;
  padding-top: calc(var(--section-pad) + 48px);
  background: var(--bg);
}

/* Ghost heading */

.ghost-heading {
  font-size: clamp(3.2rem, 11vw, 8rem);
  font-weight: 900;
  line-height: 0.92;
  margin: 0;
}

/* The gradient-text effect has to live on the innermost span, not on
   .ghost-heading itself: .mask-reveal is display:inline-block (required so
   overflow:hidden can actually clip it), and an inline-block child doesn't
   inherit an ancestor's background-clip:text paint — it just renders with
   the inherited (transparent) color and no gradient, i.e. invisible. */
.ghost-heading .mask-reveal > span {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.ghost-section {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: center;
}

.ghost-section-copy p {
  margin-bottom: 1.25em;
}

/* "You Belong Here" — an asymmetric, architectural composition: the ghost
   heading anchors the left column, two offset portrait photos overlap into
   the right column, and the copy sits underneath the heading rather than
   in a conventional centered two-up split. */
.belong-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  column-gap: 3rem;
  row-gap: 2.5rem;
  align-items: start;
}

.belong-heading,
.belong-copy {
  grid-column: 1 / 2;
}

.belong-heading .ghost-heading {
  display: block;
}

.belong-heading .mask-reveal + .mask-reveal {
  margin-left: 0.9ch;
}

.belong-copy {
  max-width: 46ch;
}

.belong-copy p {
  max-width: none;
}

.belong-photos {
  grid-column: 2 / 3;
  grid-row: 1 / 3;
  display: flex;
  gap: 1.25rem;
  height: 100%;
  /* Grid item defaults to min-width:auto, same trap as a flex item — without
     this it refuses to shrink below its two children's combined intrinsic
     width and overflows the column (and the page) instead. */
  min-width: 0;
}

.belong-photo {
  border-radius: var(--radius-card);
  object-fit: cover;
  width: 100%;
  aspect-ratio: 3 / 4;
  min-width: 0;
}

.belong-photo--1 {
  margin-top: 3rem;
}

.belong-photo--2 {
  margin-top: -1.5rem;
}

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

  .belong-heading,
  .belong-photos,
  .belong-copy {
    grid-column: 1 / 2;
  }

  .belong-photos {
    grid-row: auto;
  }

  .belong-photo--1,
  .belong-photo--2 {
    margin-top: 0;
  }
}

/* Photo cards */

.card--photo {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: flex-end;
  color: var(--white);
}

.card--photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 0.4s ease;
}

.card--photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-dark);
  z-index: 1;
}

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

.card--photo:hover {
  transform: translateY(-4px);
}

.card-photo-body {
  position: relative;
  z-index: 2;
  padding: 1.5rem;
}

.card--photo h3 {
  color: var(--white);
  margin-bottom: 0.25em;
  font-size: 1.2rem;
}

.card--photo p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.88rem;
  margin-bottom: 0.5em;
  max-width: none;
}

.card--photo .card-photo-link {
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}

/* Feature row */

.feature-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding-bottom: 2rem;
  margin-bottom: 3rem;
}

.feature-row::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  border-radius: 2px;
  background: var(--gradient-brand);
}

.feature-row-item svg {
  width: 30px;
  height: 30px;
  color: var(--blue-dark);
  margin-bottom: 0.75rem;
}

.feature-row-item h4 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.95rem;
  margin: 0 0 0.3em;
}

.feature-row-item p {
  font-size: 0.85rem;
  margin-bottom: 0;
  max-width: none;
}

/* Carousel */

.carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card);
  aspect-ratio: 16 / 9;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}

.carousel-slide {
  flex: 0 0 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}

.carousel-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-dark);
}

.carousel-controls {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--white);
}

.carousel-counter {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.carousel-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.25);
  color: var(--white);
  cursor: pointer;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.carousel-arrow:hover {
  background: rgba(0, 0, 0, 0.5);
}

/* Accordion */

.accordion {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.accordion-item {
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  /* <button> elements don't reliably inherit the page's text color the way
     normal elements do — this was always relying on the browser's own
     default button text color, which happened to be dark and blend in on
     a white background. Dark mode exposed it: same bug as form inputs. */
  color: var(--text);
}

.accordion-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-tint);
  color: var(--blue-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.accordion-icon svg {
  width: 20px;
  height: 20px;
}

.accordion-title {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15em;
}

.accordion-title strong {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.accordion-title span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.accordion-chevron {
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.accordion-item.is-open .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 1.5rem 0 4.75rem;
}

.accordion-item.is-open .accordion-body {
  max-height: 720px;
  padding-bottom: 1.5rem;
}

.accordion-body p {
  margin-bottom: 1em;
  max-width: none;
}

.accordion-body p:last-of-type {
  margin-bottom: 0;
}

.accordion-body .cta-actions {
  margin-top: 1em;
}

/* Page intro (non-photo) header for interior pages */

.page-intro {
  padding: calc(var(--section-pad) * 0.7) 0 var(--section-pad);
  text-align: left;
}

.page-intro .eyebrow {
  margin-bottom: 1em;
}

/* Info strip (service times / address) */

.info-strip {
  background: var(--black);
  color: var(--white);
}

.info-strip .container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  padding-top: 28px;
  padding-bottom: 80px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.info-item strong {
  display: block;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.95rem;
}

.info-item span {
  color: var(--gray-light);
  font-size: 0.9rem;
}

/* Stat grid (numeric highlights on light background) */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item strong {
  display: block;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 2.25rem;
  color: var(--blue-dark);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-item span {
  color: var(--text-subtle);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1.5rem;
  }
}

/* Cards / grid */

.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface);
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(34, 34, 34, 0.25);
}

.card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.card-body {
  padding: 1.75rem;
}

.card-body h3 {
  margin-bottom: 0.4em;
}

.card-body p {
  margin-bottom: 1em;
  max-width: none;
}

/* Pastoral Care offering cards — wider, roomier than the standard .card
   so the longer descriptions don't feel cramped. */

.pastoral-offerings {
  gap: 2rem 2.5rem;
}

.pastoral-offerings .card-body {
  padding: 2.5rem;
}

.pastoral-offerings .card-body h3 {
  font-size: 1.4rem;
}

.pastoral-offerings .card-body p {
  font-size: 1.05rem;
  line-height: 1.75;
}

.card--gradient {
  background: var(--gradient-brand);
  color: var(--white);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: none;
}

/* Staff cards — photo crossfades to an alternate image on hover */

.staff-card {
  text-align: center;
}

.staff-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.staff-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.staff-photo-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.5rem;
  transition: opacity 0.35s ease;
}

.staff-photo-layer--default {
  background: var(--gradient-brand);
  opacity: 1;
}

.staff-photo-layer--alt {
  background: var(--black);
  opacity: 0;
}

.staff-card:hover .staff-photo-layer--default,
.staff-card:focus-within .staff-photo-layer--default {
  opacity: 0;
}

.staff-card:hover .staff-photo-layer--alt,
.staff-card:focus-within .staff-photo-layer--alt {
  opacity: 1;
}

.staff-initials {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 3rem;
  color: var(--white);
}

.staff-card .card-body {
  text-align: center;
}

.staff-card .card-body h3 {
  margin-bottom: 0.15em;
}

.staff-title {
  color: var(--blue-dark);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0;
}

.staff-bio {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.6em 0 0;
  max-width: none;
}

.card--gradient h3 {
  color: var(--white);
}

.card--gradient p {
  color: rgba(255, 255, 255, 0.9);
}

/* Split section (image + text) */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.split img {
  border-radius: var(--radius-card);
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

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

/* Simple photo grid (clean, no overlay text) */

.photo-grid img {
  border-radius: var(--radius-card);
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

/* Photo band with overlay text */

.photo-band {
  position: relative;
  min-height: 60vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  color: var(--white);
}

.photo-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-dark);
}

.photo-band .container {
  position: relative;
}

.photo-band h2 {
  max-width: 14ch;
}

/* Triangle accent divider */

.triangle-divider {
  height: 6px;
  background: var(--gradient-brand);
  border: none;
  margin: 0;
}

/* CTA banner */

.cta-banner {
  background: var(--gradient-brand);
  color: var(--white);
  text-align: center;
}

.cta-banner h2 {
  color: var(--white);
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.9);
  margin: 0 auto 2rem;
}

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

/* List-style content (beliefs, ways to give, etc) */

.stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.stack-item {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  border-radius: var(--radius-card);
  background: var(--bg-tint);
}

.stack-item .num {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.4rem;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  flex-shrink: 0;
}

.stack-item h3 {
  margin-bottom: 0.3em;
}

.stack-item p {
  margin-bottom: 0;
  max-width: none;
}

/* Three oversized gradient words (e.g. "What Sundays Feel Like") — reuses
   the same text-gradient technique as .eyebrow/.ghost-heading, just sized
   for a mid-page moment rather than a hero-scale statement. */
.feel-word {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.15;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Scannable fact list (e.g. "Your First Sunday") — an editorial alternative
   to a generic icon-card row, echoing the gradient accents already used for
   .eyebrow text and .stack-item numerals elsewhere on the site. */
.fact-list {
  list-style: none;
  margin: 1.75rem 0 2rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.fact-list li {
  position: relative;
  padding-left: 1.85rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.fact-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4em;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--gradient-brand);
}

.fact-list strong {
  display: block;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--text);
  margin-bottom: 0.1em;
}

/* "Find Your Next Step" — oversized horizontal rows replacing a conventional
   card grid. Each row is a single link; on desktop, hovering reveals a
   contextual photo absolutely positioned over the row. On mobile (no hover)
   the photo just sits inline below the text, revealed via the same
   scroll-reveal every other section uses. */
.next-steps {
  display: flex;
  flex-direction: column;
}

.next-step-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 0.25rem;
  border-top: 1px solid var(--border);
  color: var(--text);
  transition: padding-left 0.3s ease, border-color 0.25s ease;
}

.next-steps a.next-step-row:last-child {
  border-bottom: 1px solid var(--border);
}

.next-step-row:hover {
  padding-left: 1.25rem;
}

.next-step-num {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 0.95rem;
  color: var(--blue-dark);
  flex-shrink: 0;
  width: 2.25rem;
}

.next-step-text {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 2;
}

.next-step-label {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  line-height: 1.1;
}

.next-step-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 44ch;
  margin-bottom: 0;
}

.next-step-arrow {
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease;
}

/* Default (mobile-first, and the safe fallback for any device/browser that
   doesn't clearly support mouse hover): the photo is just a normal static
   block, always visible, flowing after the text. No absolute positioning,
   so there's nothing that can get visually "stuck" from a tap. */
.next-step-row {
  flex-wrap: wrap;
}

.next-step-desc {
  max-width: none;
}

.next-step-photo {
  position: static;
  order: 3;
  width: 100%;
  height: 42vw;
  max-height: 220px;
  border-radius: var(--radius-card);
  background-size: cover;
  background-position: center;
  margin-top: 1rem;
}

/* The absolute-positioned, reveal-on-hover treatment is gated on actual
   hover capability (not a viewport-width breakpoint) — a touch device that
   happens to report a wide viewport (or an in-app browser with unusual
   width reporting) must never get an absolutely-positioned element that
   only a real mouse can dismiss. Touch "hover" is sticky after a tap with
   nothing to move the pointer away again, which is exactly what looked
   broken: a photo stuck open, overlapping the next row. */
@media (hover: hover) and (pointer: fine) and (min-width: 901px) {
  .next-step-row {
    flex-wrap: nowrap;
  }

  .next-step-desc {
    max-width: 44ch;
  }

  .next-step-row:hover {
    padding-left: 1.25rem;
  }

  .next-step-row:hover .next-step-arrow {
    transform: translate(4px, -4px);
  }

  .next-step-photo {
    position: absolute;
    top: 50%;
    right: 1.5rem;
    transform: translateY(-50%) scale(0.94);
    width: 200px;
    height: 140px;
    max-height: none;
    opacity: 0;
    z-index: 1;
    pointer-events: none;
    box-shadow: 0 30px 50px -18px rgba(34, 34, 34, 0.35);
    margin-top: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
  }

  .next-step-row:hover .next-step-photo,
  .next-step-row:focus-visible .next-step-photo {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

@media (hover: hover) and (pointer: fine) and (min-width: 901px) and (max-width: 1180px) {
  .next-step-photo {
    width: 150px;
    height: 104px;
    right: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .next-step-row,
  .next-step-arrow,
  .next-step-photo {
    transition: none;
  }
}

/* Oversized single-word heading (e.g. "Watch") — a lighter-weight sibling to
   .ghost-heading; solid, not gradient, so it doesn't compete with the
   site's one gradient-text signature moment ("You Belong Here"). */
.word-heading {
  font-size: clamp(3.2rem, 9vw, 5.5rem);
  line-height: 0.95;
  margin-bottom: 0.25em;
}

.badge {
  display: inline-block;
  padding: 0.3em 0.9em;
  border-radius: var(--radius);
  background: rgba(0, 193, 222, 0.12);
  color: var(--blue-dark);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1em;
}

/* Simple tag list (e.g. serve team categories) */

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tag-list .tag {
  padding: 0.6em 1.25em;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  font-weight: 600;
  font-size: 0.9rem;
}

/* Footer */

.site-footer {
  background: var(--black);
  color: var(--gray-light);
  padding: var(--section-pad) 0 2rem;
}

/* Oversized closing statement, site-wide, above the functional footer
   columns — the mission gets the last (biggest) word on every page. */
.footer-statement {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(2rem, 6vw, 4.4rem);
  line-height: 1.05;
  color: var(--white);
  max-width: 18ch;
  margin: 0 0 3.5rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
}

.footer-top .logo img {
  height: 30px;
  margin-bottom: 1.25rem;
}

.footer-top p {
  color: var(--gray-light);
  font-size: 0.9rem;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.1em;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer-col a {
  color: var(--gray-light);
  font-size: 0.92rem;
}

.footer-col a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--gray-dark);
}

/* Responsive */

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

@media (max-width: 900px) {
  .nav-links,
  .header-actions .btn {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .header-actions {
    gap: 0.5rem;
  }

  .split,
  .grid-2,
  .grid-3,
  .grid-4,
  .ghost-section,
  .feature-row {
    grid-template-columns: 1fr;
  }

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

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  .feature-row {
    gap: 1.5rem;
  }

  .hero-scroll {
    display: none;
  }

  .section-diagonal {
    clip-path: polygon(0 24px, 100% 0, 100% 100%, 0 100%);
    margin-top: -24px;
    padding-top: calc(var(--section-pad) + 24px);
  }
}

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

  .info-strip .container {
    flex-direction: column;
    gap: 0.75rem;
  }

  .hero {
    align-items: center;
    text-align: left;
  }
}

/* Quicklinks strip */

.quicklinks-strip {
  background: var(--black);
}

.quicklinks-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  padding: 2.5rem 24px;
}

.quicklinks-row--2 {
  grid-template-columns: repeat(2, 1fr);
}

.quicklink {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.75rem 2rem;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-card);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.quicklink:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.7);
}

.quicklink-label {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.quicklink-desc {
  font-size: 0.85rem;
  color: var(--gray-light);
}

@media (max-width: 900px) {
  .quicklinks-row {
    grid-template-columns: 1fr;
    padding: 2rem 24px;
  }
}

/* Scroll reveal */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease-out, transform 0.9s ease-out;
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Media library (sermons page) */

.media-type-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.media-type-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55em 1.1em;
  border-radius: var(--radius);
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.media-type-toggle input {
  accent-color: var(--blue-dark);
  width: 1rem;
  height: 1rem;
}

.media-type-toggle:has(input:not(:checked)) {
  opacity: 0.45;
}

.media-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
  align-items: center;
}

.media-search {
  flex: 1 1 260px;
  padding: 0.75em 1.1em;
  border-radius: var(--radius);
  border: 1.5px solid var(--border-strong);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--surface);
  /* Form controls don't reliably inherit the page's text color from a plain
     `color` cascade the way regular elements do — without this, dark mode
     would give the input a dark background but leave the browser's default
     (usually black) text color, making anything typed invisible. */
  color: var(--text);
}

.media-search:focus {
  outline: none;
  border-color: var(--blue-dark);
}

.media-filter-select {
  padding: 0.75em 1.1em;
  border-radius: var(--radius);
  border: 1.5px solid var(--border-strong);
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--surface);
  color: var(--text);
}

.media-count {
  font-size: 0.85rem;
  color: var(--text-subtle);
  margin-bottom: 1.5rem;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.media-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
}

.media-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(34, 34, 34, 0.25);
}

.media-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.media-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.media-card-meta {
  font-size: 0.8rem;
  color: var(--text-subtle);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.media-type-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--white);
  padding: 0.3em 0.7em;
  border-radius: var(--radius);
}

.media-type-badge--sermon {
  background: var(--blue-dark);
}

.media-type-badge--blog {
  background: var(--purple);
}

.media-type-badge--podcast {
  background: var(--fuchsia);
}

.media-card h3 {
  font-size: 1.15rem;
  line-height: 1.2;
}

.media-card p {
  font-size: 0.9rem;
  color: var(--text-subtle);
  flex: 1;
}

.media-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.media-topic-pill {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--blue-dark);
  background: rgba(0, 193, 222, 0.1);
  padding: 0.25em 0.7em;
  border-radius: var(--radius);
}

.media-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* Featured Topics — dark strip, matches .info-strip treatment */

.featured-topics-strip {
  background: var(--black);
  color: var(--white);
  padding: calc(var(--section-pad) * 0.5) 0;
}

.featured-topics-strip .section-head {
  margin-bottom: 2rem;
}

.featured-topics-strip .section-head h2 {
  color: var(--white);
}

.featured-topics-strip .section-head p {
  color: rgba(255, 255, 255, 0.75);
}

.featured-topic-card {
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-card);
  background: rgba(255, 255, 255, 0.05);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
  padding: 1.75rem 1.5rem;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.featured-topic-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.55);
  transform: translateY(-3px);
}

.featured-topic-card h3 {
  color: var(--white);
  font-size: 1.4rem;
  margin-bottom: 0.4em;
}

.featured-topic-card p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
  margin: 0;
  max-width: none;
}

.media-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-subtle);
}

.media-load-more {
  text-align: center;
  margin-top: 3rem;
}

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

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

  .media-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  /* .media-search's flex-basis of 260px is meant for the row layout's
     width; in the column layout above it would otherwise be read as a
     height, ballooning the input. Reset it explicitly. */
  .media-search {
    flex-basis: auto;
  }
}
