/* ==========================================================================
   Public home page
   Loaded only on the home page. Depends on the palette in theme.css.
   ========================================================================== */

/* Shared pieces — eyebrow, icons, placeholders, gold buttons — live in
   theme.css so they style every page, not only this one. */

/* --- Hero ------------------------------------------------------------------ */
.home-hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(ellipse 80% 60% at 12% 40%, rgba(253,249,242,.94), rgba(253,249,242,.70) 45%, transparent 72%),
        linear-gradient(105deg, #fdf9f2 0%, #f7ead0 42%, #efd9ad 100%);
    border-bottom: 3px solid var(--gold);
    min-height: 380px; display: flex; align-items: center;
}

/* The artwork sits behind the copy and is progressively revealed to the right. */
.home-hero-art { position: absolute; inset: 0; z-index: 0; }
.home-hero-art img,
.home-hero-art .hero-art-svg {
    width: 100%; height: 100%; object-fit: cover; object-position: 72% center;
    display: block;
}

/* --- Hero slider ----------------------------------------------------------- */
.hero-slider { position: absolute; inset: 0; }
.hero-slide {
    position: absolute; inset: 0;
    opacity: 0; transition: opacity .9s ease;
}
.hero-slide.is-active { opacity: 1; }
/* Without JS only the first slide is ever marked active, so the hero shows a
   single steady image rather than a stack. */

.hero-dots {
    position: absolute; inset-block-end: 14px; inset-inline-end: 18px;
    z-index: 2; display: flex; gap: 7px;
}
.hero-dots[hidden] { display: none; }
.hero-dot {
    width: 10px; height: 10px; padding: 0; border-radius: 50%;
    background: rgba(255,255,255,.5); border: 1px solid rgba(74,11,22,.35);
    cursor: pointer; transition: background .2s ease, transform .2s ease;
}
.hero-dot:hover { background: rgba(255,255,255,.8); }
.hero-dot.is-active { background: var(--gold); border-color: var(--maroon-dark); transform: scale(1.25); }
.hero-dot:focus-visible { outline: 2px solid var(--maroon); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    .hero-slide { transition: none; }
}
/* Veil over the photograph so the headline stays readable.
   On phones the copy is full width, so the veil runs top-to-bottom; from the
   wide breakpoint it sweeps left-to-right instead, holding near-opaque across
   the ~48% the text occupies before revealing the picture. */
.home-hero-art::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg,
        rgba(253,249,242,.94) 0%,
        rgba(253,249,242,.88) 55%,
        rgba(253,249,242,.62) 100%);
}

.home-hero-inner { position: relative; z-index: 1; width: 100%; padding-block: 34px; }
.home-hero-copy { max-width: 33rem; }

.home-hero h1 {
    font-size: 2.1rem; line-height: 1.18; color: var(--maroon-dark);
    margin: 0 0 12px; text-shadow: 0 1px 0 rgba(255,255,255,.6);
}
.home-hero .eyebrow { color: var(--maroon); }
.home-hero-text { color: var(--ink-soft); font-size: .98rem; max-width: 34rem; margin-bottom: 20px; }

/* --- Four values ----------------------------------------------------------- */
.pillars {
    list-style: none; margin: 0 0 22px; padding: 0;
    display: flex; flex-wrap: wrap; gap: 20px;
}
.pillars li { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 62px; }
.pillar-icon {
    color: var(--maroon); display: grid; place-items: center;
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(201,162,39,.16); border: 1px solid rgba(201,162,39,.45);
}
.pillar-label { font-size: .82rem; font-weight: 600; color: var(--maroon-dark); }

/* --- Figures banner -------------------------------------------------------- */
.stat-banner {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 0;
    background: linear-gradient(135deg, var(--maroon-dark), var(--maroon) 60%, #7d1a2a);
    border: 2px solid var(--gold); border-radius: 14px;
    margin: -26px auto 26px; position: relative; z-index: 2;
    max-width: var(--max); box-shadow: var(--shadow-lg); overflow: hidden;
}
.stat-banner-item {
    text-align: center; padding: 16px 10px;
    border-inline-end: 1px solid rgba(230,207,135,.28);
    border-block-end: 1px solid rgba(230,207,135,.28);
}
.stat-banner-item:nth-child(2n) { border-inline-end: 0; }
.stat-banner-item:nth-last-child(-n+2) { border-block-end: 0; }
.stat-banner-icon { color: var(--gold-soft); display: block; margin-bottom: 4px; }
.stat-banner-value {
    color: #fff; font-size: 1.5rem; font-weight: 700; margin: 0;
    font-family: "Nirmala UI", "Noto Sans Devanagari", Georgia, serif;
}
.stat-banner-label { color: var(--gold-soft); font-size: .8rem; margin: 2px 0 0; }

/* --- About ----------------------------------------------------------------- */
.home-about {
    display: grid; gap: 20px; grid-template-columns: 1fr;
    align-items: center; margin-bottom: 26px;
}
.home-about-photo img,
.home-about-photo .photo-ph {
    border-radius: 14px; border: 2px solid var(--gold-soft);
    width: 100%; aspect-ratio: 4 / 3; object-fit: cover; overflow: hidden;
}
.home-about-copy h2 { font-size: 1.45rem; margin-bottom: 10px; }
.home-about-copy p { color: var(--ink-soft); line-height: 1.8; }
.home-about-crest { display: none; text-align: center; }

/* --- Featured event -------------------------------------------------------- */
.home-event {
    display: grid; grid-template-columns: 1fr; gap: 0;
    background: linear-gradient(135deg, var(--maroon-dark), var(--maroon) 70%);
    border: 2px solid var(--gold); border-radius: 14px;
    overflow: hidden; margin-bottom: 30px; box-shadow: var(--shadow);
}
.home-event-copy { padding: 22px; }
.home-event-copy h2 { color: #fff; font-size: 1.35rem; margin-bottom: 14px; }
.home-event-meta { list-style: none; margin: 0 0 18px; padding: 0; }
.home-event-meta li {
    display: flex; align-items: center; gap: 9px;
    color: var(--gold-soft); font-size: .9rem; margin-bottom: 7px;
}
.home-event-photo { position: relative; min-height: 200px; }
.home-event-photo img,
.home-event-photo .photo-ph { width: 100%; height: 100%; object-fit: cover; display: block; }

/* --- What we do ------------------------------------------------------------ */
.home-features { margin-bottom: 30px; }
.feature-grid {
    display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr));
}
.feature-card {
    background: var(--ivory); border: 1px solid var(--line);
    border-radius: 12px; padding: 18px 14px; text-align: center;
    box-shadow: var(--shadow);
}
.feature-icon {
    color: var(--maroon); display: grid; place-items: center;
    width: 54px; height: 54px; margin: 0 auto 10px; border-radius: 50%;
    background: rgba(201,162,39,.14); border: 1px solid rgba(201,162,39,.38);
}
.feature-card h3 { font-size: .95rem; margin-bottom: 5px; color: var(--maroon-dark); }
.feature-card p { font-size: .8rem; color: var(--ink-soft); margin: 0; line-height: 1.6; }

/* --- News and gallery ------------------------------------------------------ */
.home-split { display: grid; gap: 16px; grid-template-columns: 1fr; margin-bottom: 30px; }

.news-list { list-style: none; margin: 0; padding: 0; }
.news-list > li {
    display: grid; grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line);
    position: relative;
}
.news-list > li:last-child { border-bottom: 0; }
.news-thumb { width: 74px; height: 56px; border-radius: 8px; overflow: hidden; background: var(--surface-tint); }
.news-thumb img, .news-thumb .photo-ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-title { font-weight: 600; font-size: .9rem; margin: 0 0 3px; padding-inline-end: 74px; }
.news-text { font-size: .78rem; color: var(--ink-soft); margin: 0; }
.news-date {
    position: absolute; top: 13px; inset-inline-end: 18px;
    font-size: .72rem; color: var(--ink-faint); white-space: nowrap;
}

.gallery-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
    padding: 14px 18px 18px; position: relative;
}
.gallery-tile {
    display: block; aspect-ratio: 4 / 3; border-radius: 8px;
    overflow: hidden; background: var(--surface-tint);
}
.gallery-tile img, .gallery-tile .photo-ph { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Sits over the centre of the grid rather than below it. */
.gallery-more {
    position: absolute; inset-block-start: 50%; inset-inline-start: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    background: var(--maroon); color: #fff; border: 1px solid var(--gold);
    border-radius: 999px; padding: 8px 18px;
    font-size: .84rem; font-weight: 600; white-space: nowrap;
    box-shadow: 0 4px 16px rgba(74,11,22,.4);
}
.gallery-more:hover { background: var(--maroon-dark); color: #fff; text-decoration: none; }

/* --- Closing call to action ------------------------------------------------ */
.home-cta {
    background-color: var(--maroon-dark);
    background-size: cover; background-position: center;
    border: 2px solid var(--gold); border-radius: 14px;
    overflow: hidden; margin-bottom: 8px; position: relative;
}
.home-cta::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(74,11,22,.86), rgba(74,11,22,.94));
}
.home-cta-inner { position: relative; padding: 30px 20px; text-align: center; }
.home-cta h2 { color: #fff; font-size: 1.35rem; margin-bottom: 8px; }
.home-cta p { color: var(--gold-soft); margin-bottom: 18px; }

.home-event-none { color: var(--gold-soft); margin-bottom: 18px; }

/* --- Responsive ------------------------------------------------------------ */
@media (min-width: 620px) {
    .home-hero h1 { font-size: 2.6rem; }
    .stat-banner { grid-template-columns: repeat(4, 1fr); }
    .stat-banner-item { border-block-end: 0; }
    .stat-banner-item:nth-child(2n) { border-inline-end: 1px solid rgba(230,207,135,.28); }
    .stat-banner-item:last-child { border-inline-end: 0; }
    .feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .home-event { grid-template-columns: 1fr 1fr; }
    .home-event-copy { padding: 28px; }
}

@media (min-width: 900px) {
    .home-hero { min-height: 460px; }
    .home-hero h1 { font-size: 3rem; }
    .home-hero-inner { padding-block: 48px; }

    .home-hero-art::after {
        background: linear-gradient(100deg,
            rgba(253,249,242,.97) 0%,
            rgba(253,249,242,.94) 38%,
            rgba(253,249,242,.74) 52%,
            rgba(253,249,242,.22) 66%,
            transparent 78%);
    }
    .home-about { grid-template-columns: 320px minmax(0, 1fr) 230px; gap: 26px; }
    .home-about-crest { display: block; }
    .feature-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .feature-card { padding: 20px 10px; }
    .home-split { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
    .home-cta-inner { padding: 44px 20px; }
    .home-cta h2 { font-size: 1.7rem; }
}

@media print {
    .home-hero-art, .home-cta, .gallery-more { display: none; }
}
