/* ==========================================================================
   Medhane Alem Church Nairobi — site styles
   Layout: black masthead frame with a notched name tab; airy white cards on
   light grey beneath; gold is the only accent.
   ========================================================================== */

:root {
  --bg: #F5F5F7;
  --card: #FFFFFF;
  --fg: #1D1D1F;
  --muted: #6E6E73;
  --line: #D9D9DE;
  --gold: #8A5F1C;
  --gold-soft: #F3EADA;
  --fast: #F6EEDF;
  --sel: #1D1D1F;
  --sel-fg: #FFFFFF;
  --ink: #000000;
  --ink-card: #161617;
  --ink-fg: #F5F5F7;
  --ink-muted: #A1A1A6;
  --lit: #F2D28C;
  --mast-h: 72px;
  --danger: #B3261E;
  --ok: #1E7A46;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Albert Sans", "Helvetica Neue", Arial, sans-serif;
  --eth: "Kefa", "Noto Sans Ethiopic", -apple-system, sans-serif;
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-top: max(12px, env(safe-area-inset-top, 0px));
  padding-bottom: max(40px, env(safe-area-inset-bottom, 0px));
  padding-left: max(12px, env(safe-area-inset-left, 0px));
  padding-right: max(12px, env(safe-area-inset-right, 0px));
}
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--gold); }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.et { font-family: var(--eth); }
.gold-text {
  background: linear-gradient(180deg, #F7E2AA 0%, #D6A85A 55%, #9C6F2A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); color: var(--fg); padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 16px; }

/* ---------- frame & masthead ---------- */
.frame { position: relative; background: var(--ink); color: var(--ink-fg); border-radius: 32px; overflow: hidden; }
.mast { position: fixed; top: max(12px, env(safe-area-inset-top, 0px)); left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); z-index: 50; display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 20px; padding: 0 24px; background: linear-gradient(180deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.6) 50%, rgba(0,0,0,0) 100%); color: var(--ink-fg); border-radius: 32px 32px 24px 24px; transition: transform .3s ease; }
.mast-hide { transform: translateY(calc(-100% - 24px)); }
.mast-spacer { pointer-events: none; }
.nav-l, .nav-r { flex: 1 1 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0 22px; padding-top: 12px; min-width: 0; }
.nav-r { justify-content: flex-end; }
.nl { color: #C7C7CC; text-decoration: none; font-size: 13px; padding: 14px 2px; letter-spacing: -.005em; }
.nl:hover, .nl[aria-current="page"] { color: #FFFFFF; }
.tab {
  flex: 0 0 auto; text-decoration: none; color: var(--fg); background: var(--bg);
  clip-path: polygon(0 0, 100% 0, 86% 100%, 14% 100%);
  padding: 12px 78px 17px; display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.tab b { font-size: 21px; font-weight: 600; letter-spacing: -.02em; }
.tab span { font-size: 12px; color: var(--muted); }
.menu-btn { display: none; position: absolute; right: 16px; top: 14px; background: #1C1C1E; color: #F5F5F7; border: 0; border-radius: 999px; padding: 10px 18px; font-size: 14px; min-height: 44px; }
.mnav { position: fixed; left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); background: var(--ink); border-radius: 0 0 24px 24px; z-index: 49; padding: 8px 20px 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.mnav a { color: #F5F5F7; text-decoration: none; font-size: 20px; font-weight: 600; padding: 10px 0; }
.mnav a[aria-current="page"] { color: var(--lit); }
.admin-link { color: var(--lit) !important; }
@media (max-width: 1100px) {
  .nav-l, .nav-r { display: none; }
  .mast { justify-content: flex-start; padding: 0; }
  .tab { padding: 12px 44px 16px 28px; clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%); align-items: flex-start; }
  .menu-btn { display: block; }
}

/* ---------- buttons ---------- */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; border: 0; border-radius: 999px; padding: 12px 22px; font-size: 15px; font-weight: 500; min-height: 44px; }
.pill-light { background: #F5F5F7; color: #1D1D1F; }
.pill-gold { background: linear-gradient(180deg, #F2D58F, #C99A4B); color: #1A1206; }
.pill-dark { background: var(--fg); color: var(--bg); }
.pill-line { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.pill-sm { padding: 8px 16px; min-height: 36px; font-size: 13px; }
.pill:disabled { opacity: .45; cursor: default; }
.textlink { color: #fff; text-decoration: none; font-size: 18px; font-weight: 600; padding: 10px 22px; border-radius: 999px; background: rgba(10,8,6,.62); border: 1px solid rgba(255,255,255,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); text-shadow: 0 1px 3px rgba(0,0,0,.6); transition: background .2s, border-color .2s; }
.textlink:hover { background: rgba(10,8,6,.82); border-color: #fff; text-decoration: none; }
.copy { border: 1px solid var(--line); background: transparent; color: var(--fg); border-radius: 999px; padding: 6px 12px; font-size: 13px; min-height: 34px; text-decoration: none; display: inline-flex; align-items: center; }

/* ---------- page heads ---------- */
.pagehead { position: relative; text-align: center; padding: calc(64px + var(--mast-h)) 20px 72px; }
.pagehead .am { font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; }
.pagehead h1 { font-size: clamp(44px, 7vw, 92px); font-weight: 600; letter-spacing: -.045em; line-height: 1; margin-top: 4px; }
.pagehead .sub { color: var(--ink-muted); font-size: clamp(18px, 1.8vw, 23px); max-width: 640px; margin: 16px auto 0; font-weight: 500; }

/* ---------- hero (home) ---------- */
.hero { position: relative; height: calc(880px + var(--mast-h)); cursor: none; touch-action: pan-y; --lx: 50%; --ly: 66%; --lr: 300px; }
.hero a, .hero button { cursor: pointer; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle calc(var(--lr) * 1.35) at var(--lx) var(--ly), rgba(255,186,96,.30), rgba(214,140,50,.10) 42%, rgba(0,0,0,0) 72%); }
.crosses { position: absolute; inset: 0; pointer-events: none; }
.crosses .x { position: absolute; transform: translate(-50%, -50%) rotate(var(--rot, 0deg)); }
.crosses .x svg { display: block; width: 100%; height: auto; overflow: visible; }
.crosses.dim { color: rgba(232,198,126,.075); }
.crosses.lit {
  color: var(--lit);
  filter: drop-shadow(0 0 5px rgba(255,190,100,.55));
  -webkit-mask-image: radial-gradient(circle var(--lr) at var(--lx) var(--ly), #000 0%, rgba(0,0,0,.55) 45%, rgba(0,0,0,0) 100%);
          mask-image: radial-gradient(circle var(--lr) at var(--lx) var(--ly), #000 0%, rgba(0,0,0,.55) 45%, rgba(0,0,0,0) 100%);
}
.hero-copy { position: relative; z-index: 3; text-align: center; padding: calc(64px + var(--mast-h)) 20px 0; }
.hero-copy .eyebrow { margin: 0 0 16px; font-size: 15px; font-weight: 500; color: #86868B; }
.hero-copy .am { font-size: clamp(30px, 3.4vw, 46px); font-weight: 700; line-height: 1.3; }
.hero-copy h1 { font-size: clamp(50px, 8.2vw, 120px); font-weight: 600; letter-spacing: -.045em; line-height: .98; color: #F5F5F7; margin-top: 4px; }
.hero-copy .sub { margin: 20px auto 0; max-width: 620px; font-size: clamp(19px, 1.9vw, 25px); font-weight: 500; line-height: 1.3; color: #A1A1A6; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 28px; margin-top: 28px; }
.hint { position: absolute; z-index: 3; left: 50%; bottom: 104px; transform: translateX(-50%); font-size: 13px; color: #6E6E73; transition: opacity .8s; white-space: nowrap; }
.torch { position: absolute; z-index: 4; left: 0; top: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(circle, #FFF6D8 0%, #FFD27A 45%, rgba(255,170,60,0) 72%); box-shadow: 0 0 18px 6px rgba(255,190,100,.45); }
.torch.on { opacity: 1; }
.todaybar { position: absolute; z-index: 3; left: 0; right: 0; bottom: 28px; display: flex; justify-content: center; padding: 0 16px; }
.todaybar > div { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 18px; background: rgba(40,40,44,.62); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.1); border-radius: 20px; padding: 14px 22px; font-size: 14px; color: #D2D2D7; }
.todaybar .k { color: #86868B; }
.todaybar .g { color: #E8C67E; }
.sep { width: 1px; height: 16px; background: #3A3A3C; }
@media (max-width: 700px) {
  .hero { height: calc(780px + var(--mast-h)); }
  .hint, .sep { display: none; }
  .crosses .far { display: none; }
}

/* ---------- sections ---------- */
.announce { max-width: 1180px; margin: 14px auto 0; background: var(--gold-soft); border-radius: 18px; padding: 14px 20px; display: flex; gap: 12px; align-items: center; font-size: 15px; }
.announce b { color: var(--gold); font-weight: 600; white-space: nowrap; }
.sec { max-width: 1180px; margin: 0 auto; padding: 96px 4px 0; }
.sec.first { padding-top: 56px; }
.kicker { margin: 0 0 8px; font-size: 17px; font-weight: 600; color: var(--gold); }
.h2 { font-size: clamp(36px, 4.8vw, 60px); font-weight: 600; letter-spacing: -.035em; line-height: 1.05; }
.h2 .soft { color: var(--muted); }
.lede { margin: 14px 0 0; max-width: 640px; font-size: 19px; line-height: 1.5; color: var(--muted); }
.label { font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; margin-bottom: 10px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid.wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid.mid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid.tight { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.card { background: var(--card); border-radius: 26px; padding: 28px; min-width: 0; }
.card .lab { font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.card .nm { font-size: 24px; font-weight: 600; letter-spacing: -.02em; margin-top: 4px; }
.card .gz { font-size: 15px; color: var(--gold); }
.card .gz.lg { font-size: 26px; font-weight: 700; }
.card .big { font-size: 30px; font-weight: 600; letter-spacing: -.03em; margin-top: 12px; }
.card .tx { font-size: 15px; color: var(--muted); margin-top: 6px; }
a.card { text-decoration: none; color: var(--fg); display: block; }
.row-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 36px; }
.dark { background: var(--ink); color: var(--ink-fg); border-radius: 32px; }
.dark .card { background: var(--ink-card); }
.dark .kicker { color: #E8C67E; }
.dark .lede { color: var(--ink-muted); }
.panel-dark { padding: 72px 40px; text-align: center; }
.panel-dark .lede { margin-left: auto; margin-right: auto; }
.photo { border-radius: 26px; background: var(--line); min-height: 360px; display: flex; align-items: flex-end; padding: 24px; color: var(--muted); font-size: 14px; overflow: hidden; position: relative; }
.photo.ink { background: #1D1D1F; color: #A1A1A6; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.note { font-size: 14px; color: var(--muted); }
.msg { font-size: 14px; padding: 10px 14px; border-radius: 12px; background: var(--gold-soft); margin-bottom: 16px; }
.kv { display: flex; flex-direction: column; gap: 2px; }
.kv .k { font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.kv .v { font-size: 18px; font-weight: 500; }
.dark .kv .k { color: var(--ink-muted); }
.tag { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; background: none; color: var(--gold); padding: 4px 0; }
.tag.mpesa { background: #1E7A46; color: #FFFFFF; border-radius: 999px; padding: 4px 9px; }
.tag.bank { background: #3A3A3C; color: #F5F5F7; border-radius: 999px; padding: 4px 9px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.karibu { margin-top: 16px; padding: 40px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.karibu .big { flex: 1 1 240px; font-size: 32px; font-weight: 600; letter-spacing: -.03em; }
.karibu p:last-child { flex: 2 1 380px; color: var(--ink-muted); }

/* ---------- upcoming lists ---------- */
.uplist { display: flex; flex-direction: column; gap: 10px; }
.up { display: flex; gap: 18px; align-items: center; background: var(--card); border-radius: 20px; padding: 16px 20px; text-decoration: none; color: var(--fg); }
.datebox { flex: 0 0 64px; text-align: center; line-height: 1.1; }
.datebox .d { font-size: 28px; font-weight: 600; letter-spacing: -.03em; display: block; }
.datebox .m { font-size: 12px; font-weight: 600; color: var(--gold); text-transform: uppercase; letter-spacing: .06em; }
.up .t { font-weight: 600; font-size: 17px; }
.up .s { font-size: 14px; color: var(--muted); }

/* ---------- calendar ---------- */
.cal-wrap { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.cal { flex: 2 1 600px; min-width: 0; background: var(--card); border-radius: 28px; padding: 22px; }
.cal-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.cal-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.cal-title b { display: block; font-size: 28px; font-weight: 600; letter-spacing: -.03em; }
.cal-title span { font-size: 14px; color: var(--muted); }
.cal-ctl { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.iconbtn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--fg); display: inline-flex; align-items: center; justify-content: center; }
.seg { display: inline-flex; background: var(--bg); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; color: var(--muted); border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 600; min-height: 38px; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; padding-bottom: 6px; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.day { position: relative; min-height: 92px; border: 0; border-radius: 14px; background: transparent; color: var(--fg); text-align: left; padding: 8px; display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.day:hover { background: var(--bg); }
.day.fast { background: var(--fast); }
.day .n { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.day .o { font-size: 11px; color: var(--muted); }
.day .f { font-size: 11px; line-height: 1.25; color: var(--gold); font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.day .dots { position: absolute; right: 8px; top: 10px; display: flex; gap: 3px; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.dot.ev { background: var(--fg); }
.day.today { box-shadow: inset 0 0 0 1.5px var(--gold); }
.day.today .n { color: var(--gold); }
.day.sel { background: var(--sel); color: var(--sel-fg); }
.day.sel .n, .day.sel .o, .day.sel .f { color: var(--sel-fg); }
.day.sel .dot { background: var(--sel-fg); }
.day.blank { visibility: hidden; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--muted); margin-top: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; background: var(--fast); border: 1px solid var(--line); }
.detail h3 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }
.detail .when { color: var(--muted); font-size: 14px; margin-top: 2px; }
.entry { border-top: 1px solid var(--line); padding: 12px 0 2px; margin-top: 12px; }
.entry .t { font-weight: 600; }
.entry .s { font-size: 14px; color: var(--muted); }
.yearlist { max-height: 520px; overflow: auto; }
.yl { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border: 0; border-top: 1px solid var(--line); font-size: 14px; background: none; width: 100%; text-align: left; color: var(--fg); }
.yl:hover .t { color: var(--gold); }
.yl .t { font-weight: 600; }
.yl .s { color: var(--muted); white-space: nowrap; }
@media (max-width: 640px) {
  .day { min-height: 54px; padding: 6px; }
  .day .f, .day .o { display: none; }
  .cal { padding: 14px; }
  .day .dots { right: 5px; top: auto; bottom: 6px; }
}

/* ---------- forms & admin ---------- */
input, select, textarea { font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%; }
textarea { min-height: 110px; resize: vertical; }
label { font-size: 13px; font-weight: 600; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
label.check { flex-direction: row; align-items: center; gap: 10px; color: var(--fg); font-size: 16px; }
label.check input { width: 22px; height: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--fg); border-radius: 999px; padding: 9px 16px; font-size: 14px; min-height: 40px; }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.adm-bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 12px 16px; margin-bottom: 16px; }
.adm-status { font-size: 14px; color: var(--muted); }
.adm-status.dirty { color: var(--gold); font-weight: 600; }
.fgrid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.fgrid .wide { grid-column: 1 / -1; }
.fgrid.row { border-top: 1px solid var(--line); padding: 16px 0; }
.list-item { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 14px 0; }
.list-item .t { font-weight: 600; }
.list-item .s { font-size: 14px; color: var(--muted); }
.danger { color: var(--danger) !important; border-color: var(--danger) !important; }

/* ---------- footer ---------- */
.foot { max-width: 1180px; margin: 96px auto 0; padding: 0 4px; font-size: 13px; color: var(--muted); }
.tibeb { height: 6px; border-radius: 3px; background: repeating-linear-gradient(90deg, #1F6B3A 0 14px, #D6A85A 14px 18px, #B8322A 18px 32px, #D6A85A 32px 36px); opacity: .85; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; padding: 30px 0 20px; border-bottom: 1px solid var(--line); }
.foot-cols { display: flex; flex-wrap: wrap; gap: 44px; }
.foot-cols b { color: var(--fg); display: block; margin-bottom: 4px; }
.foot a { color: var(--fg); text-decoration: none; display: block; padding: 5px 0; }
.foot a:hover { text-decoration: underline; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: 16px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ==========================================================================
   Imagery: figures, mosaic gallery, art strip, banners, hero video
   ========================================================================== */
.fig { position: relative; margin: 0; border-radius: 26px; overflow: hidden; background: #1D1D1F; min-width: 0; }
.fig img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fig figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 14px; background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.72)); color: #F5F5F7; font-size: 13px; line-height: 1.4; }
.fig figcaption small { display: block; color: #C7C7CC; font-size: 11px; margin-top: 2px; }
.fig.art { background: #EDE6D8; }
.fig.art img { object-fit: contain; padding: 18px; }
.fig.art figcaption { position: static; background: none; color: var(--fg); padding: 0 18px 16px; }
.fig.art figcaption small { color: var(--muted); }

/* mosaic gallery (home) */
.mosaic { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 220px; }
.mosaic .fig:nth-child(1) { grid-column: span 2; grid-row: span 2; }
@media (max-width: 900px) { .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 180px; } }
@media (max-width: 520px) { .mosaic { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 240px; } .mosaic .fig:nth-child(1) { grid-column: span 1; grid-row: span 1; } }

/* horizontal art strip */
.artstrip { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.artstrip .fig { flex: 0 0 auto; width: min(320px, 78vw); scroll-snap-align: start; }
.artstrip .fig img { height: 340px; }
.artstrip .fig.wide { width: min(720px, 88vw); }

/* service cards with images */
.card.has-img { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card.has-img .card-img { height: 190px; position: relative; background: #1D1D1F; }
.card.has-img .card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card.has-img .card-img.art { background: #EDE6D8; }
.card.has-img .card-img.art img { object-fit: contain; padding: 10px; }
.card.has-img .card-body { padding: 24px 28px 28px; }
.card-credit { position: absolute; right: 10px; bottom: 8px; font-size: 10px; color: rgba(255,255,255,.85); background: rgba(0,0,0,.45); border-radius: 6px; padding: 2px 6px; }
.card-img.art .card-credit { color: var(--muted); background: rgba(255,255,255,.7); }

/* wide banner */
.banner { position: relative; border-radius: 32px; overflow: hidden; min-height: 460px; display: flex; align-items: flex-end; color: #F5F5F7; background: #000; }
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .78; }
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.78)); }
.banner .in { position: relative; z-index: 1; padding: 40px; max-width: 720px; }
.banner .in .h2 { color: #F5F5F7; }
.banner .in p { color: #D2D2D7; margin-top: 12px; font-size: 18px; }
.banner .credit { position: absolute; z-index: 1; right: 16px; bottom: 12px; font-size: 11px; color: #A1A1A6; }

/* dark panel with painting behind */
.panel-art { position: relative; overflow: hidden; }
.panel-art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .28; }
.panel-art > *:not(img) { position: relative; }
.panel-art .credit { position: absolute; right: 16px; bottom: 12px; font-size: 11px; color: #86868B; }

/* feast thumbnails */
.up .thumb { flex: 0 0 56px; height: 56px; border-radius: 12px; overflow: hidden; background: #EDE6D8; }
.up .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail .art-head { margin: -28px -28px 18px; height: 200px; background: #EDE6D8; position: relative; overflow: hidden; border-radius: 26px 26px 0 0; }
.detail .art-head img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail .art-head .card-credit { color: #FFFFFF; }

/* hero slideshow: revealed by the torch light */
.hero-slides { position: absolute; inset: 0; pointer-events: none;
  filter: sepia(.25) saturate(.9) brightness(1);
  -webkit-mask-image: radial-gradient(circle calc(var(--lr) * 1.7) at var(--lx) var(--ly), rgba(0,0,0,1) 0%, rgba(0,0,0,.9) 55%, rgba(0,0,0,.78) 100%);
          mask-image: radial-gradient(circle calc(var(--lr) * 1.7) at var(--lx) var(--ly), rgba(0,0,0,1) 0%, rgba(0,0,0,.9) 55%, rgba(0,0,0,.78) 100%); }
.hero-slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s ease; }
.hero-slides img.on { opacity: 1; }
.slide-ctrl { position: absolute; z-index: 4; left: 18px; bottom: 18px; display: flex; align-items: center; gap: 12px; }
.slide-ctrl .video-toggle { position: static; }
.slide-dots { display: none; gap: 4px; }
.slide-dots button { width: 26px; height: 26px; border: 0; background: none; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.slide-dots button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.4); transition: background .2s, transform .2s; }
.slide-dots button.on::before { background: #fff; transform: scale(1.3); }
.hero-video-unused { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none;
  filter: sepia(.25) saturate(.9) brightness(1);
  -webkit-mask-image: radial-gradient(circle calc(var(--lr) * 1.7) at var(--lx) var(--ly), rgba(0,0,0,1) 0%, rgba(0,0,0,.9) 55%, rgba(0,0,0,.78) 100%);
          mask-image: radial-gradient(circle calc(var(--lr) * 1.7) at var(--lx) var(--ly), rgba(0,0,0,1) 0%, rgba(0,0,0,.9) 55%, rgba(0,0,0,.78) 100%); }
.hero-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,.1) 0%, rgba(0,0,0,.15) 38%, rgba(0,0,0,.08) 70%, rgba(0,0,0,.6) 100%); }
.hero-credit { position: absolute; z-index: 3; right: 18px; bottom: 10px; font-size: 11px; color: #6E6E73; }
.hero-credit a { color: #86868B; }
.video-toggle { position: absolute; z-index: 4; left: 18px; bottom: 18px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(40,40,44,.6); color: #F5F5F7; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 700px) { .hero-credit { display: none; } }

/* credits list */
.credits { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.credits .row { display: flex; gap: 14px; align-items: center; background: var(--card); border-radius: 18px; padding: 12px; }
.credits .row img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; flex: 0 0 auto; }
.credits .row .t { font-weight: 600; font-size: 14px; }
.credits .row .s { font-size: 13px; color: var(--muted); }

/* page heads with a picture behind the title */
.pagehead.has-img { min-height: calc(440px + var(--mast-h)); display: flex; flex-direction: column; justify-content: center; padding-top: calc(96px + var(--mast-h)); padding-bottom: 96px; }
.pagehead .ph-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.pagehead .ph-img.art { object-fit: cover; object-position: center 30%; }
.pagehead.has-img::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 55% 60% at 50% 55%, rgba(0,0,0,.34), rgba(0,0,0,.1) 100%), linear-gradient(180deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,.08) 40%, rgba(0,0,0,.5) 100%); z-index: 1; }
.pagehead.has-img h1, .pagehead.has-img .sub, .pagehead.has-img .am { text-shadow: 0 2px 18px rgba(0,0,0,.6); }
.pagehead.has-img > *:not(.ph-img) { position: relative; z-index: 2; }
.pagehead.has-img .sub { color: #D2D2D7; }
.pagehead .ph-credit { position: absolute !important; z-index: 2; right: 18px; bottom: 12px; font-size: 11px; color: #A1A1A6; margin: 0; }
.pagehead .ph-credit a { color: #C7C7CC; }
@media (max-width: 700px) { .pagehead.has-img { min-height: 360px; } }

.hero-copy h1, .hero-copy .sub, .hero-copy .eyebrow { text-shadow: 0 2px 20px rgba(0,0,0,.7); }
.hero-copy .sub, .hero-copy .eyebrow { color: #D2D2D7; }

/* gallery page */
.gal { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 220px; grid-auto-flow: dense; }
.gal button { border: 0; padding: 0; background: #1D1D1F; border-radius: 26px; overflow: hidden; display: block; min-width: 0; }
.gal img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.gal button:hover img { transform: scale(1.04); }
/* varied tiles: a feature square, a wide one and a tall one in every run of eleven */
.gal button:nth-child(11n+1) { grid-column: span 2; grid-row: span 2; }
.gal button:nth-child(11n+6) { grid-column: span 2; }
.gal button:nth-child(11n+9) { grid-row: span 2; }
@media (max-width: 900px) { .gal { gap: 12px; grid-auto-rows: 170px; } .gal button { border-radius: 20px; } }
@media (max-width: 560px) { .gal { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; grid-auto-rows: 150px; } .gal button { border-radius: 14px; } }
.lb { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; padding: 56px 16px; }
.lb[hidden] { display: none; }
.lb img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.lb button { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(40,40,44,.7); color: #fff; font-size: 24px; line-height: 1; }
.lb .lb-x { top: 12px; right: 12px; } .lb .lb-p { left: 12px; top: 50%; } .lb .lb-n { right: 12px; top: 50%; }
.lb .lb-c { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #C7C7CC; font-size: 13px; }

/* phones and touch screens: no live torch mask or colour filter over the slideshow (they repaint on every frame and make scrolling and the menu sluggish) */
@media (hover: none), (max-width: 900px) {
  .hero-slides { -webkit-mask-image: none; mask-image: none; filter: none; }
  .hero-slides img { transition-duration: .8s; }
  .textlink { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(10,8,6,.78); }
}

/* teachings */
.card.teach { display: flex; flex-direction: column; gap: 4px; }
.card.teach .tx { font-size: 16px; line-height: 1.55; }
.card.teach .am-tx { color: var(--fg); border-top: 1px solid var(--line); margin-top: 10px; padding-top: 12px; font-size: 17px; }
.card.teach .more { margin-top: auto; padding-top: 12px; font-size: 14px; font-weight: 600; text-decoration: none; }
@media (max-width: 1300px) and (min-width: 1101px) { .nav-l, .nav-r { gap: 0 12px; } .nl { font-size: 12.5px; } .tab { padding-left: 44px; padding-right: 44px; } .mast { padding: 0 18px; } }

.card.teach details.more { margin-top: auto; padding-top: 12px; }
.card.teach details.more summary { cursor: pointer; list-style: none; font-size: 14px; font-weight: 600; color: var(--gold); }
.card.teach details.more summary::-webkit-details-marker { display: none; }
.card.teach details.more summary::after { content: " ›"; }
.card.teach details.more[open] summary::after { content: " ‹"; }
.card.teach .more-body { margin-top: 12px; font-size: 15px; line-height: 1.6; color: var(--muted); }
.card.teach .more-body p { margin: 0 0 10px; }
.card.teach .more-body ul { margin: 0; padding-left: 18px; }
.card.teach .more-body li { margin-bottom: 8px; }
.card.teach .more-body b { color: var(--fg); }

.card.teach .more-link { margin-top: auto; padding-top: 12px; font-size: 14px; font-weight: 600; text-decoration: none; }

/* teaching detail view */
.back { display: inline-block; font-size: 15px; font-weight: 600; text-decoration: none; margin-bottom: 18px; }
.lang { display: inline-flex; background: var(--card); border-radius: 999px; padding: 3px; margin: 0 0 22px 16px; }
.lang button { border: 0; background: transparent; color: var(--fg); border-radius: 999px; padding: 8px 18px; font-size: 15px; min-height: 40px; }
.lang button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.teach-body { max-width: 680px; margin-top: 22px; font-size: 19px; line-height: 1.7; color: var(--fg); }
.teach-body p { margin: 0 0 16px; }
.teach-body.et { font-size: 20px; line-height: 1.9; }
.teach-body ul { padding-left: 20px; margin: 0; }
.teach-body li { margin-bottom: 14px; }
.teach-nav { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 680px; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); }
.teach-nav a { text-decoration: none; font-weight: 600; }

.tabs { display: inline-flex; background: var(--card); border-radius: 999px; padding: 3px; margin-bottom: 28px; }
.tabs a { color: var(--fg); text-decoration: none; border-radius: 999px; padding: 10px 20px; font-size: 15px; font-weight: 500; }
.tabs a[aria-current="page"] { background: var(--fg); color: var(--bg); }

.grp { margin: 44px 0 0; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.teach-body h4 { margin: 28px 0 8px; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.teach-body .byline { color: var(--muted); font-size: 15px; font-style: italic; }

.proj { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: center; margin-top: 56px; }
.proj.rev .proj-fig { order: 2; }
.proj-fig { margin: 0; background: #fff; border-radius: 26px; overflow: hidden; }
.proj-fig img { display: block; width: 100%; height: auto; }
.proj-tx .h3 { margin: 6px 0 0; font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.proj-tx .btn-row { margin-top: 22px; }
@media (max-width: 800px) { .proj { grid-template-columns: 1fr; gap: 20px; } .proj.rev .proj-fig { order: 0; } }

/* home hero: single church photo, plain and readable */
.hero .crosses, .hero .glow, .hero .hint, .hero #motes { display: none; }
.hero-slides { filter: none; -webkit-mask-image: none; mask-image: none; }
.hero-shade { background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.5) 45%, rgba(0,0,0,.45) 70%, rgba(0,0,0,.7) 100%); }
.hero-copy h1 { font-size: clamp(36px, 6.4vw, 92px); }
.hero-copy .am, .hero-copy h1, .hero-copy .sub { text-shadow: 0 2px 24px rgba(0,0,0,.8); }
