/**
 * Cooldelo Design Vault — scoped section styles.
 * Brand tokens mirror the landing page: charcoal surfaces + amber accent.
 */

.cd-vault {
	--v-bg: #0b0b0e;
	--v-surface: #101015;
	--v-surface-2: #141319;
	--v-line: #24242c;
	--v-text: #fafafa;
	--v-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--v-muted: #9ca3af;
	--v-accent: #f5a524;
	--v-accent-light: #f7c46a;
	--v-radius: 20px;
	position: relative;
	isolation: isolate;
	color: var(--v-text);
	font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

.cd-vault *,
.cd-vault *::before,
.cd-vault *::after {
	box-sizing: border-box;
}

.cd-vault__aura {
	position: absolute;
	inset: -80px 0 auto;
	height: 420px;
	z-index: -1;
	pointer-events: none;
	background:
		radial-gradient(48% 62% at 20% 0%, rgba(245, 165, 36, 0.15) 0%, rgba(245, 165, 36, 0) 70%),
		radial-gradient(40% 56% at 84% 6%, rgba(124, 92, 255, 0.11) 0%, rgba(124, 92, 255, 0) 72%);
	filter: blur(6px);
}

/* ---------- Header ---------- */

.cd-vault__head {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	max-width: 720px;
	margin: 0 auto;
	text-align: center;
}

.cd-vault__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--v-accent);
}

.cd-vault__eyebrow span {
	width: 30px;
	height: 1px;
	background: linear-gradient(90deg, rgba(245, 165, 36, 0), var(--v-accent));
}

.cd-vault__title {
	margin: 0;
	font-size: clamp(34px, 5vw, 58px);
	font-weight: 800;
	line-height: 1.03;
	letter-spacing: -0.035em;
	color: var(--v-text);
}

.cd-vault__title-accent {
	display: block;
	background: linear-gradient(100deg, #f7c46a 0%, #f5a524 48%, #cf8612 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.cd-vault__lead {
	margin: 0;
	max-width: 60ch;
	font-size: clamp(16px, 1.3vw, 18px);
	line-height: 1.7;
	color: var(--v-muted);
}

.cd-vault__tag {
	margin: 2px 0 0;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--v-muted);
}

.cd-vault__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
}

/* ---------- Buttons ---------- */

.cd-vault .cd-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 48px;
	padding: 0 26px;
	border-radius: 12px;
	border: 1px solid transparent;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.cd-vault .cd-btn--primary {
	background-color: #f5a524;
	background-image: linear-gradient(180deg, #f8b23c 0%, #f5a524 100%);
	color: #0a0a0b;
	box-shadow: 0 12px 30px -12px rgba(245, 165, 36, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.cd-vault .cd-btn--ghost {
	background: rgba(255, 255, 255, 0.03);
	border-color: var(--v-line);
	color: var(--v-text);
}

.cd-vault .cd-btn:focus-visible {
	outline: 2px solid var(--v-accent-light);
	outline-offset: 3px;
}

/* ---------- Filter bar ---------- */

.cd-vault__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	margin-top: 44px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--v-line);
}

.cd-vault__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.cd-chip {
	appearance: none;
	height: 38px;
	padding: 0 16px;
	border-radius: 999px;
	border: 1px solid var(--v-line);
	background: rgba(255, 255, 255, 0.02);
	color: #b6bac4;
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	transition: color 0.22s ease, background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.cd-chip:focus-visible {
	outline: 2px solid var(--v-accent-light);
	outline-offset: 2px;
}

.cd-chip.is-active {
	background-color: #f5a524;
	background-image: linear-gradient(180deg, #f8b23c 0%, #f5a524 100%);
	border-color: transparent;
	color: #0a0a0b;
	font-weight: 600;
	box-shadow: 0 8px 22px -10px rgba(245, 165, 36, 0.8);
}

.cd-vault__count {
	margin: 0;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--v-muted);
	font-variant-numeric: tabular-nums;
}

.cd-vault__count-num {
	color: var(--v-text);
	font-weight: 700;
}

.cd-vault__disclaimer {
	margin: 12px 0 0;
	font-size: 11.5px;
	line-height: 1.5;
	color: var(--v-muted);
}

.cd-vault__credits {
	margin: 22px 0 0;
	font-size: 11.5px;
	line-height: 1.55;
	color: var(--v-muted);
	text-align: center;
}

.cd-vault__credits a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-thickness: 1px;
}

.cd-vault__credits a:hover {
	color: var(--v-text);
}

/* ---------- Featured ---------- */

.cd-feature {
	position: relative;
	margin: 26px 0 0;
	border-radius: 24px;
	border: 1px solid var(--v-line);
	background: var(--v-surface);
	overflow: hidden;
	box-shadow: 0 50px 90px -50px rgba(0, 0, 0, 0.95);
}

.cd-feature[hidden] {
	display: none;
}

.cd-feature__media {
	position: relative;
	margin: 0;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #0d0d11;
}

.cd-feature .cd-vault__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1.01);
	transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.6s ease;
}

.cd-feature__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(8, 8, 10, 0) 28%, rgba(8, 8, 10, 0.45) 62%, rgba(8, 8, 10, 0.93) 100%);
	pointer-events: none;
}

.cd-feature__badge {
	position: absolute;
	top: 20px;
	left: 20px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 14px;
	border-radius: 999px;
	border: 1px solid rgba(247, 196, 106, 0.35);
	background: rgba(10, 10, 12, 0.55);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--v-accent-light);
}

.cd-feature__badge span {
	font-size: 8px;
}

.cd-feature__info {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	padding: clamp(20px, 3.4vw, 40px);
	pointer-events: none;
}

.cd-feature__cat {
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--v-accent);
}

.cd-feature__name {
	margin: 0;
	font-size: clamp(22px, 3.2vw, 38px);
	font-weight: 800;
	font-style: normal;
	line-height: 1.1;
	letter-spacing: -0.025em;
	color: var(--v-text);
}

.cd-feature__craft {
	font-size: 13.5px;
	color: rgba(250, 250, 250, 0.72);
}

.cd-feature__link {
	position: absolute;
	inset: 0;
	z-index: 3;
	border-radius: 24px;
}

.cd-feature__link:focus-visible {
	outline: 2px solid var(--v-accent-light);
	outline-offset: -6px;
}

/* ---------- Grid ---------- */

.cd-vault__grid {
	margin-top: 18px;
	columns: 3;
	column-gap: 18px;
}

/* Small result sets become an intentional spotlight instead of a lonely column. */
@media (min-width: 621px) {
	.cd-vault__grid[data-count="1"] {
		columns: 1;
		max-width: 480px;
		margin-inline: auto;
	}

	.cd-vault__grid[data-count="2"] {
		columns: 2;
		max-width: 900px;
		margin-inline: auto;
	}
}

.cd-vcard {
	position: relative;
	break-inside: avoid;
	margin: 0 0 18px;
	border-radius: 18px;
	border: 1px solid var(--v-line);
	background: var(--v-surface);
	overflow: hidden;
	transition: border-color 0.35s ease, box-shadow 0.45s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cd-vcard[hidden] {
	display: none;
}

.cd-vcard__media {
	position: relative;
	margin: 0;
	aspect-ratio: var(--ar, 4 / 5);
	overflow: hidden;
	background: #0d0d11;
}

.cd-vcard .cd-vault__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1.005);
	transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.5s ease;
}

.cd-vcard__glow {
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0;
	background: radial-gradient(80% 55% at 50% 0%, rgba(245, 165, 36, 0.18) 0%, rgba(245, 165, 36, 0) 70%);
	transition: opacity 0.4s ease;
}

.cd-vcard__zoom {
	position: absolute;
	right: 14px;
	bottom: 14px;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.18);
	background: rgba(10, 10, 12, 0.6);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: var(--v-text);
	font-size: 17px;
	line-height: 1;
	opacity: 0;
	transform: translateY(6px) scale(0.9);
	transition: opacity 0.35s ease, transform 0.35s ease;
	pointer-events: none;
}

.cd-vcard__body {
	padding: 16px 18px 18px;
}

.cd-vcard__cat {
	display: block;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--v-accent);
}

.cd-vcard__title {
	margin: 6px 0 4px;
	font-size: 16.5px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: -0.01em;
	color: var(--v-text);
	transition: color 0.25s ease;
}

.cd-vcard__craft {
	margin: 0;
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--v-muted);
}

.cd-vcard__link {
	position: absolute;
	inset: 0;
	z-index: 4;
	border-radius: 18px;
}

.cd-vcard__link:focus-visible {
	outline: 2px solid var(--v-accent-light);
	outline-offset: -4px;
}

.cd-vcard:focus-within {
	border-color: rgba(245, 165, 36, 0.55);
}

/* ---------- Placeholder (asset not produced yet) ---------- */

.cd-vault__ph {
	position: relative;
	width: 100%;
	height: 100%;
	min-height: 100%;
	display: grid;
	place-items: center;
	background:
		radial-gradient(120% 120% at 22% 0%, #1b1a22 0%, #101016 52%, #0b0b0e 100%);
}

.cd-vault__ph::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
	background-size: 38px 38px;
	-webkit-mask-image: radial-gradient(60% 60% at 50% 42%, #000 0%, transparent 100%);
	mask-image: radial-gradient(60% 60% at 50% 42%, #000 0%, transparent 100%);
}

.cd-vault__ph-mark {
	position: relative;
	width: 54px;
	height: 54px;
	border: 1px solid rgba(245, 165, 36, 0.32);
	border-radius: 50%;
}

.cd-vault__ph-mark::before,
.cd-vault__ph-mark::after {
	content: "";
	position: absolute;
	background: rgba(245, 165, 36, 0.32);
}

.cd-vault__ph-mark::before {
	left: 50%;
	top: -9px;
	bottom: -9px;
	width: 1px;
}

.cd-vault__ph-mark::after {
	top: 50%;
	left: -9px;
	right: -9px;
	height: 1px;
}

.cd-feature .cd-vault__ph {
	position: absolute;
	inset: 0;
	min-height: 0;
}

/* ---------- Empty state ---------- */

.cd-vault__empty {
	margin: 24px 0 0;
	padding: 32px;
	border-radius: 16px;
	border: 1px dashed var(--v-line);
	text-align: center;
	font-size: 14px;
	color: var(--v-muted);
}

.cd-vault__empty[hidden] {
	display: none;
}

/* ---------- CTA ---------- */

.cd-vault__cta {
	position: relative;
	margin-top: 56px;
	padding: clamp(36px, 5vw, 64px) clamp(24px, 4vw, 56px);
	border-radius: 26px;
	border: 1px solid rgba(245, 165, 36, 0.22);
	background:
		radial-gradient(120% 150% at 50% 0%, rgba(245, 165, 36, 0.15) 0%, rgba(20, 19, 25, 0.92) 46%, #0b0b0e 100%);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	text-align: center;
}

.cd-vault__cta-glow {
	position: absolute;
	top: -120px;
	left: 50%;
	width: 520px;
	height: 240px;
	transform: translateX(-50%);
	background: radial-gradient(closest-side, rgba(245, 165, 36, 0.35), rgba(245, 165, 36, 0));
	filter: blur(30px);
	pointer-events: none;
}

.cd-vault__cta-title {
	position: relative;
	margin: 0;
	font-size: clamp(28px, 4vw, 44px);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -0.03em;
	color: var(--v-text);
}

.cd-vault__cta-title span {
	display: block;
	background: linear-gradient(100deg, #f7c46a 0%, #f5a524 50%, #cf8612 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.cd-vault__cta-text {
	position: relative;
	margin: 0;
	max-width: 58ch;
	font-size: 16px;
	line-height: 1.7;
	color: var(--v-muted);
}

.cd-vault__cta .cd-vault__actions {
	position: relative;
	margin-top: 6px;
}

/* ---------- Hover (pointer devices only) ---------- */

@media (hover: hover) and (pointer: fine) {
	.cd-vault .cd-btn--primary:hover {
		transform: translateY(-1px);
		box-shadow: 0 18px 40px -14px rgba(245, 165, 36, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.4);
	}

	.cd-vault .cd-btn--ghost:hover {
		background: rgba(255, 255, 255, 0.06);
		border-color: #3a3a46;
	}

	.cd-chip:hover {
		color: var(--v-text);
		border-color: #3a3a46;
		background: rgba(255, 255, 255, 0.05);
	}

	.cd-chip.is-active:hover {
		color: #0a0a0b;
		border-color: transparent;
	}

	.cd-vault.is-in .cd-vcard:hover {
		transform: translateY(-3px);
		border-color: rgba(245, 165, 36, 0.4);
		box-shadow: 0 28px 50px -28px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(245, 165, 36, 0.08);
	}

	.cd-vcard:hover .cd-vault__img {
		transform: scale(1.06);
	}

	.cd-vcard:hover .cd-vcard__glow,
	.cd-vcard:focus-within .cd-vcard__glow {
		opacity: 1;
	}

	.cd-vcard:hover .cd-vcard__zoom,
	.cd-vcard:focus-within .cd-vcard__zoom {
		opacity: 1;
		transform: translateY(0) scale(1);
	}

	.cd-vcard:hover .cd-vcard__title {
		color: var(--v-accent-light);
	}

	.cd-feature:hover .cd-vault__img {
		transform: scale(1.045);
	}
}

/* ---------- Entrance ---------- */

.cd-vault--js .cd-vcard,
.cd-vault--js .cd-feature {
	opacity: 0;
	transform: translateY(16px);
}

.cd-vault--js.is-in .cd-vcard,
.cd-vault--js.is-in .cd-feature {
	opacity: 1;
	transform: translateY(0);
	transition:
		opacity 0.7s ease calc(var(--i, 0) * 35ms),
		transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) calc(var(--i, 0) * 35ms),
		border-color 0.35s ease,
		box-shadow 0.45s ease;
}

.cd-vault--js.is-in .cd-feature {
	transition-delay: 0ms;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
	.cd-vault__grid {
		columns: 2;
	}
}

@media (max-width: 840px) {
	.cd-vault__bar {
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
	}

	.cd-vault__filters {
		flex-wrap: nowrap;
		width: 100%;
		overflow-x: auto;
		scroll-snap-type: x proximity;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding-bottom: 4px;
	}

	.cd-vault__filters::-webkit-scrollbar {
		display: none;
	}

	.cd-chip {
		flex: 0 0 auto;
		scroll-snap-align: start;
	}

	.cd-feature__media {
		aspect-ratio: 4 / 3;
	}
}

@media (max-width: 620px) {
	.cd-vault__grid {
		columns: 1;
	}

	.cd-vault__head {
		gap: 16px;
	}

	.cd-vault .cd-btn {
		height: 46px;
		padding: 0 20px;
		font-size: 14px;
	}

	.cd-vault__actions {
		width: 100%;
	}

	.cd-vault__actions .cd-btn {
		flex: 1 1 auto;
	}

	.cd-vault__cta {
		margin-top: 40px;
	}

	.cd-vault__bar {
		margin-top: 32px;
	}
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
	.cd-vault,
	.cd-vault *,
	.cd-vault *::before,
	.cd-vault *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}

	.cd-vault--js .cd-vcard,
	.cd-vault--js .cd-feature,
	.cd-vault--js.is-in .cd-vcard,
	.cd-vault--js.is-in .cd-feature {
		opacity: 1;
		transform: none;
	}
}
