:root {
  --ink: #161d38;
  --navy: #17224d;
  --cobalt: #1d4aa8;
  --ruby: #b4182d;
  --ruby-deep: #8e1122;
  --gold: #e8b23a;
  --gold-soft: #fbf0d6;
  --text: #2a3047;
  --muted: #5d6377;
  --cream: #f8f4ec;
  --sand: #efe7da;
  --line: #e7e0d4;
  --paper: #ffffff;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Figtree", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --radius: 10px;
  --shadow: 0 24px 50px -28px rgba(22, 29, 56, 0.55);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.7;
}

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

a { color: var(--cobalt); font-weight: 500; text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--ruby); }

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

h1, h2, h3 {
  margin: 0 0 0.5em;
  color: var(--navy);
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.2;
}

h2 { font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.6rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; }

.wrap { width: min(100% - 2.5rem, 1180px); margin-inline: auto; }
.wrap--text { max-width: 760px; }
.wrap--wide { max-width: 980px; }

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 20;
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--paper);
}
.skip-link:focus { top: 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.72rem 1.45rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--cobalt); color: #fff; }
.btn--accent { background: var(--ruby); color: #fff; }
.btn--accent:hover { background: var(--ruby-deep); color: #fff; }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: var(--gold); color: var(--ink); }
.btn--ghost { border-color: rgba(255, 255, 255, 0.7); color: #fff; }
.btn--ghost:hover { border-color: #fff; background: #fff; color: var(--navy); }
.btn--live { border-color: var(--ruby); color: var(--ruby); }
.btn--live:hover { background: var(--ruby); color: #fff; }
.btn--big { padding: 0.95rem 2.4rem; font-size: 1.15rem; }

.more { font-weight: 600; }
.more::after { content: " \2192"; }

.live-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.3; } }

/* The pointed shape of the sanctuary windows */
.arch {
  width: 100%;
  object-fit: cover;
  aspect-ratio: 100 / 130;
  -webkit-mask: url("img/arch.svg") center / 100% 100% no-repeat;
  mask: url("img/arch.svg") center / 100% 100% no-repeat;
}

/* Announcement */
.notice { background: var(--gold); color: var(--ink); }
.notice__inner { padding-block: 0.6rem; text-align: center; }
.notice p { margin: 0; font-weight: 600; }
.notice a { margin-left: 0.4rem; color: inherit; font-weight: 700; }
.notice a::after { content: " \2192"; }
.notice a:hover { color: var(--ruby-deep); }

/* Header */
.header { position: relative; z-index: 10; background: var(--paper); box-shadow: 0 1px 0 var(--line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.7rem; }
.header__logo { flex: 0 1 auto; min-width: 0; }
.header__logo img { width: auto; height: 52px; }

.nav-toggle {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--navy);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

.nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  padding: 0.5rem 1.25rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.nav.is-open { display: block; }
.nav__list, .nav__sub { margin: 0; padding: 0; list-style: none; }
.nav__item > a:not(.btn), .nav__parent, .nav__sub a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.6rem 0.25rem;
  border: 0;
  background: none;
  color: var(--navy);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.nav__parent svg { width: 12px; height: 8px; transition: transform 0.15s; }
.nav__parent[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav__sub { display: none; padding-left: 0.9rem; border-left: 2px solid var(--sand); }
.nav__parent[aria-expanded="true"] + .nav__sub { display: block; }
.nav__sub a { font-weight: 500; }
.nav a[aria-current="page"]:not(.btn) { color: var(--ruby); }
.nav a:not(.btn):hover, .nav__parent:hover { color: var(--ruby); }
.nav__item--cta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
.nav__item--cta .btn { padding: 0.55rem 1.35rem; }

/* Home hero: the words sit in the dark of the window frames, with the glass glowing beside them */
.hero { position: relative; display: flex; align-items: center; overflow: hidden; min-height: clamp(33rem, 52vw, 44rem); background: var(--ink); color: #fff; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 100% 50%; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(14, 18, 38, 0.8) 0%, rgba(14, 18, 38, 0.58) 42%, rgba(14, 18, 38, 0.06) 68%, rgba(14, 18, 38, 0) 100%);
}
.hero__inner { position: relative; z-index: 1; padding-block: 3rem; }
.hero__kicker { margin-bottom: 0.9rem; color: var(--gold); font-size: 1rem; font-weight: 600; letter-spacing: 0.04em; }
.hero h1 { max-width: 12em; margin-bottom: 0.4em; color: #fff; font-size: clamp(2.8rem, 1.8rem + 4.6vw, 5.2rem); line-height: 1.06; }
.hero__sub { max-width: 31rem; margin-bottom: 1.6rem; font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.32rem); line-height: 1.5; }
.hero__sub p { margin: 0 0 0.3em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 0.75rem 2.75rem; margin: 2.25rem 0 0; }
.hero__facts dt { color: var(--gold); font-size: 0.9rem; font-weight: 600; }
.hero__facts dd { margin: 0; font-size: 1.12rem; font-weight: 500; }
.hero__facts a { color: #fff; }
.hero__facts a:hover { color: var(--gold); }

/* Inner page header */
.page-head { position: relative; overflow: hidden; background: var(--ink); color: #fff; }
.page-head__bg { position: absolute; top: 0; right: 0; bottom: 0; width: min(72%, 1000px); height: 100%; object-fit: cover; object-position: 50% 50%; }
.page-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--ink) 28%, rgba(22, 29, 56, 0.72) 58%, rgba(22, 29, 56, 0.1) 100%);
}
.page-head__inner { position: relative; z-index: 1; padding-block: clamp(3rem, 2.4rem + 3vw, 5rem); }
.page-head h1 { margin: 0; color: #fff; font-size: clamp(2.3rem, 1.7rem + 2.8vw, 3.8rem); }

/* Worship online */
.watch { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); background: var(--cream); scroll-margin-top: 1rem; }
.watch__grid { display: grid; gap: 2.25rem; align-items: center; }
.watch__text h2 { margin-bottom: 0.35em; }
.watch__closing { margin-top: 1.25rem; color: var(--muted); }
.watch__more { margin: 0.6rem 0 0; }
.player { margin: 0; }
.player__frame { overflow: hidden; border-radius: var(--radius); background: var(--ink); box-shadow: var(--shadow); aspect-ratio: 16 / 9; }
.player__frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.player__caption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 1rem; margin-top: 0.75rem; font-size: 1rem; }
.player__status { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--muted); font-weight: 600; }
.player__status--live { color: var(--ruby); }

.bulletin-card {
  display: block;
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--ruby);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--paper);
  color: var(--navy);
  box-shadow: 0 10px 26px -20px rgba(22, 29, 56, 0.6);
}
.bulletin-card:hover { color: var(--ruby); }
.bulletin-card__label { display: block; color: var(--muted); font-size: 0.92rem; font-weight: 600; }
.bulletin-card strong { font-family: var(--serif); font-size: 1.22rem; font-weight: 500; }
.bulletin-card strong::after { content: " \2192"; font-family: var(--sans); }

/* We're keeping your seat warm */
.seat { display: grid; background: var(--paper); }
.seat__photo { width: 100%; height: 100%; min-height: 20rem; object-fit: cover; }
.seat__text { padding: clamp(2.5rem, 1.5rem + 4vw, 5.5rem) clamp(1.25rem, 0.5rem + 5vw, 6rem); align-self: center; }
.seat h2 { font-style: italic; }
.seat__lead { color: var(--navy); font-size: 1.22rem; line-height: 1.6; }
.seat h3 { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }

/* Happening at Cann */
.happening { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); background: var(--cream); }
.happening__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 2rem; }
.happening__head h2 { margin-bottom: 0.25em; }
.flyers { display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.flyers a { display: block; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); transition: transform 0.2s; }
.flyers a:hover { transform: translateY(-3px); }

/* Come and worship with us */
.visit { position: relative; overflow: hidden; background: var(--navy); color: #fff; }
.visit__grid { display: grid; gap: 2rem; align-items: end; }
.visit__text { padding-top: clamp(3rem, 2rem + 4vw, 5.5rem); align-self: center; }
.visit h2 { color: #fff; }
.visit__time { margin-bottom: 0.4em; color: var(--gold); font-family: var(--serif); font-size: clamp(1.4rem, 1.2rem + 0.9vw, 1.9rem); }
.visit__address { margin-bottom: 1.5rem; font-size: 1.2rem; line-height: 1.45; }
.visit__address a { color: #fff; }
.visit__address a:hover { color: var(--gold); }
.visit .arch { max-width: 25rem; margin-inline: auto; margin-top: 1rem; margin-bottom: -3.5rem; }

/* Inner pages */
.section { padding-block: 3.25rem 5rem; }
.section h2:not(:first-child) { margin-top: 2.5rem; }
.page-intro { margin-bottom: 2rem; }
.prose { font-size: 1.16rem; }
.lead { color: var(--navy); font-family: var(--serif); font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); line-height: 1.55; }

.rich-text > :last-child { margin-bottom: 0; }
.rich-text ul, .rich-text ol { padding-left: 1.3em; }
.rich-text li { margin-bottom: 0.25em; }

.split { display: grid; gap: 2.5rem; }
.next-links { display: grid; gap: 0.3rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.about-photos { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; margin-top: 2.25rem; }
.about-photos img { border-radius: var(--radius); }
.about-photos img:first-child { width: 170px; }
.about-photos img:last-child { flex: 1 1 200px; min-width: 0; max-width: 320px; }

.then-now { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-content: start; }
.then-now figure { margin: 0; }
.then-now img { width: 100%; border-radius: var(--radius); }
.then-now figcaption { margin-top: 0.4rem; color: var(--muted); font-size: 0.95rem; font-weight: 600; text-align: center; }

.people { display: grid; gap: 3rem; margin: 0; padding: 0; list-style: none; }
.person { display: grid; gap: 1.25rem; }
.person img { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow); }
.person h2 { margin: 0 0 0.1em; font-size: 1.75rem; }
.person__role { margin-bottom: 0.7em; color: var(--ruby); font-weight: 600; }
.person__email { margin: 0.8em 0 0; }

.session-card { margin-top: 2.5rem; padding: 2rem 2.25rem; border-top: 4px solid var(--gold); border-radius: var(--radius); background: var(--cream); }
.session-card ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.1rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.session-card__members { font-size: 1.2rem; }
.session-card__officers { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }

.archive { margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px solid var(--line); }
.archive h2 { font-size: 1.6rem; }
.section .archive h2 { margin-top: 0; }

.issue-latest {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1.5rem 1.75rem;
  border-top: 4px solid var(--gold);
  border-radius: var(--radius);
  background: var(--cream);
}
.section .issue-latest h2 { margin: 0; font-size: 1.6rem; }
.issue-latest__tag { display: block; color: var(--ruby); font-size: 0.9rem; font-weight: 700; }

.doc-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.doc-list li { border-bottom: 1px solid var(--line); }
.doc-list a { display: block; padding: 0.65rem 0; }

.calendar-frame { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.calendar-frame iframe { display: block; width: 100%; height: 720px; border: 0; }

.give__button { margin: 2rem 0 0; }

.album { margin: 0; padding: 0; list-style: none; columns: 3 240px; column-gap: 14px; }
.album li { margin-bottom: 14px; break-inside: avoid; }
.album a { display: block; overflow: hidden; border-radius: 8px; box-shadow: 0 12px 28px -22px rgba(22, 29, 56, 0.7); }
.album img { width: 100%; transition: transform 0.25s; }
.album a:hover img { transform: scale(1.02); }

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(14, 18, 38, 0.96);
  color: #fff;
}
.lightbox::backdrop { background: rgba(14, 18, 38, 0.96); }
.lightbox[open] { display: grid; grid-template-rows: 1fr auto; }
.lightbox__stage { display: grid; place-items: center; min-height: 0; padding: 1rem; }
.lightbox__stage img { max-width: 100%; max-height: calc(100dvh - 6rem); width: auto; height: auto; object-fit: contain; }
.lightbox__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.5rem 1rem; padding: 0.6rem 1rem 1rem; }
.lightbox__caption { flex: 1 1 100%; margin: 0; font-size: 0.95rem; text-align: center; }
.lightbox button {
  padding: 0.5rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: none;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.lightbox button:hover { background: #fff; color: var(--navy); }

/* Join us */
.contact { display: grid; gap: 2.5rem; margin-top: 3rem; }
.contact__info h2 { font-size: 1.5rem; }
.section .contact__info h2:not(:first-child) { margin-top: 1.75rem; }
.contact__info p { margin-bottom: 0.4em; }
.contact__map { display: block; width: 100%; height: 380px; margin-top: 3rem; border: 0; border-radius: var(--radius); }

.message { padding: 1.75rem; border-top: 4px solid var(--gold); border-radius: var(--radius); background: var(--cream); }
.section .message h2 { margin-top: 0; font-size: 1.6rem; }
.message__row { display: grid; gap: 1rem; }
.message__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.message .field { display: grid; gap: 0.25rem; margin-bottom: 1rem; }
.message label { color: var(--navy); font-weight: 600; }
.message input, .message textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid #cdc5b6;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
}
.message__status { padding: 0.7rem 1rem; border-radius: 6px; font-weight: 600; }
.message__status--ok { background: #e3f1e0; color: #24532a; }
.message__status--error { background: #fbe6e3; color: var(--ruby-deep); }

/* Footer */
.footer { position: relative; background: var(--ink); color: #fff; font-size: 1.03rem; }
.footer a { color: #fff; font-weight: 500; }
.footer a:hover { color: var(--gold); }
.footer h2 { margin-bottom: 0.6em; color: var(--gold); font-family: var(--sans); font-size: 0.98rem; font-weight: 600; }
.footer p { margin-bottom: 0.45em; }
.footer__grid { display: grid; gap: 2rem; padding-block: 3.25rem 2.25rem; }
.footer__brand { display: flex; gap: 1rem; align-items: flex-start; }
.footer__brand img { flex: none; width: 52px; }
.footer__name { font-family: var(--serif); font-size: 1.25rem; line-height: 1.3; }
.footer__links { margin: 0; padding: 0; list-style: none; }
.footer__links li { margin-bottom: 0.3em; }
.footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 2rem;
  padding-block: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.95rem;
}
.footer__base p { margin: 0; }

@media (max-width: 639px) {
  .hero { align-items: flex-start; min-height: 40rem; }
  .hero__bg { object-position: 88% 50%; }
  .hero::after { background: linear-gradient(180deg, rgba(14, 18, 38, 0.9) 0%, rgba(14, 18, 38, 0.84) 62%, rgba(14, 18, 38, 0.25) 100%); }
  .page-head__bg { width: 100%; }
  .page-head::after { background: rgba(22, 29, 56, 0.6); }
}

@media (min-width: 640px) {
  .header__logo img { height: 62px; }
  .flyers img { width: auto; height: 300px; }
  .message__row { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
  .person { grid-template-columns: 200px 1fr; gap: 2.5rem; align-items: start; }
}

@media (min-width: 960px) {
  .watch__grid { grid-template-columns: 3fr 2fr; gap: 3.5rem; }
  .seat { grid-template-columns: 1fr 1fr; }
  .visit__grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .visit .arch { margin-top: 3.5rem; margin-right: 0; }
  .split { grid-template-columns: 3fr 2fr; gap: 4rem; align-items: start; }
  .split--history { grid-template-columns: 1fr 1fr; }
  .contact { grid-template-columns: 2fr 3fr; }
  .footer__grid { grid-template-columns: 1.7fr 1fr 1fr 0.8fr; }
}

@media (min-width: 1040px) {
  .header__logo img { height: 66px; }
  .nav-toggle { display: none; }
  .nav { display: block; position: static; padding: 0; border: 0; box-shadow: none; background: none; }
  .nav__list { display: flex; align-items: center; gap: 0.1rem; }
  .nav__item { position: relative; }
  .nav__item > a:not(.btn), .nav__parent { width: auto; gap: 0.3rem; padding: 0.5rem 0.6rem; font-size: 1.02rem; }
  .nav__item > a[aria-current="page"]:not(.btn) { box-shadow: inset 0 -2px 0 var(--ruby); }
  .nav__sub {
    position: absolute;
    top: calc(100% + 0.3rem);
    left: 0;
    min-width: 13rem;
    padding: 0.4rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow);
  }
  .nav__sub a { padding: 0.45rem 0.7rem; border-radius: 6px; }
  .nav__sub a:hover { background: var(--cream); }
  .nav__item--cta { flex-wrap: nowrap; margin: 0 0 0 0.6rem; }
}

@media (min-width: 1040px) and (hover: hover) {
  .nav__item--parent:hover .nav__sub { display: block; }
}

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