/**
 * /star2/christmas-gallery.css
 * index2.php Section 1 — big Christmas headline + endlessly scrolling photo column
 * All classes are prefixed "chg-" so site-wide CSS (.container, .header, h1 …) can't interfere.
 */

.chg {
    --chg-bg: #fbf8f2;        /* warm cream — matches index.php */
    --chg-text: #C8102E;      /* christmas red */
    --chg-accent: #1E6B3A;    /* evergreen */
    /* Headline colours — from the colour palette */
    --chg-head: #A09F8F;      /* Birch     — Give / Share / Show / Change */
    --chg-head-a: #3B5F51;    /* Evergreen — Hope / Love */
    --chg-head-b: #3B5F51;    /* Evergreen — Joy / Lives */
    --chg-gap: 25px;
    --chg-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;   /* left panel font */

    --chg-top: 0px;           /* height of the site menu above — set automatically by the JS */
    --chg-h: calc(100vh - var(--chg-top));

    position: relative;
    display: flex;
    align-items: flex-end;
    height: var(--chg-h);
    overflow: hidden;
    /* Background photo (same folder as this CSS); cream shows while it loads or if it's missing */
    background-color: var(--chg-bg);
    background-image: url('pickastar-christmas-background-5.webp');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    color: var(--chg-text);
    font-family: inherit;
}
.chg,
.chg * {
    box-sizing: border-box;
}
.chg * {
    user-select: none;
}

/* ---- Left side: headline + campus buttons (bottom left) ---- */
.chg .chg-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 22px;
    padding: var(--chg-gap);
}

/* ---- Big headline (bottom left) ---- */
.chg .chg-texts,
.chg h1.chg-texts {
    margin: 0;
    padding: 0;
    background: none;
    font-family: var(--chg-serif);
    font-weight: 400;             /* Instrument Serif only has regular — avoid faux bold */
    font-size: min(11vw, calc((var(--chg-h) - 250px) / 3.6));   /* shrinks on short wide screens so the buttons fit */
    line-height: 0.88;
    letter-spacing: -0.02em;
    text-transform: none;
    text-align: left;
    color: var(--chg-head);
}
/* Four staggered lines */
.chg .chg-texts > span { display: block; white-space: nowrap; }
.chg .chg-texts .chg-l1 { text-align: left; }
.chg .chg-texts .chg-l2 {
    display: flex;
    align-items: baseline;    /* lines "Joy" up with "Share" */
    gap: 0.25em;              /* normal word space — "Share Joy" stays together */
    padding-left: 9vw;
}
.chg .chg-texts .chg-l3 { padding-left: 4vw; }
.chg .chg-texts .chg-l4 { text-align: right; }

/* Italic accent words */
.chg .chg-texts em {
    font-style: italic;
    font-weight: 400;
}
.chg .chg-texts .chg-green { color: var(--chg-head-a); }
.chg .chg-texts .chg-gold  { color: var(--chg-head-b); }

/* ---- Intro line above the buttons ---- */
.chg .chg-note {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    margin: 0 0 -8px;              /* sits close to the buttons */
    font-family: var(--font-mono, 'IBM Plex Mono', ui-monospace, monospace);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: var(--chg-accent);
}
.chg .chg-note .chg-sep {
    color: #A8841A;                /* gold divider */
}

/* ---- Campus buttons ---- */
.chg .chg-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
}
.chg .chg-btn {
    display: inline-block;
    padding: 10px 18px;
    border: 1.5px solid var(--chg-accent);
    border-radius: 999px;
    background: transparent;
    color: var(--chg-accent);
    font-family: var(--font-mono, 'IBM Plex Mono', ui-monospace, monospace);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
    transition: background-color .2s, color .2s, border-color .2s;
}
.chg .chg-btn:hover,
.chg .chg-btn:focus-visible {
    background: var(--chg-accent);   /* same evergreen as the border */
    border-color: var(--chg-accent);
    color: #fff;
    text-decoration: none;
}
.chg .chg-btn:focus-visible {
    outline: 2px solid var(--chg-accent);
    outline-offset: 3px;
}

/* ---- Small disclaimer under the buttons (text is set in index.php: $hero_disclaimer) ---- */
.chg .chg-disclaimer {
    display: block;
    width: 100%;
    max-width: none;
    margin: -6px 0 0;              /* sits close to the buttons */
    font-family: var(--font-mono, 'IBM Plex Mono', ui-monospace, monospace);
    font-size: 11px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0.01em;
    color: var(--chg-accent);
    opacity: 0.8;
}

/* ---- Photo column (right) ---- */
.chg .chg-column {
    width: 40vw;
    height: var(--chg-h);
    margin: 0 var(--chg-gap) 0 0;
    padding: 0;
    max-width: none;
    transform-origin: center;
}
.chg .chg-content {
    display: flex;
    flex-direction: column;
    row-gap: var(--chg-gap);
    height: max-content;
    margin: 0 auto;
    padding-bottom: var(--chg-gap);
    will-change: transform;
}
.chg .chg-media {
    aspect-ratio: 1.7;
    border-radius: 0.4em;
    overflow: hidden;
    pointer-events: none;
    background: #efe8da;          /* shows while each photo loads */
}
.chg .chg-media img,
.chg .chg-media video {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
}

/* ---- Mobile ---- */
@media (max-width: 600px) {
    .chg {
        flex-direction: column;
        align-items: stretch;
        height: auto;              /* grow to fit the content — headline no longer clipped */
        min-height: var(--chg-h);
    }
    .chg .chg-column {
        width: 100%;
        height: 60vh;              /* fallback for older browsers */
        height: 60svh;             /* taller photo column — change 60 to adjust */
        min-height: 380px;
        flex: 0 0 auto;
        overflow: hidden;
        margin: 0;
        padding: 0 15px;
        order: 2;                  /* photos below the headline + buttons */
    }
    .chg .chg-left {
        flex: 0 0 auto;
        order: 1;                  /* headline + buttons first */
        gap: 16px;
        padding: 15px 15px 20px;
    }
    .chg .chg-texts,
    .chg h1.chg-texts {
        width: 100%;
        font-size: 18vw;
    }
    .chg .chg-note { font-size: 12px; gap: 2px 8px; }
    .chg .chg-buttons { gap: 8px; }
    .chg .chg-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    .chg .chg-disclaimer { font-size: 10px; margin-top: -4px; }
}

/* Visually hidden text — read by search engines and screen readers, not shown */
.chg .chg-sr {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
