﻿/* 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; }

}

/* 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; }

/* Links and <button>s styled as buttons get the same height everywhere */
.btn { line-height: 1.3; text-align: center; }
/* Phones: the two scholarship buttons stack at the same full width */
@media (max-width: 520px) {
  .award-actions { flex-direction: column; }
  .award-actions .btn { width: 100%; }
}


/* Church Constitution page: the PDF's pages shown one under another */
.doc-page .section { padding-top: clamp(2rem, 5vw, 3.5rem); }
.doc-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 2rem; }
.doc-title { font-size: clamp(2rem, 4.5vw, 3rem); text-transform: none; letter-spacing: -.02em; line-height: 1.1; color: var(--olive); margin: 0; }
.doc-viewer { display: grid; gap: 1.25rem; max-width: 900px; margin: 0 auto; }
.doc-page-img { display: block; width: 100%; height: auto; background: var(--white); border-radius: 6px; box-shadow: 0 6px 24px rgba(38, 40, 23, .1); }
.doc-status { text-align: center; color: var(--muted); padding: 3rem 0; }
.doc-frame { width: 100%; height: 85vh; border: 0; border-radius: 6px; background: var(--white); box-shadow: 0 6px 24px rgba(38, 40, 23, .1); }
.doc-frame + .doc-status { padding: .75rem 0 0; font-size: .9rem; }

/* Phones: the menu is a drawer that slides up from the bottom */
.nav-backdrop { display: none; }
@media (max-width: 700px) {
  /* A blur on the header would trap the fixed drawer inside it */
  .site-header { backdrop-filter: none; }
  .site-nav,
  .site-nav.open {
    display: flex; position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto;
    max-height: 85vh; overflow-y: auto; z-index: 30;
    border: 0; border-radius: 22px 22px 0 0;
    padding: .5rem 1.4rem calc(1.5rem + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 40px rgba(20, 22, 10, .2);
    transform: translateY(105%); visibility: hidden; animation: none;
  }
  .site-nav::before {
    content: ""; flex: none; align-self: center; width: 42px; height: 5px; margin: .4rem 0 .6rem;
    border-radius: 999px; background: var(--line);
  }
  .site-nav.open { transform: none; visibility: visible; }
  .site-nav a:not(.btn) { padding: 1rem 0; font-size: 1.1rem; }
  .nav-backdrop {
    display: block; position: fixed; inset: 0; z-index: 9; /* just under the header (10), which holds the drawer */
    background: rgba(20, 22, 10, .55); opacity: 0; pointer-events: none;
  }
  .nav-backdrop.show { opacity: 1; pointer-events: auto; }
}
@media (max-width: 700px) and (prefers-reduced-motion: no-preference) {
  .site-nav { transition: transform .38s cubic-bezier(.2, .85, .25, 1), visibility 0s linear .38s; }
  .site-nav.open { transition: transform .38s cubic-bezier(.2, .85, .25, 1), visibility 0s; }
  .nav-backdrop { transition: opacity .3s ease; }
}

/* Constitution page: the title and Download button stay pinned under the top bar */
.doc-head {
  position: sticky; top: 96px; z-index: 5;
  margin: 0 -64px 2rem; padding: 1rem 64px;
  background: var(--cream); border-bottom: 1px solid var(--line);
}
@media (max-width: 860px) { .doc-head { margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; } }
@media (max-width: 520px) {
  .doc-head { top: 80px; margin-left: -20px; margin-right: -20px; padding: .75rem 20px; gap: .5rem 1rem; align-items: center; flex-wrap: nowrap; }
  .doc-head > div { min-width: 0; }
  .doc-head .eyebrow { display: none; }
  .doc-title { font-size: 1.3rem; }
  .doc-head .btn { flex: none; }
  .doc-head .btn { padding: .55em 1.1em; font-size: .85rem; }
}

/* Constitution page: invisible text over each page (for find, copy and search) */
.doc-pg { position: relative; overflow: hidden; border-radius: 6px; box-shadow: 0 6px 24px rgba(38, 40, 23, .1); background: var(--white); }
.doc-pg .doc-page-img { box-shadow: none; border-radius: 0; }
.doc-pg .textLayer {
  position: absolute; left: 0; top: 0; transform-origin: 0 0;
  overflow: hidden; line-height: 1; -webkit-text-size-adjust: none; text-size-adjust: none;
  forced-color-adjust: none;
}
.doc-pg .textLayer span, .doc-pg .textLayer br {
  color: transparent; position: absolute; white-space: pre; cursor: text; transform-origin: 0% 0%;
}
.doc-pg .textLayer ::selection { background: rgba(79, 86, 29, .25); }
.doc-pg .textLayer .hit { background: rgba(209, 156, 48, .35); border-radius: 2px; }
.doc-pg .textLayer .hit-now { background: rgba(209, 156, 48, .75); }
.doc-pg .textLayer .endOfContent { display: block; position: absolute; inset: 100% 0 0; z-index: -1; }

/* Search box in the pinned bar */
.doc-tools { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.doc-search {
  display: flex; align-items: center; gap: .35rem; height: 46px; padding: 0 .4rem 0 .9rem;
  background: var(--white); border: 1.5px solid var(--line); border-radius: 999px; min-width: 0;
}
.doc-search[hidden] { display: none; }
.doc-search:focus-within { border-color: var(--olive); }
.doc-search-icon { flex: none; color: var(--muted); }
.doc-search input {
  border: 0; outline: none; background: transparent; font: inherit; font-size: .95rem; color: var(--ink);
  width: 15rem; min-width: 0; padding: 0 .2rem;
}
.doc-search input::-webkit-search-cancel-button { cursor: pointer; }
.doc-search-count { flex: none; font-size: .8rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.doc-search-step {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--olive); cursor: pointer;
}
.doc-search-step:hover { background: var(--sand); }
.doc-head .doc-search ~ .btn { flex: none; }
@media (max-width: 860px) {
  .doc-tools { width: 100%; }
  .doc-search { flex: 1; }
  .doc-search input { width: 100%; flex: 1; }
}
@media (max-width: 520px) {
  .doc-head { flex-wrap: wrap; }
  .doc-tools { order: 3; flex-wrap: nowrap; }
  .doc-search { height: 40px; }
  .doc-tools .btn { flex: none; padding: .55em .9em; font-size: .8rem; }
}

/* Constitution page: round icon-only Download button */
.doc-download {
  flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  border: 1.5px solid var(--olive); color: 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%;
  transition: background-size .4s cubic-bezier(.2, .7, .2, 1), color .4s cubic-bezier(.2, .7, .2, 1);
}
.doc-download:hover, .doc-download:focus-visible { background-size: 100% 100%; color: var(--white); }
@media (max-width: 520px) { .doc-download { width: 40px; height: 40px; } }

/* Who We Are: short sections with small headings */
.who-prose .who-sub { font-size: 1.15rem; color: var(--olive); margin: 1.6rem 0 .5rem; }
.who-prose .who-sub:first-child { margin-top: 0; }
.who-prose p { margin-bottom: .75rem; }
.who-list { margin: 0 0 .9rem; padding-left: 1.2em; }
.who-list li { margin-bottom: .3rem; }
.who-list li::marker { color: var(--gold); }

/* Who We Are: a much smaller photo, giving the text more room */
.about { grid-template-columns: 1fr auto; }
.about-photo { width: 280px; justify-self: end; }
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .about-photo { width: 200px; justify-self: start; margin: 0; }
}

/* Who We Are (redesigned): wide photo, then three cards */
.who-photo {
  display: block; width: 100%; aspect-ratio: 21 / 8; object-fit: cover; object-position: center 42%;
  border-radius: var(--radius); margin-bottom: 2rem;
}
.who-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-items: start; }
.who-card { background: var(--sand); border-radius: var(--radius); padding: 1.75rem 1.6rem 1.5rem; }
.who-icon {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--olive); color: var(--white); margin-bottom: 1rem;
}
.who-card .who-sub { font-size: 1.25rem; color: var(--olive); margin: 0 0 .6rem; }
.who-card p { margin: 0 0 .7rem; font-size: .97rem; }
.who-card p:last-child, .who-card .who-list:last-child { margin-bottom: 0; }
.who-card .who-list { margin: 0 0 .7rem; padding-left: 1.2em; font-size: .97rem; }
.who-card .who-list li { margin-bottom: .2rem; }
.who-card .who-list li::marker { color: var(--gold); }
@media (max-width: 960px) { .who-cards { grid-template-columns: 1fr; } .who-photo { aspect-ratio: 16 / 9; } }

/* Who We Are photo collage: one large photo, two smaller ones beside it */
.who-photos {
  display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 1rem;
  height: clamp(300px, 34vw, 460px); margin-bottom: 2rem;
}
.who-photos img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); display: block; }
.who-photos .who-photo-main { grid-row: 1 / 3; object-position: center 42%; }
@media (max-width: 700px) {
  .who-photos { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; height: auto; gap: .6rem; }
  .who-photos .who-photo-main { grid-column: 1 / 3; grid-row: auto; aspect-ratio: 16 / 10; }
  .who-photos img:not(.who-photo-main) { aspect-ratio: 1 / 1; }
}
/* Keep the collage rows from growing past the set height */
.who-photos { grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
.who-photos img { min-height: 0; }
@media (max-width: 700px) { .who-photos { grid-template-rows: auto auto; } }

/* Who We Are: playful shapes, tilts and colors */
.who-photos img { transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.who-photos .who-photo-main { border-radius: 220px 220px 18px 18px; }
.who-photos img:nth-child(2) { border-radius: 999px; transform: rotate(-2.5deg); }
.who-photos img:nth-child(3) { border-radius: 46% 12px 46% 12px; transform: rotate(2deg); }
.who-cards { gap: 1.75rem; padding-top: .5rem; }
.who-card { transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease; }
.who-card:nth-child(1) { background: #e7ecd6; transform: rotate(-1.2deg); }
.who-card:nth-child(2) { background: #f6e7c4; transform: rotate(.8deg) translateY(10px); }
.who-card:nth-child(3) { background: var(--sand); transform: rotate(-.6deg); }
.who-card .who-sub {
  display: inline-block; font-size: 1.4rem;
  margin-bottom: .5rem;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .who-photos img:hover { transform: rotate(0) scale(1.03); }
  .who-card:hover { transform: rotate(0) translateY(-6px); box-shadow: 0 16px 34px rgba(38, 40, 23, .12); }
}
@media (max-width: 960px) {
  .who-card:nth-child(n) { transform: none; }
}
@media (max-width: 700px) {
  .who-photos .who-photo-main { border-radius: 140px 140px 14px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .who-photos img, .who-card { transform: none !important; }
}

/* Who We Are: tree, olive and olive-leaf shaped photos, plus an olive branch */
.who-photos img,
.who-photos .who-photo-main,
.who-photos img:nth-child(2),
.who-photos img:nth-child(3) { border-radius: 0; transform: none; }
.who-photos .who-photo-main { clip-path: url(#shape-tree); }
.who-photos img:nth-child(2) { clip-path: url(#shape-olive); }
.who-photos img:nth-child(3) { clip-path: url(#shape-leaf); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .who-photos img:hover { transform: scale(1.04); }
}
.who-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; max-width: none; }
.olive-branch { width: clamp(110px, 16vw, 170px); height: auto; flex: none; margin-bottom: .4rem; }
@media (max-width: 700px) {
  .who-photos .who-photo-main { border-radius: 0; aspect-ratio: 4 / 3; }
  .olive-branch { width: 96px; }
}

/* Who We Are: softer, organic shapes that only hint at nature */
.who-photos .who-photo-main,
.who-photos img:nth-child(2),
.who-photos img:nth-child(3) { clip-path: none; }
.who-photos .who-photo-main { border-radius: 42% 58% 22% 26% / 55% 50% 22% 26%; }
.who-photos img:nth-child(2) { border-radius: 58% 42% 52% 48% / 52% 58% 42% 48%; }
.who-photos img:nth-child(3) { border-radius: 70% 22% 64% 26% / 64% 26% 70% 22%; }
@media (max-width: 700px) {
  .who-photos .who-photo-main { border-radius: 46% 54% 20% 24% / 48% 46% 18% 22%; }
}

/* Who We Are: scattered Polaroid photos with tape and handwritten captions */
.who-polaroids {
  display: flex; justify-content: center; align-items: flex-start;
  padding: 1.5rem 0 2.5rem; margin-bottom: 1rem;
}
.polaroid {
  position: relative; margin: 0 -1.25rem; width: min(34%, 360px);
  background: #fff; padding: 12px 12px 0; border-radius: 3px;
  box-shadow: 0 10px 26px rgba(38, 40, 23, .16), 0 2px 5px rgba(38, 40, 23, .08);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease;
}
.polaroid img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.polaroid figcaption {
  font-family: "Caveat", "Segoe Print", cursive; font-size: 1.6rem; color: var(--ink);
  text-align: center; padding: .55rem 0 .8rem; line-height: 1.1;
}
/* A strip of tape on top of each photo */
.polaroid::before {
  content: ""; position: absolute; top: -12px; left: 50%; width: 90px; height: 26px;
  background: rgba(241, 232, 207, .85); box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
  transform: translateX(-50%) rotate(-3deg);
}
.polaroid:nth-child(1) { transform: rotate(-5deg); margin-top: 1.5rem; z-index: 1; }
.polaroid:nth-child(2) { transform: rotate(2deg); z-index: 2; }
.polaroid:nth-child(2)::before { transform: translateX(-50%) rotate(4deg); }
.polaroid:nth-child(3) { transform: rotate(-2deg); margin-top: 2.25rem; z-index: 1; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .polaroid:hover { transform: rotate(0) translateY(-8px) scale(1.03); z-index: 3; box-shadow: 0 20px 40px rgba(38, 40, 23, .2); }
}
@media (max-width: 700px) {
  .who-polaroids { flex-wrap: wrap; padding: 1rem 0 1.5rem; }
  .polaroid { width: 46%; margin: 0 -.4rem 1rem; padding: 8px 8px 0; }
  .polaroid figcaption { font-size: 1.25rem; padding: .4rem 0 .6rem; }
  .polaroid::before { width: 60px; height: 20px; top: -9px; }
  .polaroid:nth-child(2) { order: -1; width: 70%; margin-top: 0; }
  .polaroid:nth-child(1) { margin-top: .5rem; }
  .polaroid:nth-child(3) { margin-top: 1rem; }
}

/* Polaroids: more space between them (no overlap) */
.who-polaroids { gap: clamp(1.5rem, 4vw, 3.5rem); }
.polaroid { margin-left: 0; margin-right: 0; width: min(30%, 330px); }
@media (max-width: 700px) {
  .who-polaroids { gap: .9rem 1.1rem; }
  .polaroid { width: 44%; margin: 0 0 .6rem; }
  .polaroid:nth-child(2) { width: 72%; }
}

/* Who We Are: polaroid photos, each held up by a pushpin */
.who-album {
  display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start; padding: 2rem 0 1.5rem; margin-bottom: 1rem;
}
.album-photo {
  position: relative; margin: 0 0 1rem; transform-origin: 50% 0;
  background: #fffdf8; padding: 10px 10px 42px; border-radius: 2px;
  box-shadow: 0 10px 24px rgba(38, 40, 23, .15), 0 1px 3px rgba(38, 40, 23, .12);
  transition: transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .45s ease;
}
.album-photo img { display: block; width: 100%; object-fit: cover; }
.album-photo:nth-of-type(1) { transform: rotate(-2.5deg); margin-top: .5rem; }
.album-photo:nth-of-type(1) img { aspect-ratio: 4 / 5; }
.album-photo:nth-of-type(2) { transform: none; }
.album-photo:nth-of-type(2) img { aspect-ratio: 4 / 3; }
.album-photo:nth-of-type(3) { transform: rotate(-1.5deg); margin-top: 1.5rem; }
.album-photo:nth-of-type(3) img { aspect-ratio: 1 / 1; }

.album-photo::before, .album-photo::after { content: none; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .album-photo:hover { transform: rotate(0deg); box-shadow: 0 18px 36px rgba(38, 40, 23, .2); }
}
@media (max-width: 700px) {
  .who-album { grid-template-columns: 1fr 1fr; gap: 2rem 1.1rem; padding: 1.2rem 0 2rem; }
  .album-photo { padding: 7px 7px 28px; }
  .album-photo:nth-of-type(2) { grid-column: 1 / 3; grid-row: 1; width: 82%; justify-self: center; }
  .album-photo:nth-of-type(1) { margin-top: 0; }
  .album-photo:nth-of-type(3) { margin-top: 1.5rem; }
}

/* Who We Are: big words drifting across the screen behind the photos */
#about { overflow-x: clip; }
.who-album { position: relative; }
.album-photo { z-index: 1; }
.who-marquee {
  position: absolute; z-index: 0; top: 50%; left: 50%; width: 100vw;
  transform: translate(-50%, -50%) rotate(-3deg); pointer-events: none; overflow: hidden;
}
.who-marquee-track { display: flex; width: max-content; }
.mq-half { display: flex; align-items: center; flex: none; }
.mq-half span {
  font-size: clamp(3rem, 7.5vw, 6.5rem); font-weight: 600; letter-spacing: -.02em;
  text-transform: uppercase; white-space: nowrap; color: rgba(79, 86, 29, .22); padding: 0 .35em;
}
.mq-half .mq-dot { color: rgba(154, 165, 106, .6); font-size: clamp(2rem, 4.5vw, 3.8rem); }
@keyframes who-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: no-preference) {
  .who-marquee-track { animation: who-marquee 60s linear infinite; }
}

/* Who We Are text: plain columns, no colored boxes */
.who-card, .who-card:nth-child(n) { background: none; padding: 0; border-radius: 0; transform: none; box-shadow: none; }
.who-cards { gap: clamp(1.75rem, 4vw, 3rem); }

/* Who We Are: left and right photos a bit smaller than the middle one */
@media (min-width: 701px) { .album-photo:nth-of-type(1), .album-photo:nth-of-type(3) { width: 84%; justify-self: center; } }
@media (min-width: 701px) { .album-photo:nth-of-type(1) { width: 74%; } }

/* Scholarship application page: the form on the left, the filled PDF on the right */
.apply-head { margin-bottom: 2rem; }
.apply-head .doc-title { margin-bottom: .5rem; }
.apply-grid { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.apply-form {
  display: grid; gap: 1.1rem; padding: 1.75rem;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
}
.field { position: relative; display: grid; gap: .4rem; min-width: 0; }
.sig-label label { font-weight: 600; font-size: .9rem; color: var(--ink); }
.field input, .field select {
  width: 100%; min-width: 0; height: 3.5rem; padding: 1.35rem .9rem .35rem; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--cream); border: 1.5px solid var(--line); border-radius: 10px;
}
/* Dropdowns: our own arrow, set in from the right edge */
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 2.75rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364665a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1.1rem center; background-size: 16px;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--olive); background-color: var(--white); }
/* Floating labels: the label sits inside the empty box like a placeholder,
   then shrinks to the top corner when the box is in use or filled in */
.field > label {
  position: absolute; left: calc(.9rem + 1.5px); top: 1.75rem; transform: translateY(-50%);
  font-size: 1rem; color: var(--muted); pointer-events: none; transform-origin: left center;
  max-width: calc(100% - 2.5rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: top .18s ease, font-size .18s ease, color .18s ease;
}
.field:focus-within > label, .field.filled > label, .field:has(input:-webkit-autofill) > label {
  top: .95rem; font-size: .75rem; font-weight: 600; color: var(--olive);
}
/* Empty date boxes hide their mm/dd/yyyy until the label moves up */
.field:not(.filled):not(:focus-within) input[type="date"] { color: transparent; }
.field-hint { font-size: .8rem; color: var(--muted); margin: 0; }
.sig-label { display: flex; justify-content: space-between; align-items: baseline; }
.sig-clear { border: 0; background: none; padding: 0; font: inherit; font-size: .85rem; font-weight: 600; color: var(--olive); cursor: pointer; }
.sig-clear:hover { text-decoration: underline; }
.sig-pad {
  display: block; width: 100%; aspect-ratio: 4 / 1; touch-action: none; cursor: crosshair;
  background: var(--cream); border: 1.5px dashed var(--line); border-radius: 10px;
}
.sig-pad:focus { outline: none; border-color: var(--olive); }
.apply-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; margin-top: .5rem; }
.apply-actions .btn:disabled { opacity: .55; cursor: wait; }
.apply-next { padding: 1rem 1.1rem; border-radius: 10px; background: var(--sand); font-size: .92rem; }
.apply-next p { margin: 0; }
.apply-next .award-label { margin-bottom: .3rem; }
.apply-preview {
  position: sticky; top: 112px; display: grid; gap: 1rem;
  max-height: calc(100vh - 128px); overflow-y: auto; padding: 4px 8px 16px 4px;
}
@media (max-width: 960px) {
  .apply-grid { grid-template-columns: minmax(0, 1fr); }
  .apply-preview { position: static; max-height: none; overflow: visible; padding: 0; }
}
@media (max-width: 520px) {
  .apply-form { padding: 1.25rem; }
  .apply-actions .btn { width: 100%; }
}

/* Application dropdowns: the open list styled to match (Chrome and Edge;
   other browsers and phones keep their own picker) */
@supports (appearance: base-select) {
  .field select, .field select::picker(select) { appearance: base-select; }
  .field select::picker-icon { display: none; }
  .field select::picker(select) {
    margin-top: .35rem; padding: .35rem;
    background: var(--white); border: 1px solid var(--line); border-radius: 12px;
    box-shadow: 0 14px 36px rgba(38, 40, 23, .14);
  }
  .field select option { padding: .65rem .8rem; border-radius: 8px; font-size: 1rem; color: var(--ink); }
  .field select option[value=""] { display: none; }
  .field select option:hover, .field select option:focus-visible { background: var(--sand); outline: none; }
  .field select option:checked { background: #e7ecd6; color: var(--olive-dark); font-weight: 600; }
  .field select option::checkmark { color: var(--olive); }
}

/* Application: attached files */
.files { display: grid; gap: .5rem; }
.files-label { margin: 0; font-weight: 600; font-size: .9rem; color: var(--ink); }
.files-add {
  display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3.5rem; padding: .75rem 1rem;
  font-weight: 600; color: var(--olive); cursor: pointer;
  background: var(--cream); border: 1.5px dashed var(--line); border-radius: 10px;
  transition: border-color .18s ease, background-color .18s ease;
}
.files-add:hover, .files:has(input:focus-visible) .files-add { border-color: var(--olive); background-color: var(--white); }
.files-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .4rem; }
.files-list:empty { display: none; }
.files-list li {
  display: flex; align-items: center; gap: .5rem; padding: .5rem .5rem .5rem .85rem;
  background: var(--sand); border-radius: 8px; font-size: .9rem;
}
.files-list span { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.35; }
.files-remove {
  flex: none; display: grid; place-items: center; width: 28px; height: 28px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1.25rem; line-height: 1; cursor: pointer;
}
.files-remove:hover { background: var(--line); color: var(--ink); }
.files-error, .field-error { margin: 0; font-size: .85rem; font-weight: 500; color: #a2361f; }
.field.invalid input, .field.invalid select { border-color: #a2361f; }
.field.invalid > label { color: #a2361f; }
.sig-pad.invalid, .files.invalid .files-add { border-color: #a2361f; }


/* A box flashes gold after clicking its line in the preview */
@keyframes field-flash { from { box-shadow: 0 0 0 4px rgba(209, 156, 48, .55); } to { box-shadow: 0 0 0 4px rgba(209, 156, 48, 0); } }
.field.flash input, .field.flash select, .field.flash .sig-pad, .files.flash .files-add { animation: field-flash 1.4s ease-out; }

/* Application: address suggestions under the street box */
.addr-list {
  position: absolute; top: calc(3.5rem + 6px); left: 0; right: 0; z-index: 20;
  margin: 0; padding: .35rem; list-style: none;
  background: var(--white); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 14px 36px rgba(38, 40, 23, .14);
}
.addr-list [role="option"] { display: grid; gap: .1rem; padding: .6rem .75rem; border-radius: 8px; cursor: pointer; }
.addr-list [role="option"] strong { font-weight: 600; color: var(--ink); }
.addr-list [role="option"] span { font-size: .85rem; color: var(--muted); }
.addr-list [role="option"]:hover, .addr-list [role="option"].active { background: var(--sand); }
.addr-credit { padding: .35rem .75rem .15rem; font-size: .7rem; color: var(--muted); text-align: right; }

/* Long things in the form stay inside it */
.apply-form > *, .files > * { min-width: 0; }

/* Application: title over the preview, pinned while the pages scroll under it */
.preview-title {
  position: sticky; top: -4px; z-index: 1; margin: 0; padding: .6rem 0;
  background: var(--cream); font-size: .8rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold-dark);
}
@media (max-width: 960px) { .preview-title { top: 96px; } }
@media (max-width: 520px) { .preview-title { top: 80px; } }

/* Application: the preview sits on a sand-colored tray, apart from the white form */
.apply-preview { padding: 0 1.25rem 1.25rem; background: var(--sand); border: 1px solid var(--line); border-radius: var(--radius); }
.preview-title { top: 0; padding: 1rem 0 .75rem; background: var(--sand); }
@media (max-width: 960px) {
  .apply-preview { padding: 0 1rem 1rem; }
  .preview-title { top: 96px; }
}
@media (max-width: 520px) {
  .apply-preview { padding: 0 .75rem .75rem; }
  .preview-title { top: 80px; }
}

/* Application: a slim olive scroll bar on the preview tray */
.apply-preview { scrollbar-width: thin; scrollbar-color: rgba(79, 86, 29, .35) transparent; }
.apply-preview::-webkit-scrollbar { width: 10px; }
.apply-preview::-webkit-scrollbar-track { background: transparent; margin: 12px 0; }
.apply-preview::-webkit-scrollbar-thumb {
  background: rgba(79, 86, 29, .3); border-radius: 999px;
  border: 3px solid var(--sand); /* the sand border makes the thumb look slimmer and inset */
}
.apply-preview::-webkit-scrollbar-thumb:hover { background: rgba(79, 86, 29, .55); }

/* Application: the form gets 40% of the width and the preview 60% */
@media (min-width: 961px) {
  .apply-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
}
.preview-title { color: var(--olive); }

/* Application: no card around the form; the boxes themselves are white */
.apply-form { padding: 0; background: none; border: 0; border-radius: 0; }
.field input, .field select, .sig-pad, .files-add { background-color: var(--white); }
@media (max-width: 520px) { .apply-form { padding: 0; } }

/* Phones and narrow screens: a line between the form and the preview, no tray */
@media (max-width: 960px) {
  .apply-preview { padding: 1.25rem 0 0; background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
  .preview-title { background: var(--cream); }
}
@media (max-width: 520px) { .apply-preview { padding: 1rem 0 0; } }

/* Application: the title sits on the left */
.preview-title { display: flex; align-items: center; justify-content: flex-start; gap: 1rem; }
.apply-preview:focus { outline: none; }
.preview-toggle, .preview-backdrop { display: none; }

/* Phones and narrow screens: the preview is a drawer that slides up from the bottom */
@media (max-width: 960px) {
  .preview-toggle { display: inline-block; }
  .apply-preview {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 40;
    height: 90vh; max-height: 90vh; overflow-y: auto; overscroll-behavior: contain;
    padding: 0 1rem calc(1.25rem + env(safe-area-inset-bottom));
    background: var(--cream); border: 0; border-radius: 22px 22px 0 0;
    box-shadow: 0 -10px 40px rgba(20, 22, 10, .2);
    transform: translateY(105%); visibility: hidden;
  }
  .apply-preview.open { transform: none; visibility: visible; }
  .preview-title { top: 0; padding: 1.5rem 0 .75rem; background: var(--cream); }
  /* the grab handle, centered above the title */
  .preview-title::before {
    content: ""; position: absolute; top: .6rem; left: 50%; transform: translateX(-50%);
    width: 42px; height: 5px; border-radius: 999px; background: var(--line);
  }
  /* Show preview goes under Download/Save PDF */
  .apply-actions { flex-direction: column; align-items: stretch; }
  .preview-backdrop {
    display: block; position: fixed; inset: 0; z-index: 39;
    background: rgba(20, 22, 10, .55); opacity: 0; pointer-events: none;
  }
  .preview-backdrop.show { opacity: 1; pointer-events: auto; }
}
@media (max-width: 960px) and (prefers-reduced-motion: no-preference) {
  .apply-preview { transition: transform .38s cubic-bezier(.2, .85, .25, 1), visibility 0s linear .38s; }
  .apply-preview.open { transition: transform .38s cubic-bezier(.2, .85, .25, 1), visibility 0s; }
  .preview-backdrop { transition: opacity .3s ease; }
}
