/* ==========================================================================
   A fresher, brighter finish, loaded last: two-style headlines (upright + italic gradient), gradient buttons, quicker
   scroll reveals and a few extra scroll effects.
   ========================================================================== */
:root {
    --g-bright: linear-gradient(100deg, #7c612c 0%, #254f3c 58%, #254f3c 100%);
    --g-btn: linear-gradient(135deg, #7c612c 0%, #254f3c 100%);
    --g-btn-alt: linear-gradient(135deg, #254f3c 0%, #295d46 55%, #7c612c 100%);
}

/* ---- buttons: gradient fills that slide on hover ---- */
.btn--gold, .btn--primary, .nl-btn {
    color: #fff !important;
    border-color: transparent !important;
    background-size: 180% 100% !important;
    background-position: 0% 0 !important;
    box-shadow: 0 10px 24px -12px rgb(37 79 60 / 0.45);
    transition: background-position 0.45s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s ease !important;
}
.btn--gold, .nl-btn { background-image: var(--g-btn) !important; background-color: #254f3c !important; }
.btn--primary { background-image: var(--g-btn-alt) !important; background-color: #254f3c !important; }
.btn--gold:hover, .btn--primary:hover, .nl-btn:hover { background-position: 100% 0 !important; transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgb(37 79 60 / 0.5); }

/* ---- reveals: shorter, no long stagger, start before the section reaches the screen ---- */
.js [data-reveal] { transform: translateY(0.9rem); transition: opacity 0.45s ease, transform 0.55s var(--ease); transition-delay: calc(var(--d, 0) * 40ms); }
.js [data-reveal="zoom"] { transition-duration: 0.6s; transform: scale(0.97); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---- extra motion: lift on hover, a soft light follows the scroll ---- */
.hx__tile, .hy__card, .gl-card a, .sc-box, .a-term, .ev-card, .vv-pillars li { transition: transform 0.35s var(--ease), box-shadow 0.35s ease; }
.hx__tile:hover, .hy__card:hover, .gl-card a:hover, .sc-box:hover, .a-term:hover, .ev-card:hover { transform: translateY(-6px); }

body { background: #fff; }

/* ---- section headlines: a little smaller, light upright words + an italic accent-colour finish ---- */
.h2, .pg-title, .md-title,
body:not(.page-home) :is(.h2, .h-display, .md-title, .a-block__title, .pg-title, .fg-text__title, .fc-card__title, .cca-row__title) {
    font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.6rem);
    font-weight: 400 !important;
    letter-spacing: -0.02em !important;
    line-height: 1.12;
}
.hl { font-style: italic !important; font-weight: 400 !important; color: var(--c-gold-700); }
:is(.section--dark, .v-mission, .achievements, .recognition, .ad-select, .upcoming, .site-footer, .sc-box--dark) .hl { color: var(--c-gold-300); }
.js [data-reveal] .hl { display: inline-block; opacity: 0; transform: translateX(-0.3em); transition: opacity 0.5s ease 0.1s, transform 0.5s var(--ease) 0.1s; }
.js [data-reveal].is-in .hl { opacity: 1; transform: none; }
/* ---- inner-page hero titles: the same two-colour finish (light upright words, italic accent words) ---- */
.h-hero__title { font-weight: 400 !important; letter-spacing: -0.02em !important; }
.h-hero__line:last-child:not(:first-child), .h-hero .hl { font-style: italic !important; font-weight: 400 !important; color: var(--c-gold-300) !important; }
.h-hero .hl { display: inline; opacity: 1; transform: none; }

/* accent words on a dark background (found by the headline's own light text colour) */
.hl.hl--light { color: var(--c-gold-300) !important; }

/* ---- home: the principal's message, a little smaller ---- */
.principal__quote p { font-size: clamp(1.2rem, 1rem + 1vw, 1.8rem); line-height: 1.4; }

/* ---- photo viewer: the picture fits the screen (no scroll bars), with previous / next / close buttons ---- */
.cv-box { width: fit-content; max-width: 96vw; }
.cv-box > img, .cv-box__scroll img { width: auto !important; height: auto !important; max-width: min(96vw, calc(100vw - 9rem)) !important; max-height: 86vh !important; object-fit: contain; }
.cv-box__scroll { overflow: hidden !important; max-height: none !important; }
.page-certs .cv-box { width: fit-content; }

/* ---- gallery year tabs: no scroll bar (the row still scrolls sideways on small screens) ---- */
.gl-tabs__bar { overflow-y: hidden; scrollbar-width: none; }
.gl-tabs__bar::-webkit-scrollbar { display: none; }

/* ---- history tiles: the dark gradient under the name must stay, so the white text reads on any photograph ---- */
.hx__tile::after { background-image: linear-gradient(0deg, rgb(var(--rgb-maroon-950) / 0.96) 0%, rgb(var(--rgb-maroon-950) / 0.78) 30%, rgb(var(--rgb-maroon-950) / 0.3) 55%, transparent 75%) !important; }
.hx__years { color: var(--c-gold-300) !important; }

/* ---- student council boxes: the dark box lost its gradient to an earlier "no gradients" rule, so give it back ---- */
.sc-box--dark { background-color: var(--c-maroon-800) !important; background-image: linear-gradient(135deg, var(--c-maroon-950) 0%, var(--c-maroon-800) 65%, var(--c-maroon-700) 100%) !important; }

/* ---- footer: tighter, without the extra empty space ---- */
.site-footer__top { padding-block: 1.75rem; gap: 1rem; }
.site-footer__grid { padding-block: 2.25rem; gap: 1.75rem; }
.site-footer__heading { margin-bottom: 0.6rem; }
.site-footer__col { gap: 0.4rem; }
.site-footer__col ul { gap: 0.3rem; }
.site-footer__hours { gap: 0.45rem; }
.site-footer__base { padding-block: 1.1rem 1.25rem; gap: 0.5rem 2rem; }
.site-footer { line-height: 1.6; }

/* ---- scroll bars: slim, rounded, in the site's teal, so they blend with the page ---- */
html { scrollbar-width: thin; scrollbar-color: rgb(var(--rgb-gold-500) / 0.55) transparent; }
* { scrollbar-width: thin; scrollbar-color: rgb(var(--rgb-gold-500) / 0.5) transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgb(var(--rgb-gold-500) / 0.5); border: 2px solid transparent; background-clip: padding-box; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgb(var(--rgb-gold-500) / 0.85); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }
html::-webkit-scrollbar-track { background: var(--c-soft); }
html::-webkit-scrollbar { width: 11px; }

/* ---- back to top button: a round button with a progress ring, bottom right ---- */
.to-top {
    position: fixed; right: clamp(1rem, 2.4vw, 1.75rem); bottom: clamp(1rem, 2.4vw, 1.75rem); z-index: 60;
    display: grid; place-items: center; width: 3.1rem; height: 3.1rem; padding: 0; cursor: pointer;
    color: #fff; background: linear-gradient(135deg, #7c612c, #254f3c); border: 0; border-radius: 50%;
    box-shadow: 0 14px 28px -12px rgb(37 79 60 / 0.7);
    opacity: 0; visibility: hidden; transform: translateY(1rem) scale(0.9);
    transition: opacity 0.3s ease, transform 0.35s var(--ease), visibility 0s linear 0.35s, box-shadow 0.25s ease;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.to-top:hover { transform: translateY(-3px); box-shadow: 0 20px 32px -12px rgb(37 79 60 / 0.85); }
.to-top:focus-visible { outline: 3px solid var(--c-gold-300); outline-offset: 3px; }
.to-top svg { position: relative; z-index: 1; }
.to-top__ring { position: absolute; inset: -4px; border-radius: 50%; --p: 0;
    background: conic-gradient(var(--c-gold-300) calc(var(--p) * 360deg), rgb(124 97 44 / 0.22) 0);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px)); pointer-events: none; }
@media print { .to-top { display: none; } }

/* ---- neighbouring sections with the same background: one block, not two (see modules/sections.js) ---- */
.sec-join { padding-top: 0 !important; }
.sec-join-prev { padding-bottom: clamp(2rem, 4vw, 3.5rem) !important; }
.h-hero + .sec-join { padding-top: 0 !important; }
