/*
Theme Name: Yukon Aurora
Theme URI: https://yukonlights.com/
Description: Yukon Lights: a northern-lights child theme of Twenty Twenty-Five with a Christmas look (Nov 1 – Sep 30) and a Halloween look (October), switched by date.
Author: The Venasse family
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 7.1
Requires PHP: 8.3
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yukon-aurora
*/

/* ---------- Season tokens ----------------------------------------------------------------------
   theme.json holds the Christmas palette. In October functions.php puts .yl-halloween on <body>,
   which redefines the same preset variables, so every block colour follows. */
body {
	--yl-sky-top: #040B16; --yl-sky-mid: #0A1E33; --yl-sky-bottom: #12304A;
	--yl-aurora-1: #3DDC97; --yl-aurora-2: #2EC4B6; --yl-aurora-3: #8B7BFF;
	--yl-bulb-1: #FF5A5F; --yl-bulb-2: #3DDC97; --yl-bulb-3: #FFD166; --yl-bulb-4: #7AA7FF;
	--yl-ridge: #163A5C; --yl-glow: rgba(61, 220, 151, .55);
	--yl-light-link: #0B6E4F;
}
body.yl-halloween {
	--wp--preset--color--base: #0D0814; --wp--preset--color--base-2: #1C1028; --wp--preset--color--surface: #1C1028;
	--wp--preset--color--line: #3A2350; --wp--preset--color--contrast: #F4ECE4; --wp--preset--color--muted: #C9B8CF;
	--wp--preset--color--accent: #FF8A1F; --wp--preset--color--accent-2: #FFB054; --wp--preset--color--accent-3: #7B3FE4;
	--wp--preset--color--snow: #F1E9EE; --wp--preset--color--ink: #1A0D22;
	--wp--preset--font-family--display: var(--wp--preset--font-family--display-halloween);
	--yl-sky-top: #07040C; --yl-sky-mid: #1E0E2C; --yl-sky-bottom: #36172E;
	--yl-aurora-1: #7B3FE4; --yl-aurora-2: #FF8A1F; --yl-aurora-3: #C2185B;
	--yl-bulb-1: #FF8A1F; --yl-bulb-2: #9B5DE5; --yl-bulb-3: #FFB054; --yl-bulb-4: #7BD389;
	--yl-ridge: #2E1840; --yl-glow: rgba(255, 138, 31, .45);
	--yl-light-link: #8A3A06;
}
body.yl-halloween :is(h1, h2) {
	font-family: var(--wp--preset--font-family--display-halloween);
	font-weight: 400;
	letter-spacing: .01em;
}
body.yl-halloween .wp-block-site-title a { color: var(--wp--preset--color--accent); }

:where(a, button, .wp-element-button):focus-visible { outline: 3px solid var(--wp--preset--color--accent-2); outline-offset: 3px; }
.screen-reader-text:focus { clip-path: none; }

/* ---------- Night sky: a layer behind the top of every page (stars, gradient, aurora) ---------- */
.wp-site-blocks { position: relative; isolation: isolate; overflow-x: clip; }
.wp-site-blocks::before {
	content: ""; position: absolute; inset: 0 0 auto 0; height: 980px; z-index: -2; pointer-events: none;
	background:
		radial-gradient(1px 1px at 12% 9%, #fff 99%, transparent),
		radial-gradient(1px 1px at 32% 4%, #dbe8ff 99%, transparent),
		radial-gradient(1.5px 1.5px at 58% 11%, #fff 99%, transparent),
		radial-gradient(1px 1px at 76% 6%, #fff 99%, transparent),
		radial-gradient(1px 1px at 88% 15%, #cfe3ff 99%, transparent),
		radial-gradient(1px 1px at 45% 18%, #fff 99%, transparent),
		radial-gradient(1px 1px at 22% 21%, #fff 99%, transparent),
		radial-gradient(1px 1px at 66% 26%, #fff 99%, transparent),
		linear-gradient(180deg, var(--yl-sky-top) 0%, var(--yl-sky-mid) 55%, var(--wp--preset--color--base) 100%);
}
.wp-site-blocks::after {
	content: ""; position: absolute; left: -10%; right: -10%; top: -120px; height: 620px; z-index: -1; pointer-events: none;
	filter: blur(48px); opacity: .62;
	background:
		radial-gradient(ellipse 34% 26% at 30% 45%, var(--yl-aurora-1), transparent 70%),
		radial-gradient(ellipse 30% 22% at 58% 30%, var(--yl-aurora-2), transparent 70%),
		radial-gradient(ellipse 22% 20% at 80% 50%, var(--yl-aurora-3), transparent 70%);
	animation: yl-drift 16s infinite alternate ease-in-out;
}
@keyframes yl-drift { from { transform: translateX(-5%) skewX(-6deg); } to { transform: translateX(6%) skewX(8deg); } }
.yl-hero { position: relative; }
.yl-hero > :not(.yl-deco) { position: relative; z-index: 1; }
.yl-hero > .yl-deco { position: absolute; inset: -80px 0 0 0; max-width: none !important; margin: 0 !important; z-index: 0; pointer-events: none; overflow: hidden; }
.yl-titleband { padding-top: clamp(1.5rem, 5vw, 3rem); padding-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.yl-titleband h1 { margin: 0; }
.yl-titleband p { margin: .5rem 0 0; color: var(--wp--preset--color--muted); }

.yl-snow i { position: absolute; top: -10px; width: 4px; height: 4px; border-radius: 50%; background: #fff; opacity: .8; animation: yl-fall linear infinite; }
@keyframes yl-fall { to { transform: translateY(900px); } }

.yl-moon { position: absolute; right: 40%; top: 36px; width: clamp(90px, 12vw, 150px); aspect-ratio: 1; border-radius: 50%;
	background: radial-gradient(circle at 38% 36%, #FFF1C9 0%, #F6D58E 55%, #E3A24F 100%); box-shadow: 0 0 60px 18px rgba(246, 213, 142, .35); }
.yl-bat { position: absolute; width: 64px; height: 30px; animation: yl-flutter 4s infinite ease-in-out; }
.yl-bat path { fill: #0A0610; }
@keyframes yl-flutter { 50% { transform: translate(14px, -10px); } }
.yl-fog { position: absolute; left: -20%; right: -20%; bottom: 40px; height: 160px; filter: blur(10px);
	background: radial-gradient(ellipse at 30% 60%, rgba(230, 220, 240, .2), transparent 60%), radial-gradient(ellipse at 75% 50%, rgba(230, 220, 240, .16), transparent 60%);
	animation: yl-fog 20s infinite alternate ease-in-out; }
@keyframes yl-fog { from { transform: translateX(-4%); } to { transform: translateX(4%); } }

/* Garland across the top */
.yl-garland { display: block; width: 100%; height: 56px; }
.yl-garland path { fill: none; stroke: var(--wp--preset--color--line); stroke-width: 2; }
.yl-garland circle { filter: drop-shadow(0 0 6px currentColor); animation: yl-twinkle 2.2s infinite ease-in-out; }
.yl-garland circle:nth-of-type(4n+1) { fill: var(--yl-bulb-1); color: var(--yl-bulb-1); }
.yl-garland circle:nth-of-type(4n+2) { fill: var(--yl-bulb-2); color: var(--yl-bulb-2); animation-delay: .7s; }
.yl-garland circle:nth-of-type(4n+3) { fill: var(--yl-bulb-3); color: var(--yl-bulb-3); animation-delay: 1.4s; }
.yl-garland circle:nth-of-type(4n+4) { fill: var(--yl-bulb-4); color: var(--yl-bulb-4); animation-delay: .35s; }
@keyframes yl-twinkle { 50% { opacity: .35; } }
body.yl-halloween .yl-garland circle { animation-timing-function: steps(2, end); animation-duration: 1.7s; }

/* Header */
.yl-header { padding-bottom: .5rem; }
.yl-header .wp-block-site-title a { text-shadow: 0 0 16px var(--yl-glow); }
.yl-header .wp-block-navigation a { color: var(--wp--preset--color--contrast); padding: .6rem .2rem; }
.yl-header .wp-block-navigation a:hover,
.yl-header .wp-block-navigation .current-menu-item > a { color: var(--wp--preset--color--accent-2); }
.yl-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--base); color: var(--wp--preset--color--contrast); }

/* Hero */
.yl-hero { padding-top: clamp(1.5rem, 5vw, 3.5rem); }
.yl-hero h1 { margin-top: 0; }
.yl-lead { font-size: var(--wp--preset--font-size--large); color: var(--wp--preset--color--muted); max-width: 34rem; }
.yl-glass { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); border-radius: 18px; backdrop-filter: blur(6px); }
.yl-hero .wp-block-video { padding: 10px; margin: 0; }
.yl-hero .wp-block-video video { border-radius: 12px; display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
.yl-hero .wp-block-video figcaption { margin: .6rem .4rem .2rem; color: var(--wp--preset--color--contrast); font-weight: 700; text-align: left; }
.yl-hero .wp-block-button.is-style-outline > .wp-block-button__link { border: 1px solid var(--wp--preset--color--accent-2); color: var(--wp--preset--color--contrast); background: transparent; }

/* Countdown */
.yl-countdown { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 1.5rem 0; }
.yl-countdown__tile { min-width: 84px; padding: 10px 8px; text-align: center; background: rgba(255, 255, 255, .07);
	border: 1px solid rgba(255, 255, 255, .16); border-radius: 14px; }
.yl-countdown__tile b { display: block; font: 600 2.25rem/1 var(--wp--preset--font-family--heading); font-variant-numeric: tabular-nums; color: var(--wp--preset--color--contrast); }
.yl-countdown__tile span { display: block; margin-top: 4px; font-size: .8125rem; color: var(--wp--preset--color--muted); }
.yl-countdown__label { margin: 0; color: var(--wp--preset--color--muted); font-size: .95rem; }
.yl-countdown__today { display: none; margin: 0; padding: .7rem 1.2rem; border-radius: 14px; background: rgba(255, 255, 255, .07);
	font: 600 1.5rem/1.2 var(--wp--preset--font-family--heading); color: var(--wp--preset--color--accent-2); }
.yl-countdown.is-today > :not(.yl-countdown__today) { display: none; }
.yl-countdown.is-today .yl-countdown__today { display: block; }

/* Snowy ridge between the sky and the light section */
.yl-ridge { display: block; width: 100%; height: 110px; margin: 2rem 0 -1px; }
.yl-ridge .mountains { fill: var(--yl-ridge); }
.yl-ridge .snowline { fill: var(--wp--preset--color--snow); }

/* Light section (video gallery on the home page) */
.yl-light { background: var(--wp--preset--color--snow); color: var(--wp--preset--color--ink); }
.yl-light a:where(:not(.wp-element-button)) { color: var(--yl-light-link); }
.yl-light .yl-vcard a, .yl-light .yl-chips a { color: inherit; }

/* Season filter chips */
.yl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.yl-chips a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; text-decoration: none;
	font-weight: 700; background: var(--wp--preset--color--surface); color: var(--wp--preset--color--contrast) !important; border: 1px solid var(--wp--preset--color--line); }
.yl-chips a:hover { border-color: var(--wp--preset--color--accent); }
.yl-chips a[aria-current="page"], .yl-chips a.is-current { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--base) !important; border-color: var(--wp--preset--color--accent); }

/* Video cards (Query Loop) */
.yl-vcard { position: relative; height: 100%; background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line);
	border-radius: 16px; overflow: hidden; color: var(--wp--preset--color--contrast); transition: transform .2s ease, box-shadow .2s ease; }
.yl-vcard:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--wp--preset--color--accent), 0 18px 40px var(--yl-glow); }
.yl-vcard .wp-block-post-featured-image { margin: 0; }
.yl-vcard .wp-block-post-featured-image img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.yl-vcard__body { padding: 12px 16px 16px !important; }
.yl-vcard__body > * { margin: 0 !important; }
.yl-vcard .wp-block-post-title { font-family: var(--wp--preset--font-family--body) !important; font-size: 1.0625rem; font-weight: 800; letter-spacing: 0 !important; line-height: 1.3; }
.yl-vcard .wp-block-post-title a { color: var(--wp--preset--color--contrast); }
.yl-vcard .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; }
.yl-vcard .wp-block-post-excerpt { color: var(--wp--preset--color--muted); font-size: .9rem; }
.yl-vcard .wp-block-post-excerpt p { margin: 0; }
.yl-badge { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; align-items: center; margin: 0 !important; padding: 2px 10px;
	border-radius: 999px; background: var(--wp--preset--color--accent); color: var(--wp--preset--color--base); font-size: .8125rem; font-weight: 800; z-index: 2; }
.yl-badge > * { margin: 0 !important; }
.yl-badge a { color: inherit !important; text-decoration: none; position: relative; z-index: 3; }

/* Info cards ("How it works" / "What to expect") */
.yl-card { padding: 24px !important; height: 100%; }
.yl-card h3 { margin: .6rem 0 .4rem; }
.yl-card p { margin: 0; color: var(--wp--preset--color--muted); }
.yl-card svg { width: 32px; height: 32px; fill: none; stroke: var(--wp--preset--color--accent); stroke-width: 1.8; }

/* Visit strip and footer */
.yl-strip { background: var(--wp--preset--color--base-2); border-top: 1px solid var(--wp--preset--color--line); }
.yl-footer { border-top: 1px solid var(--wp--preset--color--line); color: var(--wp--preset--color--muted); font-size: .9375rem; }
.yl-footer p { margin: 0; }

/* Story page: journal notes and taped polaroids */
.yl-entry { margin-block: 3rem !important; }
.yl-note { padding: 22px 26px 26px !important; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); }
.yl-note .yl-year { margin: 0; font: 700 3rem/1 var(--wp--preset--font-family--display); color: var(--wp--preset--color--accent-2); }
.yl-note h3 { margin: .3rem 0 .6rem; }
.yl-polaroids { display: flex; flex-wrap: wrap; gap: 26px; justify-content: center; }
.yl-polaroid { background: #FBF8F1; padding: 10px 10px 8px; box-shadow: 0 12px 28px rgba(0, 0, 0, .45); position: relative; max-width: 260px; }
.yl-polaroid::before { content: ""; position: absolute; top: -12px; left: 50%; width: 84px; height: 24px; margin-left: -42px; transform: rotate(-3deg);
	background: rgba(233, 196, 106, .8); }
body.yl-halloween .yl-polaroid::before { background: repeating-linear-gradient(45deg, #1E1A16 0 10px, #D9661F 10px 20px); opacity: .9; }
.yl-polaroid:nth-child(odd) { transform: rotate(-2.5deg); }
.yl-polaroid:nth-child(even) { transform: rotate(2deg); }
.yl-polaroid img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.yl-polaroid figcaption { margin: .5rem 0 0; color: #2A2119 !important; font: 600 1.05rem/1.25 var(--wp--preset--font-family--heading); text-align: center; }
.yl-polaroid a { color: inherit; text-decoration: none; }

/* Category and year under a video's title */
.yl-meta { gap: .6rem; margin-top: .5rem !important; color: var(--wp--preset--color--muted); font-weight: 700; }
.yl-meta > * { margin: 0 !important; }
.yl-meta a { color: var(--wp--preset--color--accent-2); }

/* Music credit lines (CC BY) under videos */
.yl-credit { margin-top: .6rem; font-size: .8125rem; line-height: 1.5; color: var(--wp--preset--color--muted); }
.yl-credit a { color: var(--wp--preset--color--accent-2); }
.yl-hero .yl-credit { padding: 0 .5rem; }

/* Single video page */
.yl-single .wp-block-video video { width: 100%; border-radius: 14px; background: #000; }

/* Map */
.yl-map { margin: 1.5rem 0; }
.yl-map iframe { display: block; width: 100%; height: 420px; border: 0; border-radius: 16px; background: var(--wp--preset--color--surface); }
.yl-map p { margin: .5rem 0 0; font-size: .875rem; color: var(--wp--preset--color--muted); }
.yl-directions li { margin-bottom: .4rem; }

@media (max-width: 600px) {
	.yl-moon { right: 18%; top: 58px; width: 62px; }
	.yl-bat { transform: scale(.7); }
}

@media (prefers-reduced-motion: reduce) {
	.wp-site-blocks::after, .yl-snow i, .yl-bat, .yl-fog, .yl-garland circle { animation: none !important; }
	.yl-snow { display: none; }
	.yl-vcard { transition: none; }
	.yl-vcard:hover { transform: none; }
}
