/* Church at the Woodlands — shared styles for every page */

/* Georgia tuned to Literata's width and line metrics, so the layout
   doesn't jump when the web font swaps in. */
@font-face {
  font-family: "Literata Fallback";
  src: local("Georgia");
  font-weight: 300 600;
  size-adjust: 105.3%;
  ascent-override: 112.1%;
  descent-override: 29.4%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Literata Fallback";
  src: local("Georgia Bold"), local("Georgia-Bold");
  font-weight: 700;
  size-adjust: 96.6%;
  ascent-override: 122.2%;
  descent-override: 32.1%;
  line-gap-override: 0%;
}

:root {
  --paper: #F1F2EE;
  --ink: #16181A;
  --body: #3C4340;
  --quiet: #565C5A;
  --pine: #34655A;
  --ember: #A04A2A;
  --wheat: #D9B36C;
  --hairline: #D3D7CF;
  --shade: #1C211E;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Literata, "Literata Fallback", Georgia, "Times New Roman", serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--pine); }

::selection { background: var(--pine); color: var(--paper); }

:focus-visible { outline: 2px solid var(--pine); outline-offset: 4px; }

.page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  /* keep the panel's slide-in from briefly overflowing and flashing a scrollbar */
  overflow: hidden;
  overflow: clip;
}

/* ---------- the picture frame: rotating photos beside the headline ---------- */

.frame {
  margin: 0;
  padding: 10px;
  border: 1px solid var(--hairline);
}

.photos {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  max-height: 32vh;
  width: 100%;
  background: var(--shade);
}

.slide {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: slideCycle 12s linear infinite;
}

/* focal points keep every face in frame from a 1:1 phone crop down to
   the widest 2.6:1 desktop crop (only ~26% of the photo's height):
   teaching, Isaac's face sits at 37–50%; worship, the singer at 22–34%;
   kids, the children and Isaac at 32–49% */
.s1 { object-position: center 42%; animation-delay: -0.3s; }
.s2 { object-position: center 20%; animation-delay: -9.3s; }
.s3 { object-position: center 38%; animation-delay: -6.3s; }
.s4 { object-position: center 55%; animation-delay: -3.3s; }

@keyframes slideCycle {
  0%    { opacity: 0; }
  2.5%  { opacity: 1; }
  25%   { opacity: 1; }
  27.5% { opacity: 0; }
  100%  { opacity: 0; }
}

.dots {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: flex;
  gap: 9px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(241, 242, 238, 0.35);
  animation: dotCycle 12s linear infinite;
}

.d1 { animation-delay: -0.3s; }
.d2 { animation-delay: -9.3s; }
.d3 { animation-delay: -6.3s; }
.d4 { animation-delay: -3.3s; }

@keyframes dotCycle {
  0%, 25%    { background: #F1F2EE; }
  27.5%, 100% { background: rgba(241, 242, 238, 0.35); }
}

/* ---------- the panel ---------- */

.panel {
  width: 100%;
  max-width: 1180px;
  padding: clamp(20px, 3.5vh, 56px) clamp(24px, 5.2vw, 76px);
  animation: up 1s cubic-bezier(.16, 1, .3, 1) .25s both;
}

/* two columns on desktop, shared by the hero and the facts so the frame
   lines up with Children's Church below it */
.hero, .facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(32px, 4vw, 56px);
}

.hero { align-items: center; margin-top: clamp(14px, 2.6vh, 32px); }

.facts > div { display: flex; flex-direction: column; }
.facts > div > .row { flex: 1; }

@keyframes up { from { opacity: 0; transform: translateY(16px); } }

/* the logo beside the venue's, split by a rule and never merged;
   font-size is the height of "Woodlands" and everything scales from it */
.lockup {
  display: inline-flex;
  align-items: center;
  margin: 0;
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(30px, min(2.9vw, 4.64vh), 42px);
  line-height: 1;
}

.logo { display: block; white-space: nowrap; }

.logo-top {
  display: block;
  margin: 0 0 .07em .02em;
  font-size: .4em;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--pine);
}

.logo-name {
  display: block;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: .86;
  color: var(--ink);
}

.partner-rule {
  align-self: stretch;
  flex: none;
  width: 1px;
  margin: 0 .6em;
  background: var(--hairline);
}

/* the venue mirrors the logo's two lines: "Meeting at" is set exactly like
   "Church at the", the café's logo is centered on the line of "Woodlands"
   (.86em), so both halves share a top, a baseline and a bottom */
.partner-venue { display: grid; grid-template-rows: auto .86em; align-items: center; }

.partner-label {
  display: block;
  margin: 0 0 .07em .02em;
  font-size: .4em;
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1;
  color: var(--pine);
}

.partner-logo { display: block; height: .78em; width: auto; }

/* the logo on the left, the navbar on the far right (under the logo on phones) */
.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  /* full-bleed paper bar, content still on the panel's column */
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 0 calc(50vw - 50%) 10px;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}

/* site.js adds this once the header is stuck to the top */
.masthead.is-stuck { border-bottom-color: var(--hairline); }

/* the menu button only shows on phones */
.menu-toggle { display: none; }

/* the navbar: plain pine words, underlined on hover and focus */
.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px clamp(18px, min(1.8vw, 2.88vh), 26px);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: clamp(15px, min(1.18vw, 1.89vh), 17px);
}

.nav li { white-space: nowrap; }

.nav a {
  text-decoration: underline transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: .3em;
  transition: color .2s ease, text-decoration-color .2s ease;
}

.nav a:hover, .nav a:focus-visible { color: var(--ink); text-decoration-color: currentColor; }

.place {
  margin: 5px 0 0;
  font-size: clamp(14px, min(1.1vw, 1.76vh), 16px);
  color: var(--quiet);
}

h1 {
  margin: 0;
  font-size: clamp(30px, min(3.2vw, 5.12vh), 45px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.022em;
}

h1 span { color: var(--pine); }

.lede {
  margin: clamp(16px, 2.4vh, 24px) 0 0;
  font-size: clamp(16px, min(1.25vw, 2vh), 18px);
  line-height: 1.6;
  color: var(--pine);
  max-width: 56ch;
}

/* what we do every time we meet: a wheat marker stroke under each word,
   below the letters so the pine text keeps its contrast on paper */
.lede mark {
  background: none;
  color: inherit;
  text-decoration: underline var(--wheat);
  text-decoration-thickness: .26em;
  text-underline-offset: .06em;
  text-decoration-skip-ink: none;
}

/* ---------- the facts: when we meet, and what kids do ---------- */

.facts { margin-top: clamp(20px, 3.2vh, 34px); }

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px 24px;
  padding: clamp(14px, 2vh, 20px) 0;
}

.row-label {
  margin: 0;
  font-size: clamp(15px, min(1.25vw, 2vh), 18px);
  font-weight: 700;
  line-height: 1.4;
  color: var(--pine);
}

.row-value {
  margin: 2px 0 0;
  font-size: clamp(16px, min(1.32vw, 2.11vh), 19px);
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

/* a short link at the end of a row's line ("Learn More") never splits */
.row-value a { white-space: nowrap; }

/* dates and times, each in its own cell */
.cells { display: flex; margin: 0; padding: 0; list-style: none; }

.cell {
  min-width: 64px;
  padding: 0 clamp(14px, 1.4vw, 20px);
}

.cell:last-child { padding-right: 0; }

.cell-top {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  font-size: clamp(14px, min(1.05vw, 1.68vh), 15px);
  color: var(--quiet);
}

.cell-main {
  display: block;
  font-size: clamp(26px, min(2.2vw, 3.52vh), 32px);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cell-main small { font-size: .5em; letter-spacing: .02em; }

/* kids: where each age group is, in words rather than numbers,
   stacked under the heading so it never gets squeezed */
.row-stack { grid-template-columns: 1fr; }
.cells-text .cell { flex: 1 1 0; }
.cells-text .cell:first-child { padding-left: 0; }

/* Children's Church is set a step larger: it's what new families look for first */
.kids .row-label { font-size: clamp(19px, min(1.65vw, 2.64vh), 23px); line-height: 1.3; }
.kids .row-value { font-size: clamp(17px, min(1.45vw, 2.32vh), 20px); }
.kids .cell-top { font-size: clamp(15px, min(1.15vw, 1.84vh), 16px); }
.kids .cell-text { font-size: clamp(18px, min(1.55vw, 2.48vh), 21px); }

.cell-text {
  display: block;
  margin-top: 2px;
  font-size: clamp(16px, min(1.32vw, 2.11vh), 19px);
  line-height: 1.35;
}

/* the fall dates, separated by middle dots */
.dates { margin-top: 4px; white-space: nowrap; }
.date + .date::before { content: "\00B7"; margin: 0 .45em; }

/* the next gathering gets a hand-drawn ember circle, added by the script */
.day { position: relative; display: inline-block; }

.scribble {
  position: absolute;
  top: -.24em;
  left: -.42em;
  width: calc(100% + .84em);
  height: calc(100% + .44em);
  overflow: visible;
  pointer-events: none;
}

.scribble path {
  fill: none;
  stroke: var(--ember);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw .9s cubic-bezier(.6, 0, .3, 1) 1s forwards;
}

@keyframes draw { to { stroke-dashoffset: 0; } }

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

.where {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 10px;
  margin-top: clamp(28px, 4.2vh, 48px);
}

/* home: the address row sits under a hairline, centered in its gap */
.page:not(.page-flow) .where {
  margin-top: clamp(10px, 1.8vh, 20px);
  padding-top: clamp(16px, 2.6vh, 28px);
  border-top: 1px solid var(--hairline);
}


/* the address holds the left; margin-right: auto pushes the buttons to the far right */
.address {
  margin: 0 auto 0 0;
  font-size: clamp(16px, min(1.25vw, 2vh), 18px);
  line-height: 1.5;
}

.address span { color: var(--quiet); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 28px;
  background: var(--pine);
  color: var(--paper);
  font-size: clamp(16px, min(1.25vw, 2vh), 18px);
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.btn:hover, .btn:focus-visible { background: var(--ink); color: var(--paper); }

.btn-outline {
  background: transparent;
  color: var(--pine);
  box-shadow: inset 0 0 0 1px var(--pine);
}

.btn-outline:hover, .btn-outline:focus-visible {
  background: transparent;
  color: var(--pine);
  box-shadow: inset 0 0 0 1px var(--ink);
}

/* ---------- shared by every page ---------- */

/* the logo is the way home */
a.logo { text-decoration: none; }

.nav a[aria-current="page"] { color: var(--ink); text-decoration-color: currentColor; }

/* a square, written label: pine outline for Gathered, Formed and Sent */
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  color: var(--pine);
  box-shadow: inset 0 0 0 1px var(--pine);
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}

/* wheat: kids' materials and practical facts, always ink text (9.0:1) */
.tag-wheat { background: var(--wheat); color: var(--ink); box-shadow: none; }

/* a heading with a tag beside it */
.row-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }

/* ---------- full-bleed bands: pine for the mission line, shade for a dark moment ---------- */

/* breaks out of the panel to the window's edges while the content keeps the panel's column */
.band {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: clamp(18px, 2.6vh, 36px) calc(50vw - 50%);
}

/* every page's top section sits on a band that starts right at the navbar's
   bottom line; the inner pages, which scroll anyway, keep the roomier padding */
.hero.band { margin-top: 0; }
.page-flow .hero.band { padding-top: clamp(32px, 6vh, 64px); padding-bottom: clamp(32px, 6vh, 64px); }

/* on pine and shade, text is always paper */
.band-pine { background: var(--pine); color: var(--paper); }
.band-shade { background: var(--shade); color: var(--paper); }
.band :focus-visible { outline-color: var(--paper); }
.band ::selection { background: var(--paper); color: var(--pine); }

/* the mission line on pine: paper, with "Sent for mission." in wheat (3.4:1, large text only) */
.band-pine h1, .band-pine .lede { color: var(--paper); }
.band-pine h1 span { color: var(--wheat); }
.band-pine .frame { border: 0; background: var(--paper); }

/* the home page must fit one laptop screen, so its slideshow runs shorter */
@media (min-width: 900px) {
  .page:not(.page-flow) .hero.band .photos { max-height: 26vh; }
}

/* home: no dividers in the schedule and Children's Church rows; without
   the rules the rows need less padding, and the band takes the space */
.page:not(.page-flow) .row { padding: clamp(6px, 1.2vh, 12px) 0; }
.page:not(.page-flow) .cell:first-child { padding-left: 0; }

.page-flow .row { padding: 0; }

/* every page: the same header spacing above the logo on desktop */
@media (min-width: 900px) {
  .panel { padding-top: 0; }
  .masthead { padding-top: clamp(12px, 2vh, 28px); }
}

/* home: less air below, more inside the band, same total height */
@media (min-width: 900px) {
  .page:not(.page-flow) { align-items: stretch; }
  .page:not(.page-flow) .panel {
    display: flex;
    flex-direction: column;
    padding-bottom: clamp(12px, 2vh, 28px);
  }
  /* on tall screens the spare height goes into the band, not above the logo */
  .page:not(.page-flow) .hero.band { flex-grow: 1; align-content: center; }
}
.page:not(.page-flow) .hero.band { padding-top: clamp(24px, 3.6vh, 44px); padding-bottom: clamp(24px, 3.6vh, 44px); }


/* ---------- inner pages: Our Story, Meet our Pastor ---------- */

/* inner pages read from the top and scroll */
.page-flow { align-items: flex-start; }
.page-flow .panel { padding-bottom: clamp(48px, 9vh, 96px); }

/* a single photo in the frame, instead of the rotating set */
.photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.frame-portrait .photos { aspect-ratio: 4 / 5; max-height: 62vh; }

/* a group photo that must never be cropped: always its own 3:2 shape */
.frame-wide .photos { aspect-ratio: 3 / 2; max-height: none; }

.facts-single { grid-template-columns: minmax(0, 1fr); }

.section { margin-top: clamp(44px, 8vh, 80px); }

/* a hairline between two sections on the same paper ground, centered in
   the gap; next to a pine or shade band the color change does the job */
.section:not(.section-band) + .section:not(.section-band) {
  margin-top: clamp(22px, 4vh, 40px);
  padding-top: clamp(22px, 4vh, 40px);
  border-top: 1px solid var(--hairline);
}

.section-title {
  margin: 0 0 clamp(16px, 2.4vh, 24px);
  font-size: clamp(24px, min(2.3vw, 3.68vh), 32px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.prose p {
  margin: 0 0 1em;
  max-width: 62ch;
  font-size: clamp(16px, min(1.25vw, 2vh), 18px);
  line-height: 1.65;
  color: var(--body);
}

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

/* a personal note in someone's own words: italic, opened with a wheat
   quotation mark and signed with their name */
.note { margin: 0; }
.note blockquote { margin: 0; }
.note blockquote::before {
  content: "\201C";
  display: block;
  height: .42em;
  font-size: clamp(64px, 6vw, 88px);
  font-style: normal;
  line-height: 1;
  color: var(--wheat);
}
.note blockquote p { font-style: italic; color: var(--ink); }
.note figcaption { margin-top: 1.4em; font-size: clamp(15px, min(1.15vw, 1.84vh), 17px); color: var(--quiet); }
.note-name { display: block; font-style: italic; font-size: clamp(18px, min(1.5vw, 2.4vh), 21px); font-weight: 600; color: var(--pine); }

/* text beside a framed photo, in the same two columns as the hero */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(32px, 4vw, 56px);
  align-items: start;
}

/* photo on the left, text on the right (desktop only; phones keep reading order) */
.split-flip .frame { order: -1; }

/* mission and vision, quoted word for word */
.statement {
  margin: 6px 0 0;
  font-size: clamp(19px, min(1.7vw, 2.72vh), 24px);
  line-height: 1.45;
  color: var(--ink);
}

/* three or four columns between hairlines */
.columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(24px, 3.6vh, 32px) clamp(24px, 3vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.columns h3 { margin: 12px 0 6px; font-size: clamp(18px, min(1.5vw, 2.4vh), 21px); font-weight: 700; }
.columns h3:first-child { margin-top: 0; }
.columns p { margin: 0; font-size: clamp(15px, min(1.15vw, 1.84vh), 17px); line-height: 1.55; color: var(--body); }
.columns + .prose { margin-top: clamp(24px, 3.6vh, 32px); }
/* the line under the columns runs the full width of the section */
.columns + .prose p { max-width: none; }

/* the seven convictions, numbered i.–vii. */
.convictions { display: grid; gap: clamp(20px, 3vh, 28px); margin: 0; padding: 0; list-style: none; }

.convictions li {
  display: grid;
  grid-template-columns: 3.2em minmax(0, 1fr);
}

.convictions .num { font-style: italic; font-size: clamp(18px, min(1.5vw, 2.4vh), 21px); color: var(--pine); }
.convictions strong { display: block; font-size: clamp(18px, min(1.5vw, 2.4vh), 21px); font-weight: 600; line-height: 1.35; }
.convictions p { margin: 6px 0 0; max-width: 64ch; font-size: clamp(15px, min(1.15vw, 1.84vh), 17px); line-height: 1.55; color: var(--body); }
.refs { color: var(--quiet); white-space: nowrap; }

/* the sending verse */
.verse { margin: 0; padding: clamp(22px, 3.4vh, 32px) 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); text-align: center; }
.verse p { margin: 0; font-size: clamp(22px, min(2.2vw, 3.52vh), 30px); font-style: italic; line-height: 1.35; color: var(--pine); }
.verse cite { display: block; margin-top: 10px; font-size: clamp(15px, min(1.15vw, 1.84vh), 16px); font-style: normal; color: var(--quiet); }
.verse.band {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: clamp(40px, 7vh, 72px) calc(50vw - 50%);
  border: 0;
}
.band-shade.verse p { color: var(--paper); }
.band-shade.verse cite { color: var(--hairline); }

/* the invitation that closes an inner page */
.closing {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 24px;
  justify-content: space-between;
}

.closing .section-title { margin: 0; }
.closing p { margin: 6px 0 0; font-size: clamp(16px, min(1.25vw, 2vh), 18px); color: var(--body); }
.closing .btn { margin: 0; }

/* the Instagram link: a plain pine text link, set before the button on desktop */
.social {
  order: 1;
  font-size: clamp(16px, min(1.25vw, 2vh), 18px);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .25em;
  transition: color .2s ease;
}

.social:hover, .social:focus-visible { color: var(--ink); }

/* the Instagram glyph, drawn in the link's own color; the underline stays on the words.
   Literata's capitals stand .7em tall, so a .95em icon sits centered on them at -.125em */
.ig {
  display: inline-block;
  width: .95em;
  height: .95em;
  margin-right: .4em;
  vertical-align: -.125em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}
.ig .ig-dot { fill: currentColor; stroke: none; }
.where .btn, .closing .btn { order: 2; }
.closing { justify-content: flex-start; }
.closing > div:first-child { margin-right: auto; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 24px; }

/* how to reach someone: a quiet label over a link */
.contact { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }

.contact li { padding: 0 clamp(16px, 2vw, 28px); }
.contact li:first-child { padding-left: 0; }
.contact li:last-child { padding-right: 0; }

.contact a {
  display: block;
  font-size: clamp(18px, min(1.55vw, 2.48vh), 21px);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .25em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.contact a:hover, .contact a:focus-visible { color: var(--ink); }

/* ---------- phones and small tablets ---------- */

@media (max-width: 899px) {
  .page { display: block; min-height: 0; }
  .panel { display: flex; flex-direction: column; padding: 0 24px 48px; }
  /* the frame comes apart into a full-width photo band at the top */
  .hero, .facts { display: block; }
  .hero { display: contents; }
  .frame { order: -1; margin: 0 -24px 20px; padding: 0; border: 0; }
  /* a short 3:2 strip, not most of the screen */
  .photos { aspect-ratio: 3 / 2; height: auto; min-height: 0; max-height: 340px; }
  .dots { bottom: 18px; }
  h1 { margin-top: clamp(18px, 3.4vh, 42px); }
  .facts { margin-top: clamp(20px, 3.2vh, 34px); }
  .where { display: block; }
  .lede { max-width: none; }
  .row { grid-template-columns: 1fr; }
  .cell:first-child { padding-left: 0; }
  .btn { display: flex; width: 100%; }
  .address + .btn { margin-top: 18px; }
  .page-flow .panel { padding-bottom: 48px; }
  .closing { display: block; }
  .split { display: block; }
  .split .frame { margin: 28px -24px 0; }
  /* portraits stay square on phones and tablets: a wide band would cut faces */
  .frame-portrait .photos { aspect-ratio: 1 / 1; height: auto; min-height: 0; max-height: 80svh; }
  .frame-wide .photos { aspect-ratio: 3 / 2; height: auto; min-height: 0; max-height: none; }
  /* the pastor's portrait at the top: 5:4 is the shortest that keeps both faces */
  .hero .frame-portrait .photos { aspect-ratio: 5 / 4; max-height: 70svh; }
  .closing .btn { margin-top: 18px; }
  .social { display: block; margin-top: 18px; }
  .where .social { text-align: center; }
  .actions { display: block; }
  /* the hero comes apart on phones, so the band moves onto its text */
  .hero.band-pine > div:first-child { margin: 0 -24px; padding: 32px 24px; background: var(--pine); }

  /* phone spacing, from the mobile audit: fixed steps instead of
     height-based ones, so every phone gets the same rhythm */
  .section { margin-top: 48px; }
  .section:not(.section-band) + .section:not(.section-band) { margin-top: 24px; padding-top: 24px; }
  /* stacked pairs on inner pages (mission, vision) need their own space */
  .page-flow .facts > div + div { margin-top: 32px; }
  .verse.band { padding-top: 48px; padding-bottom: 48px; }
  .page:not(.page-flow) .row { padding: 16px 0; }
  .page:not(.page-flow) .facts { margin-top: 32px; }
  .page:not(.page-flow) .where { margin-top: 16px; padding-top: 32px; }
  .contact { display: block; margin-top: 20px; }
  .contact li { padding: 12px 0; }
  .masthead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0 12px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  /* the logo, place line and links each get their own row, so the
     menu button can center on the logo alone */
  .masthead > div:first-child { display: contents; }
  .masthead .lockup { grid-column: 1; grid-row: 1; justify-self: start; }
  .masthead .menu-toggle { grid-column: 2; grid-row: 1; }
  .masthead .place { grid-column: 1 / -1; }
  .lockup { font-size: 25px; }

  .menu-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex: none;
    width: 44px;
    height: 44px;
    margin: 0 -10px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--pine);
    cursor: pointer;
  }

  .menu-toggle .bar {
    display: block;
    width: 22px;
    height: 2px;
    background: currentColor;
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
  }

  /* the two bars turn into an X */
  .menu-open .menu-toggle .bar:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-open .menu-toggle .bar:last-child { transform: translateY(-4px) rotate(-45deg); }

  /* the links drop down over the page instead of pushing it, so nothing
     below the header moves and the page never re-scrolls under a stuck header */
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 4px 24px 14px;
    background: var(--paper);
    border-bottom: 1px solid var(--hairline);
    box-shadow: 0 12px 24px -16px rgba(22, 24, 26, .25);
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path .32s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .32s;
  }

  .menu-open .nav {
    clip-path: inset(0 0 -40px 0);
    visibility: visible;
    transition-delay: 0s;
  }

  .nav ul { flex-direction: column; gap: 0; }
  .nav li a { display: block; padding: 10px 0; font-size: 18px; }

  .nav li { opacity: 0; transform: translateY(-6px); transition: opacity .25s ease, transform .25s ease; }
  .menu-open .nav li { opacity: 1; transform: none; }
  .menu-open .nav li:nth-child(2) { transition-delay: .04s; }
  .menu-open .nav li:nth-child(3) { transition-delay: .08s; }
  .menu-open .nav li:nth-child(4) { transition-delay: .12s; }
  .menu-open .nav li:nth-child(5) { transition-delay: .16s; }
  .btn-outline { margin-top: 10px; }
}

/* the narrowest phones: stack the venue under the logo */
@media (max-width: 359px) {
  .lockup { flex-direction: column; align-items: flex-start; }
  .partner-rule { align-self: stretch; width: auto; height: 1px; margin: .45em 0; }
}

@media (prefers-reduced-motion: reduce) {
  .panel, .dot, .slide { animation: none; }
  .scribble path { animation: none; stroke-dashoffset: 0; }
  .nav, .nav ul, .nav li, .menu-toggle .bar, .masthead { transition: none; }
  .s2, .s3, .s4 { visibility: hidden; }
}
