/* Jalalia Mosque & Islamic Education Centre — site styles.
   No external fonts, images or scripts: everything is served from this site. */

:root {
  --green-950: #08241f;
  --green-900: #0e3b35;
  --green-700: #1b5e52;
  --green-600: #24786a;
  --stone-50: #f6f8f6;
  --stone-100: #edf1ee;
  --stone-200: #dbe3de;
  --stone-400: #9aa9a2;
  --slate: #223036;
  --slate-soft: #46565c;
  --brass: #a9802b;
  --brass-light: #dcbd72;
  --white: #fff;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --arabic: "Noto Naskh Arabic", "Geeza Pro", "Traditional Arabic", "Scheherazade New", "Times New Roman", serif;

  --measure: 66ch;
  --wrap: 72rem;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--stone-100);
  color: var(--slate);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--green-700); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { color: var(--green-900); }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: 0.75rem; top: -4rem; z-index: 50;
  background: var(--white); color: var(--green-900); padding: 0.6rem 1rem; font-family: var(--sans);
}
.skip:focus { top: 0.75rem; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Header ---------- */
.site-header { background: var(--white); color: var(--green-900); border-bottom: 4px solid var(--green-900); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.5rem 2rem; padding-block: 0.9rem;
}
.brand { display: flex; align-items: center; gap: 0.8rem; color: var(--white); text-decoration: none; }
.brand:hover { color: var(--white); }
.brand-mark { width: 2.4rem; height: 3rem; flex: none; }
.brand-text { display: block; line-height: 1.2; }
.brand-name { display: block; font-size: 1.2rem; font-weight: 600; letter-spacing: 0.01em; }
.brand-sub { display: block; font-family: var(--sans); font-size: 0.8rem; color: var(--brass-light); }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.15rem 1.35rem; }
.site-nav a {
  display: inline-block; padding: 0.45rem 0; font-family: var(--sans); font-size: 0.97rem;
  color: var(--green-900); text-decoration: none; border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--brass); color: var(--green-900); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--brass); font-weight: 600; }

/* ---------- Hero ---------- */
.hero { background: var(--green-900); color: var(--white); padding-block: clamp(2.5rem, 7vw, 5rem) 0; position: relative; overflow: hidden; }
.hero .wrap { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: 1fr; align-items: end; }
@media (min-width: 62rem) { .hero .wrap { grid-template-columns: minmax(0, 1.1fr) minmax(22rem, 0.9fr); } }
.hero-copy { padding-bottom: clamp(2.5rem, 6vw, 4.5rem); max-width: 40rem; }
.bismillah { text-align: left; font-family: var(--arabic); font-size: 1.7rem; line-height: 1.8; color: var(--brass-light); margin: 0 0 0.5rem; }
.hero h1 { color: var(--white); font-size: clamp(2.2rem, 5.2vw, 3.6rem); line-height: 1.08; font-weight: 600; margin: 0 0 1.1rem; letter-spacing: -0.012em; text-wrap: balance; }
.hero p.lead { font-size: 1.25rem; color: #d3e2dc; margin: 0 0 1.8rem; max-width: 36rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-block; font-family: var(--sans); font-weight: 600; font-size: 1rem; line-height: 1.2;
  padding: 0.85rem 1.35rem; border-radius: 0.2rem; text-decoration: none; border: 2px solid var(--brass-light);
}
.btn-primary { background: var(--brass-light); color: var(--green-950); }
.btn-primary:hover { background: var(--white); border-color: var(--white); color: var(--green-950); }
.btn-ghost { color: var(--white); background: transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); color: var(--white); }

/* Pointed-arch panel (echoes the Gothic window of the building): a panel with a pointed top and a brass edge */
.arch { --rise: 3.2rem; position: relative; color: var(--green-950); width: min(100%, 30rem); margin-inline: auto;
  background: var(--brass); padding: 3px 3px 0;
  clip-path: polygon(0 var(--rise), 50% 0, 100% var(--rise), 100% 100%, 0 100%); }
.arch-inner { background: var(--stone-100); padding: calc(var(--rise) + 1.6rem) clamp(1.3rem, 4vw, 2rem) 1.5rem;
  clip-path: polygon(0 var(--rise), 50% 0, 100% var(--rise), 100% 100%, 0 100%); }
.arch h2 { font-size: 1.5rem; line-height: 1.2; margin: 0; font-weight: 600; }
.arch .date { font-family: var(--sans); font-size: 0.92rem; color: var(--slate-soft); margin: 0.2rem 0 0.7rem; }
.next { font-family: var(--sans); font-size: 0.97rem; margin: 0 0 0.9rem; padding: 0.55rem 0.75rem; background: var(--green-900); color: var(--white); border-radius: 0.2rem; }
.next strong { color: var(--brass-light); }

.times { list-style: none; margin: 0; padding: 0; font-family: var(--sans); }
.times li {
  display: grid; grid-template-columns: 1fr auto auto; gap: 0 1.2rem; align-items: baseline;
  padding: 0.5rem 0.2rem; border-bottom: 1px solid var(--stone-200); font-size: 1.05rem;
}
.times li:last-child { border-bottom: 0; }
.times .p-name { font-family: var(--serif); font-weight: 600; font-size: 1.12rem; }
.times .p-time { font-variant-numeric: tabular-nums; min-width: 3.4rem; text-align: right; }
.times .p-jamaat { font-variant-numeric: tabular-nums; min-width: 3.4rem; text-align: right; color: var(--green-700); font-weight: 600; }
.times li.is-info { color: var(--slate-soft); }
.times li.is-info .p-name { font-weight: 400; }
.times li.is-next { background: #e2ece7; box-shadow: inset 4px 0 0 var(--brass); padding-left: 0.7rem; }
.times-head { display: grid; grid-template-columns: 1fr auto auto; gap: 0 1.2rem; font-family: var(--sans); font-size: 0.85rem; color: var(--slate-soft); padding: 0 0.2rem 0.3rem; border-bottom: 2px solid var(--green-900); }
.times-head span:nth-child(2), .times-head span:nth-child(3) { min-width: 3.4rem; text-align: right; }
.arch-foot { font-family: var(--sans); font-size: 0.88rem; margin: 0.9rem 0 0; color: var(--slate-soft); }
.arch-empty { font-family: var(--sans); font-size: 1rem; }

/* ---------- Content sections ---------- */
main { display: block; }
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section + .section { padding-top: 0; }
.section.on-white { background: var(--stone-50); padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section.on-white + .section { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
h1, h2, h3 { font-weight: 600; line-height: 1.2; color: var(--green-900); text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.15rem); margin: 0 0 1rem; }
h3 { font-size: 1.25rem; margin: 1.8rem 0 0.4rem; }
p { margin: 0 0 1.1rem; }
.measure { max-width: var(--measure); }
.two-col { display: grid; gap: 2rem clamp(2rem, 6vw, 5rem); grid-template-columns: 1fr; }
@media (min-width: 52rem) { .two-col { grid-template-columns: 1fr 1fr; } }

.page-title { background: var(--green-900); color: var(--white); padding-block: clamp(2rem, 5vw, 3.5rem); position: relative; }
.page-title h1 { color: var(--white); font-size: clamp(2rem, 4.6vw, 3rem); margin: 0 0 0.4rem; }
.page-title p { color: #d3e2dc; margin: 0; max-width: 44rem; font-size: 1.15rem; }
.page-title::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 0.4rem;
  background: repeating-linear-gradient(90deg, var(--brass) 0 1.2rem, transparent 1.2rem 1.6rem);
  opacity: 0.55;
}

/* A plain list of things the mosque does: structure carries meaning, no card chrome */
.rows { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--green-900); }
.rows > li { display: grid; gap: 0.3rem 2rem; padding: 1.2rem 0; border-bottom: 1px solid var(--stone-400); }
@media (min-width: 46rem) { .rows > li { grid-template-columns: 15rem 1fr; } }
.rows h3 { margin: 0; font-size: 1.2rem; }
.rows p { margin: 0; }

dl.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1.4rem; font-family: var(--sans); font-size: 1rem; }
dl.facts dt { font-weight: 600; color: var(--green-900); }
dl.facts dd { margin: 0; }

.note { border-left: 4px solid var(--brass); background: var(--stone-50); padding: 0.9rem 1.1rem; margin: 1.4rem 0; font-size: 1rem; }
.note p:last-child { margin-bottom: 0; }

.address { font-style: normal; }

/* Tables */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1rem 0 1.5rem; }
table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: 0.97rem; background: var(--white); }
caption { text-align: left; font-family: var(--serif); font-weight: 600; font-size: 1.15rem; padding: 0 0 0.5rem; color: var(--green-900); }
th, td { padding: 0.55rem 0.7rem; border: 1px solid var(--stone-200); text-align: left; vertical-align: top; }
thead th { background: var(--green-900); color: var(--white); font-weight: 600; text-align: center; }
thead th:first-child { text-align: left; }
thead tr + tr th { background: var(--green-700); font-weight: 400; font-size: 0.88rem; }
tbody td { font-variant-numeric: tabular-nums; }
.tt td { text-align: center; }
.tt td:first-child, .tt th[scope="row"] { text-align: left; white-space: nowrap; }
.tt tr.is-today td, .tt tr.is-today th { background: #fbf2d8; font-weight: 600; }
.tt tr.is-friday td:first-child { box-shadow: inset 4px 0 0 var(--green-600); }
.rakah td, .rakah th { text-align: left; }
.rakah thead th { text-align: left; }

.controls { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center; font-family: var(--sans); margin-bottom: 0.5rem; }
select, button.btn { font: inherit; }
select { padding: 0.55rem 0.8rem; border: 2px solid var(--green-900); border-radius: 0.2rem; background: var(--white); color: var(--slate); font-size: 1rem; }
button.btn { cursor: pointer; background: var(--green-900); color: var(--white); border-color: var(--green-900); }
button.btn:hover { background: var(--green-700); border-color: var(--green-700); color: var(--white); }

/* Audio */
.audio-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--green-900); }
.audio-list li { padding: 1rem 0; border-bottom: 1px solid var(--stone-400); display: grid; gap: 0.4rem 1.5rem; align-items: center; }
@media (min-width: 46rem) { .audio-list li { grid-template-columns: 16rem 1fr; } }
.audio-list .ar { font-family: var(--arabic); font-size: 1.4rem; color: var(--green-700); display: block; line-height: 1.5; }
.audio-list strong { font-size: 1.1rem; }
audio { width: 100%; }
.ar { font-family: var(--arabic); }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-950); color: #c6d7d0; padding-block: 2.5rem; font-family: var(--sans); font-size: 0.95rem; line-height: 1.6; }
.site-footer a { color: var(--brass-light); }
.site-footer a:hover { color: var(--white); }
.site-footer .cols { display: grid; gap: 1.8rem 3rem; grid-template-columns: 1fr; }
@media (min-width: 52rem) { .site-footer .cols { grid-template-columns: 1.3fr 1fr 1fr; } }
.site-footer h2 { font-family: var(--serif); font-size: 1.1rem; color: var(--white); margin: 0 0 0.5rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer .legal { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid rgba(255, 255, 255, 0.18); font-size: 0.85rem; }

/* ---------- Print: used for the prayer timetable ---------- */
@media print {
  body { background: #fff; font-size: 11pt; color: #000; }
  .site-header, .site-footer, .hero, .controls, .skip, .no-print { display: none !important; }
  .page-title { background: none; color: #000; padding: 0 0 0.5rem; }
  .page-title h1, .page-title p { color: #000; }
  .page-title::after { display: none; }
  .section { padding: 0; }
  table { font-size: 9pt; }
  thead th { background: #eee !important; color: #000 !important; }
  .tt tr.is-today td { background: none; }
}

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { .times li.is-next { outline: 2px solid CanvasText; } }

.section .arch-shape .fill { fill: var(--stone-50); }
.note ul { list-style: none; padding: 0; margin: 0; }
.note h3 { margin-top: 0; }

.brand img { height: clamp(3rem, 8vw, 4.2rem); width: auto; }

input[type="search"] { padding: 0.55rem 0.8rem; border: 2px solid var(--green-900); border-radius: 0.2rem; background: var(--white); color: var(--slate); font: inherit; font-size: 1rem; min-width: 14rem; }
.audio-list li[hidden] { display: none; }

.members { list-style: none; margin: 0; padding: 0; columns: 2 12rem; column-gap: 2rem; }
.members li { break-inside: avoid; padding: 0.15rem 0; }

.photo { width: 100%; max-width: 32rem; height: auto; border-bottom: 4px solid var(--brass); background: var(--stone-200); }

.linklike { font: inherit; color: var(--brass-light); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }
.linklike:hover { color: var(--white); }
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--green-950); color: var(--white); border-top: 4px solid var(--brass); padding: 1rem var(--gutter); display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; font-family: var(--sans); font-size: 0.97rem; line-height: 1.5; }
.consent p { margin: 0; flex: 1 1 24rem; max-width: 52rem; }
.consent a { color: var(--brass-light); }
.consent .btn { padding: 0.6rem 1.1rem; font-size: 0.95rem; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.92em; background: var(--stone-200); padding: 0.05em 0.3em; border-radius: 0.15rem; }
.consent .btn { background: var(--brass-light); color: var(--green-950); border-color: var(--brass-light); }
.consent .btn:hover { background: var(--white); border-color: var(--white); color: var(--green-950); }

.section .arch-inner { background: var(--stone-50); }
