﻿/* Colors taken from the church logo */
:root {
  --olive: #4f561d;
  --olive-dark: #383d14;
  --gold: #d19c30;
  --gold-dark: #8f6612;
  --cream: #fdfaf2;
  --sand: #f2ede0;
  --line: #e4ddc9;
  --ink: #262817;
  --muted: #64665a;
  --white: #ffffff;
  --radius: 14px;
  --max: 1240px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 104px; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
}

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

h1, h2, h3 { font-weight: 800; line-height: 1.1; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.6rem, 7.5vw, 5.2rem); text-transform: uppercase; line-height: .98; letter-spacing: -.03em; }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.6rem); }
h3 { font-size: 1.45rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--olive); }

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

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

.eyebrow {
  font-size: .8rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold-dark); margin-bottom: .75em;
}
.muted { color: var(--muted); }

/* Buttons */
/* On hover, a fill color sweeps across from left to right */
.btn {
  --btn-fill: var(--olive-dark);
  display: inline-block; padding: .8em 1.5em; border-radius: 999px;
  background-color: var(--olive); color: var(--white); text-decoration: none;
  background-image: linear-gradient(var(--btn-fill), var(--btn-fill));
  background-repeat: no-repeat; background-position: left center; background-size: 0% 100%;
  font-weight: 600; font-size: .95rem; border: 2px solid var(--olive);
  font-family: inherit; cursor: pointer;
  transition: background-size .4s cubic-bezier(.2, .7, .2, 1), color .4s cubic-bezier(.2, .7, .2, 1), border-color .4s ease;
}
.btn:hover, .btn:focus-visible { background-size: 100% 100%; border-color: var(--olive-dark); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.75); }
.btn-ghost:hover { background: var(--white); color: var(--olive-dark); border-color: var(--white); }
.btn-small { padding: .5em 1.1em; font-size: .9rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(253,250,242,.96); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; height: 96px; }
.logo { display: flex; align-items: center; gap: .7rem; color: var(--olive); text-decoration: none; }
.logo img { width: 78px; height: auto; }
.wordmark { display: flex; flex-direction: column; line-height: 1; white-space: nowrap; }
.wm-top { font-size: 1.5rem; font-weight: 800; letter-spacing: -.025em; }
.wm-bottom { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .32em; margin-top: .35em; }

/* Menu: always behind the menu button, opens as a card under the header */
.header-inner { position: relative; }
.site-nav {
  display: none; position: absolute; top: calc(100% + 8px); right: 64px; width: 320px;
  flex-direction: column; align-items: stretch;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .75rem 1.5rem 1.5rem; box-shadow: 0 16px 40px rgba(38, 40, 23, .14);
}
.site-nav.open { display: flex; }
.site-nav a:not(.btn) {
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 1.05rem;
  padding: .85rem 0; border-bottom: 1px solid var(--line);
}
.site-nav a:not(.btn):hover { color: var(--olive); }
.site-nav .btn { color: var(--white); margin-top: 1.1rem; text-align: center; }

.header-right { display: flex; align-items: center; gap: .5rem; order: 2; }

/* EN / Lai switch: a green pill slides behind the selected language */
.lang-toggle {
  position: relative; display: flex; align-items: center; height: 46px; padding: 4px; border-radius: 999px; cursor: pointer;
  background: var(--sand); border: 1px solid var(--line); font: inherit;
}
.lang-toggle::before {
  content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 2);
  border-radius: 999px; background: var(--olive);
}
html[lang="cnh"] .lang-toggle::before { transform: translateX(100%); }
.lang-toggle span {
  position: relative; z-index: 1; display: grid; place-items: center; height: 100%; width: 56px;
  border-radius: 999px; font-size: .95rem; font-weight: 700; color: var(--muted); transition: color .3s ease;
}
html[lang="en"] .lang-toggle [data-lang="en"],
html[lang="cnh"] .lang-toggle [data-lang="ha"] { color: var(--white); }
/* Only animate once the page has set its language, so it doesn't slide on load */
.lang-ready .lang-toggle::before { transition: transform .35s cubic-bezier(.3, 1.3, .5, 1); }

.header-right { gap: .9rem; }
.nav-toggle {
  display: grid; place-content: center; width: 46px; height: 46px; padding: 0; cursor: pointer;
  border: 0; border-radius: 50%;
  /* Same left-to-right color sweep as the buttons */
  background-color: var(--olive);
  background-image: linear-gradient(var(--olive-dark), var(--olive-dark));
  background-repeat: no-repeat; background-position: left center; background-size: 0% 100%;
  transition: background-size .4s cubic-bezier(.2, .7, .2, 1);
}
.nav-toggle:hover, .nav-toggle:focus-visible { background-size: 100% 100%; }
.nav-toggle .bar { display: block; width: 20px; height: 2px; background: var(--white); margin: 2.5px 0; border-radius: 2px; }

/* Image shapes */
.shape-pill { border-radius: 999px; }
.shape-pill-tall { border-radius: 999px; aspect-ratio: 3 / 4 !important; }
.shape-circle { border-radius: 50% !important; aspect-ratio: 1 / 1; }
.shape-arch { border-radius: 999px 999px 18px 18px !important; }
.shape-leaf { border-radius: 46% 8px 46% 8px !important; }

/* Hero */
.hero { background: var(--cream); padding: clamp(3rem, 8vw, 6.5rem) 0 0; }
.hero-stage {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2.5rem, 5vw, 5rem); align-items: center;
  padding-bottom: clamp(3.5rem, 8vw, 6.5rem);
}
.hero-kicker { font-size: .95rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dark); margin: 0 0 .9em; }
.hero h1 {
  font-size: clamp(2.6rem, 5vw, 4.4rem); color: var(--olive);
  text-transform: none; line-height: .98; letter-spacing: -.045em; margin: 0 0 .45em;
}
.lead { font-size: 1.2rem; line-height: 1.75; max-width: 30em; color: var(--muted); margin-top: 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; }

.hero-pics { display: grid; gap: 1.25rem; max-width: 460px; justify-self: end; width: 100%; }
.hero-pic { width: 88%; aspect-ratio: 1.75 / 1; object-fit: cover; }
.hero-pic-1 { justify-self: end; }
.hero-pic-2 { justify-self: start; margin-left: -3rem; }
/* Visit */
.visit { background: var(--sand); padding: 3rem 0; }
.visit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.visit-card { background: var(--white); border-radius: var(--radius); padding: 1.75rem; }
.visit-card h2 { font-size: 1.1rem; margin-bottom: .6em; }
.visit-card .big { font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em; color: var(--olive); line-height: 1.1; margin-bottom: .3em; }
.visit-card p:last-child { margin-bottom: 0; }
.btn-outline { --btn-fill: var(--olive); background-color: transparent; color: var(--olive); }
.btn-outline:hover, .btn-outline:focus-visible { color: var(--white); border-color: var(--olive); }
.link { font-weight: 600; text-decoration: none; }

/* Sections */
.section { padding: clamp(4rem, 9vw, 6.5rem) 0; }
.section-tint { background: var(--sand); }
.section-head { margin-bottom: 2.5rem; max-width: 640px; }

/* About */
.about { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3.5rem; align-items: start; }
.about-photo { order: 2; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; position: sticky; top: 100px; }
.prose p { color: var(--ink); }

/* Ministries: cards with a photo along the bottom */
.m-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.m-card {
  display: flex; flex-direction: column; background: var(--white);
  border-radius: var(--radius); overflow: hidden;
}
.m-card-body { display: flex; flex-direction: column; flex: 1; padding: 2rem 1.75rem 1.75rem; }
.m-card h3 { color: var(--gold-dark); font-size: 1.75rem; margin-bottom: .6em; }
.m-card p { color: var(--ink); margin-bottom: 1.75rem; }
.m-card .btn { margin-top: auto; align-self: flex-start; }
.m-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
/* The globe map is shown whole on a soft background instead of cropped */
.m-card img.m-card-map { object-fit: contain; padding: .9rem; background: #e3eef2; }
.img-credit { font-size: .8rem; color: var(--muted); margin-top: 1.5rem; }
.img-credit a { color: inherit; }


/* Ministry popups */
.m-dialog {
  width: min(720px, calc(100% - 32px)); max-height: 88vh; padding: 0; border: 0;
  border-radius: 18px; background: var(--white); color: var(--ink);
  overflow: hidden; /* keep the rounded corners; the body scrolls instead */
  box-shadow: 0 30px 80px rgba(20, 22, 10, .35);
}
.m-dialog[open] { display: flex; flex-direction: column; }
.m-dialog::backdrop { background: rgba(20, 22, 10, .6); }

.m-dialog-body { overflow-y: auto; padding: 2rem 2.25rem 2.25rem; }
.m-dialog-body h3 { color: var(--gold-dark); font-size: 2rem; padding-right: 3.5rem; }
.m-dialog-close {
  position: absolute; top: 18px; right: 22px; z-index: 1;
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--white); color: var(--ink); font-size: 1.6rem; line-height: 1;
  background: var(--sand);
}
.m-dialog-close:hover { background: var(--olive); color: var(--white); }
.list-head { font-weight: 700; margin: 1.25em 0 .5em; }
.details { margin: 0 0 1em; padding-left: 1.2em; }
.details li { margin-bottom: .6em; }
.details li::marker { color: var(--gold); }
/* Scholarships */
.awards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 2rem; }
.award { background: var(--white); border-radius: var(--radius); padding: 1.75rem; border-top: 4px solid var(--gold); }
.award ul { margin: 0; padding-left: 1.2em; color: var(--muted); }
.award li { margin-bottom: .4em; }
.award-label {
  margin: 1.4rem 0 .5rem; font-size: .8rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--gold-dark);
}
.award h3 + .award-label { margin-top: .9rem; }
.award-how { margin: 0; color: var(--ink); }
.award-more { margin-top: .9rem; }

/* College Student Award: award amounts */
.prices { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prices th, .prices td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); }
.prices thead th { font-size: .95rem; font-weight: 700; color: var(--ink); }
.prices tbody th { font-weight: 700; }
.prices tbody tr:last-child th, .prices tbody tr:last-child td { border-bottom: 0; }
.prices th:first-child { padding-left: 0; }

/* Content written in both languages: show the one that matches the switch */
html[lang="en"] .lang-ha,
html[lang="cnh"] .lang-en { display: none; }

/* Numbered rules in the College Student Award popup */
.rules { margin: 0; padding-left: 1.4em; }
.rules > li { margin-bottom: .85em; padding-left: .3em; }
.rules > li::marker { color: var(--gold-dark); font-weight: 700; }
.rules ul { margin: .5em 0 0; padding-left: 1.2em; }
.rules ul li { margin-bottom: .35em; }
.award-btn { margin-top: 1.25rem; }

/* Footer */
.site-footer { background: var(--cream); padding: 4.5rem 0 2rem; font-size: 1rem; color: var(--ink); }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1.6fr auto; gap: 2.5rem; align-items: start; }
.footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: .55rem; }
.footer-title { font-weight: 800; text-transform: uppercase; margin: 0 0 .2rem; color: var(--ink); }
.site-footer .footer-col > a:not(.footer-logo) { text-transform: uppercase; font-weight: 500; color: var(--olive); text-decoration: none; }
.site-footer .footer-col > a.footer-strong { font-weight: 800; color: var(--ink); }
.site-footer .footer-col > a:not(.footer-logo):hover { color: var(--gold-dark); }
.footer-info { margin: 0; text-transform: uppercase; font-size: .95rem; }
.footer-logo { margin: 0; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem;
  margin-top: 3rem;
  font-size: .85rem; text-transform: uppercase;
}
.footer-bottom p { margin: 0; }
.site-footer .footer-verses a { color: var(--ink); text-decoration: none; }
.site-footer .footer-verses a:hover { color: var(--olive); text-decoration: underline; }
.social-icons { display: flex; gap: .6rem; margin: .35rem 0; }
.site-footer .social-icons a {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--olive); color: var(--white); text-decoration: none;
}
.site-footer .social-icons a:hover { background: var(--olive-dark); color: var(--white); }
.social-icons svg { width: 20px; height: 20px; fill: currentColor; }
.social-icons svg[fill="none"] { fill: none; }
.site-footer .footer-logo,
.site-footer .footer-logo:hover { color: var(--olive); text-decoration: none; }

/* Responsive */

@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-row: 1; grid-column: 1 / -1; }
  .m-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .container { padding-left: 24px; padding-right: 24px; }
  .site-nav { left: 24px; right: 24px; width: auto; }
  .about, .awards { grid-template-columns: 1fr; }
  .hero-stage { grid-template-columns: 1fr; gap: 2.5rem; padding-bottom: 3.5rem; }
  .hero-pics { grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 380px; justify-self: start; }
  .hero-pic { width: 100%; }
  .hero-pic-2 { margin-top: 2rem; margin-left: 0; }
  .visit-grid { grid-template-columns: 1fr; }
  .about { gap: 2rem; }
  .about-photo { position: static; }
  .about-photo { max-width: 420px; margin: 0 auto; aspect-ratio: 4 / 5; }
}

@media (max-width: 520px) {
  .container { padding-left: 20px; padding-right: 20px; }
  .site-nav { left: 20px; right: 20px; }
  .m-cards { grid-template-columns: 1fr; }
  .m-dialog-body { padding: 1.5rem 1.4rem 1.75rem; }
  .m-dialog-body h3 { padding-right: 3rem; }
  .m-dialog-close { top: 14px; right: 14px; }
  .header-inner { height: 80px; gap: 1rem; }
  .header-right { gap: .6rem; }
  .lang-toggle { height: 42px; }
  .lang-toggle span { width: 44px; font-size: .9rem; }
  .nav-toggle { width: 42px; height: 42px; }
  .site-nav { top: 80px; }
  .logo img { width: 56px; }
  .wm-top { font-size: 1.1rem; }
  .wm-bottom { font-size: .55rem; letter-spacing: .25em; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
  .logo { gap: .5rem; }
  .logo img { width: 42px; }
  .wm-top { font-size: 1rem; }
  .wm-bottom { font-size: .5rem; letter-spacing: .2em; }
}


.prices-note { margin: -.2rem 0 .4rem; font-size: .85rem; color: var(--muted); }
.prices td { white-space: nowrap; }
@media (max-width: 520px) {
  .prices { font-size: .88rem; }
  .prices th, .prices td { padding: .5rem .35rem; }
}
.award-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.award-actions .award-btn { margin-top: 0; }
.award-intro { color: var(--muted); margin: -.25rem 0 0; }
.award-note { margin-top: 1rem; }
.footer-info { white-space: nowrap; }
.site-footer .footer-verses a { white-space: nowrap; }
@media (max-width: 400px) { .footer-info { white-space: normal; } }

/* Calendar */
.cal-wrap { display: grid; gap: 2rem; }
.cal { background: var(--white); border-radius: var(--radius); padding: 1.5rem; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.cal-title { margin: 0; font-size: 1.5rem; }
/* Month arrows: green sweeps in the direction the arrow points */
.cal-nav {
  width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--olive);
  background-color: transparent;
  background-image: linear-gradient(var(--olive), var(--olive));
  background-repeat: no-repeat; background-position: left center; background-size: 0% 100%;
  color: var(--olive); font-size: 1.5rem; line-height: 1; cursor: pointer;
  transition: background-size .4s cubic-bezier(.2, .7, .2, 1), color .4s cubic-bezier(.2, .7, .2, 1);
}
#cal-prev { background-position: right center; }
.cal-nav:hover, .cal-nav:focus-visible { background-size: 100% 100%; color: var(--white); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line);  border-radius: 12px; overflow: hidden; }
.cal-dow {
  padding: .6rem; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold-dark); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--cream);
}
.cal-day {
  min-height: 110px; padding: .45rem; display: flex; flex-direction: column; gap: .3rem;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0;
}
.cal-day.other { background: #faf8f2; }
.cal-day.other .cal-num { color: #b5b2a5; }
.cal-num { font-weight: 700; font-size: .9rem; }
.cal-day.today .cal-num {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--olive); color: var(--white);
}
.cal-event {
  font-size: .75rem; line-height: 1.3; padding: .25rem .4rem; border-radius: 6px;
  background: var(--gold); color: var(--ink); font-weight: 600;
  overflow-wrap: anywhere;
}
.cal-event.regular { background: #e7ecd6; color: var(--olive-dark); }
.cal-upcoming h3 { font-size: 1.3rem; }
.cal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.cal-list li { display: flex; align-items: center; gap: 1rem; background: var(--white); border-radius: var(--radius); padding: .9rem 1.1rem; }
.cal-list strong { display: block; }
.cal-list small { color: var(--muted); }
.cal-date {
  flex: none; width: 52px; text-align: center; font-size: 1.4rem; font-weight: 800; line-height: 1.1; color: var(--olive);
}
.cal-date b { display: block; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-dark); }
.cal-list .cal-empty { color: var(--muted); }
@media (max-width: 700px) {
  .cal { padding: 1rem .6rem; }
  .cal-dow { padding: .4rem .2rem; text-align: center; font-size: .65rem; letter-spacing: 0; }
  .cal-day { min-height: 64px; padding: .3rem .2rem; align-items: center; }
  /* On phones, events show as small dots */
  .cal-event { display: block; width: 8px; height: 8px; padding: 0; border-radius: 50%; font-size: 0; }
}

/* Clickable calendar events and the event popup */
.cal-item {
  display: flex; align-items: center; gap: 1rem; width: 100%; text-align: left; font: inherit; color: inherit;
  background: none; border: 0; padding: 0; cursor: pointer;
}
.cal-list li { padding: 0; }
.cal-list .cal-item { padding: .9rem 1.1rem; }
.cal-list li:hover { box-shadow: inset 0 0 0 1.5px var(--olive); }
.cal-item > span:nth-child(2) { flex: 1; }
.cal-more { font-weight: 600; font-size: .9rem; color: var(--olive); white-space: nowrap; }
.cal-list .cal-empty { padding: .9rem 1.1rem; }

.ev + .ev { border-top: 1px solid var(--line); margin-top: 1.75rem; padding-top: 1.75rem; }
.ev-img { width: 100%; max-height: 260px; object-fit: cover; border-radius: 12px; margin-bottom: 1.25rem; }
.ev-title { color: var(--gold-dark); font-size: 1.9rem; padding-right: 3.5rem; }
.ev-facts { display: grid; gap: .8rem; margin: 1rem 0 1.25rem; }
.ev-facts div { display: grid; grid-template-columns: 120px 1fr; gap: 1rem; }
.ev-facts dt { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); padding-top: .2rem; }
.ev-facts dd { margin: 0; font-size: .92rem; font-weight: 500; line-height: 1.55; white-space: pre-line; }
.ev-details { margin: 0 0 .8rem; }
.ev-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
.ev-actions .btn { font-size: .88rem; padding: .65em 1.2em; }
@media (max-width: 700px) {
  .ev-facts div { grid-template-columns: 1fr; gap: .2rem; }
  .cal-more { display: none; }
}

/* Calendar group colors */
.g-church   { --g-bg: #e7ecd6; --g-fg: #383d14; --g-dot: #4f561d; }
.g-youth    { --g-bg: #dbeaf3; --g-fg: #1d4e6b; --g-dot: #2f78a3; }
.g-children { --g-bg: #f6e7c4; --g-fg: #6b4a0b; --g-dot: #d19c30; }
.g-women    { --g-bg: #f4dbe3; --g-fg: #7a2a46; --g-dot: #c45b7a; }
.g-ec       { --g-bg: #e6e0f0; --g-fg: #4a3a6e; --g-dot: #7a62a8; }
.cal-event[class*="g-"] { background: var(--g-bg); color: var(--g-fg); border-left: 3px solid var(--g-dot); }
.cal-legend { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 1rem 0 0; padding: 0; font-size: .85rem; font-weight: 600; }
.cal-legend li { display: flex; align-items: center; gap: .45rem; }
.cal-legend span { width: 12px; height: 12px; border-radius: 50%; background: var(--g-dot); }
.ev-group {
  display: inline-block; margin: 0 0 .6rem; padding: .25rem .7rem; border-radius: 999px;
  font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: var(--g-bg); color: var(--g-fg);
}
@media (max-width: 700px) {
  .cal-event[class*="g-"] { background: var(--g-dot); border-left: 0; }
}
@media (max-width: 700px) {
  .cal-event { width: 9px; height: 9px; flex: none; }
}
.ev-files { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; }
.ev-files a { font-weight: 600; color: var(--olive); }
.ev-files a::after { content: " ↓"; text-decoration: none; display: inline-block; margin-left: .2em; }

/* Days with events open a popup */
.cal-day.has-events { cursor: pointer; transition: background .15s; }
.cal-day.has-events:hover { background: #f6f3e8; }
.cal-day.has-events:focus-visible { outline: 2px solid var(--olive); outline-offset: -2px; }
.cal-event { display: block; }
.ev-day { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 3.5rem 1rem 0; }

/* Animations: hero on load, sections fade up on scroll. Skipped when the
   visitor prefers reduced motion; scroll reveals only run when JS is on. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
  @keyframes slide-in { from { opacity: 0; transform: translateX(40px) scale(.97); } to { opacity: 1; transform: none; } }

  .hero-text > * { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-text > :nth-child(1) { animation-delay: .1s; }
  .hero-text > :nth-child(2) { animation-delay: .22s; }
  .hero-text > :nth-child(3) { animation-delay: .38s; }
  .hero-text > :nth-child(4) { animation-delay: .52s; }
  .hero-pic { animation: slide-in 1s cubic-bezier(.2, .7, .2, 1) both; }
  /* After sliding in, the photos keep swaying gently in opposite directions */
  @keyframes sway-right { from { transform: translateX(0); } to { transform: translateX(var(--sway, 16px)); } }
  @keyframes sway-left { from { transform: translateX(0); } to { transform: translateX(calc(var(--sway, 16px) * -1)); } }
  .hero-pic-1 { animation: slide-in 1s cubic-bezier(.2, .7, .2, 1) .3s both, sway-right 4.5s ease-in-out 1.3s infinite alternate; }
  .hero-pic-2 { animation: slide-in 1s cubic-bezier(.2, .7, .2, 1) .5s both, sway-left 4.5s ease-in-out 1.5s infinite alternate; }

  .js .reveal {
    opacity: 0; transform: translateY(28px);
    transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
    transition-delay: var(--reveal-delay, 0s);
  }
  .js .reveal.in { opacity: 1; transform: none; }

  .m-card { transition: transform .25s ease, box-shadow .25s ease; }
  .m-card:hover, .js .m-card.reveal.in:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(38, 40, 23, .1); }
}

/* Popups and the menu ease in when they open */
@media (prefers-reduced-motion: no-preference) {
  @keyframes pop-in { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
  @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
  @keyframes drop-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
  .m-dialog[open] { animation: pop-in .32s cubic-bezier(.2, .8, .2, 1); }
  .m-dialog[open]::backdrop { animation: fade-in .3s ease; }
  .site-nav.open { animation: drop-in .22s ease-out; }
  @keyframes pop-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(14px) scale(.97); } }
  @keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }
  .m-dialog[open].closing { animation: pop-out .22s ease-in forwards; }
  .m-dialog[open].closing::backdrop { animation: fade-out .22s ease-in forwards; }
  .m-dialog-close { transition: transform .3s ease, background .2s, color .2s; }
  .m-dialog-close:hover { transform: rotate(90deg); }
  .m-dialog.closing .m-dialog-close { transform: rotate(180deg); }
}

/* Menu button turns into an X while the menu is open */
.nav-toggle .bar { transition: transform .25s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }

/* Links lift up slightly on hover */
.link, .site-nav a:not(.btn), .site-footer .footer-col > a:not(.footer-logo),
.site-footer .footer-verses a, .site-footer .social-icons a, .ev-files a {
  display: inline-block;
}
@media (prefers-reduced-motion: no-preference) {
  .link, .site-nav a:not(.btn), .site-footer .footer-col > a:not(.footer-logo),
  .site-footer .footer-verses a, .site-footer .social-icons a, .ev-files a {
    transition: transform .2s ease, color .2s ease;
  }
  .link:hover, .site-nav a:not(.btn):hover, .site-footer .footer-col > a:not(.footer-logo):hover,
  .site-footer .footer-verses a:hover, .site-footer .social-icons a:hover, .ev-files a:hover {
    transform: translateY(-3px);
  }
}

/* Calendar: on hover, soft blobs bubble up from the bottom and melt together
   to fill the day (the #goo filter in index.html makes them merge) */
.cal-day { position: relative; }
.cal-day .cal-num { display: inline-grid; place-items: center; align-self: flex-start; min-width: 28px; height: 28px; margin: -3px 0 0 -4px; border-radius: 50%; }
.cal-day.today .cal-num { margin: -3px 0 0 -4px; }
.cal-day > .cal-num, .cal-day > .cal-event { position: relative; z-index: 1; }
.cal-blobs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.cal-blobs-inner { position: relative; display: block; height: 100%; filter: url("#goo"); }
.cal-blob {
  position: absolute; top: 2px; width: 25%; height: 100%;
  background: #f8f3e6; border-radius: 100%;
  transform: translate3d(0, 150%, 0) scale(1.4);
}
.cal-blob:nth-child(1) { left: 0%; }
.cal-blob:nth-child(2) { left: 30%; transition-delay: .08s; }
.cal-blob:nth-child(3) { left: 60%; transition-delay: .16s; }
.cal-blob:nth-child(4) { left: 90%; transition-delay: .24s; }
@media (hover: hover) and (min-width: 701px) {
  .cal-day.has-events:hover { background: transparent; }
  .cal-day.has-events:hover .cal-blob { transform: translateZ(0) scale(1.4); }
}
@media (max-width: 700px) { .cal-blobs { display: none; } }
@media (hover: hover) and (min-width: 701px) and (prefers-reduced-motion: no-preference) {
  .cal-blob { transition: transform .45s ease; }
  .cal-day .cal-event { transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
  .cal-day.has-events:hover .cal-event { transform: translateX(4px); }
  .cal-day.has-events:hover .cal-event:nth-of-type(3) { transition-delay: .05s; }
  .cal-day.has-events:hover .cal-event:nth-of-type(4) { transition-delay: .1s; }
}

/* Keep the footer icons centered in their circles */
.site-footer .social-icons a { display: grid; place-items: center; }

/* Keep the swaying photos from causing sideways scrolling */
.hero { overflow-x: clip; }
@media (max-width: 860px) { .hero-pics { --sway: 8px; } }

/* Phones: popups become drawers that slide up from the bottom */
@media (max-width: 700px) {
  .m-dialog {
    width: 100%; max-width: 100%; max-height: 88vh; margin: auto 0 0;
    border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom);
  }
  .m-dialog::before {
    content: ""; flex: none; display: block; width: 42px; height: 5px; margin: 10px auto 2px;
    border-radius: 999px; background: var(--line);
  }
  .m-dialog-close { top: 16px; right: 14px; }
  .m-dialog-body { padding-top: 1rem; }
}
@media (max-width: 700px) and (prefers-reduced-motion: no-preference) {
  @keyframes drawer-up { from { transform: translateY(100%); } to { transform: none; } }
  @keyframes drawer-down { from { transform: translateY(var(--drag, 0px)); } to { transform: translateY(100%); } }
  .m-dialog[open] { animation: drawer-up .38s cubic-bezier(.2, .85, .25, 1); }
  .m-dialog[open].closing { animation: drawer-down .26s ease-in forwards; }
}

/* Phone drawers: the title (or the date, for calendar days) stays pinned at
   the top while the rest scrolls; no close button (swipe down or tap outside) */
@media (max-width: 700px) {
  .m-dialog-close { display: none; }
  .m-dialog .m-dialog-body { padding: 0 1.4rem 1.75rem; }
  .m-dialog-body > h3,
  .m-dialog-body > .lang-en > h3:first-child,
  .m-dialog-body > .lang-ha > h3:first-child,
  .m-dialog-body > .ev-day {
    position: sticky; top: 0; z-index: 2;
    margin: 0 -1.4rem .6rem; padding: .9rem 1.4rem .7rem;
    background: var(--white); box-shadow: 0 1px 0 var(--line);
  }
  .m-dialog-body > .ev-day { margin-bottom: 1rem; }
  .m-dialog-body h3, .ev-title { padding-right: 0; }
}

/* No focus outline around the whole popup when it opens */
.m-dialog:focus, .m-dialog:focus-visible { outline: none; }

/* Center the calendar arrows exactly */
.cal-nav { display: grid; place-items: center; padding: 0; }
.cal-nav svg { display: block; }

/* Logo symbol hidden for now (header and footer); delete this rule to show it again */
.logo img { display: none; }
