/* Halloween pack. Every rule is scoped to an element class (aas-el-a … aas-el-j) set on <body>. */

body.aas-halloween {
	--aas-night: #071327;
	--aas-season: var(--aa-accent);
	--aas-season-ink: var(--aa-accent-dark);
	--aas-season-soft: var(--aa-tint);
}
/* A: pumpkin accent for seasonal pieces only */
body.aas-halloween.aas-el-a {
	--aas-season: #E8772E;
	--aas-season-ink: #A9480F;
	--aas-season-soft: #FFF1E6;
}

/* B: event bar */
.aas-bar { background: var(--aas-night); color: #F5F8FF; font-size: 13px; line-height: 1.4; }
.aas-bar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px; padding-top: 9px; padding-bottom: 9px; text-align: center; }
.aas-bar__title { color: var(--aas-season); font-weight: 600; }
body:not(.aas-el-a) .aas-bar__title { color: #9CC0FF; }
.aas-code {
	font: inherit; font-family: var(--aa-mono); font-size: 12px; color: #fff; cursor: pointer;
	background: transparent; border: 1px dashed var(--aas-season); border-radius: 5px; padding: 2px 8px; min-height: 26px;
}
body:not(.aas-el-a) .aas-code { border-color: #9CC0FF; }
.aas-code:hover { background: rgba(255, 255, 255, .08); }
.aas-code.is-copied::after { content: " ✓ copied"; color: #BFE8C8; }
.aas-count { display: inline-flex; gap: 4px; font-size: 12px; font-variant-numeric: tabular-nums; }
.aas-count span { background: rgba(255, 255, 255, .09); border-radius: 4px; padding: 1px 5px; }

/* Hero effects container (added by season.js inside the hero photo) */
.aas-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.aa-hero:not(.aa-hero--media) { position: relative; }
.aa-hero:not(.aa-hero--media) > .aas-fx { z-index: 0; }
.aa-hero:not(.aa-hero--media) .aa-hero__inner { z-index: 1; }

/* C: after-hours lighting */
.aas-el-c .aa-hero__poster, .aas-el-c .aa-hero__video { filter: brightness(.5) saturate(.75) contrast(1.08) hue-rotate(-8deg); }
.aas-night {
	position: absolute; inset: 0; mix-blend-mode: screen; animation: aas-flicker 7s infinite;
	background:
		radial-gradient(circle at 84% 12%, rgba(217, 230, 255, .95) 0 2.2%, rgba(217, 230, 255, .35) 2.6%, rgba(217, 230, 255, 0) 9%),
		radial-gradient(ellipse 30% 40% at 72% 62%, color-mix(in srgb, var(--aas-season) 45%, transparent), transparent 70%),
		linear-gradient(180deg, rgba(7, 19, 39, .35), rgba(7, 19, 39, 0) 45%, rgba(7, 19, 39, .45));
}
@keyframes aas-flicker { 0%, 46%, 48%, 51%, 100% { filter: none; } 47% { filter: brightness(.8); } 50% { filter: brightness(.9); } }

/* D: fog */
.aas-fog { position: absolute; left: 0; right: 0; bottom: 0; height: 70%; overflow: hidden; }
.aas-fog i {
	position: absolute; bottom: -20%; left: -50%; width: 200%; height: 100%; filter: blur(6px);
	background:
		radial-gradient(ellipse 18% 55% at 20% 80%, rgba(225, 234, 250, .5), transparent 70%),
		radial-gradient(ellipse 22% 50% at 55% 85%, rgba(225, 234, 250, .42), transparent 70%),
		radial-gradient(ellipse 16% 45% at 85% 80%, rgba(225, 234, 250, .48), transparent 70%);
	animation: aas-drift 26s linear infinite;
}
.aas-fog i + i { animation-duration: 38s; animation-direction: reverse; opacity: .7; bottom: -32%; }
@keyframes aas-drift { from { transform: translateX(0); } to { transform: translateX(25%); } }

/* E: bats */
.aas-bat { position: absolute; left: -48px; width: 34px; color: #04070E; opacity: 0; }
.aas-bat svg { display: block; width: 100%; height: auto; animation: aas-flap .22s ease-in-out infinite alternate; transform-origin: 50% 40%; }
.aas-bat:nth-child(1) { top: 58%; }
.aas-bat:nth-child(2) { top: 38%; width: 24px; }
.aas-bat:nth-child(3) { top: 66%; width: 19px; }
.aas-bats.play .aas-bat { animation: aas-fly 3.6s cubic-bezier(.4, .1, .5, 1) forwards; }
.aas-bats.play .aas-bat:nth-child(2) { animation-delay: .35s; }
.aas-bats.play .aas-bat:nth-child(3) { animation-delay: .8s; }
@keyframes aas-flap { from { transform: scaleY(1); } to { transform: scaleY(.35); } }
@keyframes aas-fly {
	0% { opacity: 1; transform: translate(0, 0); }
	35% { transform: translate(35vw, -40px); }
	70% { transform: translate(70vw, -10px); }
	100% { opacity: 1; transform: translate(calc(100vw + 100px), -90px); }
}
/* bat hanging from the logo */
.aas-el-e .aa-header__brand > a { position: relative; }
.aas-el-e .aa-header__brand > a::before {
	content: ""; position: absolute; left: 10px; top: -10px; width: 18px; height: 11px; pointer-events: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 14'%3E%3Cpath fill='%230B1F3A' d='M12 0v2c-2 0-3.4 1-3.8 3C6 5 4 6.6 3 9.4c1.6-.8 3-.8 4 0 .6-1 1.8-1.4 2.8-1 .2 2 1 4 2.2 5.6 1.2-1.6 2-3.6 2.2-5.6 1-.4 2.2 0 2.8 1 1-.8 2.4-.8 4 0C20 6.6 18 5 15.8 5c-.4-2-1.8-3-3.8-3z'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* F: cobwebs */
.aas-web { position: absolute; top: 0; left: 0; width: 110px; height: 110px; color: rgba(235, 242, 255, .5); pointer-events: none; }
.aa-coa-lookup { position: relative; overflow: hidden; }
.aa-coa-lookup > .aas-web { left: auto; right: 0; transform: scaleX(-1); width: 90px; height: 90px; color: rgba(195, 209, 230, .35); }
@media (min-width: 768px) {
	.aas-web { width: 150px; height: 150px; }
	.aa-coa-lookup > .aas-web { width: 120px; height: 120px; }
}

/* I: seasonal hero tag */
.aas-el-i .aa-hero--intro .aa-pill { border-color: var(--aas-season); color: #FFE2CC; background: color-mix(in srgb, var(--aas-season) 14%, transparent); }
body.aas-el-i:not(.aas-el-a) .aa-hero--intro .aa-pill { color: #BFD5FF; }

/* G: lab pick badge + cap glow */
.aas-pick {
	position: absolute; top: 8px; left: 8px; z-index: 2; display: inline-flex; align-items: center; gap: 5px;
	background: var(--aas-season-soft); color: var(--aas-season-ink); font-size: 11.5px; font-weight: 600; line-height: 1.3;
	border: 1px solid color-mix(in srgb, var(--aas-season) 40%, transparent); border-radius: 99px; padding: 3px 8px 3px 6px;
}
.aa-badge ~ .aas-pick { top: 36px; }
.aas-glow {
	position: absolute; top: 0; left: 0; right: 0; aspect-ratio: 1; pointer-events: none; mix-blend-mode: multiply;
	background: radial-gradient(ellipse 24% 10% at 50% 19%, color-mix(in srgb, var(--aas-season) 50%, transparent), transparent 100%);
}

/* H: spider */
.aas-spider { position: absolute; right: 24%; top: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; pointer-events: none; color: var(--aa-ink); }
.aas-spider::before { content: ""; width: 1px; height: 0; background: rgba(11, 31, 58, .45); transition: height .7s cubic-bezier(.3, 1.4, .5, 1); }
.aas-spider svg { opacity: 0; transition: opacity .2s ease; }
li.product:hover .aas-spider::before, ul.products li.product:first-child .aas-spider::before { height: 52px; }
li.product:hover .aas-spider svg, ul.products li.product:first-child .aas-spider svg { opacity: 1; }
ul.products li.product:first-child .aas-spider svg { animation: aas-bob 3s ease-in-out infinite; }
@keyframes aas-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* J: glassware bench + night footer (not on cart, checkout or account) */
.aas-glass { margin-top: 48px; background: var(--aas-night); line-height: 0; }
.aas-glass svg { display: block; width: 100%; height: 110px; }
.aas-glass .liq { fill: var(--aas-season); }
.aas-glass .bub { fill: color-mix(in srgb, var(--aas-season) 60%, #fff); animation: aas-rise 2.6s ease-in infinite; }
.aas-glass .bub:nth-of-type(2n) { animation-delay: .9s; animation-duration: 3.1s; }
.aas-glass .bub:nth-of-type(3n) { animation-delay: 1.6s; }
@keyframes aas-rise { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-34px); opacity: 0; } }
.aas-glass + .aa-footer { margin-top: 0; border-top: 0; }
body.aas-el-j:not(.aas-quiet) .aa-footer { background: var(--aas-night); }
body.aas-el-j:not(.aas-quiet) .aa-footer a { color: #E3ECFA; }
body.aas-el-j:not(.aas-quiet) .aa-footer__disclaimer,
body.aas-el-j:not(.aas-quiet) .aa-footer__copy { color: #9FB4D3; }
@media (min-width: 768px) { .aas-glass svg { height: 140px; } }

@media (prefers-reduced-motion: reduce) {
	.aas-night, .aas-fog i, .aas-bat svg, .aas-glass .bub, .aas-spider svg { animation: none !important; }
	.aas-bats { display: none; }
	.aas-spider::before { transition: none; }
}
