/* =========================================================
   خانه زکات — design system
   Minimal, app-like, RTL. Palette and shape follow pwa.ozone.ir
   ========================================================= */

@font-face {
    font-family: "Yekan";
    src: url("../fonts/Yekan.woff") format("woff"),
        url("../fonts/Yekan.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #F5F7F7;
    --surface: #FFFFFF;
    --surface-2: #EAEDED;
    --border: #E1E3E3;
    --text: #1F1F1F;
    --text-2: #535454;
    --muted: #747575;
    --accent: #048848;
    --accent-hover: #03723C;
    --accent-soft: #E6F2ED;
    --on-accent: #FFFFFF;
    --danger: #AB1300;
    --danger-soft: #FFEFED;
    --header-bg: rgba(255, 255, 255, .9);

    --shadow: 0 4px 16px rgba(0, 0, 0, .04);
    --shadow-bar: 0 -4px 16px rgba(0, 0, 0, .04), 0 -.5px 0 rgba(0, 0, 0, .04);

    --r-card: 20px;
    --r-pill: 50px;
    --r-sm: 12px;

    --header-h: 64px;
    --tabbar-h: 64px;

    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1F1F1F;
        --surface: #323333;
        --surface-2: #3D3E3E;
        --border: #535454;
        --text: #FFFFFF;
        --text-2: #CACCCC;
        --muted: #B1B2B2;
        --accent: #06C167;
        --accent-hover: #05A859;
        --accent-soft: rgba(6, 193, 103, .14);
        --on-accent: #0B1F14;
        --danger: #F1998E;
        --danger-soft: rgba(241, 153, 142, .12);
        --header-bg: rgba(31, 31, 31, .9);
        --shadow: none;
        --shadow-bar: 0 -.5px 0 rgba(255, 255, 255, .08);
    }
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
    margin: 0;
    padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
    font-family: "Yekan", Tahoma, sans-serif;
    font-size: 16px;
    line-height: 1.9;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

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

a {
    color: inherit;
    text-decoration: none;
}

h1, h2, h3, h4 {
    margin: 0;
    font-weight: 400;
    line-height: 1.6;
}

p, figure {
    margin: 0;
}

ul, ol {
    margin: 0;
    padding: 0;
}

button, input {
    font: inherit;
    color: inherit;
}

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.icon {
    width: 24px;
    height: 24px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.skip-link {
    position: absolute;
    inset-inline-start: 16px;
    top: -60px;
    z-index: 100;
    padding: 8px 16px;
    border-radius: var(--r-pill);
    background: var(--text);
    color: var(--bg);
}

.skip-link:focus {
    top: 12px;
}

.container {
    width: 100%;
    max-width: 1120px;
    margin-inline: auto;
    padding-inline: 16px;
}

@media (min-width: 768px) {
    .container {
        padding-inline: 24px;
    }
}

.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

.flow > * + * {
    margin-top: 12px;
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--header-bg);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow .2s;
}

.site-header.is-scrolled {
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    height: var(--header-h);
}

.brand {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.brand img {
    width: 48px;
    height: 48px;
    margin-inline-start: -8px;
}

.brand-text {
    font-size: 17px;
    line-height: 1.3;
}

.brand-text small {
    display: block;
    font-size: 11px;
    color: var(--muted);
}

.nav {
    display: none;
    align-items: center;
    gap: 2px;
}

.nav a {
    padding: 6px 14px;
    border-radius: var(--r-pill);
    font-size: 14px;
    color: var(--muted);
    transition: color .2s, background-color .2s;
}

.nav a:hover {
    color: var(--text);
}

.nav a[aria-current="page"] {
    color: var(--text);
    background: var(--surface-2);
}

.header-cta {
    margin-inline-start: auto;
    width: 40px;
    padding: 0;
}

.lg-only {
    display: none;
}

@media (min-width: 1024px) {
    .nav {
        display: flex;
        margin-inline-start: auto;
    }

    .header-cta {
        margin-inline-start: 12px;
        width: auto;
        padding-inline: 16px;
    }

    .lg-only {
        display: inline;
    }
}

/* ---------- Bottom tab bar ---------- */
.tabbar {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--surface);
    box-shadow: var(--shadow-bar);
}

.tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    height: var(--tabbar-h);
    padding-top: 8px;
    font-size: 11px;
    line-height: 1.4;
    color: var(--muted);
}

.tab-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 30px;
    border-radius: var(--r-pill);
    transition: background-color .2s;
}

.tabbar a[aria-current="page"] {
    color: var(--text);
}

.tabbar a[aria-current="page"] .tab-icon {
    background: var(--surface-2);
}

.tabbar a[aria-current="page"] .icon {
    stroke-width: 2.1;
}

@media (min-width: 1024px) {
    body {
        padding-bottom: 0;
    }

    .tabbar {
        display: none;
    }
}

/* ---------- Buttons & chips ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding-inline: 22px;
    border: 1px solid transparent;
    border-radius: var(--r-pill);
    font-size: 15px;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s, border-color .2s, color .2s, transform .1s;
}

.btn:active {
    transform: scale(.98);
}

.btn .icon {
    width: 20px;
    height: 20px;
}

.btn-primary {
    background: var(--accent);
    color: var(--on-accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

.btn-secondary:hover,
.btn-ghost:hover {
    background: var(--surface-2);
}

.btn-ghost {
    background: var(--bg);
    color: var(--text);
}

.btn-sm {
    height: 40px;
    padding-inline: 16px;
    font-size: 14px;
}

.btn-block {
    width: 100%;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 1px 12px;
    border-radius: var(--r-pill);
    background: var(--surface-2);
    color: var(--text-2);
    font-size: 12px;
    line-height: 1.9;
    white-space: nowrap;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 1px 12px;
    border-radius: var(--r-pill);
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 13px;
}

/* ---------- Layout blocks ---------- */
.section {
    padding-block: 12px;
}

@media (min-width: 768px) {
    .section {
        padding-block: 20px;
    }
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.section-title {
    font-size: 20px;
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 14px;
    color: var(--accent);
    white-space: nowrap;
}

.section-link .icon {
    width: 18px;
    height: 18px;
}

.card {
    padding: 20px;
    border-radius: var(--r-card);
    background: var(--surface);
    box-shadow: var(--shadow);
}

@media (min-width: 768px) {
    .card {
        padding: 28px;
    }
}

.card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.card-title {
    font-size: 18px;
}

.badge {
    display: grid;
    place-items: center;
    flex: none;
    min-width: 40px;
    height: 40px;
    padding-inline: 8px;
    border-radius: var(--r-sm);
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 15px;
    line-height: 1;
}

.grid {
    display: grid;
    gap: 12px;
}

@media (min-width: 768px) {
    .grid { gap: 16px; }
    .grid-2, .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.split {
    display: grid;
    gap: 12px;
}

@media (min-width: 768px) {
    .split {
        grid-template-columns: 1.5fr 1fr;
        gap: 16px;
        align-items: start;
    }
}

.rounded-media {
    width: 100%;
    border-radius: var(--r-card);
    object-fit: cover;
}

/* ---------- Page head & segmented control ---------- */
.page-head {
    padding-block: 20px 8px;
}

@media (min-width: 768px) {
    .page-head {
        padding-block: 32px 12px;
    }
}

.page-title {
    font-size: 26px;
    line-height: 1.5;
}

@media (min-width: 768px) {
    .page-title {
        font-size: 32px;
    }
}

.page-lead {
    max-width: 70ch;
    margin-top: 6px;
    color: var(--text-2);
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.segmented {
    display: flex;
    gap: 4px;
    width: max-content;
    max-width: 100%;
    margin-bottom: 16px;
    padding: 4px;
    overflow-x: auto;
    border-radius: var(--r-pill);
    background: var(--surface-2);
    scrollbar-width: none;
}

.segmented::-webkit-scrollbar {
    display: none;
}

.segmented a {
    flex: none;
    padding: 4px 16px;
    border-radius: var(--r-pill);
    font-size: 14px;
    color: var(--muted);
    white-space: nowrap;
}

.segmented a[aria-current="page"] {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}

/* ---------- Home: hero, tiles, features ---------- */
.hero {
    display: grid;
    padding: 0;
    overflow: hidden;
}

.hero-media {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--surface-2);
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-body {
    padding: 20px;
}

.hero-title {
    margin-top: 10px;
    font-size: 26px;
    line-height: 1.5;
}

.hero-text {
    margin-top: 8px;
    color: var(--text-2);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.hero-actions .btn {
    flex: 1 1 auto;
}

@media (min-width: 768px) {
    .hero {
        grid-template-columns: 1fr 1fr;
    }

    .hero-media {
        order: 2;
        aspect-ratio: auto;
        min-height: 380px;
    }

    .hero-body {
        align-self: center;
        padding: 40px;
    }

    .hero-title {
        font-size: 34px;
    }

    .hero-actions .btn {
        flex: 0 0 auto;
    }
}

.tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

@media (min-width: 768px) {
    .tiles {
        grid-template-columns: repeat(6, 1fr);
        gap: 16px;
    }
}

.tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 6px 12px;
    border-radius: var(--r-card);
    background: var(--surface);
    box-shadow: var(--shadow);
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
    color: var(--text-2);
    transition: color .2s;
}

.tile:hover {
    color: var(--text);
}

.tile-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--text);
    transition: background-color .2s, color .2s;
}

.tile:hover .tile-icon {
    background: var(--accent-soft);
    color: var(--accent);
}

.feature-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 12px;
    border-radius: 14px;
    background: var(--accent-soft);
    color: var(--accent);
}

.feature-title {
    font-size: 17px;
}

.feature-text {
    margin-top: 2px;
    font-size: 14px;
    line-height: 1.9;
    color: var(--muted);
}

@media (max-width: 767px) {
    .feature {
        display: grid;
        grid-template-columns: auto 1fr;
        column-gap: 14px;
        align-items: center;
        padding: 16px;
    }

    .feature-icon {
        grid-row: span 2;
        margin: 0;
    }
}

/* ---------- Horizontal scroller ---------- */
.scroller {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 72%;
    gap: 12px;
    margin-inline: -16px;
    padding: 2px 16px 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
}

.scroller::-webkit-scrollbar {
    display: none;
}

.scroller > * {
    scroll-snap-align: start;
}

.scroller-posters {
    grid-auto-columns: 46%;
}

@media (min-width: 560px) {
    .scroller { grid-auto-columns: 42%; }
    .scroller-posters { grid-auto-columns: 30%; }
}

@media (min-width: 768px) {
    .scroller {
        grid-auto-columns: calc((100% - 36px) / 4);
        margin-inline: 0;
        padding-inline: 0;
        scroll-padding-inline: 0;
    }

    .scroller-posters {
        grid-auto-columns: calc((100% - 24px) / 3);
    }
}

/* ---------- Cause (donation) cards ---------- */
.cause {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--r-card);
    background: var(--surface);
    box-shadow: var(--shadow);
    scroll-margin-top: calc(var(--header-h) + 16px);
}

.cause-media {
    aspect-ratio: 11 / 8;
    overflow: hidden;
    background: var(--surface-2);
}

.cause-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}

.cause:hover .cause-media img {
    transform: scale(1.03);
}

.cause-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 14px 16px 16px;
}

.cause-title {
    font-size: 16px;
    line-height: 1.7;
}

.cause-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.8;
    color: var(--muted);
}

.cause-body .btn {
    margin-top: 8px;
}

/* ---------- Posters, gallery, lightbox ---------- */
.poster {
    display: block;
    overflow: hidden;
    aspect-ratio: 2362 / 3307;
    border-radius: var(--r-card);
    background: var(--surface-2);
    box-shadow: var(--shadow);
    cursor: zoom-in;
}

.poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}

.poster:hover img {
    transform: scale(1.02);
}

.gallery {
    display: grid;
    gap: 16px;
}

@media (min-width: 560px) {
    .gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
    .gallery { grid-template-columns: repeat(3, 1fr); }
}

.gallery figcaption {
    padding: 10px 4px 0;
}

.gallery-title {
    display: block;
    font-size: 15px;
    line-height: 1.8;
}

.gallery-source {
    display: block;
    font-size: 13px;
    color: var(--muted);
}

.lightbox {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    margin: 0;
    padding: 16px;
    border: 0;
    background: transparent;
    color: #FFFFFF;
}

.lightbox[open] {
    display: grid;
    place-items: center;
}

.lightbox::backdrop {
    background: rgba(0, 0, 0, .85);
}

.lightbox figure {
    display: grid;
    justify-items: center;
    gap: 12px;
}

.lightbox img {
    width: auto;
    max-width: min(100%, 760px);
    max-height: calc(100vh - 140px);
    border-radius: var(--r-sm);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .4);
}

.lightbox figcaption {
    max-width: 60ch;
    font-size: 14px;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: 16px;
    inset-inline-end: 16px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    cursor: pointer;
}

/* ---------- Lists & notes ---------- */
.prose {
    color: var(--text-2);
    line-height: 2;
}

.prose p + p {
    margin-top: 12px;
}

.prose a,
.link {
    color: var(--accent);
}

.num-list {
    list-style: none;
    counter-reset: n;
}

.num-list > li {
    position: relative;
    padding-block: 12px;
    padding-inline-start: 42px;
    border-bottom: 1px solid var(--border);
    color: var(--text-2);
    counter-increment: n;
}

.num-list > li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.num-list > li::before {
    content: counter(n, persian);
    position: absolute;
    top: 14px;
    inset-inline-start: 0;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg);
    color: var(--text);
    font-size: 13px;
    line-height: 1;
}

.bullet-list {
    list-style: none;
    display: grid;
    gap: 6px;
}

.bullet-list > li {
    position: relative;
    padding-inline-start: 20px;
    color: var(--text-2);
}

.bullet-list > li::before {
    content: "";
    position: absolute;
    top: .8em;
    inset-inline-start: 4px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.note {
    padding: 12px 16px;
    border-radius: var(--r-sm);
    background: var(--bg);
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.9;
}

.note-danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    background: var(--accent-soft);
    box-shadow: none;
}

.cta-title {
    font-size: 18px;
}

@media (min-width: 768px) {
    .cta {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* ---------- Guide stepper ---------- */
.steps {
    list-style: none;
    display: grid;
    gap: 16px;
}

.step {
    position: relative;
}

.step:not(:last-child)::after {
    content: "";
    position: absolute;
    bottom: -16px;
    inset-inline-start: 41px;
    width: 2px;
    height: 16px;
    background: var(--border);
}

@media (min-width: 768px) {
    .step:not(:last-child)::after {
        inset-inline-start: 49px;
    }
}

.step-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.step-num {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--on-accent);
    font-size: 18px;
    line-height: 1;
}

.step-label {
    display: block;
    font-size: 13px;
    line-height: 1.4;
    color: var(--muted);
}

.step-title {
    font-size: 18px;
    line-height: 1.6;
}

/* ---------- Statute document ---------- */
.doc {
    display: grid;
    gap: 12px;
}

@media (min-width: 1024px) {
    .doc {
        grid-template-columns: 270px 1fr;
        align-items: start;
        gap: 16px;
    }
}

.toc {
    padding: 14px 16px;
}

.toc summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    cursor: pointer;
}

.toc summary::-webkit-details-marker {
    display: none;
}

.toc summary .icon {
    transform: rotate(-90deg);
    transition: transform .2s;
}

.toc[open] summary .icon {
    transform: rotate(90deg);
}

.toc ol {
    list-style: none;
    display: grid;
    margin-top: 8px;
}

.toc a {
    display: flex;
    gap: 8px;
    padding: 5px 10px;
    border-radius: var(--r-sm);
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-2);
}

.toc a span {
    min-width: 22px;
    color: var(--muted);
}

.toc a:hover {
    background: var(--bg);
    color: var(--text);
}

@media (min-width: 1024px) {
    .toc {
        position: sticky;
        top: calc(var(--header-h) + 16px);
        max-height: calc(100vh - var(--header-h) - 32px);
        overflow-y: auto;
    }
}

.articles {
    display: grid;
    gap: 12px;
}

.article {
    scroll-margin-top: calc(var(--header-h) + 16px);
}

.article-num {
    display: block;
    font-size: 13px;
    line-height: 1.5;
    color: var(--accent);
}

.article-title {
    margin-bottom: 8px;
    font-size: 19px;
}

.article .num-list > li:first-child {
    padding-top: 4px;
}

.article .num-list > li:first-child::before {
    top: 6px;
}

.tabsare {
    padding: 10px 14px;
    border-inline-start: 3px solid var(--border);
    border-start-end-radius: var(--r-sm);
    border-end-end-radius: var(--r-sm);
    background: var(--bg);
    font-size: 14px;
    line-height: 1.9;
    color: var(--text-2);
}

.tabsare b {
    margin-inline-end: 4px;
    font-weight: 400;
    color: var(--text);
}

.options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 2px 12px;
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    font-size: 14px;
    color: var(--text-2);
}

.option::before {
    content: "";
    width: 12px;
    height: 12px;
    border: 1.5px solid var(--muted);
    border-radius: 3px;
}

.blank {
    display: inline-block;
    min-width: 96px;
    margin-inline: 4px;
    border-bottom: 1px dashed var(--muted);
}

.fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 16px;
}

@media (min-width: 768px) {
    .fields {
        grid-template-columns: repeat(5, 1fr);
    }
}

.field {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    color: var(--muted);
}

.field .blank {
    min-width: 0;
    height: 24px;
    margin: 0;
}

.signature {
    text-align: end;
    font-size: 14px;
    color: var(--muted);
}

/* ---------- Charter ---------- */
.principle {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: start;
    padding: 18px;
}

@media (min-width: 768px) {
    .principle {
        padding: 22px;
    }
}

.principle-num {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 15px;
    line-height: 1;
}

.principle-title {
    font-size: 16px;
    line-height: 1.8;
}

.principle-text {
    font-size: 14px;
    line-height: 1.9;
    color: var(--text-2);
}

/* ---------- News ---------- */
.news {
    display: grid;
    overflow: hidden;
    padding: 0;
    scroll-margin-top: calc(var(--header-h) + 16px);
}

.news-media {
    aspect-ratio: 16 / 9;
    background: var(--surface-2);
}

.news-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 18px 20px 20px;
}

@media (min-width: 768px) {
    .news {
        grid-template-columns: 340px 1fr;
    }

    .news-media {
        aspect-ratio: auto;
        min-height: 240px;
    }

    .news-body {
        padding: 24px 28px;
    }
}

.news-title {
    font-size: 19px;
    line-height: 1.7;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
}

.news-mini {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 18px;
}

.news-mini h3 {
    font-size: 16px;
    line-height: 1.8;
}

.progress {
    width: 100%;
    height: 6px;
    overflow: hidden;
    border-radius: var(--r-pill);
    background: var(--surface-2);
}

.progress > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
    font-size: 13px;
    color: var(--muted);
}

.stats b {
    display: block;
    font-weight: 400;
    font-size: 15px;
    color: var(--text);
}

/* ---------- Contact ---------- */
.contact-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.contact-card h2 {
    font-size: 15px;
}

.contact-big {
    font-size: 32px;
    line-height: 1.4;
}

.search {
    position: relative;
    margin-bottom: 8px;
}

.search input {
    width: 100%;
    height: 48px;
    padding-inline: 46px 16px;
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    background: var(--bg);
    font-size: 15px;
    outline: none;
    transition: border-color .2s;
}

.search input:focus {
    border-color: var(--accent);
}

.search .icon {
    position: absolute;
    top: 50%;
    inset-inline-start: 16px;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

.office-list {
    list-style: none;
    display: grid;
}

@media (min-width: 768px) {
    .office-list {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 32px;
    }
}

.office {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-block: 10px;
    border-bottom: 1px solid var(--border);
}

.office-prov {
    display: block;
    font-size: 15px;
    line-height: 1.6;
}

.office-name {
    display: block;
    font-size: 13px;
    line-height: 1.6;
    color: var(--muted);
}

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th,
.table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border);
    text-align: start;
}

.table th {
    font-weight: 400;
    font-size: 13px;
    color: var(--muted);
}

.table tr:last-child td {
    border-bottom: 0;
}

/* ---------- Empty state ---------- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding-block: 48px;
    text-align: center;
}

.empty-code {
    font-size: 72px;
    line-height: 1.2;
    color: var(--muted);
}

/* ---------- Footer ---------- */
.site-footer {
    margin-top: 32px;
    padding-block: 32px 20px;
    border-top: 1px solid var(--border);
    background: var(--surface);
    font-size: 14px;
    color: var(--text-2);
}

.footer-grid {
    display: grid;
    gap: 24px;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 1.6fr 1fr 1.2fr;
        gap: 40px;
    }
}

.footer-title {
    margin-bottom: 8px;
    font-size: 15px;
    color: var(--text);
}

.footer-links {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 16px;
}

.footer-links a:hover {
    color: var(--text);
}

.footer-bottom {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--muted);
}

/* =========================================================
   Effects & motion
   Everything that hides content before animating is scoped to
   html.motion, which is only set when reduced motion is off.
   ========================================================= */
:root {
    --glow: rgba(6, 193, 103, .16);
    --glow-2: rgba(4, 136, 72, .10);
    --shadow-hover: 0 14px 36px rgba(0, 0, 0, .08);
    --shimmer: rgba(255, 255, 255, .55);
    --ease-out: cubic-bezier(.16, 1, .3, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --glow: rgba(6, 193, 103, .20);
        --glow-2: rgba(6, 193, 103, .10);
        --shadow-hover: 0 14px 36px rgba(0, 0, 0, .35);
        --shimmer: rgba(255, 255, 255, .06);
    }
}

main {
    position: relative;
    isolation: isolate;
    overflow-x: clip;
}

/* ---------- Page transitions ---------- */
@view-transition {
    navigation: auto;
}

.site-header {
    view-transition-name: site-header;
}

.tabbar {
    view-transition-name: tabbar;
}

::view-transition-old(root) {
    animation: vt-out .16s ease both;
}

::view-transition-new(root) {
    animation: vt-in .4s var(--ease-out) both;
}

::view-transition-group(tab-indicator) {
    animation-duration: .45s;
    animation-timing-function: var(--ease-out);
}

@keyframes vt-out {
    to { opacity: 0; }
}

@keyframes vt-in {
    from { opacity: 0; translate: 0 12px; }
}

.tabbar a {
    position: relative;
}

.tab-indicator {
    position: absolute;
    top: 0;
    left: 50%;
    width: 28px;
    height: 3px;
    margin-left: -14px;
    border-radius: 0 0 3px 3px;
    background: var(--accent);
    view-transition-name: tab-indicator;
}

.tab-icon {
    transition: background-color .2s, scale .25s var(--ease-out);
}

.tabbar a:active .tab-icon {
    scale: .9;
}

/* ---------- Scroll reveal ---------- */
/* Keep this selector list in sync with REVEAL in js/app.js */
.motion :is(.page-head > *, .section-head, .tiles > *, .stats-strip > *, .grid > *, .scroller > *, .gallery > *, .steps > *, .articles > *, .split > *, .cta) {
    opacity: 0;
    translate: 0 18px;
    transition:
        opacity .7s ease var(--reveal-delay, 0s),
        translate .8s var(--ease-out) var(--reveal-delay, 0s),
        transform .35s var(--ease-out),
        box-shadow .35s ease,
        color .2s ease,
        background-color .2s ease;
}

.motion .is-in {
    opacity: 1;
    translate: none;
}

/* ---------- Hover lift & tap feedback ---------- */
.tile,
.cause,
.news-mini,
.poster {
    transition: transform .35s var(--ease-out), box-shadow .35s ease, color .2s ease;
}

@media (hover: hover) {
    a.tile:hover,
    a.cause:hover,
    article.cause:hover,
    a.news-mini:hover,
    a.stat-item:hover,
    .poster:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-hover);
    }
}

a.tile:active,
a.cause:active,
a.news-mini:active,
.poster:active {
    transform: scale(.98);
    transition-duration: .1s;
}

.tile-icon .icon {
    transition: scale .35s var(--ease-out);
}

.tile:hover .tile-icon .icon {
    scale: 1.12;
}

.btn .icon,
.section-link .icon {
    transition: translate .3s var(--ease-out);
}

.btn:hover .icon:has(use[href="#i-arrow"]),
.section-link:hover .icon {
    translate: -4px 0;
}

.eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    margin-inline-end: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: dot-pulse 2.4s ease-in-out infinite;
}

@keyframes dot-pulse {
    0%, 100% { opacity: 1; scale: 1; }
    50% { opacity: .35; scale: .7; }
}

/* ---------- Glows ---------- */
.hero {
    position: relative;
    isolation: isolate;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    aspect-ratio: 1;
    border-radius: 50%;
    pointer-events: none;
}

.hero::before {
    top: -40%;
    inset-inline-start: -15%;
    width: 70%;
    background: radial-gradient(closest-side, var(--glow), transparent);
    animation: glow-drift 16s ease-in-out infinite alternate;
}

.hero::after {
    bottom: -45%;
    inset-inline-start: 25%;
    width: 60%;
    background: radial-gradient(closest-side, var(--glow-2), transparent);
    animation: glow-drift 21s ease-in-out -7s infinite alternate-reverse;
}

@keyframes glow-drift {
    from { translate: 0 0; scale: 1; }
    to { translate: -8% 10%; scale: 1.2; }
}

/* ---------- Ambient background ---------- */
/* Soft, slowly drifting colour blobs behind the top of every page; header and tab bar are frosted over them */
:root {
    --header-bg: rgba(255, 255, 255, .72);
    --ambient-1: rgba(6, 193, 103, .30);
    --ambient-2: rgba(255, 205, 60, .30);
    --ambient-3: rgba(64, 196, 214, .22);
}

@media (prefers-color-scheme: dark) {
    :root {
        --header-bg: rgba(31, 31, 31, .7);
        --ambient-1: rgba(6, 193, 103, .20);
        --ambient-2: rgba(255, 196, 40, .10);
        --ambient-3: rgba(64, 196, 214, .12);
    }
}

:root {
    --ambient-4: rgba(140, 214, 90, .22);
}

@media (prefers-color-scheme: dark) {
    :root {
        --ambient-4: rgba(140, 214, 90, .10);
    }
}

/* Fixed to the viewport. Idle drift uses translate/scale; js/app.js adds scroll-following motion via transform */
.ambient {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.ambient span {
    position: absolute;
    border-radius: 50%;
    will-change: transform, translate, scale;
    animation: ambient-drift 10s ease-in-out infinite alternate;
    /* --ambient-t is set in <head> so the drift continues smoothly from page to page */
    animation-delay: var(--ambient-t, 0s);
}

.ambient span:nth-child(1) {
    top: -24vmax;
    right: -22vmax;
    width: 76vmax;
    height: 62vmax;
    background: radial-gradient(closest-side, var(--ambient-1), transparent);
}

.ambient span:nth-child(2) {
    top: -28vmax;
    left: -26vmax;
    width: 72vmax;
    height: 60vmax;
    background: radial-gradient(closest-side, var(--ambient-2), transparent);
    animation-duration: 12s;
    animation-delay: calc(var(--ambient-t, 0s) - 5s);
}

.ambient span:nth-child(3) {
    top: 28vh;
    left: 10%;
    width: 62vmax;
    height: 50vmax;
    background: radial-gradient(closest-side, var(--ambient-3), transparent);
    animation-direction: alternate-reverse;
    animation-duration: 15s;
    animation-delay: calc(var(--ambient-t, 0s) - 7s);
}

.ambient span:nth-child(4) {
    bottom: -30vmax;
    right: -12vmax;
    width: 66vmax;
    height: 56vmax;
    background: radial-gradient(closest-side, var(--ambient-4), transparent);
    animation-duration: 20s;
    animation-delay: calc(var(--ambient-t, 0s) - 11s);
}

@keyframes ambient-drift {
    0% { translate: 0 0; scale: 1; }
    33% { translate: -12% 10%; scale: 1.18; }
    66% { translate: 10% -8%; scale: .9; }
    100% { translate: -6% -12%; scale: 1.1; }
}

.tabbar {
    background: var(--header-bg);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
}

@media print {
    .ambient {
        display: none;
    }
}

/* ---------- Home banner ---------- */
.banner {
    position: relative;
}

.banner-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    border-radius: var(--r-card);
    scrollbar-width: none;
}

.banner-track::-webkit-scrollbar {
    display: none;
}

.banner-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

/* Slides share the tallest slide's height; centre shorter text in the leftover space */
@media (max-width: 767px) {
    .banner-slide {
        grid-template-rows: auto 1fr;
    }

    .banner-slide .hero-body {
        align-self: center;
    }
}

.banner-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.banner-dots {
    display: flex;
}

.banner-dot {
    display: grid;
    place-items: center;
    height: 28px;
    padding: 0 3px;
    border: 0;
    background: none;
    cursor: pointer;
}

.banner-dot-bar {
    position: relative;
    display: block;
    width: 8px;
    height: 8px;
    overflow: hidden;
    border-radius: var(--r-pill);
    background: var(--border);
    transition: width .45s var(--ease-out);
}

.banner-dot.is-active .banner-dot-bar {
    width: 32px;
}

.banner-dot-fill {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--accent);
    transform-origin: right;
    scale: 0 1;
}

.banner-dot.is-active .banner-dot-fill {
    scale: 1 1;
}

.banner.is-autoplay .banner-dot.is-active .banner-dot-fill {
    animation: banner-progress 6s linear both;
}

.banner.is-paused .banner-dot-fill {
    animation-play-state: paused;
}

@keyframes banner-progress {
    from { scale: 0 1; }
    to { scale: 1 1; }
}

.banner-arrow {
    display: none;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: background-color .2s;
}

.banner-arrow:hover {
    background: var(--surface-2);
}

.banner-arrow .icon {
    width: 18px;
    height: 18px;
}

.banner-arrow--prev .icon {
    rotate: 180deg;
}

@media (hover: hover) and (min-width: 768px) {
    .banner-arrow {
        display: grid;
    }
}

.hero--green {
    --glow: rgba(255, 255, 255, .16);
    --glow-2: rgba(6, 193, 103, .55);
    background: linear-gradient(135deg, #048848, #035E33);
    color: #FFFFFF;
}

.hero--green .hero-text {
    color: rgba(255, 255, 255, .82);
}

.hero--green .eyebrow {
    background: rgba(255, 255, 255, .14);
    color: #FFFFFF;
}

.btn-light {
    background: #FFFFFF;
    color: #035E33;
}

.btn-light:hover {
    background: #E6F2ED;
}

.hero--wheat {
    --glow: rgba(255, 255, 255, .7);
    --glow-2: rgba(200, 146, 58, .28);
    background: linear-gradient(135deg, #F8F0DE, #EAD7AE);
    color: #2B2418;
}

.hero--wheat .hero-text {
    color: #6A5A43;
}

.hero--wheat .eyebrow {
    background: rgba(122, 85, 24, .12);
    color: #7A5518;
}

.hero--wheat .btn-secondary {
    border-color: transparent;
    background: rgba(255, 255, 255, .7);
    color: #2B2418;
}

@media (prefers-color-scheme: dark) {
    .hero--green {
        background: linear-gradient(135deg, #05703D, #023A20);
    }

    .hero--wheat {
        --glow: rgba(232, 196, 122, .12);
        --glow-2: rgba(200, 146, 58, .18);
        background: linear-gradient(135deg, #3B3223, #252017);
        color: #F3E9D2;
    }

    .hero--wheat .hero-text {
        color: #CDBF9F;
    }

    .hero--wheat .eyebrow {
        background: rgba(232, 196, 122, .14);
        color: #E8C47A;
    }

    .hero--wheat .btn-secondary {
        background: rgba(255, 255, 255, .08);
        color: #F3E9D2;
    }
}

.hero-art {
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 10;
    background: transparent;
}

@media (min-width: 768px) {
    .hero-art {
        aspect-ratio: auto;
    }
}

@keyframes float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -8px; }
}

.art-steps {
    list-style: none;
    display: grid;
    gap: 10px;
    width: min(300px, 82%);
}

.art-steps li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 16px;
    background: rgba(255, 255, 255, .12);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #FFFFFF;
    font-size: 15px;
    line-height: 1.6;
    animation: float 6s ease-in-out infinite;
}

.art-steps li:nth-child(2) {
    margin-inline-start: 28px;
    animation-delay: -2s;
}

.art-steps li:nth-child(3) {
    margin-inline-start: 56px;
    animation-delay: -4s;
}

.art-steps span {
    display: grid;
    place-items: center;
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #FFFFFF;
    color: #035E33;
    line-height: 1;
}

.art-stack {
    position: relative;
    width: min(340px, 72%);
    aspect-ratio: 11 / 8;
    animation: float 7s ease-in-out infinite;
}

.art-stack img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 4px solid var(--surface);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
}

.art-stack img:nth-child(1) {
    rotate: -9deg;
    translate: 20% 2%;
    scale: .78;
}

.art-stack img:nth-child(2) {
    rotate: 8deg;
    translate: -20% 6%;
    scale: .78;
}

.art-stack img:nth-child(3) {
    scale: .88;
}

.art-posters {
    position: relative;
    width: clamp(110px, 32%, 210px);
    aspect-ratio: 2362 / 3307;
    translate: 18% 0;
    animation: float 8s ease-in-out infinite;
}

.art-posters img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(60, 40, 10, .25);
}

.art-posters img:first-child {
    rotate: 8deg;
    translate: -55% 4%;
    scale: .9;
}

.art-posters img:last-child {
    rotate: -4deg;
}

/* ---------- Stats strip ---------- */
.stats-strip {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    padding: 6px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    border-radius: 14px;
    text-align: center;
}

.stat-num {
    font-size: 34px;
    line-height: 1.3;
    color: var(--accent);
}

.stat-label {
    font-size: 13px;
    color: var(--muted);
    transition: color .2s;
}

a.stat-item:hover .stat-label {
    color: var(--text);
}

@media (min-width: 768px) {
    .stats-strip {
        grid-template-columns: repeat(4, 1fr);
        padding: 10px;
    }
}

/* ---------- Progress bars ---------- */
.progress > span {
    position: relative;
    width: var(--value, 0%);
    overflow: hidden;
    transition: width 1.4s var(--ease-out) .15s;
}

.motion .progress:not(.is-in) > span {
    width: 0;
}

.progress > span::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
    translate: 100% 0;
    animation: sheen 2.6s ease-in-out 1.6s infinite;
}

@keyframes sheen {
    to { translate: -100% 0; }
}

/* ---------- Image loading ---------- */
@keyframes shimmer {
    from { background-position: 150% 0; }
    to { background-position: -50% 0; }
}

.motion :is(.hero-media, .cause-media, .news-media, .poster):not(.hero-art):not(.is-loaded) {
    background-image: linear-gradient(100deg, transparent 30%, var(--shimmer) 50%, transparent 70%);
    background-size: 200% 100%;
    animation: shimmer 1.4s linear infinite;
}

.motion :is(.hero-media, .cause-media, .news-media, .poster) img,
.motion img.rounded-media {
    opacity: 0;
    transition: opacity .6s ease, transform .4s ease;
}

.motion img.is-loaded {
    opacity: 1;
}

/* ---------- Lightbox & anchors ---------- */
.lightbox[open]::backdrop {
    animation: fade-in .25s ease both;
}

.lightbox[open] figure {
    animation: zoom-in .4s var(--ease-out) both;
}

@keyframes fade-in {
    from { opacity: 0; }
}

@keyframes zoom-in {
    from { opacity: 0; scale: .94; }
}

.article:target {
    animation: target-flash 1.8s ease both;
}

@keyframes target-flash {
    0%, 35% { box-shadow: 0 0 0 2px var(--accent); }
    100% { box-shadow: var(--shadow); }
}

@media print {
    .motion :is(.page-head > *, .section-head, .tiles > *, .stats-strip > *, .grid > *, .scroller > *, .gallery > *, .steps > *, .articles > *, .split > *, .cta),
    .motion img {
        opacity: 1 !important;
        translate: none !important;
    }

    .hero::before,
    .hero::after,
    .page-head::before {
        display: none;
    }
}

/* ---------- Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
    @view-transition {
        navigation: none;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}

@media print {
    :root {
        --bg: #FFFFFF;
        --surface: #FFFFFF;
        --surface-2: #F0F0F0;
        --border: #DDDDDD;
        --text: #000000;
        --text-2: #222222;
        --muted: #555555;
        --accent: #000000;
        --accent-soft: #F0F0F0;
    }

    body {
        padding: 0;
        background: #FFFFFF;
    }

    .site-header,
    .tabbar,
    .site-footer,
    .segmented,
    .page-actions,
    .toc,
    .cta,
    .skip-link,
    .no-print {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid var(--border);
        break-inside: avoid;
    }

    .doc {
        display: block;
    }
}
