/* The stylesheets in the order they cascade; the build joins them into one. */
/* Tokens: the visual system from "Parafia Style Guide.dc.html". */

:root {
  /* Core palette */
  --parchment: #EBE4C8;
  --sky: #6CB1EE;
  --blueberry: #4F82B6;
  --deep-blue: #2F5F8C;
  --ink: #1C1B14;
  --paper: #FBF9F2;
  --mist: #F3EEDD;
  --line: #E2DCC4;
  --flint: #6F6E60;

  /* From the sanctuary: crimson for the Arabic beneath each heading, gold for
     the cross and the Arabic on the ink band, where it holds its contrast. */
  --rubric: #8E2B2B;
  --gold: #B08D4A;

  /* Surfaces and text */
  --card: #ffffff;
  --card-line: #E7E1CC;
  --card-line-soft: #EDE8D6;
  --text: #3A3A2E;
  --text-soft: #5C5B4D;
  --muted: #A9A794;
  --give-fill: #F2EBD2;

  /* Type: the guide runs one face across display, UI and body. EB Garamond,
     a text cut of Cormorant's lineage, sets the reading sections, the footer
     and the second line of the wordmark. */
  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --ui: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --body: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --text-face: "EB Garamond", Georgia, "Times New Roman", serif;
  --dw: 400;          /* display weight */
  --dls: -0.03em;     /* display tracking */
  --dls2: -0.025em;   /* heading tracking */

  /* Rhythm, on an 8pt base: 112px between sections */
  --sp-section: clamp(64px, 8vw, 112px);
  --r-pill: 999px;
  --e-raised: 0 8px 24px rgba(28, 27, 20, 0.06);
  --e-lift: 0 24px 60px rgba(28, 27, 20, 0.10);

  /* Motion */
  --t-hover: 160ms ease-out;
  --t-lift: 240ms cubic-bezier(.2, .7, .3, 1);
  --t-reveal: 500ms cubic-bezier(.2, .7, .3, 1);

  /* Layout. The full-bleed header and footer sit --chrome-pad in from the
     screen's edges. */
  --measure: 1320px;
  --gutter: clamp(20px, 5vw, 80px);
  --chrome-pad: clamp(18px, 3vw, 44px);
  --header-h: 66px;
}
/* Base: the page, its type, and the layout every section shares. */

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

/* Nothing may widen the page past the screen: a phone turned on its side and
   back otherwise keeps room to zoom out to whatever stuck out. */
html {
  overflow-x: hidden;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--sky); color: var(--ink); }

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

a { color: var(--deep-blue); text-decoration: none; transition: color var(--t-hover); }
/* Hover effects throughout answer a mouse only: on a phone a tap would leave
   them showing until the next tap. */
@media (hover: hover) { a:hover { color: var(--ink); } }

:focus-visible { outline: 2px solid var(--deep-blue); outline-offset: 3px; }

h1, h2, h3 { margin: 0; font-weight: var(--dw); }

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

.skip-link {
  position: fixed;
  left: 12px;
  top: -100px;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 22px;
  border-radius: var(--r-pill);
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: top var(--t-hover);
}
.skip-link:focus { top: 12px; color: var(--paper); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.prose { font-size: 19px; line-height: 1.85; color: var(--text); max-width: 66ch; }

/* The Coptic cross, the parish glyph the system repeats. The artwork is one
   colour with its filigree cut through, so it masks a fill of the text
   colour: the cross always matches the words beside it and moves with them
   on hover. */
.mark {
  width: 30px;
  height: 30px;
  flex: none;
  display: block;
  background-color: currentColor;
  -webkit-mask: url(./assets/coptic-cross.svg) center / contain no-repeat;
  mask: url(./assets/coptic-cross.svg) center / contain no-repeat;
}

.wrap {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-top: var(--sp-section); }

/* Giving is the one change of ground. */
.section--ink {
  margin-top: var(--sp-section);
  padding-bottom: var(--sp-section);
  background: var(--ink);
  color: var(--parchment);
}

/* EB Garamond carries the reading sections and the footer; the welcome, the
   nav and the schedule keep Cormorant. */
#watch-listen,
#our-services,
#give,
#contact,
.site-footer {
  --ui: var(--text-face);
  --body: var(--text-face);
  font-family: var(--body);
}

.block__head {
  margin-bottom: clamp(26px, 4vw, 42px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 22px;
}
.block__title {
  grid-column: 1;
  font-family: var(--display);
  font-weight: var(--dw);
  font-size: clamp(32px, 3.8vw, 44px);
  line-height: 1.12;
  letter-spacing: var(--dls2);
}

/* Each heading carries its other language beneath it: Arabic under English,
   English under Arabic. It repeats the heading, so screen readers skip it. */
.block__alt {
  grid-column: 1;
  font-size: clamp(22px, 2.3vw, 28px);
  line-height: 1.35;
  color: var(--rubric);
  text-align: left;
}
html[dir="rtl"] .block__alt { text-align: right; }
.block__alt:lang(ar) { font-family: Amiri, Georgia, serif; }
.block__alt:lang(en) { font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; }
.section--ink .block__alt { color: var(--gold); }
.block__action { grid-column: 2; grid-row: 1 / span 2; justify-self: end; }

@media (max-width: 560px) {
  body { font-size: 17px; }
}

/* On a touchscreen the smallest controls reach further than they look, so a
   fingertip finds them: the verse dots, the phone numbers and the links to
   Facebook and YouTube. */
@media (pointer: coarse) {
  :is(.rotator__dot, .person__tel, .social a) { position: relative; }
  :is(.rotator__dot, .person__tel, .social a)::after { content: ''; position: absolute; inset: -10px -4px; }
  .rotator__dot::after { inset-inline: 0; }
}
/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  cursor: pointer;
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1;
  padding: 17px 40px;
  border-radius: var(--r-pill);
  text-align: center;
  transition: background var(--t-hover), color var(--t-hover), border-color var(--t-hover);
}

.btn--primary { background: var(--blueberry); color: #fff; }
@media (hover: hover) { .btn--primary:hover { background: var(--deep-blue); color: #fff; } }

.btn--outline { background: transparent; color: var(--ink); border: 1px solid var(--ink); padding: 16px 39px; }
@media (hover: hover) { .btn--outline:hover { background: var(--blueberry); color: #fff; border-color: var(--blueberry); } }

.btn--sm { font-size: 12px; padding: 11px 26px; }
.btn--outline.btn--sm { padding: 10px 25px; }

/* Giving: parchment on ink, the one inverted control, and its reverse in the
   drawer. */
.btn--give { background: var(--give-fill); color: var(--ink); font-weight: 700; padding: 18px 34px; }
@media (hover: hover) { .btn--give:hover { background: var(--paper); color: var(--ink); } }
.btn--give-light { background: var(--ink); color: var(--give-fill); font-weight: 700; }
@media (hover: hover) { .btn--give-light:hover { background: var(--give-fill); color: var(--ink); } }

@media (max-width: 560px) {
  .btn { padding: 15px 30px; font-size: 12px; }
  .btn--outline { padding: 14px 29px; }
  .btn--sm { padding: 11px 24px; font-size: 11px; }
  .btn--outline.btn--sm { padding: 10px 23px; }
}
/* Header: the name, the nav, the language pill and, on phones, the menu button. */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  /* All but opaque, with no backdrop blur: that re-blurred the page beneath
     on every frame of a scroll, a cost a phone on low power feels. */
  background: rgba(243, 238, 221, 0.97);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--t-hover);
}
.site-header.is-stuck { box-shadow: var(--e-raised); }

.site-header__bar {
  padding: 12px var(--chrome-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.site-header__right { display: flex; align-items: center; gap: clamp(6px, 1.5vw, 18px); }

/* The link carries the one colour; cross and wordmark both inherit it, so
   they move to the blue as a single change. */
.brand { display: flex; align-items: center; gap: 13px; min-width: 0; color: var(--ink); }
@media (hover: hover) { a.brand:hover, .site-footer__identity:hover { color: var(--deep-blue); } }

/* The name as written, in the display face; the second line steps down and
   softens by opacity rather than colour, so a hover still moves it as one. */
.brand__name {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.1;
}
.brand__name span { display: block; }
.brand__name span + span { margin-top: 3px; font-family: var(--text-face); font-size: 13.5px; font-weight: 500; opacity: 0.72; }

.nav { display: flex; align-items: center; gap: 2px; }

/* The labels as written rather than in spaced capitals, sized up to keep the
   presence the capitals had. */
.nav__link {
  padding: 9px 14px;
  font-family: var(--ui);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--text-soft);
  border-bottom: 1px solid transparent;
  transition: color var(--t-hover), border-color var(--t-hover);
}
@media (hover: hover) { .nav__link:hover { color: var(--ink); border-bottom-color: var(--line); } }
.nav__link.is-active { color: var(--ink); border-bottom-color: var(--ink); }

/* The language pill (after React Bits' Pill Nav): under the pointer, a circle
   of ink rises from its foot and fills it, while the label rides up out of
   sight and a paper copy rides up into its place. The script sizes the
   circle to the pill, so its edge always sweeps the corners. */
.lang-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  line-height: 1;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: transparent;
  cursor: pointer;
  font-family: Amiri, Georgia, serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--deep-blue);
  white-space: nowrap;
  transition: border-color var(--t-hover);
}
@media (hover: hover) { .lang-pill:hover { border-color: var(--ink); } }
.pill__fill {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: -1;
  width: 200%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--ink);
  transform: translateX(-50%) scale(0);
  transition: transform 200ms cubic-bezier(.215, .61, .355, 1);
  pointer-events: none;
}
.pill__label { display: block; transition: transform 200ms cubic-bezier(.215, .61, .355, 1); }
.pill__label--over {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  transform: translateY(105%);
}
/* A phone keeps the last tapped thing "hovered" until the next tap, which
   left the pill filled as if the page were in Arabic; the fill answers only
   a mouse and the keyboard. */
.lang-pill:focus-visible .pill__fill { transform: translateX(-50%) scale(1.2); }
.lang-pill:focus-visible .pill__label { transform: translateY(-200%); }
.lang-pill:focus-visible .pill__label--over { transform: none; }
.lang-pill:focus-visible :is(.pill__fill, .pill__label) { transition-duration: 300ms; }
@media (hover: hover) {
  .lang-pill:hover .pill__fill { transform: translateX(-50%) scale(1.2); }
  .lang-pill:hover .pill__label { transform: translateY(-200%); }
  .lang-pill:hover .pill__label--over { transform: none; }
  .lang-pill:hover :is(.pill__fill, .pill__label) { transition-duration: 300ms; }
}

html[lang="ar"] .lang-pill {
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

/* The menu button: two bars (the drawer turns its own into a close). */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-inline-end: -10px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle__bars { position: relative; width: 17px; height: 7.5px; }
.nav-toggle__bars span {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
}
.nav-toggle__bars span:last-child { top: 6px; }

@media (max-width: 900px) {
  .nav { display: none; }
  .nav-toggle { display: flex; }
}

@media (max-width: 560px) {
  .brand__name { font-size: 16px; }
  .brand__name span + span { font-size: 12px; }
  .lang-pill { padding: 6px 11px; font-size: 12px; }
  html[lang="ar"] .lang-pill { font-size: 10px; letter-spacing: 0.1em; }
}
/* The phone menu: a panel from the edge over a dimmed page. It glides in and
   eases to a stop, and its links drop into place one after another (timed
   after Apple's phone menu); shutting, the links go first, then the panel.
   In the panel's corner, over the menu button's place, the two bars meet
   and cross into its close as it arrives, and fold back as it leaves. */

.drawer { position: fixed; inset: 0; z-index: 90; overflow: hidden; visibility: hidden; transition: visibility 0s linear 520ms; }
.drawer[data-open="true"] { visibility: visible; transition-delay: 0s; }
@media (min-width: 901px) { .drawer { display: none; } }

.drawer .nav-toggle { display: flex; }
.drawer .nav-toggle__bars span { transition: transform 110ms cubic-bezier(.4, 0, .6, 1), top 110ms cubic-bezier(.4, 0, .6, 1) 110ms; }
.drawer[data-open="true"] .nav-toggle__bars span {
  top: 3px;
  transition: top 120ms cubic-bezier(.4, 0, .6, 1) 160ms, transform 120ms cubic-bezier(.4, 0, .6, 1) 280ms;
}
.drawer[data-open="true"] .nav-toggle__bars span:first-child { transform: rotate(45deg); }
.drawer[data-open="true"] .nav-toggle__bars span:last-child { transform: rotate(-45deg); }

.drawer__scrim {
  position: absolute;
  inset: 0;
  background: rgba(28, 27, 20, 0.42);
  opacity: 0;
  transition: opacity 280ms cubic-bezier(.4, 0, .6, 1) 220ms;
}
.drawer[data-open="true"] .drawer__scrim { opacity: 1; transition-delay: 0s; }

.drawer__panel {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(320px, 88vw);
  background: var(--card);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 300ms cubic-bezier(.4, 0, .6, 1) 220ms;
}
.drawer[data-open="true"] .drawer__panel {
  transform: none;
  transition: transform 460ms cubic-bezier(.22, 1, .36, 1);
}

.drawer__top {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--card-line-soft);
}

.drawer__link {
  height: 52px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-bottom: 1px solid var(--card-line-soft);
  font-family: var(--ui);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-soft);
}
@media (hover: hover) { .drawer__link:hover { color: var(--ink); } }
.drawer__link.is-active { color: var(--ink); box-shadow: inset 2px 0 0 var(--ink); }

.drawer__foot { margin-top: auto; padding: 18px; border-top: 1px solid var(--card-line-soft); display: grid; }
.drawer__foot .btn { width: 100%; }

.drawer__link,
.drawer__foot .btn { opacity: 0; transform: translateY(-8px); }
.drawer__link { transition: opacity 160ms cubic-bezier(.4, 0, .6, 1), transform 160ms cubic-bezier(.4, 0, .6, 1), color var(--t-hover), box-shadow var(--t-hover); }
.drawer__foot .btn { transition: opacity 160ms cubic-bezier(.4, 0, .6, 1), transform 160ms cubic-bezier(.4, 0, .6, 1), background var(--t-hover), color var(--t-hover), border-color var(--t-hover); }
.drawer[data-open="true"] :is(.drawer__link, .drawer__foot .btn) {
  opacity: 1;
  transform: none;
  transition-duration: 240ms, 240ms, 160ms, 160ms, 160ms;
  transition-delay: calc(200ms + var(--i, 0) * 20ms), calc(200ms + var(--i, 0) * 20ms), 0s, 0s, 0s;
}
.drawer__link:nth-child(2) { --i: 1; }
.drawer__link:nth-child(3) { --i: 2; }
.drawer__link:nth-child(4) { --i: 3; }
.drawer__foot .btn { --i: 4; }
/* The welcome: the sanctuary full bleed, the copy bottom-left over a warm
   ink gradient, so the iconostasis, the photograph's subject, stays clear. */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: clamp(560px, calc(100svh - var(--header-h)), 900px);
  background: var(--ink);
  color: var(--paper);
}

.hero__media,
.hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__media { z-index: -2; }
.hero__media img { object-fit: cover; object-position: 50% 38%; }

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(28, 27, 20, 0.9) 0%, rgba(28, 27, 20, 0.62) 34%, rgba(28, 27, 20, 0.1) 64%, rgba(28, 27, 20, 0.16) 100%),
    linear-gradient(to right, rgba(28, 27, 20, 0.5) 0%, rgba(28, 27, 20, 0) 58%);
}

/* Right to left, the copy sits on the right, so the side shade follows it. */
html[dir="rtl"] .hero::before {
  background:
    linear-gradient(to top, rgba(28, 27, 20, 0.9) 0%, rgba(28, 27, 20, 0.62) 34%, rgba(28, 27, 20, 0.1) 64%, rgba(28, 27, 20, 0.16) 100%),
    linear-gradient(to left, rgba(28, 27, 20, 0.5) 0%, rgba(28, 27, 20, 0) 58%);
}

/* On a phone the copy climbs over the lit iconostasis, so the shade climbs with it. */
@media (max-width: 700px) {
  .hero::before,
  html[dir="rtl"] .hero::before {
    background: linear-gradient(to top, rgba(28, 27, 20, 0.92) 0%, rgba(28, 27, 20, 0.78) 48%, rgba(28, 27, 20, 0.4) 72%, rgba(28, 27, 20, 0.14) 88%, rgba(28, 27, 20, 0.2) 100%);
  }
}

.hero__inner { position: relative; width: 100%; padding-block: clamp(48px, 8vw, 96px); }
/* On a short screen the welcome sits a little closer to the foot, so its
   upper corners stay free for the patrons. */
@media (min-width: 701px) and (max-height: 820px) {
  .hero__inner { padding-block: clamp(36px, 7svh, 72px); }
}
/* Narrow enough that the copy stays over the blurred left of the photograph. */
.hero__body { max-width: 660px; }

.hero__title {
  font-family: var(--display);
  font-weight: var(--dw);
  font-size: clamp(44px, 6vw, 80px);
  line-height: 1.02;
  letter-spacing: var(--dls);
  text-wrap: balance;
}

.hero__lead {
  margin-top: 24px;
  max-width: 48ch;
  font-size: clamp(18px, 1.4vw, 20px);
  line-height: 1.7;
  color: rgba(251, 249, 242, 0.88);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* Controls on the photograph: paper on ink, the outline in paper. */
.hero .btn--primary { background: var(--paper); color: var(--ink); }
@media (hover: hover) { .hero .btn--primary:hover { background: var(--parchment); color: var(--ink); } }
.hero .btn--outline { color: var(--paper); border-color: rgba(251, 249, 242, 0.7); }
@media (hover: hover) { .hero .btn--outline:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); } }

@media (max-width: 560px) {
  .hero__actions .btn { flex: 1 1 auto; }
}
/* The patrons hover in the welcome's upper corners, the tops of their halos
   over the foot of the header: Archangel Raphael in the top left, St. Mary in
   the top right, each giving off a warm light and fading out below.
   They stand in a layer of their own above the page; the script sizes them
   and keeps them clear of the welcome's words. */

/* The layer covers the screen and clips, so a patron leaving past its corner
   never widens the page. */
.patrons {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 61;
  pointer-events: none;
}
.patrons.is-away { visibility: hidden; }
.patron {
  --corner: clamp(12px, 2vw, 36px);
  position: absolute;
  /* Low enough that a halo, at the top of its breath (9px up), stays clear
     of the name and the language pill above it. */
  top: calc(var(--header-h) - 6px);
  height: var(--patron-h, clamp(140px, 30svh, 260px));
  will-change: transform;
}
.patron img {
  width: auto;
  height: 100%;
  filter: drop-shadow(0 4px 8px rgba(255, 232, 176, 0.55)) drop-shadow(0 12px 26px rgba(255, 214, 140, 0.28));
}

/* A glow about each figure, brightest about the head, kept below the header
   so the light never washes over the name or the nav. */
.patron::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 9% -70% -12%;
  background: radial-gradient(closest-side at 50% 34%, rgba(255, 222, 156, 0.42), rgba(255, 210, 136, 0.2) 48%, rgba(255, 210, 136, 0.06) 72%, rgba(255, 210, 136, 0) 88%);
  pointer-events: none;
}

.patron--raphael { left: var(--corner); }
.patron--mary { right: var(--corner); }
.patron.is-crowded { visibility: hidden; }
/* On a phone they keep small, to the very corners, upright or on its side:
   the icons are painted close, their faces and halos large, so they stand at
   0.7 of the height the full-length figures had there, which keeps their
   heads the size those figures' were. */
@media (max-width: 700px) {
  .patron { height: var(--patron-h, clamp(77px, 12.6svh, 112px)); }
}
@media (orientation: landscape) and (max-height: 500px) {
  .patron { height: var(--patron-h, clamp(77px, 25svh, 112px)); }
}
/* The service schedule: the heading, the dates and the calendar link stand in
   a column beside the list, so the list's card is only as wide as its entries
   and the row is filled end to end. The column stays alongside the list as
   it runs down the page. */

.agenda-layout {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.agenda-layout__aside {
  display: grid;
  gap: 18px;
  justify-items: start;
  position: sticky;
  top: calc(var(--header-h) + 32px);
}
.agenda-layout__aside .block__head { margin-bottom: 0; }
.agenda-layout__aside .btn { margin-top: 8px; }
@media (max-width: 900px) {
  .agenda-layout { grid-template-columns: minmax(0, 1fr); }
  .agenda-layout__aside { position: static; }
}

.agenda-panel { border: 1px solid var(--card-line); background: var(--card); }

/* The coming week at full height, with no box scrolling inside the page. */
.agenda { padding: 0 clamp(16px, 2.4vw, 26px); }
.agenda__more { padding: 18px 0 22px; }

.agenda__status {
  padding: 32px 0;
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--flint);
}

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

.agenda__day {
  display: grid;
  grid-template-columns: minmax(0, 118px) minmax(0, 1fr);
  gap: clamp(12px, 2vw, 26px);
  padding: 14px 0;
  border-bottom: 1px solid var(--card-line-soft);
}
.agenda__day:last-child { border-bottom: 0; }
/* Later weeks wait behind the toggle; the row's own display would otherwise
   override the hidden attribute. */
.agenda__day[hidden] { display: none; }

.agenda__date { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; align-content: start; }

.agenda__daynum {
  font-family: var(--display);
  font-size: 30px;
  line-height: 1;
  letter-spacing: var(--dls2);
  color: var(--ink);
}

.agenda__dow {
  font-family: var(--ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}

.agenda__month { font-family: var(--ui); font-size: 12px; letter-spacing: 0.1em; color: var(--flint); flex-basis: 100%; }

.agenda__day.is-today .agenda__daynum,
.agenda__day.is-today .agenda__dow { color: var(--deep-blue); }

.agenda__today {
  font-family: var(--ui);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  background: var(--blueberry);
  border-radius: var(--r-pill);
  padding: 4px 9px;
  line-height: 1;
}

.agenda__events { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }

.agenda__event {
  display: grid;
  grid-template-columns: minmax(0, 168px) minmax(0, 1fr);
  gap: 2px 18px;
  align-items: baseline;
}

/* Full-height figures at a reading size: in the face's old-style figures at
   11px the times read too small on a phone. */
.agenda__time {
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: lining-nums;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--deep-blue);
  white-space: nowrap;
}

.agenda__title { font-size: 15px; line-height: 1.45; color: var(--ink); }

.agenda__range { font-family: var(--ui); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--flint); }

@media (max-width: 640px) {
  .agenda__day { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .agenda__event { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .agenda__month { flex-basis: auto; }
}
/* Watch & Listen: one row, the recordings and the players in the main column
   and the Facebook feed beside them as a tall column. The feed's column is
   the plugin's own 502px: any narrower and it clips its posts. */

.media {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 502px;
  gap: clamp(28px, 3.4vw, 48px);
  align-items: start;
}
.media__main { display: grid; gap: clamp(32px, 4vw, 48px); }

/* One column that can never be widened by what it holds. */
.media__group { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.media__group > * { min-width: 0; }

.media__label {
  font-family: var(--display);
  font-size: clamp(22px, 2.2vw, 26px);
  line-height: 1.25;
  letter-spacing: var(--dls2);
}

.media__stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

/* Narrower, the recordings take the full row and the feed and the players
   share the row beneath it, the players stretched to the feed's height. */
@media (max-width: 1100px) {
  .media { grid-template-columns: 502px minmax(0, 1fr); grid-template-areas: "video video" "feed audio"; }
  .media__main { display: contents; }
  .media__main > :first-child { grid-area: video; }
  .media__main > :last-child { grid-area: audio; grid-template-rows: auto 1fr; align-self: stretch; }
  .media__aside { grid-area: feed; }
  .media__stack { grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr 1fr; }
  .media__stack .embed--player iframe { flex: 1 1 auto; height: auto; min-height: 166px; }
}

/* Stacked, every embed still starts on the heading's edge. */
@media (max-width: 900px) {
  .media { grid-template-columns: minmax(0, 1fr); grid-template-areas: "video" "audio" "feed"; }
  .media__stack { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
  .media__stack .embed--player iframe { flex: none; height: 166px; }
  /* The feed is no wider than 502px, so in a wider column it sits centred. */
  .embed--feed { margin-inline: auto; }
}
@media (max-width: 640px) {
  .media__stack { grid-template-columns: minmax(0, 1fr); }
}

.embed {
  width: 100%;
  border: 1px solid var(--card-line);
  background: var(--card);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--t-lift);
}
@media (hover: hover) { .embed:hover { box-shadow: var(--e-lift); } }

.embed iframe { display: block; width: 100%; border: 0; }

.embed--video iframe { aspect-ratio: 16 / 9; }

/* The Facebook plugin renders at a fixed width, so the card matches it
   exactly rather than leaving a strip of empty card around the feed. */
.embed--feed { max-width: 502px; }
.embed--feed iframe { height: 640px; }

.embed--player iframe { height: 166px; }

.embed__meta { padding: 14px 18px; border-top: 1px solid var(--card-line-soft); display: grid; gap: 6px; }

.embed__name {
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}

/* Recent services: the latest on a screen of its own, the ones before it in
   a row beneath. The screen holds a still until the service is played. */
/* An explicit width, so Safari sizes the height from it: left to stretch,
   it kept the landscape height after a turn back upright and took its width
   from that, running the block past the screen. */
.watch__stage { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; contain: paint; background: var(--ink); }
.watch__stage iframe { position: absolute; inset: 0; height: 100%; aspect-ratio: auto; }

.watch__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  text-align: start;
  cursor: pointer;
}
/* A shade from the foot, for the service's name. */
.watch__poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28, 27, 20, 0.88) 0%, rgba(28, 27, 20, 0.42) 34%, rgba(28, 27, 20, 0) 64%);
}

/* A stream's still carries its ticker along the foot. The still runs 16%
   taller than its frame, cropped at the sides by object-fit, so the ticker
   falls below the frame and nothing reaches past its sides, where Safari on
   a phone would count it as page width and let the page zoom out. */
.watch__still {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 116%;
  object-fit: cover;
  object-position: 50% 0;
  transform-origin: 50% 0;
  transition: transform 1.2s cubic-bezier(.22, 1, .36, 1);
}

.watch__heading {
  position: absolute;
  z-index: 1;
  inset-inline: clamp(20px, 3vw, 36px) calc(clamp(20px, 3vw, 36px) + 84px);
  bottom: clamp(18px, 2.8vw, 32px);
  display: grid;
  gap: 4px;
}
.watch__name {
  font-family: var(--display);
  font-size: clamp(26px, 3.2vw, 44px);
  line-height: 1.04;
  letter-spacing: var(--dls2);
}
.watch__date { font-size: 16px; font-style: italic; line-height: 1.4; color: rgba(251, 249, 242, 0.78); }

/* Paper, with a crimson circle that rises inside it on hover, as the
   language pill fills. The arrow sits a touch right of centre to look
   centred, and points right in either language, as players do. */
.watch__play {
  position: absolute;
  z-index: 1;
  inset-inline-end: clamp(20px, 3vw, 36px);
  bottom: clamp(18px, 2.8vw, 32px);
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  transition: color 240ms ease;
}
.watch__play::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 50%;
  background: var(--rubric);
  transform: translateY(112%) scale(1.2);
  transition: transform 340ms cubic-bezier(.22, 1, .36, 1);
}
.watch__play svg { margin-left: 3px; }
.watch__poster:focus-visible .watch__play { color: var(--paper); }
@media (hover: hover) { .watch__poster:hover .watch__play { color: var(--paper); } }
.watch__poster:focus-visible .watch__play::before { transform: none; }
@media (hover: hover) { .watch__poster:hover .watch__play::before { transform: none; } }
.watch__poster:focus-visible { outline-offset: -4px; outline-color: var(--paper); }

.watch__list {
  list-style: none;
  margin: 0;
  padding: clamp(14px, 1.6vw, 18px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.4vw, 16px);
}
.watch__item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: start;
  color: var(--ink);
  cursor: pointer;
}
.watch__thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; contain: paint; margin-bottom: 4px; background: var(--ink); }
.watch__thumb .watch__still { transition-duration: 0.8s; }
@media (hover: hover) {
  .watch__poster:hover .watch__still { transform: scale(1.035); }
  .watch__item:hover .watch__still { transform: scale(1.05); }
}
/* The one on the screen is outlined in ink. */
.watch__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 0 var(--ink);
  transition: box-shadow var(--t-hover);
}
.watch__item[aria-current="true"] .watch__thumb::after { box-shadow: inset 0 0 0 3px var(--ink); }
.watch__item-name { font-family: var(--display); font-size: 17px; line-height: 1.2; }
.watch__item-date { font-size: 14px; font-style: italic; line-height: 1.3; color: var(--flint); }

@media (max-width: 640px) {
  .watch__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .watch__play { width: 52px; height: 52px; }
  .watch__heading { inset-inline-end: calc(clamp(20px, 3vw, 36px) + 64px); }
}
/* Our Services: the services in one panel and the photo wheel beside them,
   on the right (on the left in Arabic, as the grid follows the reading
   direction). The wheel keeps its place while the services scroll past it,
   as the schedule's heading column does.

   The services take half the content's width. The wheel takes the other half
   and reaches past the content's edge into the page margin, by up to 96px but
   never beyond the header's edge, so it can be larger without narrowing the
   services. (100vw counts a classic scrollbar, so on Windows the reach can be
   up to ~9px more than worked out here; the margin still covers it.) */

.services {
  --services-gap: clamp(32px, 4vw, 64px);
  --wheel-reach: min(96px, max(0px, (100vw - var(--measure)) / 2) + var(--gutter) - var(--chrome-pad));
  display: grid;
  grid-template-columns: calc((100% - var(--wheel-reach) - var(--services-gap)) / 2) minmax(0, 1fr);
  gap: var(--services-gap);
  margin-inline-end: calc(var(--wheel-reach) * -1);
  align-items: start;
}
.services .ministries { grid-column: 1; grid-row: 1; }
.services__wheel { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--header-h) + 24px); }
/* As tall as the screen allows below the header, ending 16px above its foot:
   the photo in front takes most of it and its neighbours run off the top and
   bottom. */
.services__wheel .circular-carousel[data-enhanced] {
  height: clamp(520px, calc(100vh - var(--header-h) - 40px), 840px);
}

/* Below 1100px the services' column would grow too narrow to read beside the
   wheel, so the wheel goes above them, no wider than a large photo, its
   height 1.25 times its width so the photo in front fills it on any phone. */
@media (max-width: 1100px) {
  .services { grid-template-columns: minmax(0, 1fr); margin-inline-end: 0; }
  .services .ministries,
  .services__wheel { grid-column: auto; grid-row: auto; }
  .services__wheel { position: static; width: 100%; max-width: 600px; margin-inline: auto; }
  .services__wheel .circular-carousel[data-enhanced] {
    height: clamp(380px, calc(min(100vw - 2 * var(--gutter), 600px) * 1.25), calc(100vh - var(--header-h) - 32px));
  }
}

/* Each service carries its own rule, so nothing is painted behind the cards
   while they are still fading in. */
.ministries { display: grid; }
.ministry { border: 1px solid var(--line); background: var(--card); }
.ministry + .ministry { border-top: 0; }

.ministry__body {
  padding: clamp(28px, 4vw, 44px) clamp(24px, 3.4vw, 40px);
  display: grid;
  gap: 22px;
  align-content: center;
}

.ministry__name {
  font-family: var(--display);
  font-weight: var(--dw);
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: var(--dls2);
}

.ministry__text { font-size: 17px; line-height: 1.85; color: var(--text-soft); }
.ministry__text p + p { margin-top: 0.9em; }

/* Scripture: a component, not bold text. Verses keep their own face where the
   section's text face is EB Garamond (--display is Cormorant, or Amiri in
   Arabic). */
.verses { display: grid; gap: 16px; }
.verse { border-inline-start: 2px solid var(--sky); padding-inline-start: 18px; }
.verse__text { font-family: var(--display); font-style: italic; font-size: 19px; line-height: 1.6; color: var(--text); }
.verse__ref {
  display: block;
  margin-top: 8px;
  font-family: var(--display);
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--deep-blue);
}

/* When and where, set as a reading: the time in italic Cormorant, the place
   beneath it in crimson, with no rule or box. */
.schedules { display: grid; gap: 18px; }
.schedule { display: grid; gap: 4px; }
.schedule__label { font-family: var(--ui); font-size: 16px; color: var(--text-soft); }
.schedule__when { font-family: var(--display); font-style: italic; font-size: 21px; line-height: 1.55; color: var(--text); font-variant-numeric: lining-nums; }
.schedule__where { font-family: var(--ui); font-size: 16px; line-height: 1.5; color: var(--rubric); }
/* The photo wheel. Without script, the authored list is a plain photo grid;
   once the script has built the ring, the list steps aside. Its section sets
   its height (services.css). */

.circular-carousel__items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.circular-carousel__items figure { margin: 0; display: grid; gap: 6px; }
.circular-carousel__items img {
  display: block;
  width: 100%;
  /* The width and height attributes only reserve the shape while loading;
     without this the height attribute would set the rendered height. */
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: var(--line);
}
.circular-carousel__items figcaption { font-size: 15px; line-height: 1.4; color: var(--text-soft); }
.circular-carousel[data-enhanced] .circular-carousel__items { display: none; }

.circular-carousel[data-enhanced] {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: pan-x;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
/* On touch-first devices the ring isn't draggable (the script drops dragging
   under the same query), so the page scrolls and pinch-zooms as normal
   whatever a swipe starts on. */
@media (hover: none) and (pointer: coarse) {
  .circular-carousel[data-enhanced] { touch-action: manipulation; }
}
.circular-carousel[data-draggable] { cursor: grab; }
.circular-carousel[data-dragging] { cursor: grabbing; }

/* The wheel fades into the ground at its top and bottom edges, under a still
   wash of the ground's colour: a mask would redraw every card through it on
   every frame of a turn. */
.circular-carousel__view { position: absolute; inset: 0; }
.circular-carousel[data-enhanced]::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, var(--mist), transparent 18%, transparent 82%, var(--mist));
}

.circular-carousel__stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.45s ease;
}
.circular-carousel[data-ready] .circular-carousel__stage { opacity: 1; }

.circular-carousel__camera,
.circular-carousel__ring,
.circular-carousel__card {
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
}
.circular-carousel__camera { position: relative; }
.circular-carousel__ring,
.circular-carousel__card { position: absolute; left: 0; top: 0; }

.circular-carousel__tile {
  position: absolute;
  outline: 1px solid transparent;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
/* Each part takes the card's corners itself, with no clip on the frame, and
   the shade has a layer of its own: its fade then changes on the graphics
   chip, where through a clip it repainted the card, photo and all, on every
   frame of a turn. The ring is drawn at its fitted size (--cc-fit, from the
   script), so the corners are measured at that size too. */
.circular-carousel__frame { position: absolute; inset: 0; border-radius: calc(12px * var(--cc-fit, 1)); }
.circular-carousel__photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  border-radius: inherit;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Cards turning away fade into the page's ground. */
.circular-carousel__shade { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: var(--mist); opacity: 0; will-change: opacity; }
/* Giving: the one place the palette inverts, ink ground and parchment type.
   Full bleed on ink, the icon with its verses holds one column and the appeal
   the other, so the band reads as one piece rather than a panel in a field. */

.give {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-areas: "aside head" "aside body";
  grid-template-rows: auto 1fr;
  column-gap: clamp(40px, 6vw, 96px);
}
.give__head { grid-area: head; margin-bottom: clamp(20px, 2.6vw, 30px); color: var(--parchment); }

/* The icon with its verses beneath it, as a verse sits under an icon. */
.give__aside {
  grid-area: aside;
  display: grid;
  gap: clamp(28px, 3vw, 40px);
  align-content: start;
}

/* Cropped to 4:5 around Christ and the loaves. */
.give__figure {
  position: relative;
  box-shadow: var(--e-lift);
  aspect-ratio: 4 / 5;
  background: #26251C;
}
.give__figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }

/* Read like a letter: the appeal under the heading, the thanks and signature
   at the foot, level with the end of the verse beside them. */
.give__body { grid-area: body; display: flex; flex-direction: column; gap: 22px; }

.give__title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--display);
  font-style: italic;
  font-weight: var(--dw);
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.3;
  color: var(--parchment);
}
/* Optical alignment: the glyph's mass sits a little above the baseline. */
.give__title .mark { position: relative; top: 4px; color: var(--gold); }

.give__text { font-size: 18px; line-height: 1.8; color: rgba(235, 228, 200, 0.78); max-width: 52ch; }
.give__cta { justify-self: start; align-self: flex-start; margin-top: 4px; }

.give__closing {
  display: grid;
  gap: 18px;
  margin-top: auto;
  padding-top: clamp(26px, 3vw, 36px);
  border-top: 1px solid rgba(235, 228, 200, 0.16);
}
.give__closing .prose { color: rgba(235, 228, 200, 0.78); font-size: 18px; }

/* Signed, like the end of a letter. */
.signature { font-family: var(--display); font-style: italic; font-size: 22px; line-height: 1.3; color: var(--deep-blue); }
.give__closing .signature { color: var(--parchment); }

.quote {
  margin: 0;
  border-inline-start: 2px solid var(--deep-blue);
  padding: 4px 0 4px clamp(20px, 2.4vw, 28px);
}
.quote__text { font-family: var(--display); font-style: italic; font-size: clamp(21px, 2.4vw, 27px); line-height: 1.55; color: var(--text); }
.quote cite {
  display: block;
  margin-top: 14px;
  font-style: normal;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--deep-blue);
}
.give__aside .quote { border-inline-start-color: rgba(235, 228, 200, 0.4); }
.give__aside .quote__text { color: var(--parchment); font-size: clamp(20px, 1.9vw, 24px); }
.give__aside .quote cite { color: var(--muted); }

/* The verses on giving, one at a time. With script they share one grid cell,
   so the panel keeps the longest verse's height and nothing beside or below
   it moves as they change; each verse is only as tall as its own text. */
.rotator__item:not(.is-active) { display: none; }
.js .rotator__track { display: grid; position: relative; }
.js .rotator__item { grid-area: 1 / 1; align-self: start; }
.js .rotator__item:not(.is-active) { display: block; visibility: hidden; }
.js .rotator__item.is-leaving { visibility: visible; }

/* One rule for the whole rotator, drawn by the track at the current verse's
   height, so it eases from one verse's height to the next instead of four
   rules snapping in and out. */
.js .give__aside .rotator__item { border-inline-start-color: transparent; }
.js .rotator__track::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: 2px;
  height: var(--verse-h, 100%);
  background: rgba(235, 228, 200, 0.4);
  transition: height 650ms cubic-bezier(.22, 1, .36, 1);
}

/* The words of the verse that is leaving slide up and out first, then the
   next verse's come up behind them (the masks are in motion.css). */
.js .rotator__item:not(.is-active) .rw__in { transform: translateY(110%); opacity: 0; }
.js .rotator__item.is-active .rw__in {
  transform: none;
  opacity: 1;
  transition: transform 650ms cubic-bezier(.22, 1, .36, 1), opacity 420ms ease;
  transition-delay: calc(var(--enter, 0ms) + var(--i) * var(--stagger, 16ms));
}
.js .rotator__item.is-leaving .rw__in {
  transform: translateY(-110%);
  opacity: 0;
  transition: transform 340ms cubic-bezier(.55, 0, .7, .2), opacity 260ms ease;
  transition-delay: calc(var(--i) * 5ms);
}
/* Waiting below its line: the verse in place, for a moment, when the
   language changes, so it comes up again in the new words. */
.js .rotator__item.is-holding .rw__in { transform: translateY(110%); opacity: 0; transition: none; }

/* The dots sit under the verse's text; the first dot's mark lines up with it. */
.rotator__controls {
  display: flex;
  gap: 2px;
  margin-top: 10px;
  padding-inline-start: calc(clamp(20px, 2.4vw, 28px) - 8.5px);
  transition: transform 600ms ease;
}
.rotator__dot {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.rotator__dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(235, 228, 200, 0.32);
  transition: background var(--t-hover);
}
@media (hover: hover) { .rotator__dot:hover::before { background: rgba(235, 228, 200, 0.7); } }
.rotator__dot[aria-current="true"]::before { background: var(--parchment); }
.rotator :focus-visible { outline-color: var(--parchment); }

/* Stacked, the appeal and its button come first, then the icon with its
   verses, then the thanks: the body's children join the band's own grid. */
@media (max-width: 700px) {
  .give { grid-template-columns: minmax(0, 1fr); grid-template-areas: none; grid-template-rows: none; row-gap: 22px; }
  .give__head,
  .give__aside { grid-area: auto; }
  .give__body { display: contents; }
  .give__aside { order: 1; margin-block: 18px; }
  .give__figure { max-width: 420px; width: 100%; }
  .give__closing { order: 2; margin-top: 0; }
}
/* Contact: the two churches on their maps, the people to call, and the
   addresses and links the footer repeats. */

.address { display: grid; gap: 7px; align-content: start; }
.address__label {
  font-family: var(--ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--deep-blue);
}
.address address { font-style: normal; font-size: 16px; line-height: 1.5; color: var(--text); }

.social { display: flex; flex-wrap: wrap; gap: 18px; }
.social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-family: var(--ui);
  font-size: 16px;
  font-weight: 500;
  color: var(--deep-blue);
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(47, 95, 140, 0.35);
  transition: color var(--t-hover), border-color var(--t-hover);
}
@media (hover: hover) { .social a:hover { color: var(--ink); border-bottom-color: var(--ink); } }
.social svg { display: block; flex: none; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 26px;
  align-items: stretch;
}

.location {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--card-line);
  background: var(--card);
  transition: box-shadow var(--t-lift);
}
@media (hover: hover) { .location:hover { box-shadow: var(--e-lift); } }
.location iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-bottom: 1px solid var(--card-line-soft);
}
.location__meta { flex: 1; padding: 20px 22px; display: grid; gap: 8px; align-content: start; }

/* The people to call: Abouna's card across the full width, carrying his
   biography, and the church's own number beneath it. */
.people {
  margin-top: 26px;
  display: grid;
  gap: 26px;
}

.person {
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--card-line);
  background: var(--card);
  padding: 20px 22px;
  transition: box-shadow var(--t-lift);
}
@media (hover: hover) { .person:hover { box-shadow: var(--e-raised); } }

/* The parish cross on ink, where a typed "SMAR" stood in for a photograph. */
.person__mark {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--parchment);
  display: grid;
  place-items: center;
}
.person__mark .mark { width: 30px; height: 30px; }

.person__body { display: grid; gap: 5px; min-width: 0; }
.person__name { font-family: var(--display); font-weight: 600; font-size: 22px; line-height: 1.2; color: var(--ink); }
.person__tel { font-family: var(--ui); font-size: 15px; letter-spacing: 0.08em; }
/* Only as wide as the number, so in Arabic it keeps to the right with the
   words above it rather than to the left of a full-width line. */
.person .person__tel { justify-self: start; }

@media (max-width: 560px) {
  .person { flex-direction: column; align-items: flex-start; }
}

/* Abouna's card: his portrait beside his name and number, as the small card
   had them, and his biography under a hairline, set as the services' text is.
   The photograph is 300px square, so it is shown no larger than it stays
   sharp. */
.person--featured {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: start;
  gap: clamp(24px, 3.4vw, 48px);
  padding: clamp(24px, 3vw, 40px);
}
.person__portrait { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; background: var(--ink); }
.person--featured .person__name { font-size: clamp(28px, 2.6vw, 34px); line-height: 1.15; letter-spacing: var(--dls2); }
.person--featured .person__tel { font-size: 16px; }
.person__bio {
  margin-top: 18px;
  padding-top: 22px;
  border-top: 1px solid var(--card-line-soft);
  display: grid;
  gap: 0.9em;
  font-size: 17px;
  line-height: 1.85;
  color: var(--text-soft);
}
.person__bio p { max-width: 68ch; }
.person__bio-rest { display: grid; gap: inherit; }
.person--featured .person__more { display: none; }

@media (max-width: 900px) {
  .person--featured { grid-template-columns: 180px minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .person--featured { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .person__portrait { width: 132px; }
}

/* On a phone, upright or on its side, the biography shows its first paragraph
   and opens on the rest when asked (bio.js). */
@media (max-width: 700px), (orientation: landscape) and (max-height: 500px) {
  .person--featured.is-folded .person__bio-rest { display: none; }
  .person--featured .person__more { display: inline-flex; justify-self: start; margin-top: 20px; }
}

/* The church's number on a computer: one row across the card, the cross and
   its name at one end and the number at the other, where the number under
   the name left most of the wide card empty. It is inset as Abouna's card is,
   so the cross stands under his portrait. */
@media (min-width: 900px) {
  .person--office { padding-inline: clamp(24px, 3vw, 40px); }
  .person--office .person__body { flex: 1; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 24px; }
  .person--office .person__tel { grid-column: 2; grid-row: 1 / span 2; justify-self: end; font-size: 18px; }
}
/* The footer: a bar across the bottom, the name and the church's banner hard
   against one end, the contact details two by two against the other. */

.site-footer {
  margin-top: clamp(56px, 6vw, 88px);
  background: var(--mist);
  border-top: 1px solid var(--line);
}

.site-footer__inner {
  padding: clamp(20px, 2.6vw, 32px) var(--chrome-pad);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px clamp(24px, 4vw, 56px);
}

.site-footer__identity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  color: var(--ink);
}

.site-footer__wordmark { display: flex; align-items: center; gap: 12px; }
.site-footer__mark { width: 26px; height: 26px; }
.site-footer__name { font-family: var(--display); font-size: 18px; font-weight: 600; line-height: 1.25; }

/* The banner whole, its white ground taken into the footer's own by
   multiplying, so it reads as printed on the page rather than pasted on. */
.site-footer__banner { width: 320px; max-width: 100%; height: auto; mix-blend-mode: multiply; }

/* Two across, two down: the addresses over the telephones and the links. */
.site-footer__details {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 18px clamp(32px, 4vw, 64px);
  align-items: start;
  justify-items: start;
  text-align: start;
}
.site-footer__details .address { gap: 5px; }
.site-footer__details .address__label { font-size: 15px; font-style: italic; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--text-soft); }
.site-footer__details address { font-size: 15px; line-height: 1.5; }
.site-footer__details .person__tel { display: block; font-size: 13px; line-height: 1.6; letter-spacing: 0; font-variant-numeric: lining-nums; }
.site-footer__details .social { gap: 16px; align-items: center; justify-content: flex-start; }

/* Short of a computer's width, the banner shrinks with the screen. */
@media (max-width: 959px) {
  .site-footer__banner { width: clamp(200px, 26vw, 260px); }
}

/* Condensed on a phone: tighter type, less air, no banner, and still two by
   two, the links stacked under Follow line for line with the numbers under
   Telephone, their names lined up past icons of one width. */
@media (max-width: 700px) {
  .site-footer__inner { padding: 18px var(--gutter); gap: 16px; }
  .site-footer__details { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; width: 100%; }
  .site-footer__details .address__label { font-size: 14px; }
  .site-footer__details address,
  .site-footer__details .person__tel { font-size: 14px; line-height: 1.45; }
  .site-footer__name { font-size: 16px; }
  .site-footer__mark { width: 22px; height: 22px; }
  .site-footer__banner { display: none; }
  .site-footer__details .social { flex-direction: column; align-items: flex-start; gap: 0; }
  .site-footer__details .social a { font-size: 14px; line-height: 1.45; padding-bottom: 0; border-bottom: 0; }
  .site-footer__details .social svg { width: 14px; }
}

/* The bar as on a computer wherever it fits: a tablet either way up, and any
   phone on its side, the name and banner at one end and the details two by
   two at the other, from 660px, the narrowest it fits. Only a phone held
   upright stacks them. */
@media (min-width: 660px) {
  .site-footer__inner { flex-wrap: nowrap; padding-inline: var(--chrome-pad); }
  .site-footer__banner { display: block; }
  .site-footer__details { width: auto; grid-template-columns: repeat(2, auto); }
}
/* Arabic: the locale swaps the whole stack, not just the glyphs. Amiri
   throughout, line height up, and no tracking (Arabic must never be
   tracked); sizes run a step larger, as Naskh sits optically smaller than
   the Latin. Right to left, the details drawn from a leading edge mirror. */

html[lang="ar"] {
  --display: Amiri, "Cormorant Garamond", Georgia, serif;
  --ui: Amiri, "Cormorant Garamond", Georgia, serif;
  --body: Amiri, "Cormorant Garamond", Georgia, serif;
  --text-face: Amiri, "Cormorant Garamond", Georgia, serif;
  --dw: 400;
  --dls: 0;
  --dls2: 0;
}

html[lang="ar"] body { font-size: 19px; line-height: 2; }

html[lang="ar"] .brand__name,
html[lang="ar"] .nav__link,
html[lang="ar"] .drawer__link,
html[lang="ar"] .btn,
html[lang="ar"] .address__label,
html[lang="ar"] .schedule__label,
html[lang="ar"] .verse__ref,
html[lang="ar"] .agenda__dow,
html[lang="ar"] .agenda__time,
html[lang="ar"] .agenda__today,
html[lang="ar"] .agenda__range,
html[lang="ar"] .embed__name,
html[lang="ar"] .signature,
html[lang="ar"] .site-footer__name,
html[lang="ar"] .quote cite,
html[lang="ar"] .social a,
html[lang="ar"] .skip-link,
html[lang="ar"] .agenda__status {
  letter-spacing: 0;
  text-transform: none;
}

html[lang="ar"] .brand__name { font-size: 15px; font-weight: 700; line-height: 1.35; }
html[lang="ar"] .brand__name span + span { margin-top: 0; }
html[lang="ar"] .nav__link { font-size: 16px; }
html[lang="ar"] .drawer__link { font-size: 16px; }
html[lang="ar"] .btn { font-size: 15px; }
html[lang="ar"] .btn--sm { font-size: 14px; }
html[lang="ar"] .address__label { font-size: 13px; }
html[lang="ar"] .schedule__label { font-style: normal; }
html[lang="ar"] .verse__ref { font-size: 14px; }
html[lang="ar"] .quote cite { font-size: 14px; }
html[lang="ar"] .embed__name { font-size: 15px; }
html[lang="ar"] .signature { font-size: 20px; font-style: normal; }
html[lang="ar"] .site-footer__name { font-size: 15px; line-height: 1.7; }
html[lang="ar"] .site-footer__details .address__label { font-style: normal; }
html[lang="ar"] .agenda__dow { font-size: 13px; }
html[lang="ar"] .agenda__time { font-size: 13px; }
html[lang="ar"] .agenda__title { font-size: 16px; line-height: 1.8; }
html[lang="ar"] .agenda__range { font-size: 13px; }
html[lang="ar"] .verse__text,
html[lang="ar"] .quote__text,
html[lang="ar"] .schedule__when { font-style: normal; line-height: 1.9; }

/* Latin runs, addresses and phone numbers, keep their own face. */
html[lang="ar"] address,
html[lang="ar"] .person__tel { font-family: "Cormorant Garamond", Georgia, serif; }

html[dir="rtl"] .drawer__panel { inset: 0 auto 0 0; transform: translateX(-100%); }
html[dir="rtl"] .drawer[data-open="true"] .drawer__panel { transform: none; }
html[dir="rtl"] .drawer__link.is-active { box-shadow: inset -2px 0 0 var(--ink); }
html[dir="rtl"] .skip-link { left: auto; right: 12px; }
/* Motion: content fading up as it is reached, the rising words, the
   patrons' arrival and hover, and what all of it does under reduced motion. */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--t-reveal), transform var(--t-reveal);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Rising words: each word comes up through its own mask, one after another.
   The masks give italic overhangs and Arabic marks a little room, taken back
   by the negative margin so the lines don't move. */
.rw {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0.12em 0.1em 0.16em;
  margin: -0.12em -0.1em -0.16em;
}
.rw__in { display: inline-block; }
/* Copied text comes out once, from the words, not again from the hidden copy. */
.rw-copy { user-select: none; }

/* The welcome, the section headings and the services' verses rise the first
   time they are reached. Until the script splits them they stay hidden, so
   they never show whole for a moment first. */
.js [data-rise]:not(.is-split) { visibility: hidden; }
.js [data-rise] .rw__in { transform: translateY(110%); opacity: 0; }
.js [data-rise].is-risen .rw__in {
  transform: none;
  opacity: 1;
  transition: transform 650ms cubic-bezier(.22, 1, .36, 1), opacity 420ms ease;
  transition-delay: calc(var(--i) * var(--stagger, 16ms));
}

/* The welcome's introduction and buttons follow its words up, once. */
.js .hero__lead,
.js .hero__actions {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms ease, transform 700ms cubic-bezier(.22, 1, .36, 1);
}
.js .has-risen > .hero__lead { opacity: 1; transform: none; transition-delay: 320ms; }
.js .has-risen > .hero__actions { opacity: 1; transform: none; transition-delay: 440ms; }

/* The patrons come down into their corners with the welcome, then hover
   there, rising and settling a few pixels, each to its own slow breath. */
.js .patron img {
  opacity: 0;
  transform: translateY(-36%);
  transition: opacity 900ms ease, transform 1600ms cubic-bezier(.16, 1, .3, 1);
}
.js .patron.is-in img {
  opacity: 1;
  transform: none;
  animation: patron-hover 6.5s ease-in-out 1.6s infinite alternate;
}
.js .patron--mary.is-in img { transition-delay: 220ms; animation-duration: 8s; animation-delay: 2s; }
.patrons.is-away .patron img { animation-play-state: paused; }
/* The breath moves translate, apart from the arrival's transform: Chrome and
   Safari both run it off the main thread. (On transform, Chrome restyled the
   page on every frame for as long as the patrons were on screen.) */
@keyframes patron-hover {
  from { translate: 0 0; }
  to { translate: 0 -9px; }
}

/* Leaving the welcome, each slides up and out past its own corner and fades,
   in step with the scroll: gone 260px down, faded by 62.5% of the way. Where
   an animation can follow the scroll, this does it (Safari moves it as the
   page scrolls, off the main thread, so a phone on low power still moves it
   smoothly); elsewhere patrons.js does, with the same numbers. */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .js .patron--raphael,
    .js .patron--mary {
      animation: patron-leave-left linear both;
      animation-timeline: scroll(root);
      animation-range: 0px 260px;
    }
    .js .patron--mary { animation-name: patron-leave-right; }
  }
}
@keyframes patron-leave-left {
  62.5% { opacity: 0; }
  to { opacity: 0; transform: translate(-130px, -90px); }
}
@keyframes patron-leave-right {
  62.5% { opacity: 0; }
  to { opacity: 0; transform: translate(130px, -90px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* Transitions go altogether. Cut to a hundredth of a millisecond instead,
     every change of every property became one, and a size the script read
     straight after a change was the old one: the patrons, refitted, shrank. */
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
  .js .reveal,
  .js .hero__lead,
  .js .hero__actions { opacity: 1; transform: none; }
  .js .patron img { opacity: 1; transform: none; animation: none; }
  .js [data-rise]:not(.is-split) { visibility: visible; }
}
