/*--------------------------------------------------------------
# Inner Circle — Session Archive Preview (Vault)
# "Peek inside the vault" — 4×2 locked session tiles.
--------------------------------------------------------------*/

/* ── Section ── */
.ic-vault {
	background: var(--tpp-white);
	padding: 100px 0;
	overflow: hidden;
}

/* ── Container ── */
.ic-vault__container {
	width: 100%;
	max-width: var(--tpp-container-max);
	margin: 0 auto;
	padding: 0 var(--tpp-container-padding);
}


/* ──────────────────────────────────────────────
   Header row — title + badge
   ────────────────────────────────────────────── */

.ic-vault__header {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	margin-bottom: 48px;

	/* Scroll-reveal */
	opacity: 0;
	transform: translateY(24px);
	transition:
		opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
		transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.ic-vault__header.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.ic-vault__heading {
	font-family: var(--tpp-font-heading);
	font-size: clamp(1.75rem, 4vw + 0.5rem, 2.75rem);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.03em;
	color: var(--tpp-black);
	margin: 0 0 12px;
}

.ic-vault__sub {
	font-family: var(--tpp-font-body);
	font-size: 0.875rem;
	font-weight: 400;
	line-height: 1.5;
	color: var(--tpp-text-light);
	margin: 0 0 20px;
}

.ic-vault__badge {
	display: inline-flex;
	align-items: center;
	padding: 8px 18px;
	font-family: var(--tpp-font-body);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--tpp-white);
	background: var(--tpp-black);
	border-radius: 100px;
}


/* ──────────────────────────────────────────────
   Session tile grid — 4 columns
   ────────────────────────────────────────────── */

.ic-vault__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;

	/* Scroll-reveal */
	opacity: 0;
	transform: translateY(24px);
	transition:
		opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s,
		transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}

.ic-vault__grid.is-visible {
	opacity: 1;
	transform: translateY(0);
}


/* ──────────────────────────────────────────────
   Individual tile
   ────────────────────────────────────────────── */

.ic-vault__tile {
	background: var(--tpp-black);
	border-radius: 12px;
	padding: 20px 18px;
	min-height: 220px;
	display: flex;
	flex-direction: column;
	/* Icon, title, and hint sit as one group along the bottom edge, so the
	   thumbnail behind them reads clearly in the space above. */
	justify-content: flex-end;
	transition:
		transform 0.3s ease,
		box-shadow 0.3s ease;
}

.ic-vault__tile:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}


/* ── Lock icon ── */
.ic-vault__tile-lock {
	margin-bottom: 12px;
	color: rgba(255, 255, 255, 0.4);
}


/* ── Session title ── */
.ic-vault__tile-title {
	font-family: var(--tpp-font-body);
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.85);
	margin: 0;
}


/* ── "+N more" accent tile ── */
.ic-vault__tile--more {
	background: #0a0f2e;
	align-items: center;
	justify-content: center;
	text-align: center;
	text-decoration: none;
}

.ic-vault__tile-count {
	font-family: var(--tpp-font-heading);
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--tpp-white);
	line-height: 1.2;
}

.ic-vault__tile-label {
	font-family: var(--tpp-font-body);
	font-size: 0.8125rem;
	font-weight: 400;
	color: rgba(255, 255, 255, 0.55);
	margin-top: 2px;
}


/* ──────────────────────────────────────────────
   Unlock CTA line
   ────────────────────────────────────────────── */

/* Wrapper keeps the .ic-vault__unlock class — js/inner-circle-vault.js
   observes it by that name for the scroll-reveal. */
.ic-vault__unlock {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	margin: 36px 0 0;

	/* Scroll-reveal */
	opacity: 0;
	transform: translateY(16px);
	transition:
		opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.3s,
		transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.3s;
}

.ic-vault__unlock.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.ic-vault__unlock-text {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: var(--tpp-font-body);
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.5;
	color: var(--tpp-text-light);
	text-align: center;
	margin: 0;
}

.ic-vault__unlock-icon {
	flex-shrink: 0;
	color: var(--tpp-black);
}

/* Matches .ic-countdown__cta — the primary CTA treatment on white sections. */
.ic-vault__unlock-btn {
	padding: 14px 30px;
	font-size: 0.9375rem;
	border-radius: var(--tpp-radius-pill);
	background: var(--tpp-black);
	color: var(--tpp-white);
	border: 1.5px solid var(--tpp-black);
}

.ic-vault__unlock-btn:hover {
	color: var(--tpp-white);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.ic-vault__unlock-btn:visited,
.ic-vault__unlock-btn:hover:visited,
.ic-vault__unlock-btn:focus,
.ic-vault__unlock-btn:active {
	color: var(--tpp-white);
}


/* ──────────────────────────────────────────────
   Responsive
   ────────────────────────────────────────────── */

/* Tablet (≤991px) */
@media screen and (max-width: 991px) {
	.ic-vault__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Mobile (≤767px) */
@media screen and (max-width: 767px) {
	.ic-vault {
		padding: 72px 0;
	}

	.ic-vault__heading {
		font-size: clamp(1.5rem, 6vw, 2rem);
	}

	/* ── Carousel ──
	   The grid becomes a horizontally snapping track. Native scrolling
	   gives touch swipe for free, so this needs no JS. Negative inline
	   margins cancel the container padding so cards can scroll to the
	   screen edge, and scroll-padding puts the snap position back at the
	   content edge rather than the viewport edge. */
	.ic-vault__grid {
		display: flex;
		gap: 12px;
		overflow-x: auto;
		overflow-y: hidden;
		scroll-snap-type: x mandatory;
		scroll-padding-left: var(--tpp-container-padding);
		margin-left: calc(var(--tpp-container-padding) * -1);
		margin-right: calc(var(--tpp-container-padding) * -1);
		padding-left: var(--tpp-container-padding);
		padding-right: var(--tpp-container-padding);
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		-ms-overflow-style: none;
	}

	.ic-vault__grid::-webkit-scrollbar {
		display: none;
	}

	/* Capped so cards keep their shape on wider phones instead of
	   stretching into letterboxes. The remainder leaves the next card
	   peeking, which is what signals the track scrolls. */
	.ic-vault__tile {
		flex: 0 0 min(78%, 300px);
		scroll-snap-align: start;
		padding: 16px 14px;
		min-height: 180px;
	}
}

/* Small mobile (≤480px) */
@media screen and (max-width: 480px) {
	.ic-vault {
		padding: 56px 0;
	}
}


/*--------------------------------------------------------------
# Thumbnail tile — a session with a cover image attached
# Works with or without a video, so a title + image alone still
# gives the grid something to show.
--------------------------------------------------------------*/

/* Height is deliberately not set here — it inherits the 220px from
   .ic-vault__tile so thumbnail and plain tiles stay the same size. */
.ic-vault__tile--has-thumb {
	position: relative;
	overflow: hidden;
	isolation: isolate;
}

.ic-vault__thumb {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Scrim — keeps the lock, title, and hint legible over any image. */
.ic-vault__tile--has-thumb::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, 0.88) 0%,
		rgba(0, 0, 0, 0.6) 55%,
		rgba(0, 0, 0, 0.38) 100%
	);
	transition: background 0.3s ease;
}

/* Only playable tiles react — a locked tile has nothing to invite a click. */
.ic-vault__tile--has-thumb.ic-vault__tile--playable:hover .ic-vault__thumb {
	transform: scale(1.06);
}


/*--------------------------------------------------------------
# Playable tile — a session with a preview video attached
--------------------------------------------------------------*/

.ic-vault__tile--playable {
	position: relative;
	width: 100%;
	border: none;
	cursor: pointer;
	text-align: left;
	font-family: inherit;
	font-size: inherit;
}

.ic-vault__tile--playable:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.ic-vault__tile--playable:focus-visible {
	outline: 2px solid var(--tpp-white);
	outline-offset: -4px;
}

/* Play glyph replaces the padlock on tiles that can be previewed. */
.ic-vault__tile-play {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: var(--tpp-white);
	transition: background 0.3s ease, transform 0.3s ease;
}

.ic-vault__tile--playable:hover .ic-vault__tile-play {
	background: rgba(255, 255, 255, 0.24);
	transform: scale(1.08);
}

/* No margin-top:auto here — an auto margin would absorb the tile's free
   space and undo the flex-end alignment, stranding the icon and title
   back at the top. */
.ic-vault__tile-hint {
	padding-top: 8px;
	font-family: var(--tpp-font-body);
	font-size: 0.6875rem;
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.4);
}


/*--------------------------------------------------------------
# Session preview lightbox
--------------------------------------------------------------*/

.ic-vault-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;

	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.ic-vault-modal.is-active {
	opacity: 1;
	pointer-events: auto;
}

.ic-vault-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.7);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.ic-vault-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 720px;
	background: var(--tpp-black);
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 32px 80px rgba(0, 0, 0, 0.4);

	transform: scale(0.92) translateY(16px);
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.ic-vault-modal.is-active .ic-vault-modal__dialog {
	transform: scale(1) translateY(0);
}

.ic-vault-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	background: rgba(0, 0, 0, 0.5);
	border: none;
	border-radius: 50%;
	color: var(--tpp-white);
	cursor: pointer;
	transition: background 0.25s ease;
}

.ic-vault-modal__close:hover {
	background: rgba(0, 0, 0, 0.75);
}

.ic-vault-modal__player {
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
}

.ic-vault-modal__video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.ic-vault-modal__caption {
	font-family: var(--tpp-font-body);
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.72);
	margin: 0;
	padding: 16px 20px;
}


/* ── Lock gate — covers the player once the preview runs out ── */
.ic-vault-modal__gate {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(26, 26, 26, 0.95);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);

	opacity: 0;
	transition: opacity 0.35s ease;
}

.ic-vault-modal__gate.is-visible {
	opacity: 1;
}

.ic-vault-modal__gate-inner {
	text-align: center;
	padding: 32px;
	max-width: 460px;
}

.ic-vault-modal__gate-lock {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 68px;
	height: 68px;
	margin: 0 auto 20px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.14);
	color: var(--tpp-white);
}

.ic-vault-modal__gate-title {
	font-family: var(--tpp-font-heading);
	font-size: 1.375rem;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.02em;
	color: var(--tpp-white);
	margin: 0 0 10px;
}

.ic-vault-modal__gate-desc {
	font-family: var(--tpp-font-body);
	font-size: 0.9375rem;
	font-weight: 400;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.68);
	margin: 0 0 24px;
}

.ic-vault-modal__gate-btn {
	padding: 14px 30px;
	font-size: 0.9375rem;
	border-radius: var(--tpp-radius-pill);
	background: var(--tpp-accent); /* orange key button, white until 29 Nov 2026 */
	border: 1.5px solid var(--tpp-accent);
}

.ic-vault-modal__gate-btn,
.ic-vault-modal__gate-btn:visited,
.ic-vault-modal__gate-btn:hover,
.ic-vault-modal__gate-btn:focus,
.ic-vault-modal__gate-btn:active {
	color: var(--tpp-black);
}

.ic-vault-modal__gate-btn:hover {
	background: var(--tpp-accent-dark);
	border-color: var(--tpp-accent-dark);
}

.ic-vault-modal__gate-btn:visited,
.ic-vault-modal__gate-btn:hover:visited {
	color: var(--tpp-black);
}


/* ── Lightbox responsive ── */
@media screen and (max-width: 767px) {
	.ic-vault-modal {
		padding: 16px;
	}

	.ic-vault-modal__dialog {
		border-radius: 16px;
	}

	.ic-vault-modal__gate-inner {
		padding: 24px;
	}

	.ic-vault-modal__gate-lock {
		width: 56px;
		height: 56px;
		margin-bottom: 16px;
	}

	.ic-vault-modal__gate-title {
		font-size: 1.125rem;
	}

	.ic-vault-modal__gate-desc {
		font-size: 0.875rem;
		margin-bottom: 20px;
	}
}


/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
	.ic-vault__tile--playable,
	.ic-vault__tile-play,
	.ic-vault__thumb,
	.ic-vault-modal,
	.ic-vault-modal__dialog,
	.ic-vault-modal__gate {
		transition: none;
	}

	.ic-vault__tile--playable:hover {
		transform: none;
	}

	.ic-vault__tile--has-thumb.ic-vault__tile--playable:hover .ic-vault__thumb {
		transform: none;
	}
}
