/* Darrut Tarbiyah Muslim School — relocation fund site. Built by NTECH. */

:root {
  --ink: #14213D;
  --ink-2: #1F3160;
  --blue: #2B4C8C;
  --saffron: #F2B705;
  --saffron-deep: #D89F00;
  --paper: #F3F6FB;
  --tint: #E6ECF6;
  --text: #1B2438;
  --muted: #4A5670;
  --line: #CBD5E6;
  --brick-empty: #D7DFEC;
  --surface: #FFFFFF;

  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --arabic: "Amiri", "Traditional Arabic", serif;
  --measure: 38rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius-sm: 6px;
  --radius-lg: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0F1830;
    --tint: #16213F;
    --surface: #1A2749;
    --text: #E8EDF7;
    --muted: #A9B4CC;
    --line: #2C3B63;
    --brick-empty: #25345C;
    --blue: #8FB0EA;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0F1830; --tint: #16213F; --surface: #1A2749; --text: #E8EDF7;
  --muted: #A9B4CC; --line: #2C3B63; --brick-empty: #25345C; --blue: #8FB0EA;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font);
  font-size: clamp(1.02rem, 0.98rem + 0.2vw, 1.12rem);
  line-height: 1.6;
  font-variation-settings: "opsz" 16;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; border-radius: 3px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--saffron); color: var(--ink); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { width: min(72rem, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* Type */
h1, h2, h3 { font-family: var(--font); line-height: 1.05; margin: 0 0 .6em; letter-spacing: -0.01em; }
h1 {
  font-size: clamp(2.6rem, 1.6rem + 5vw, 5rem);
  font-weight: 800;
  font-variation-settings: "opsz" 96, "wdth" 78;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.2rem);
  font-weight: 750;
  font-variation-settings: "opsz" 72, "wdth" 82;
  text-wrap: balance;
}
h3 { font-size: 1.3rem; font-weight: 700; font-variation-settings: "opsz" 24, "wdth" 90; }
p { margin: 0 0 1em; max-width: var(--measure); }
strong { font-weight: 700; }
.small { font-size: .92rem; color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.35rem; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--saffron); color: var(--ink); }
.btn-primary:hover { background: var(--saffron-deep); }
.btn-quiet { border-color: currentColor; color: var(--text); }
.btn-quiet:hover { background: var(--tint); }
.btn-quiet-light { border-color: rgba(255,255,255,.5); color: #fff; background: transparent; }
.btn-quiet-light:hover { border-color: #fff; }
.btn-donate { background: var(--saffron); color: var(--ink); padding: .5rem 1.1rem; }
.btn-donate:hover { background: var(--saffron-deep); }
.btn-wide { width: 100%; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ink) 94%, transparent);
  backdrop-filter: blur(8px);
  color: #fff;
}
.header-row { display: flex; align-items: center; gap: 1.5rem; min-height: 4rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; margin-right: auto; }
.brand-mark { width: 30px; height: 30px; color: #fff; flex: none; }
.brand-name { font-weight: 750; font-variation-settings: "wdth" 85; line-height: 1.05; font-size: 1.02rem; }
.brand-sub { display: block; font-weight: 400; font-size: .82rem; opacity: .75; }
.nav { display: flex; gap: 1.25rem; font-size: .95rem; }
.nav a { text-decoration: none; opacity: .85; }
.nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 860px) { .nav { display: none; } }

/* Hero */
.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.bismillah { font-family: var(--arabic); font-size: 1.5rem; color: var(--blue); margin: 0 0 1rem; max-width: none; text-align: left; }
.lede { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0 1rem; }
.hero-note { font-size: .92rem; color: var(--muted); }

/* The brick building: the signature element */
.build { margin: 0; }
.bricks { width: 100%; height: auto; display: block; overflow: visible; }
.bricks .b { fill: var(--brick-empty); transition: fill .25s; }
.bricks .b.on { fill: var(--saffron); }
.bricks .b.on.alt { fill: var(--saffron-deep); }
.bricks .ground { fill: var(--ink); }
:root[data-theme="dark"] .bricks .ground { fill: #0A1024; }
.build-caption { display: flex; align-items: baseline; gap: .9rem; margin: 1.25rem 0 .9rem; }
.build-pct {
  font-size: clamp(3rem, 2rem + 4vw, 4.6rem); font-weight: 800; line-height: 1;
  font-variation-settings: "opsz" 96, "wdth" 75; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .build-pct { color: var(--saffron); } }
:root[data-theme="dark"] .build-pct { color: var(--saffron); }
.build-label { color: var(--muted); max-width: 16rem; line-height: 1.3; }

.bar { position: relative; height: 12px; border-radius: 999px; background: var(--brick-empty); overflow: visible; }
.bar-fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: var(--saffron); transition: width 1.6s cubic-bezier(.2,.7,.2,1); }
.bar-tick { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--paper); transform: translateX(-1px); }
.milestones { list-style: none; padding: 0; margin: .5rem 0 0; position: relative; height: 1.4rem; font-size: .85rem; color: var(--muted); }
.milestones li { position: absolute; left: var(--at); transform: translateX(-100%); white-space: nowrap; padding-right: .1rem; }
.milestones li.done { color: var(--text); font-weight: 700; }
.updated { font-size: .82rem; color: var(--muted); margin-top: .6rem; }

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-tint { background: var(--tint); }
.section-ink { background: var(--ink); color: #EEF2FA; }
.section-ink h2 { color: #fff; }
.section-lede { font-size: clamp(1.08rem, 1rem + .3vw, 1.25rem); opacity: .9; margin-bottom: 2.25rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

/* Timeline (a real sequence) */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 5rem 1fr; gap: 1rem; padding: 0 0 1.75rem 1.25rem; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -9px; top: .45rem; width: 15px; height: 15px; border-radius: 50%; background: var(--blue); }
.timeline .t-next::before { background: var(--saffron); box-shadow: 0 0 0 4px color-mix(in srgb, var(--saffron) 30%, transparent); }
.t-year { font-weight: 800; font-size: 1.6rem; line-height: 1.1; font-variation-settings: "opsz" 48, "wdth" 78; color: var(--blue); }
.t-next .t-year { color: var(--saffron-deep); }
.t-body strong { display: block; }

/* Reasons */
.reasons { list-style: none; padding: 0; margin: 0 0 3rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.5rem 2.5rem; }
.reasons li { border-top: 2px solid var(--saffron); padding-top: .9rem; color: #D5DDEE; }
.reasons strong { color: #fff; display: block; font-size: 1.12rem; margin-bottom: .2rem; }
.photo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 0; }
.photo-pair img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); }
.photo-pair figcaption { grid-column: 1 / -1; font-size: .9rem; opacity: .75; }
@media (max-width: 560px) { .photo-pair { grid-template-columns: 1fr; } }

/* Achievers */
.achievers { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 860px) { .achievers { grid-template-columns: 1fr; } }
.achievers-lead {
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem); line-height: 1.3; font-weight: 500;
  font-variation-settings: "opsz" 40; margin: 0;
  padding-left: 1.25rem; border-left: 6px solid var(--saffron);
}
.achievers-list { list-style: none; margin: 0; padding: 0; }
.achievers-list li { padding: 1rem 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.achievers-list li:first-child { padding-top: 0; }
.achievers-list strong { display: block; color: var(--text); font-size: 1.15rem; }
.spot img { border-radius: var(--radius-sm); aspect-ratio: 1; object-fit: cover; }

/* Courts */
.courts { align-items: center; }
.courts-img { margin: 0; }
.courts-img img { border-radius: var(--radius-lg); width: 100%; }
.courts-img figcaption { font-size: .85rem; color: var(--muted); margin-top: .5rem; }
.court { width: min(18rem, 100%); margin-top: .5rem; }
.court-bg { fill: #1F7A5A; }
.court-line { fill: none; stroke: #fff; stroke-width: 1.5; }
.court-net { stroke: var(--saffron); stroke-width: 3; }

/* Community */
.plain { padding-left: 1.2rem; margin: 0 0 1.25rem; }
.plain li { margin-bottom: .35rem; }
.plain li::marker { color: var(--saffron-deep); }
.stack { margin: 0; display: grid; grid-template-columns: 1fr 1.3fr; gap: .75rem; align-items: end; }
.stack img { border-radius: var(--radius-sm); width: 100%; object-fit: cover; }
.stack img:first-child { aspect-ratio: 3 / 4; }
.stack img:last-child { aspect-ratio: 4 / 3; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 11rem; gap: .6rem; }
.g { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius-sm); overflow: hidden; }
.g img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.g:hover img { transform: scale(1.03); }
.g-tall { grid-row: span 2; }
@media (max-width: 760px) { .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 9rem; } }
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(92vw, 1100px); max-height: 90vh; }
.lightbox::backdrop { background: rgba(8, 12, 26, .88); }
.lightbox img { max-height: 84vh; width: auto; margin: 0 auto; border-radius: var(--radius-sm); }
.lightbox-close { margin: .75rem auto 0; display: block; background: #fff; color: var(--ink); border: 0; border-radius: 999px; padding: .5rem 1.2rem; font: inherit; font-weight: 700; cursor: pointer; }

/* Donate */
.donate-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.5rem; align-items: start; }
.donate-grid:has(> .panel-card[hidden]) { grid-template-columns: minmax(0, 44rem); }
@media (max-width: 860px) { .donate-grid { grid-template-columns: 1fr; } }
.panel { background: var(--surface); color: var(--text); border-radius: var(--radius-lg); padding: clamp(1.25rem, 3vw, 2rem); }
.panel h3 { margin-bottom: .8rem; }
.panel-eft { border-top: 6px solid var(--saffron); }
.bank { margin: 0 0 1rem; }
.bank > div { display: grid; grid-template-columns: 9rem 1fr; gap: .5rem; padding: .65rem 0; border-bottom: 1px solid var(--line); align-items: center; }
@media (max-width: 480px) { .bank > div { grid-template-columns: 1fr; gap: .1rem; } }
.bank dt { color: var(--muted); font-size: .9rem; }
.bank dd { margin: 0; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.mono-num { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.copy { font: inherit; font-size: .8rem; font-weight: 700; padding: .3rem .75rem; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; color: var(--blue); cursor: pointer; }
.copy:hover { border-color: var(--blue); }
.copy.done { background: var(--saffron); border-color: var(--saffron); color: var(--ink); }

.chips { border: 0; padding: 0; margin: 0 0 1rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.chips legend { padding: 0; margin-bottom: .5rem; font-size: .9rem; color: var(--muted); }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; }
.chips span { display: block; text-align: center; padding: .6rem .25rem; border: 2px solid var(--line); border-radius: var(--radius-sm); font-weight: 700; cursor: pointer; }
.chips input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.chips input:focus-visible + span { outline: 3px solid var(--saffron); outline-offset: 2px; }
@media (max-width: 400px) { .chips { grid-template-columns: repeat(2, 1fr); } }
.other { display: grid; gap: .3rem; margin-bottom: 1rem; font-size: .9rem; color: var(--muted); }
.other input { font: inherit; font-size: 1.1rem; padding: .6rem .8rem; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); color: var(--text); }
.form-error { color: #B42318; font-size: .9rem; }

.contacts-title { color: #fff; margin-top: 3rem; }
.contacts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0 2rem; }
.contacts li { display: grid; grid-template-columns: 1fr auto; gap: 0 1rem; padding: .8rem 0; border-bottom: 1px solid rgba(255,255,255,.15); }
.contacts span { grid-column: 1 / -1; font-weight: 700; color: #fff; }
.contacts a { color: #C9D4EA; text-decoration: none; font-variant-numeric: tabular-nums; }
.contacts a:hover { color: #fff; text-decoration: underline; }
.contacts .wa { color: var(--saffron); font-weight: 700; }

.closing {
  margin: 3.5rem 0 1.5rem; padding: 0; max-width: 40rem;
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); line-height: 1.3; font-weight: 500; color: #fff;
}
.share { margin: 0; }

/* Footer */
.site-footer { background: #0B1330; color: #B9C3DA; padding: 2.5rem 0; font-size: .92rem; }
.footer-row { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; align-items: end; }
.footer-row p { margin: 0; }
.site-footer strong { color: #fff; }
.credit strong { color: var(--saffron); }

.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 150%);
  background: var(--ink); color: #fff; padding: .7rem 1.2rem; border-radius: 999px; margin: 0;
  font-weight: 600; transition: transform .25s, visibility .25s; z-index: 80; pointer-events: none; visibility: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
.toast.show { transform: translate(-50%, 0); visibility: visible; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
