/* Diwan — civic & clear. Large, high-contrast text (Noto Naskh Arabic / Source Sans 3), a sober
   green-teal civic band derived from the brand colour, a dismissible notice bar, e-service tiles with
   a Request button each, and a plain office-hours & contact panel. No emblems, no ornament. */
:root {
    --accent: #166534;
    --accent-ink: #fff;
    --civic: color-mix(in srgb, var(--accent) 45%, #0c302c);
    --civic-2: color-mix(in srgb, var(--accent) 30%, #0a2421);
    --civic-ink: #f2f7f6;
    --civic-soft: #c3d6d3;
    --notice: #fff4d6;
    --notice-ink: #4a3500;
    --notice-line: #f0d68a;
    --bg: #ffffff;
    --bg-2: #f1f5f4;
    --surface: #ffffff;
    --ink: #0d1a19;
    --ink-soft: #3e4f4d;
    --line: #c9d5d3;
    --font: "Source Sans 3", "Noto Naskh Arabic", system-ui, sans-serif;
    --r: 8px;
    color-scheme: light;
}
:is(:lang(ar), :lang(ku)) { --font: "Noto Naskh Arabic", "Source Sans 3", serif; }
/* Latin runs (phones, emails) inside Arabic pages use the sans face for legibility. */
:is(:lang(ar), :lang(ku)) :is([dir="ltr"], bdi) { font-family: "Source Sans 3", sans-serif; }
:root[data-theme="dark"] {
    --civic: color-mix(in srgb, var(--accent) 35%, #071c1a);
    --civic-2: color-mix(in srgb, var(--accent) 20%, #051312);
    --notice: #2e2610;
    --notice-ink: #f5e2a8;
    --notice-line: #5a4a1a;
    --bg: #0b1514;
    --bg-2: #101d1c;
    --surface: #132321;
    --ink: #eef5f4;
    --ink-soft: #b8c9c6;
    --line: #2b403d;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 112.5%; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.is-large { font-size: 128%; }
body { margin: 0; overflow-x: hidden; background: var(--bg); color: var(--ink); font: 400 1rem/1.7 var(--font); }
:is(:lang(ar), :lang(ku)) body { line-height: 1.9; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.25; text-wrap: balance; }
:is(:lang(ar), :lang(ku)) :is(h1, h2, h3) { line-height: 1.55; }
:focus-visible { outline: 3px solid #f2b705; outline-offset: 2px; }
.wrap { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.hide, .is-empty { display: none !important; }
.skip { position: absolute; inset-inline-start: 1rem; top: -100px; z-index: 100; padding: .6rem 1rem; background: var(--ink); color: var(--bg); border-radius: var(--r); }
.skip:focus { top: 1rem; }

.eyebrow { margin: 0 0 .5rem; font-size: .85rem; font-weight: 700; color: var(--civic); text-transform: uppercase; letter-spacing: .06em; }
:root[data-theme="dark"] .eyebrow { color: color-mix(in srgb, var(--accent) 50%, #fff); }
:is(:lang(ar), :lang(ku)) .eyebrow { text-transform: none; letter-spacing: 0; font-size: .95rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 50px; padding: .6rem 1.4rem; border-radius: var(--r); border: 2px solid transparent; font: 700 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.btn-solid { background: var(--civic); color: var(--civic-ink); }
.btn-solid:hover { background: var(--civic-2); }
.btn-outline { border-color: var(--civic); color: var(--civic); background: var(--surface); }
:root[data-theme="dark"] .btn-outline { color: var(--ink); border-color: var(--line); }
.btn-outline:hover { background: var(--bg-2); }

/* Notice bar */
.notice { background: var(--notice); color: var(--notice-ink); border-bottom: 1px solid var(--notice-line); }
.notice-in { display: flex; align-items: center; gap: .8rem; min-height: 48px; padding: .4rem 0; }
.notice-ic { flex: 0 0 auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--notice-ink) 12%, transparent); }
.notice-ic svg { width: 17px; height: 17px; }
.notice p { margin: 0; flex: 1; font-size: .92rem; line-height: 1.5; }
.notice-x { flex: 0 0 auto; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.notice-x:hover { background: color-mix(in srgb, var(--notice-ink) 12%, transparent); }
.notice-x svg { width: 18px; height: 18px; }

/* Header */
.hdr { position: sticky; top: 0; z-index: 50; background: var(--surface); transition: box-shadow .25s; }
.hdr.is-stuck { box-shadow: 0 6px 20px -12px rgba(0, 0, 0, .35); }
.hdr-top { display: flex; align-items: center; gap: 1.2rem; min-height: 78px; }
.brand { display: inline-flex; align-items: center; gap: .8rem; text-decoration: none; min-width: 0; }
.brand-logo { height: 48px; width: auto; }
.brand-logo--dark { display: none; }
:root[data-theme="dark"] .brand-logo--light { display: none; }
:root[data-theme="dark"] .brand-logo--dark { display: block; }
.brand-text { display: flex; flex-direction: column; min-width: 0; padding-inline-start: .8rem; border-inline-start: 4px solid var(--civic); }
.brand-name { font-weight: 700; font-size: 1.15rem; line-height: 1.3; }
.brand-sub { font-size: .82rem; color: var(--ink-soft); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hdr-tools { display: flex; align-items: center; gap: .5rem; margin-inline-start: auto; }
.tool { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); cursor: pointer; font-family: "Source Sans 3", sans-serif; }
.tool svg { width: 19px; height: 19px; }
.text-size { display: flex; align-items: baseline; justify-content: center; gap: 1px; font-weight: 700; }
.ts-s { font-size: .75rem; }
.ts-l { font-size: 1.15rem; }
.text-size[aria-pressed="true"] { background: var(--civic); color: var(--civic-ink); border-color: var(--civic); }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.navband { background: var(--civic); color: var(--civic-ink); }
.nav { display: flex; gap: .2rem; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { flex: 0 0 auto; padding: .75rem 1rem; font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; }
.nav a:first-child { padding-inline-start: 0; }
.nav a:hover { border-bottom-color: var(--civic-ink); }

/* Hero */
.hero { background: var(--bg-2); border-bottom: 1px solid var(--line); padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 4.8vw, 3.6rem); }
.hero-tagline { margin: 1rem 0 2rem; font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: var(--ink-soft); max-width: 44ch; }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-photo { aspect-ratio: 4 / 3; border-radius: var(--r); background-size: cover; background-position: center;
    background-color: var(--civic);
    background-image:
        linear-gradient(180deg, transparent 62%, var(--civic-2) 62% 64%, transparent 64%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .07) 0 2px, transparent 2px 56px),
        linear-gradient(135deg, var(--civic) 0%, var(--civic-2) 100%); }

/* Quick links */
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-top: -1.8rem; position: relative; z-index: 2; }
.quick-item { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; box-shadow: 0 10px 30px -22px rgba(0, 0, 0, .4); transition: border-color .2s; }
.quick-item:hover { border-color: var(--civic); }
.quick-ic { flex: 0 0 auto; display: grid; place-items: center; width: 46px; height: 46px; border-radius: var(--r); background: color-mix(in srgb, var(--civic) 12%, var(--surface)); color: var(--civic); }
:root[data-theme="dark"] .quick-ic { color: var(--ink); }
.quick-ic svg { width: 22px; height: 22px; }
.quick-item strong { display: block; font-size: 1.02rem; }
.quick-item small { display: block; font-size: .85rem; color: var(--ink-soft); line-height: 1.45; }

/* Sections */
.section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
.sec-head { margin-bottom: 2rem; max-width: 760px; }
.sec-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.sec-lead { margin: .6rem 0 0; color: var(--ink-soft); }

/* E-service tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; }
.pcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--civic); border-radius: var(--r); overflow: hidden; }
.pcard-cover { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
.pcard-cover--blank { position: relative; aspect-ratio: auto; height: 70px; background: transparent; }
.pcard-cover--blank::before { content: ""; position: absolute; top: 1.3rem; inset-inline-start: 1.3rem; width: 46px; height: 46px; border-radius: var(--r); background: color-mix(in srgb, var(--civic) 12%, var(--surface)); }
.pcard-cover--blank::after { content: ""; position: absolute; top: calc(1.3rem + 11px); inset-inline-start: calc(1.3rem + 13px); width: 20px; height: 24px; border: 2px solid var(--civic); border-radius: 2px;
    background: linear-gradient(var(--civic), var(--civic)) 3px 6px / 10px 2px no-repeat, linear-gradient(var(--civic), var(--civic)) 3px 11px / 10px 2px no-repeat, linear-gradient(var(--civic), var(--civic)) 3px 16px / 6px 2px no-repeat; }
:root[data-theme="dark"] .pcard-cover--blank::after { border-color: var(--ink); background: linear-gradient(var(--ink), var(--ink)) 3px 6px / 10px 2px no-repeat, linear-gradient(var(--ink), var(--ink)) 3px 11px / 10px 2px no-repeat, linear-gradient(var(--ink), var(--ink)) 3px 16px / 6px 2px no-repeat; }
.pcard-body { display: flex; flex-direction: column; gap: .4rem; flex: 1; padding: 1.2rem 1.3rem 1.3rem; }
.pcard h3 { font-size: 1.18rem; }
.pcard p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.pcard-price { font-size: .9rem; font-weight: 600; }
.pcard-price::before { content: attr(data-fee) " "; font-weight: 400; color: var(--ink-soft); }
.pcard-req { margin-top: auto; padding-top: 1rem; }
.pcard-req .btn { width: 100%; min-height: 46px; }

/* About */
.about { background: var(--bg-2); border-block: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.about-grid:not(:has(.about-photo)) { grid-template-columns: 1fr; max-width: 820px; }
.about-media:empty { display: none; }
.about-copy h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: .8rem; }
.lead { margin: 0; color: var(--ink-soft); font-size: 1.05rem; max-width: 62ch; }
.about-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); }

/* Officials */
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.tcard { display: grid; grid-template-columns: 60px 1fr; column-gap: 1rem; align-items: center; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.tcard-avatar { grid-row: span 2; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--civic); color: var(--civic-ink); font-weight: 700; font-size: 1.1rem; }
.tcard h3 { font-size: 1.05rem; }
.tcard p { margin: 0; font-size: .92rem; color: var(--ink-soft); }

/* Gallery */
.gallery { background: var(--bg-2); border-top: 1px solid var(--line); }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gallery-item { margin: 0; overflow: hidden; border-radius: var(--r); }
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* Office hours & contact */
.office { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.office-card { padding: clamp(1.5rem, 4vw, 2.2rem); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.office-card--hours { background: var(--civic); color: var(--civic-ink); border-color: var(--civic); }
.office-card h3 { display: flex; align-items: center; gap: .6rem; font-size: 1.15rem; }
.office-card h3 svg { width: 22px; height: 22px; flex: 0 0 auto; }
.office-card h3 + p { margin: .4rem 0 1.4rem; }
.office-card--hours p { color: var(--civic-soft); }
.office-addr { font-weight: 600; color: var(--civic-ink) !important; font-size: 1.08rem; }
.office-note { margin: 0; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, .2); font-size: .92rem; }
.office-list { margin: 0; }
.office-list div { padding: 0 0 1.1rem; margin-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.office-list dt { font-size: .88rem; font-weight: 700; color: var(--ink-soft); }
.office-list dd { margin: .2rem 0 0; font-size: 1.15rem; font-weight: 600; overflow-wrap: anywhere; }
.office-cta { display: flex; gap: .7rem; flex-wrap: wrap; }

/* Footer */
.ftr { background: var(--civic-2); color: var(--civic-soft); padding: 3.5rem 0 0; font-size: .95rem; }
.ftr-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; }
.footer-logo { height: 46px; width: auto; margin-bottom: .8rem; }
.footer-name { display: block; font-size: 1.2rem; font-weight: 700; color: var(--civic-ink); }
.ftr-brand p { margin: .3rem 0 0; max-width: 44ch; }
.ftr-col { display: flex; flex-direction: column; gap: .45rem; }
.ftr-col h4 { margin: 0 0 .4rem; font-size: 1rem; color: var(--civic-ink); }
.ftr a { text-decoration: none; }
.ftr-col a:hover { color: var(--civic-ink); text-decoration: underline; }
.socials { display: flex; gap: .5rem; margin-top: 1rem; }
.socials a { width: 42px; height: 42px; border-radius: var(--r); display: grid; place-items: center; background: rgba(255, 255, 255, .1); color: var(--civic-ink); }
.socials a:hover { background: rgba(255, 255, 255, .2); }
.socials svg { width: 18px; height: 18px; }
.ftr-base { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 3rem; padding: 1.2rem 0; border-top: 1px solid rgba(255, 255, 255, .15); font-size: .88rem; }
.footer-credit a { color: var(--civic-ink); text-decoration: underline; }

.wa { position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 60; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 12px 28px -10px rgba(0, 0, 0, .45); }

/* Motion — kept minimal */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
    html { scroll-behavior: auto; }
}

@media (max-width: 960px) {
    .hero-grid, .about-grid, .office { grid-template-columns: 1fr; }
    .hero-photo { aspect-ratio: 16 / 7; }
    .photos { grid-template-columns: 1fr 1fr; }
    .ftr-grid { grid-template-columns: 1fr 1fr; }
    .ftr-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .brand-logo { height: 40px; }
    .brand-sub { display: none; }
    .brand-name { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .hdr-top { min-height: 66px; gap: .6rem; }
    .tool { width: 40px; height: 40px; }
    .quick { margin-top: 1.5rem; gap: .6rem; }
    .quick-item { padding: .75rem 1rem; box-shadow: none; }
    .quick-item small { display: none; }
    .quick-ic { width: 38px; height: 38px; }
    .photos, .ftr-grid { grid-template-columns: 1fr; }
}
