/**
 * dbi services · Neve Child Theme
 * eggs/xmas/xmas.css — Christmas mode (eggs/xmas/xmas.php,
 * eggs/xmas/xmas.js, enhancements #50).
 *
 * The whole skin hangs on html.dbi-xmas. The site's colours are
 * variables (tokens.css reads Neve's --nv-* ones), so the first block
 * re-points them: teal → Christmas red, the dark surface → deep green,
 * the page → snow. The rest puts a starry night and a snow drift on
 * the hero, snow caps on the cards, Santa hats on the logo and the
 * portraits, a ribbon on the CTA, and styles the trimmings the script
 * adds: the floating snowflake button, the snow, the lights, the
 * curtain, the toast.
 *
 * Contrast: #b3121f carries white text (7.4:1); gold #f2c14e sits on
 * the deep green only (6.8:1); the ink is #14231c. Under
 * prefers-reduced-motion nothing moves (the script adds no snow).
 *
 * Removing xmas.php's require in eggs/eggs.php unloads this file.
 */

/* ── The trigger is the logo: no double-tap zoom delay on touch. ── */
.site-logo a.brand {
	touch-action: manipulation;
}

/* ── The snowflake: the off switch, present only while the mode is
   on, right after the logo that was tapped (.site-logo is a flex
   row, so the button is its second item, centred on the logo) ── */
.dbi-xmas-button {
	flex: 0 0 auto;
	align-self: center;
	width: 28px;
	height: 28px;
	margin: 0 0 0 14px;
	padding: 0;
	border: 1px solid #fff;
	border-radius: 50%;
	background: #b3121f;
	color: #fff;
	font: 15px/1 'Segoe UI Symbol', 'Apple Color Emoji', system-ui, sans-serif;
	box-shadow: 0 0 0 2px rgba( 179, 18, 31, .25 ), 0 4px 12px rgba( 179, 18, 31, .35 );
	cursor: pointer;
	transition: transform .25s ease;
	animation: dbi-xmas-switch-in .35s ease both;
}
.dbi-xmas-button:hover {
	transform: rotate( 25deg ) scale( 1.1 );
}
.dbi-xmas-button:focus-visible {
	outline: 3px solid #0b3d2e;
	outline-offset: 2px;
}
@keyframes dbi-xmas-switch-in {
	from { transform: scale( .4 ); opacity: 0; }
}

/* ── Tokens ──────────────────────────────────────────────── */
html.dbi-xmas {
	--nv-primary-accent:   #b3121f;
	--nv-secondary-accent: #8f0e18;
	--nv-site-bg:          #f3f6fb;
	--nv-light-bg:         #e6ecf5;
	--nv-dark-bg:          #0b3d2e;
	--nv-text-color:       #14231c;
	--nv-text-dark-bg:     #f6f3ea;
	--nv-c-1:              #4f5b55;
	--nv-c-2:              #e3efe8;
	--xmas-red:   #b3121f;
	--xmas-green: #0b3d2e;
	--xmas-pine:  #0f5132;
	--xmas-gold:  #f2c14e;
	--xmas-snow:  #f3f6fb;
}
html.dbi-xmas .dbi-scope {
	--teal-mid:   rgba( 179, 18, 31, .10 );
	--border:     #d9e2ee;
	--divider:    rgba( 11, 61, 46, .08 );
	--faint:      #4f5b55;
	--faint-on-dark: #c9d6cf;
}

/* ── Surfaces ────────────────────────────────────────────── */
html.dbi-xmas body {
	background-color: #f3f6fb;
	background-image: url( "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'><g fill='none' stroke='%23c9d6ea' stroke-width='1.2' stroke-linecap='round' opacity='.55'><path d='M18 8v14M11 15h14M13 10l10 10M23 10 13 20'/><path d='M54 44v14M47 51h14M49 46l10 10M59 46 49 56'/></g></svg>" );
}
html.dbi-xmas .dbi-hero-h1,
html.dbi-xmas .dbi-hero-h1 em,
html.dbi-xmas .dbi-cta-h2,
html.dbi-xmas .dbi-cta-h2 em,
html.dbi-xmas .dbi-most-read-label,
html.dbi-xmas .dbi-search-title {
	font-family: 'Mountains of Christmas', 'Instrument Serif', Georgia, serif !important;
	font-weight: 700 !important;
	letter-spacing: .01em;
}

/* Hero: a starry night over the pines, a snow drift at the foot. */
html.dbi-xmas .dbi-hero {
	background: linear-gradient( 180deg, #06281e 0%, #0b3d2e 60%, #124a39 100% ) !important;
}
html.dbi-xmas .dbi-hero::before {
	background:
		radial-gradient( circle at 12% 28%, rgba( 255, 255, 255, .9 ) 0 1px, transparent 1.6px ),
		radial-gradient( circle at 27% 68%, rgba( 255, 255, 255, .7 ) 0 1px, transparent 1.6px ),
		radial-gradient( circle at 41% 18%, rgba( 255, 255, 255, .8 ) 0 1.2px, transparent 1.8px ),
		radial-gradient( circle at 58% 52%, rgba( 255, 255, 255, .6 ) 0 1px, transparent 1.6px ),
		radial-gradient( circle at 71% 24%, rgba( 255, 255, 255, .9 ) 0 1.3px, transparent 2px ),
		radial-gradient( circle at 84% 64%, rgba( 255, 255, 255, .7 ) 0 1px, transparent 1.6px ),
		radial-gradient( circle at 92% 14%, rgba( 255, 255, 255, .8 ) 0 1px, transparent 1.6px ),
		radial-gradient( circle at 49% 84%, rgba( 255, 255, 255, .5 ) 0 1px, transparent 1.6px ),
		radial-gradient( ellipse at 78% 30%, rgba( 242, 193, 78, .14 ) 0%, transparent 50% );
	opacity: 1;
}
html.dbi-xmas .dbi-hero::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 16px;
	pointer-events: none;
	z-index: 0;
	background: radial-gradient( circle at 14px 16px, #f3f6fb 13px, transparent 13.6px ) 0 0 / 28px 16px repeat-x;
}
html.dbi-xmas .dbi-hero-h1 em {
	color: #f2c14e;
	font-style: normal;
}
html.dbi-xmas .dbi-hero-proof a:hover {
	color: #f2c14e;
}

/* Lights under the header (script-made). */
.dbi-xmas-lights {
	position: relative;
	display: flex;
	justify-content: space-around;
	align-items: flex-start;
	height: 22px;
	margin-top: -2px;
	background: #fff;
	overflow: hidden;
}
.dbi-xmas-lights::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 3px;
	border-top: 2px solid #2b3a34;
}
.dbi-xmas-lights span {
	position: relative;
	width: 9px;
	height: 14px;
	margin-top: 4px;
	border-radius: 50% 50% 50% 50% / 38% 38% 62% 62%;
	animation: dbi-xmas-twinkle 1.6s ease-in-out infinite alternate;
}
.dbi-xmas-lights span::before {
	content: "";
	position: absolute;
	top: -3px;
	left: 2px;
	width: 5px;
	height: 4px;
	background: #4a5a53;
	border-radius: 1px;
}
.dbi-xmas-lights .is-red   { background: #e3222f; box-shadow: 0 0 6px #e3222f; }
.dbi-xmas-lights .is-gold  { background: #f2c14e; box-shadow: 0 0 6px #f2c14e; }
.dbi-xmas-lights .is-green { background: #2fae5c; box-shadow: 0 0 6px #2fae5c; }
.dbi-xmas-lights .is-blue  { background: #3b8be8; box-shadow: 0 0 6px #3b8be8; }
@keyframes dbi-xmas-twinkle {
	from { opacity: .45; filter: brightness( .8 ); }
	to   { opacity: 1;   filter: brightness( 1.25 ); }
}

/* Logo: a Santa hat on the corner. */
html.dbi-xmas .site-logo .brand {
	position: relative;
	display: inline-block;
}
html.dbi-xmas .site-logo .brand::after {
	content: "";
	position: absolute;
	top: -15px;
	left: -11px;
	width: 32px;
	height: 28px;
	pointer-events: none;
	background: url( "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 28'><path d='M6 22C8 10 16 4 26 6 20 8 16 14 14 22Z' fill='%23c8102e'/><circle cx='26' cy='6' r='3.2' fill='%23fff'/><rect x='3' y='20' width='15' height='5.5' rx='2.7' fill='%23fff'/></svg>" ) no-repeat center / contain;
	transform: rotate( -14deg );
}

/* Filter bar: a red bauble for the active pill. */
html.dbi-xmas .dbi-filter-bar {
	border-bottom: 2px solid #d9e2ee;
}
html.dbi-xmas .dbi-filter-bar a[aria-current],
html.dbi-xmas .dbi-filter-bar .current-menu-item a,
html.dbi-xmas .dbi-filter-bar li.is-current a {
	background: #b3121f !important;
	color: #fff !important;
}

/* Cards: a snow cap on every card. */
html.dbi-xmas .dbi-grid-section li.wp-block-post {
	position: relative;
	overflow: visible !important;
	border-color: #d9e2ee !important;
}
html.dbi-xmas .dbi-grid-section li.wp-block-post::before {
	content: "";
	position: absolute;
	top: -6px;
	left: 6px;
	right: 6px;
	height: 12px;
	pointer-events: none;
	z-index: 1;
	background: radial-gradient( circle at 8px 0, #fff 6.5px, transparent 7.2px ) 0 0 / 16px 12px repeat-x;
	filter: drop-shadow( 0 1px 0 #d9e2ee );
}
html.dbi-xmas .dbi-grid-section .wp-block-post-featured-image,
html.dbi-xmas .dbi-grid-section .wp-block-post-featured-image img {
	border-radius: 8px;
}
html.dbi-xmas .dbi-grid-section .wp-block-post-terms a {
	color: #0f5132;
}
html.dbi-xmas .dbi-grid-section .wp-block-post-title a:hover {
	color: #b3121f;
}

/* Portraits: a Santa hat each. */
html.dbi-xmas .wp-block-avatar {
	position: relative;
	overflow: visible;
}
/* The hat sits on the head: about 80% of the 64px portrait, its white
   brim overlapping the top of the circle (on the white card it is
   only visible over the photo), tilted to the top left. Drawn for a
   head (full-width brim, cone leaning right, pompom), unlike the
   small corner hat on the logo. */
html.dbi-xmas .wp-block-avatar::before {
	content: "";
	position: absolute;
	top: -26px;
	left: 3px;
	width: 52px;
	height: 45px;
	pointer-events: none;
	z-index: 1;
	background: url( "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 56'><path d='M7 42C9 26 20 12 42 8 50 22 55 32 57 42Z' fill='%23c8102e'/><circle cx='43' cy='8' r='6' fill='%23fff'/><rect x='2' y='38' width='60' height='13' rx='6.5' fill='%23fff'/></svg>" ) no-repeat center / contain;
	transform: rotate( -18deg );
	transform-origin: 50% 100%;
	filter: drop-shadow( 0 1px 1px rgba( 0, 0, 0, .25 ) );
}
html.dbi-xmas .wp-block-avatar img,
html.dbi-xmas .avatar {
	border: 2px solid #b3121f;
	box-shadow: 0 0 0 2px #fff;
}

/* CTA: gift-wrapped. */
html.dbi-xmas .dbi-cta-interrupt,
html.dbi-xmas .dbi-cta {
	background: #b3121f !important;
	outline: 3px double #f2c14e;
	outline-offset: -12px;
}
html.dbi-xmas .dbi-cta-interrupt::before {
	content: "";
	position: absolute;
	top: -4px;
	left: 26px;
	width: 44px;
	height: 30px;
	opacity: 1;
	background: url( "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 30'><path d='M22 15 6 5c-3-2-5 1-5 4v8c0 3 2 6 5 4l16-6Zm0 0 16-10c3-2 5 1 5 4v8c0 3-2 6-5 4L22 15Z' fill='%23f2c14e'/><path d='M22 15 14 29h5l3-8 3 8h5Z' fill='%23e0ad3a'/><circle cx='22' cy='15' r='4' fill='%23c8102e' stroke='%23f2c14e' stroke-width='2'/></svg>" ) no-repeat center / contain;
}
html.dbi-xmas .dbi-cta-label,
html.dbi-xmas .dbi-cta-h2,
html.dbi-xmas .dbi-cta-h2 em,
html.dbi-xmas .dbi-cta-body {
	color: #fff !important;
}
html.dbi-xmas .dbi-cta-h2 em {
	color: #f2c14e !important;
	font-style: normal;
}
html.dbi-xmas .dbi-btn-expert {
	background: #fff !important;
	color: #b3121f !important;
}
html.dbi-xmas .dbi-btn-expert:hover {
	background: #f2c14e !important;
	color: #14231c !important;
}

/* Most read: pine-framed, gold star. */
html.dbi-xmas .dbi-most-read {
	border: 2px solid #0f5132;
}
html.dbi-xmas .dbi-most-read-label {
	color: #0f5132;
	font-size: 1.25rem !important;
	text-transform: none;
	letter-spacing: 0;
}
html.dbi-xmas .dbi-most-read-label::after {
	content: " ★";
	color: #f2c14e;
}

/* Footer: deep green with a red ribbon on top. */
html.dbi-xmas .site-footer,
html.dbi-xmas .site-footer .footer--row-inner {
	background: #06281e !important;
	border-top: 4px solid #b3121f;
}
html.dbi-xmas .site-footer .widget-title,
html.dbi-xmas .site-footer .dbi-footer-brand,
html.dbi-xmas .site-footer .dbi-footer-blurb,
html.dbi-xmas .site-footer .widget ul a,
html.dbi-xmas .site-footer .footer-main a,
html.dbi-xmas .site-footer .footer-bottom p,
html.dbi-xmas .site-footer .footer-bottom .cr div {
	color: #e6efe9 !important;
}
html.dbi-xmas .site-footer .widget ul a:hover,
html.dbi-xmas .site-footer .footer-main a:hover {
	color: #f2c14e !important;
}

/* ── Snow (script-made, fixed layer) ─────────────────────── */
.dbi-xmas-snow {
	position: fixed;
	inset: 0;
	z-index: 2147481990;
	pointer-events: none;
	overflow: hidden;
}
.dbi-xmas-snow span {
	position: absolute;
	top: -6vh;
	color: #fff;
	line-height: 1;
	text-shadow: 0 0 3px rgba( 60, 90, 130, .45 );
	animation-name: dbi-xmas-fall, dbi-xmas-sway;
	animation-timing-function: linear, ease-in-out;
	animation-iteration-count: infinite, infinite;
	animation-direction: normal, alternate;
}
@keyframes dbi-xmas-fall {
	to { transform: translateY( 112vh ); }
}
@keyframes dbi-xmas-sway {
	from { margin-left: -14px; }
	to   { margin-left: 14px; }
}

/* ── Entrance: the curtain of snow ───────────────────────── */
.dbi-xmas-curtain {
	position: fixed;
	inset: 0;
	z-index: 2147482000;
	pointer-events: none;
	background: linear-gradient( 180deg, #fff 0%, #fff 55%, rgba( 255, 255, 255, 0 ) 100% );
	transform: translateY( -100% );
	transition: transform .95s ease-in;
}
.dbi-xmas-curtain.is-down {
	transform: translateY( 100% );
}

/* ── Toast ───────────────────────────────────────────────── */
.dbi-xmas-toast {
	position: fixed;
	left: 20px;
	bottom: 20px;
	z-index: 2147482002;
	max-width: min( 360px, calc( 100vw - 40px ) );
	padding: 16px 18px 14px;
	border-radius: 14px;
	background: #fff;
	color: #14231c;
	border: 2px solid #b3121f;
	box-shadow: 0 16px 40px rgba( 11, 61, 46, .25 );
	font: 15px/1.5 var( --f-body, 'Inter', system-ui, sans-serif );
	transform: translateY( 16px );
	opacity: 0;
	transition: transform .3s ease, opacity .3s ease;
}
.dbi-xmas-toast.is-in {
	transform: none;
	opacity: 1;
}
.dbi-xmas-toast strong {
	display: block;
	font: 700 24px/1.2 'Mountains of Christmas', Georgia, serif;
	color: #0f5132;
	margin-bottom: 4px;
}
.dbi-xmas-toast p {
	margin: 0 0 4px;
}
.dbi-xmas-toast .dbi-xmas-eggs {
	color: #b3121f;
	font-weight: 600;
}
.dbi-xmas-toast button {
	margin-top: 8px;
	padding: 8px 16px;
	border: 0;
	border-radius: 999px;
	background: #b3121f;
	color: #fff;
	font: 600 14px var( --f-body, system-ui, sans-serif );
	cursor: pointer;
}
.dbi-xmas-toast button:focus-visible {
	outline: 3px solid #0f5132;
	outline-offset: 2px;
}

@media ( prefers-reduced-motion: reduce ) {
	.dbi-xmas-button,
	.dbi-xmas-lights span,
	.dbi-xmas-snow span,
	.dbi-xmas-curtain,
	.dbi-xmas-toast {
		animation: none !important;
		transition: none !important;
	}
	.dbi-xmas-button:hover {
		transform: none;
	}
}
