/* =========================================================================
   Christmas takeover for the year-end giving appeals (body.gx-on).
   Turned on per slogan theme ('holiday' in sr_give_themes(), inc/giving.php),
   or forced with ?xmas=1 / ?xmas=0. Lights, ornaments and snow are drawn by
   assets/js/giving-holiday.js; artwork is in assets/img/xmas/.
   Colours follow the Holiday Drop (PRESENT.). Added 2026-11-12.
   ========================================================================= */

.gx-on {
	--gx-red: #8c1a2b;
	--gx-red-hi: #b3263a;
	--gx-wine: #5a0f1e;
	--gx-deep: #1c0710;
	--gx-pine: #1f4a3a;
	--gx-pine-dk: #123026;
	--gx-gold: #efb845;
	--gx-cream: #f7efe3;
	--gx-knit: 44px;
}

/* ---------- Snow (a fixed canvas over the page, under the popups) ---------- */
.gx-snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }
html.ga-reel-lock .gx-snow { z-index: 1005; } /* over the opening animation while it plays */

/* ---------- Top bar ---------- */
.gx-on .ga-bar { background: linear-gradient(90deg, var(--gx-wine), var(--gx-red) 50%, var(--gx-wine)); border-bottom-color: rgba(239, 184, 69, .5); color: #fff; }

/* ---------- Header: the brand brush in holiday colours ---------- */
.gx-on .site-header::before {
	background:
		linear-gradient(105deg, rgba(140, 26, 43, .6) 0%, rgba(140, 26, 43, 0) 40%),
		linear-gradient(255deg, rgba(31, 74, 58, .55) 0%, rgba(31, 74, 58, 0) 34%);
}

/* ---------- Opening animation ---------- */
html.ga-reel-play body.gx-on .ga-reel:not([hidden]) {
	background:
		radial-gradient(120% 90% at 50% 112%, rgba(239, 184, 69, .2), transparent 58%),
		radial-gradient(90% 70% at 50% -12%, rgba(179, 38, 58, .55), transparent 70%),
		var(--gx-deep);
}

/* ---------- Campaign hero ---------- */
.gx-on .ga-hero { background: var(--gx-deep); }
.gx-on .ga-hero__shade {
	background:
		linear-gradient(90deg, rgba(28, 7, 16, .94) 0%, rgba(74, 12, 28, .8) 46%, rgba(18, 48, 38, .66) 100%),
		linear-gradient(180deg, rgba(28, 7, 16, .7) 0%, rgba(28, 7, 16, 0) 32%, rgba(28, 7, 16, .7) 100%);
}
.gx-on .ga-hero__wrap { position: relative; z-index: 1; padding-top: clamp(178px, 23vh, 224px); }
.gx-on .ga-hero .ga-eyebrow::before {
	content: ""; display: inline-block; width: 30px; height: 21px; margin-right: 9px; vertical-align: -5px;
	background: url("../img/xmas/holly.svg") center / contain no-repeat;
}

/* Lights and ornaments layer (filled by giving-holiday.js) */
.gx-hang { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.gx-lights { position: absolute; left: 0; width: 100%; overflow: visible; }
.gx-lights .gx-b { animation: gx-twinkle 3s ease-in-out infinite; }
@keyframes gx-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .42; } }
.gx-orn { position: absolute; top: 0; transform-origin: 50% 0; animation: gx-sway 4.8s ease-in-out infinite alternate; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .35)); }
.gx-orn i { display: block; width: 1.5px; margin: 0 auto; background: linear-gradient(rgba(239, 184, 69, .95), rgba(239, 184, 69, .55)); }
.gx-orn svg { display: block; width: 100%; height: auto; margin-top: -2px; }
@keyframes gx-sway { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }

/* The "three ways" card, wrapped like a present */
.gx-on .ga-hero__card { position: relative; box-shadow: 0 30px 80px rgba(0, 0, 0, .5), inset 0 0 0 2px rgba(140, 26, 43, .16); }
.gx-on .ga-hero__cardtitle { color: var(--gx-red); }
.gx-bow {
	position: absolute; z-index: 3; top: -46px; right: 16px; width: 112px; height: 90px; pointer-events: none;
	background: url("../img/xmas/bow.svg") center / contain no-repeat;
	filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35));
}
.gx-tag { position: absolute; z-index: 2; top: -24px; right: 112px; transform: rotate(-6deg); transform-origin: 100% 50%; filter: drop-shadow(0 5px 8px rgba(0, 0, 0, .3)); pointer-events: none; }
.gx-tag__in {
	position: relative; display: flex; flex-direction: column; padding: 6px 30px 7px 14px;
	background: #fffaf0; color: var(--gx-red);
	font-family: 'Caveat', 'Segoe Print', cursive; font-weight: 700; font-size: 20px; line-height: 1.02; white-space: nowrap;
	clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%);
	border-radius: 3px 0 0 3px;
}
.gx-tag__in::after { /* the hole */
	content: ""; position: absolute; right: 12px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%;
	background: rgba(90, 15, 30, .22); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .25);
}
.gx-tag::after { /* the string, up to the bow */
	content: ""; position: absolute; right: -44px; top: 50%; width: 50px; height: 1.5px;
	background: var(--gx-gold); transform: rotate(-24deg); transform-origin: 0 50%;
}

/* ---------- Ticker under the hero: snow on a cranberry band ---------- */
.gx-on .marquee {
	background: var(--gx-red) url("../img/xmas/snowcap.svg") repeat-x 0 0 / auto 22px;
	color: var(--gx-cream); border-block-color: var(--gx-wine); padding-top: 26px;
}
.gx-on .marquee__track .star {
	font-size: 0; padding: 0; width: 20px; height: 20px; flex: 0 0 20px;
	background: url("../img/xmas/snowflake.svg") center / contain no-repeat;
}

/* ---------- Fair Isle knit bands, like the Holiday Drop sweaters ---------- */
.gx-on .ga-inline,
.gx-on .cta-band {
	border-top: var(--gx-knit) solid transparent;
	background-image: url("../img/xmas/knit.svg");
	background-repeat: repeat-x;
	background-position: 0 0;
	background-size: auto var(--gx-knit);
	background-origin: border-box;
}
.gx-on .cta-band { background-color: var(--gx-pine); }

/* ---------- Footer: snow along the top edge ---------- */
.gx-on .site-footer { background-image: url("../img/xmas/snowcap.svg"); background-repeat: repeat-x; background-position: 0 0; background-size: auto 28px; }

/* ---------- Popups wrapped like a present: ribbon across the top, bow on it ---------- */
.gx-on .ga-intro[data-variant="card"] .ga-intro__frame::before,
.gx-on .ga-modal__card::before {
	content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px; z-index: 3; pointer-events: none;
	background: linear-gradient(var(--gx-red-hi), var(--gx-red));
	box-shadow: 0 1px 0 rgba(239, 184, 69, .9);
}
.gx-on .ga-intro[data-variant="card"] .ga-intro__frame::after,
.gx-on .ga-modal__card::after {
	content: ""; position: absolute; top: -4px; right: 58px; width: 92px; height: 74px; z-index: 4; pointer-events: none;
	background: url("../img/xmas/bow.svg") center top / contain no-repeat;
	filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .25));
}
.gx-on .ga-intro[data-variant="card"] .ga-intro__body { padding-top: 44px; }
.gx-on .ga-modal__body { padding-top: 52px; }
.gx-on .ga-modal__body .ga-eyebrow,
.gx-on .ga-intro[data-variant="card"] .ga-eyebrow,
.gx-on .ga-intro[data-variant="card"] .ga-intro__title span,
.gx-on .ga-modal__title em { color: var(--gx-red); }

/* ---------- Smaller screens ---------- */
@media (max-width: 980px) {
	.gx-on .ga-hero__wrap { padding-top: 168px; }
}
@media (max-width: 560px) {
	.gx-on .ga-hero__wrap { padding-top: 150px; }
	.gx-on .ga-hero__card { padding-top: 46px; } /* the tag sits above the card title */
	.gx-on .ga-intro[data-variant="card"] .ga-intro__body { padding-top: 64px; } /* clear of the bow */
	.gx-bow { width: 92px; height: 74px; top: -38px; right: 10px; }
	.gx-tag { right: 90px; top: -20px; }
	.gx-tag__in { font-size: 17px; padding: 5px 26px 6px 12px; }
	.gx-tag::after { right: -38px; width: 44px; }
	.gx-on .ga-intro[data-variant="card"] .ga-intro__frame::after,
	.gx-on .ga-modal__card::after { right: 50px; width: 76px; height: 61px; }
	.gx-on { --gx-knit: 36px; }
}

/* ---------- Reduced motion: everything stays still, no snow ---------- */
@media (prefers-reduced-motion: reduce) {
	.gx-lights .gx-b, .gx-orn { animation: none; }
	.gx-snow { display: none; }
}

@media print {
	.gx-snow, .gx-hang, .gx-bow, .gx-tag { display: none; }
}
