/* Barangay Irisan — landing page styles (home only; other pages use style.css) */

:root {
    color-scheme: light dark;

    --green-700-light: #1a5f2a;
    --green-700-dark: #7fd394;
    --green-800: #0d3d16;
    --gold: #f8b500;

    --brand: light-dark(var(--green-700-light), var(--green-700-dark));
    --brand-ink: light-dark(#ffffff, #0b1a0f);
    --bg: light-dark(#fbfaf6, #0e1511);
    --surface: light-dark(#ffffff, #16201a);
    --surface-2: light-dark(#eef4ec, #1c2a21);
    --text: light-dark(#1d2620, #e7ede8);
    --text-muted: light-dark(#4f5c53, #a9b6ad);
    --border: light-dark(#d5ded6, #2c3a31);
    --focus: light-dark(#0d3d16, #ffd25a);

    --radius: 1.25rem;
    --radius-sm: 0.75rem;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 8px 24px -12px rgb(0 0 0 / 0.18);
    --container: 74rem;

    accent-color: var(--brand);
    scrollbar-color: light-dark(#7b877e, #6b7a70) light-dark(#eef1ee, #141c17);
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-block-start: 6rem;
}

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

body {
    margin: 0;
    font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size-adjust: from-font;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    overflow-wrap: break-word;
}

img, picture, svg { display: block; max-inline-size: 100%; }
img { block-size: auto; }

h1, h2, h3 { line-height: 1.2; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--brand); text-underline-offset: 0.2em; }
:where(ul[role="list"]) { list-style: none; margin: 0; padding: 0; }

::selection { background: light-dark(#cfe8d5, #2f5b3a); color: var(--text); }

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
    border-radius: 0.25rem;
}

.visually-hidden {
    position: absolute !important;
    inline-size: 1px; block-size: 1px;
    overflow: hidden; clip-path: inset(50%);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    inset-inline-start: 1rem;
    inset-block-start: -10rem;
    z-index: 100;
    padding: 0.75rem 1rem;
    background: var(--surface);
    color: var(--brand);
    border-radius: var(--radius-sm);
    font-weight: 600;
}
.skip-link:focus { inset-block-start: 1rem; }

.container {
    inline-size: min(100% - 2rem, var(--container));
    margin-inline: auto;
}

.section { margin-block: clamp(3.5rem, 2rem + 5vw, 6rem); }

.eyebrow {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brand);
    margin-block-end: 0.5rem;
}

h2 { font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.375rem); }

.section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 1rem 2rem;
    margin-block-end: 1.75rem;
}

.link-arrow {
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
}
.link-arrow::after { content: "\2192"; transition: translate 0.2s ease; }
.link-arrow:hover { text-decoration: underline; }
@media (prefers-reduced-motion: no-preference) {
    .link-arrow:hover::after { translate: 0.25em 0; }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-block-size: 2.75rem;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    border: 2px solid transparent;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-sm { min-block-size: 2.5rem; padding: 0.5rem 1.1rem; font-size: 0.9375rem; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: light-dark(var(--green-800), #a5e3b3); }
.btn-outline { border-color: var(--brand); color: var(--brand); }
.btn-outline:hover { background: var(--surface-2); }
.btn-ghost { border-color: rgb(255 255 255 / 0.85); color: #fff; }
.btn-ghost:hover { background: rgb(255 255 255 / 0.14); }

/* ---------- Header / navigation ---------- */
.site-header {
    position: sticky;
    inset-block-start: 0;
    z-index: 50;
    background: color-mix(in oklab, var(--bg) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(12px);
    border-block-end: 1px solid var(--border);
}

.header-inner {
    inline-size: min(100% - 2rem, var(--container));
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-block-size: 4.5rem;
    padding-block: 0.5rem;
}
.header-inner > * { flex-shrink: 0; white-space: nowrap; }

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
    text-decoration: none;
}
.site-logo img { inline-size: 3rem; block-size: 3rem; }
.site-logo-text { display: grid; line-height: 1.2; }
.site-logo-text strong { font-size: 1.0625rem; }
.site-logo-text span { font-size: 0.8125rem; color: var(--text-muted); }

.menu-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-block-size: 2.75rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    anchor-name: --menu-button;
}

.site-menu {
    position: fixed;
    inset: auto;
    inset-block-start: 4.75rem;
    inset-block-start: anchor(--menu-button bottom);
    inset-inline-end: 1rem;
    inline-size: min(80dvw, 20rem);
    max-inline-size: calc(100dvw - 2rem);
    block-size: fit-content;
    max-block-size: calc(100dvh - 6rem);
    margin: 0.5rem 0 0;
    padding: 0.5rem;
    overflow: auto;
    list-style: none;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 24px 48px -16px rgb(0 0 0 / 0.3);
}
.site-menu a {
    display: block;
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-sm);
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}
.site-menu a:hover { background: var(--surface-2); }
.site-menu a[aria-current="page"] {
    color: var(--brand);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.45em;
}
.site-menu .nav-cta {
    margin-block-start: 0.25rem;
    background: var(--brand);
    color: var(--brand-ink);
    text-align: center;
    font-weight: 600;
}
.site-menu .nav-cta:hover { background: light-dark(var(--green-800), #a5e3b3); }

@media (prefers-reduced-motion: no-preference) {
    .site-menu {
        transition: opacity 0.18s ease-out, translate 0.18s ease-out, display 0.18s, overlay 0.18s;
        transition-behavior: allow-discrete;
    }
    .site-menu:not(:is(:popover-open, .\:popover-open)) { opacity: 0; translate: 0 -0.5rem; }
    @starting-style {
        .site-menu:is(:popover-open, .\:popover-open) { opacity: 0; translate: 0 -0.5rem; }
    }
}

.site-header.is-measuring * { transition: none !important; }

.site-header.is-wide .menu-button { display: none; }
.site-header.is-wide .site-menu {
    position: static;
    display: flex;
    align-items: center;
    gap: 0.125rem;
    inline-size: auto;
    max-inline-size: none;
    block-size: auto;
    max-block-size: none;
    overflow: visible;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    translate: none;
}
.site-header.is-wide .site-menu::backdrop { display: none; }
.site-header.is-wide .site-menu a { padding: 0.5rem 0.7rem; font-size: 0.9375rem; }
.site-header.is-wide .site-menu .nav-cta { margin: 0 0 0 0.5rem; padding-inline: 1.1rem; border-radius: 999px; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    display: grid;
    margin-block-start: 1.25rem;
    border-radius: var(--radius);
    overflow: clip;
    min-block-size: clamp(30rem, 72svh, 42rem);
    color: #fff;
    background: var(--green-800);
}
.hero > * { grid-area: 1 / 1; }
.hero-media img {
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
    object-position: 50% 40%;
}
.hero::after {
    content: "";
    grid-area: 1 / 1;
    background:
        linear-gradient(to top, rgb(6 28 12 / 0.92) 0%, rgb(6 28 12 / 0.6) 45%, rgb(6 28 12 / 0.15) 80%),
        linear-gradient(to right, rgb(6 28 12 / 0.55), transparent 70%);
}
.hero-content {
    position: relative;
    z-index: 1;
    align-self: end;
    padding: clamp(1.5rem, 1rem + 4vw, 4rem);
    max-inline-size: 46rem;
}
.hero .eyebrow { color: var(--gold); }
.hero h1 {
    font-size: clamp(2.25rem, 1.4rem + 3.6vw, 4.25rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}
.hero-lead {
    margin-block-start: 1rem;
    font-size: clamp(1rem, 0.95rem + 0.35vw, 1.1875rem);
    max-inline-size: 38rem;
    color: rgb(255 255 255 / 0.92);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-block-start: 1.75rem; }
.hero .btn-primary { background: var(--gold); color: #1d1a00; }
.hero .btn-primary:hover { background: #ffd25a; }
.hero :focus-visible { outline-color: #ffd25a; }

@media (forced-colors: active) {
    .hero::after { display: none; }
    .hero-content { background: Canvas; color: CanvasText; }
}

/* ---------- Quick links ---------- */
.quick { margin-block-start: 1.5rem; }
.quick-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
}
@media (min-width: 44rem) { .quick-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 70rem) { .quick-grid { grid-template-columns: repeat(6, 1fr); } }
.quick-card {
    display: block;
    block-size: 100%;
    color: inherit;
    text-decoration: none;
    border-radius: var(--radius);
}
.quick-card article {
    block-size: 100%;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, translate 0.2s ease;
}
.quick-card svg {
    inline-size: 2.75rem;
    block-size: 2.75rem;
    padding: 0.6rem;
    margin-block-end: 0.875rem;
    border-radius: 0.875rem;
    background: var(--surface-2);
    fill: none;
    stroke: var(--brand);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.quick-card h3 { font-size: 1.0625rem; }
.quick-card p { margin-block-start: 0.25rem; font-size: 0.9375rem; color: var(--text-muted); }
.quick-card:hover article { border-color: var(--brand); box-shadow: var(--shadow); }
@media (prefers-reduced-motion: no-preference) {
    .quick-card:hover article { translate: 0 -2px; }
}

/* ---------- Announcements ---------- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
    gap: 1.25rem;
}
.news-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.news-card:has(> img) { padding-block-start: 0; overflow: clip; }
.news-card > img {
    order: -1;
    margin-inline: -1.5rem;
    max-inline-size: none;
    inline-size: calc(100% + 3rem);
    aspect-ratio: 16 / 9;
    object-fit: cover;
    margin-block-end: 0.75rem;
    background: var(--surface-2);
}
.news-card time { font-size: 0.8125rem; font-weight: 600; color: var(--brand); }
.news-card h3 { font-size: 1.125rem; }
.news-card .card-link { color: var(--text); text-decoration: none; }
.news-card .card-link::after { content: ""; position: absolute; inset: 0; }
.news-card .card-link:focus-visible { outline: none; }
.news-card:has(.card-link:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.news-card:has(.card-link:hover) { border-color: var(--brand); box-shadow: var(--shadow); }
.news-card:has(.card-link:hover) .card-link { text-decoration: underline; }
.news-card p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- About ---------- */
.about {
    display: grid;
    gap: clamp(1.5rem, 1rem + 3vw, 4rem);
    align-items: center;
}
@media (min-width: 56rem) {
    .about { grid-template-columns: 1fr 1fr; }
}
.about-media img {
    inline-size: 100%;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}
.about-text { display: grid; gap: 1rem; justify-items: start; max-inline-size: 36rem; }
.about-text h2 { margin-block-end: 0.25rem; }
.about-text p:not(.eyebrow) { color: var(--text-muted); }
.about-text .eyebrow { margin-block-end: -0.5rem; }

/* ---------- Gallery (native scroll-snap strip) ---------- */
.gallery {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: min(82%, 24rem);
    gap: 1rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    padding-block: 0.25rem 1rem;
    padding-inline: max(1rem, (100% - var(--container)) / 2);
    scroll-padding-inline: max(1rem, (100% - var(--container)) / 2);
}
.gallery:focus-visible { outline-offset: -3px; border-radius: 0; }
.gallery li { scroll-snap-align: start; }
.gallery figure { margin: 0; }
.gallery img {
    inline-size: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius);
    background: var(--surface-2);
}
.gallery figcaption { margin-block-start: 0.625rem; font-size: 0.9375rem; color: var(--text-muted); }

@media (prefers-reduced-motion: no-preference) {
    @supports ((animation-timeline: view()) and (animation-range: entry)) {
        @keyframes gallery-in { from { opacity: 0.35; scale: 0.92; } }
        @keyframes gallery-out { to { opacity: 0.35; scale: 0.92; } }
        .gallery li {
            animation: gallery-in auto linear backwards, gallery-out auto linear forwards;
            animation-timeline: view(inline);
            animation-range: entry, exit;
        }

        @keyframes rise-in { from { opacity: 0; translate: 0 1.5rem; } }
        .quick-grid > li, .news-card, .about > *, .app-option, .leader-card {
            animation: rise-in auto ease-out backwards;
            animation-timeline: view();
            animation-range: entry 0% entry 60%;
        }
    }
}

/* ---------- App panel ---------- */
.app-panel {
    display: grid;
    gap: 2rem;
    padding: clamp(1.5rem, 1rem + 3vw, 3.5rem);
    border-radius: calc(var(--radius) * 1.4);
    background:
        radial-gradient(60rem 30rem at 100% 0%, rgb(248 181 0 / 0.18), transparent 60%),
        linear-gradient(135deg, #1a5f2a, #0d3d16);
    color: #fff;
}
@media (min-width: 60rem) {
    .app-panel { grid-template-columns: 1fr 1.2fr; align-items: center; }
}
.app-panel .eyebrow { color: var(--gold); }
.app-intro p:not(.eyebrow) { margin-block-start: 0.75rem; color: rgb(255 255 255 / 0.88); max-inline-size: 30rem; }
.app-options { display: grid; gap: 0.75rem; }
.app-option {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    background: rgb(255 255 255 / 0.08);
    border: 1px solid rgb(255 255 255 / 0.18);
}
.app-option svg {
    inline-size: 2.25rem; block-size: 2.25rem;
    fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.app-option h3 { font-size: 1.0625rem; }
.app-option p { font-size: 0.875rem; color: rgb(255 255 255 / 0.8); }
.app-panel .btn-primary { background: var(--gold); color: #1d1a00; }
.app-panel .btn-primary:hover { background: #ffd25a; }
.app-panel .btn-outline { border-color: #fff; color: #fff; }
.app-panel .btn-outline:hover { background: rgb(255 255 255 / 0.14); }
.app-panel :focus-visible { outline-color: #ffd25a; }
.badge {
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px dashed rgb(255 255 255 / 0.6);
    color: rgb(255 255 255 / 0.9);
}
@media (max-width: 26rem) {
    .app-option { grid-template-columns: auto 1fr; }
    .app-option > :last-child { grid-column: 1 / -1; justify-self: start; }
}

/* ---------- Leader ---------- */
.leader-card {
    margin: 0;
    display: grid;
    gap: 1.5rem;
    align-items: center;
    justify-items: start;
    padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 1.4);
}
@media (min-width: 40rem) {
    .leader-card { grid-template-columns: auto 1fr; gap: 2.5rem; }
}
.leader-card img {
    inline-size: 9rem;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--surface-2);
}
.leader-card figcaption { display: grid; gap: 0.5rem; justify-items: start; }
.leader-card .eyebrow { margin: 0; }
.leader-name { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem); font-weight: 700; line-height: 1.2; }
.leader-card p:not(.eyebrow, .leader-name) { color: var(--text-muted); max-inline-size: 40rem; }

/* ---------- Footer ---------- */
.site-footer {
    margin-block-start: clamp(3.5rem, 2rem + 5vw, 6rem);
    background: light-dark(#0f2a16, #0a100c);
    color: rgb(255 255 255 / 0.85);
    padding-block: 3.5rem 1.5rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
    gap: 2rem;
}
.footer-brand img { inline-size: 4rem; block-size: 4rem; margin-block-end: 0.75rem; }
.site-footer h2 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gold);
    margin-block-end: 0.75rem;
}
.site-footer li + li { margin-block-start: 0.4rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer address { font-style: normal; }
.site-footer :focus-visible { outline-color: #ffd25a; }
.footer-bottom {
    margin-block-start: 2.5rem;
    padding-block-start: 1.5rem;
    border-block-start: 1px solid rgb(255 255 255 / 0.15);
    font-size: 0.875rem;
    color: rgb(255 255 255 / 0.65);
}
