/* AP Saleroom — homepage sections. */

/* 1. Fixed hero + curtain sheet (StickyStage) */
.ap-hero {
	position: fixed;
	inset: 0;
	height: 100dvh;
	z-index: 0;
	display: flex;
	align-items: center;
	overflow: hidden;
}
.ap-sheet {
	position: relative;
	z-index: 1;
	margin-top: 100dvh;
	background: var(--ap-navy-990);
	box-shadow: 0 -30px 80px rgb(0 0 0 / .55);
}
.ap-front .ap-footer { position: relative; z-index: 1; }

.ap-hero__bg { position: absolute; inset: 0; }
.ap-hero__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 1.8s var(--ap-ease-out);
	will-change: transform, opacity;
}
.ap-hero__img.is-kb-active { opacity: 1; }
.ap-hero__scrim {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(100deg, rgb(10 20 40 / .92) 25%, rgb(10 20 40 / .55) 60%, rgb(10 20 40 / .35) 100%),
		radial-gradient(1400px 700px at 85% 15%, rgb(1 33 105 / .35), transparent 65%);
}
.ap-hero__bg:has(+ .ap-hero__content) { background: var(--ap-navy-900); }

.ap-hero__content { position: relative; z-index: 1; width: 100%; padding-top: 4rem; }
.ap-hero__title { margin: 0 0 1.25rem; max-width: 14em; }
.ap-hero__title em { font-style: normal; color: var(--ap-red-bright); }
.ap-hero__lead { max-width: 34em; }
.ap-hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin: 2rem 0 1.5rem; }
.ap-hero__pill { margin: 0; }

.ap-hero__hint {
	position: absolute;
	bottom: 2rem;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .5rem;
	color: var(--ap-mist);
	font-size: .75rem;
	letter-spacing: .3em;
	text-transform: uppercase;
}
.ap-hero__hint-line {
	width: 1px;
	height: 44px;
	background: linear-gradient(var(--ap-cream), transparent);
	animation: ap-hint 1.8s var(--ap-ease-out) infinite;
	transform-origin: top;
}
@media (max-width: 640px), (max-height: 700px) {
	.ap-hero__hint { display: none; }
	.ap-hero__content { padding-top: 5.5rem; }
	.ap-hero__actions { margin: 1.5rem 0 1rem; }
	.ap-hero__actions .ap-btn { padding: .75rem 1.4rem; font-size: .875rem; }
}
@keyframes ap-hint { 0% { transform: scaleY(0); } 45% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* 3. Pinned set piece */
.ap-setpiece { background: var(--ap-navy-900); border-block: 1px solid var(--ap-navy-700); }
.ap-setpiece__stage {
	max-width: 1240px;
	margin-inline: auto;
	padding: var(--ap-section) var(--ap-gutter);
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: clamp(2rem, 5vw, 5rem);
	align-items: start;
}
.ap-setpiece__media {
	position: sticky;
	top: 0;
	height: 100dvh;
	display: grid;
	align-content: center;
	margin: 0;
}
.ap-setpiece__media img {
	grid-area: 1 / 1;
	width: 100%;
	max-height: 74vh;
	object-fit: contain;
	border-radius: var(--ap-radius);
	background: var(--ap-paper);
	opacity: 0;
	transition: opacity .5s var(--ap-ease-out);
}
.ap-setpiece__media img.is-active { opacity: 1; }
.ap-setpiece__caption { grid-area: 2 / 1; font-size: .8125rem; color: var(--ap-mist); padding-top: .75rem; }
.ap-setpiece__steps { display: flex; flex-direction: column; }
.ap-setpiece__step {
	min-height: 88dvh;
	display: flex;
	flex-direction: column;
	justify-content: center;
}
.ap-setpiece__title { font-family: var(--ap-display); font-weight: 400; font-size: clamp(1.75rem, 3.2vw, 2.75rem); }
.ap-setpiece__copy { color: var(--ap-mist); max-width: 30em; font-size: 1.125rem; }

@media (max-width: 900px) {
	.ap-setpiece__stage { grid-template-columns: 1fr; }
	.ap-setpiece__media { position: relative; height: auto; }
	.ap-setpiece__media img { position: static; opacity: 1; max-height: 52vh; display: none; }
	.ap-setpiece__media img.is-active, .ap-setpiece__media img:first-of-type { display: block; }
	.ap-setpiece__step { min-height: 0; padding-block: 2.5rem; }
}

/* 4. Departments */
.ap-depts__title { max-width: 12em; margin-bottom: 2.5rem; }
.ap-depts__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 1.25rem;
}
.ap-dept {
	position: relative;
	display: block;
	border-radius: var(--ap-radius);
	overflow: hidden;
	text-decoration: none;
	border: 1px solid var(--ap-navy-700);
	background: var(--ap-navy-800);
}
.ap-dept__media { display: block; aspect-ratio: 4 / 5; overflow: hidden; }
.ap-dept__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ap-ease-out), filter .7s var(--ap-ease-out); }
.ap-dept:hover .ap-dept__media img { transform: scale(1.07); filter: brightness(1.08); }
.ap-dept__name {
	position: absolute;
	left: 1.1rem;
	bottom: 1rem;
	right: 3rem;
	font-family: var(--ap-heading);
	font-size: 1.375rem;
	font-weight: 600;
	color: var(--ap-paper);
	text-shadow: 0 2px 18px rgb(0 0 0 / .8);
}
.ap-dept__arrow {
	position: absolute;
	right: 1rem;
	bottom: 1rem;
	width: 2.2rem;
	height: 2.2rem;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--ap-union-red);
	color: var(--ap-paper);
	font-size: 1.1rem;
	transition: transform .35s var(--ap-ease-out);
}
.ap-dept:hover .ap-dept__arrow { transform: translateX(4px); }
.ap-dept::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 55%, rgb(10 20 40 / .82) 100%);
	pointer-events: none;
}
.ap-dept__name, .ap-dept__arrow { z-index: 1; }

/* 5. Consign */
.ap-consign { background: var(--ap-navy-900); border-block: 1px solid var(--ap-navy-700); }
.ap-consign__stage {
	max-width: 1240px;
	margin-inline: auto;
	padding: var(--ap-section) var(--ap-gutter) 0;
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	gap: clamp(2rem, 5vw, 5rem);
	align-items: start;
}
.ap-consign__intro { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; justify-content: center; }
.ap-consign__heading { font-size: clamp(2rem, 3.6vw, 3.25rem); max-width: 11em; }
.ap-consign__count { font-family: var(--ap-display); font-size: clamp(3rem, 7vw, 5.5rem); color: var(--ap-union-red); line-height: 1; margin: 1.5rem 0 0; }
.ap-consign__count-total { color: var(--ap-navy-700); font-size: .5em; }
.ap-consign__steps { display: flex; flex-direction: column; padding-bottom: 10vh; }
.ap-consign__step { min-height: 66dvh; display: flex; flex-direction: column; justify-content: center; max-width: 30em; }
.ap-consign__num { font-family: var(--ap-display); color: var(--ap-brass); font-size: 1.25rem; margin-bottom: .5rem; }
.ap-consign__step h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.ap-consign__step p { color: var(--ap-mist); font-size: 1.125rem; }
.ap-consign__cta { padding: 2rem 0 4rem; }

@media (max-width: 900px) {
	.ap-consign__stage { grid-template-columns: 1fr; }
	.ap-consign__intro { position: relative; height: auto; padding-top: 0; }
	.ap-consign__count { display: none; }
	.ap-consign__step { min-height: 0; padding-block: 1.75rem; }
}

.ap-consign__stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 2rem;
	padding-block: var(--ap-section);
	border-top: 1px solid var(--ap-navy-700);
	margin-top: 2rem;
}

/* 6. Results shelf */
.ap-results__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem 2rem; margin-bottom: 2.5rem; }
.ap-results__paddles { display: flex; gap: .5rem; }
.ap-paddle {
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	border: 2px solid var(--ap-navy-700);
	background: transparent;
	color: var(--ap-cream);
	font-size: 1.2rem;
	cursor: pointer;
	transition: background .25s var(--ap-ease-out), border-color .25s var(--ap-ease-out);
}
.ap-paddle:hover { background: var(--ap-union-red); border-color: var(--ap-union-red); color: var(--ap-paper); }
.ap-results__shelf {
	display: flex;
	gap: 1.25rem;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	padding: 0 max(var(--ap-gutter), calc((100vw - 1240px) / 2 + var(--ap-gutter))) 1.5rem;
	scrollbar-width: thin;
	scrollbar-color: var(--ap-navy-700) transparent;
}
.ap-results__card { flex: 0 0 min(300px, 78vw); scroll-snap-align: start; }
.ap-results .ap-wrap > p { margin-top: 1.5rem; }

/* 7. Venue */
.ap-venue__grid {
	display: grid;
	grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
	gap: clamp(2rem, 5vw, 5rem);
	align-items: center;
}
.ap-venue__media { position: relative; min-height: 480px; }
.ap-venue__layer { position: absolute; border-radius: var(--ap-radius); overflow: hidden; box-shadow: 0 24px 60px rgb(0 0 0 / .5); }
.ap-venue__layer img { width: 100%; height: 100%; object-fit: cover; }
.ap-venue__layer--back { inset: 0 18% 18% 0; }
.ap-venue__layer--front { inset: 38% 0 0 32%; border: 4px solid var(--ap-navy-990); }
.ap-venue__facts { list-style: none; padding: 0; margin: 0 0 1.6em; }
.ap-venue__facts li { padding: .6em 0 .6em 1.6em; position: relative; color: var(--ap-mist); border-bottom: 1px solid var(--ap-navy-700); }
.ap-venue__facts li::before { content: "\2726"; position: absolute; left: 0; color: var(--ap-union-red); }
@media (max-width: 900px) {
	.ap-venue__grid { grid-template-columns: 1fr; }
	.ap-venue__media { min-height: 340px; }
}

/* 8. Marquees */
.ap-marquees { padding-block: 2rem; }
.ap-marquees .ap-marquee + .ap-marquee { border-top: 0; }

/* 9. CTA */
.ap-cta__grid {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	gap: clamp(2rem, 5vw, 5rem);
	align-items: center;
}
.ap-cta__card {
	background: var(--ap-navy-800);
	border: 1px solid var(--ap-navy-700);
	border-radius: var(--ap-radius);
	padding: 2rem;
}
.ap-cta__contacts { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.ap-cta__contacts li { padding: 1rem 0; border-bottom: 1px solid var(--ap-navy-700); display: grid; gap: .15rem; }
.ap-cta__who { font-family: var(--ap-heading); font-weight: 600; font-size: 1.125rem; }
.ap-cta__contacts a { color: var(--ap-mist); text-decoration: none; }
.ap-cta__contacts a:hover { color: var(--ap-red-bright); }
.ap-cta__hours { font-size: .875rem; color: var(--ap-mist); }
@media (max-width: 900px) { .ap-cta__grid { grid-template-columns: 1fr; } }

/* Progressive enhancement: simple parallax drift on venue layers where
   CSS scroll-driven animations are supported and motion allowed (JS also
   drives this; the CSS layer is harmless double-cover for no-JS). */
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.ap-venue__layer--back { animation: ap-drift-up linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
		@keyframes ap-drift-up { from { transform: translateY(3%); } to { transform: translateY(-3%); } }
	}
}
