/* ==========================================================================
   History page — parallax scrolling timeline
   Brand tokens match style.css: navy #002A3F, gold #FFB605, Proxima Nova.
   ========================================================================== */

.vnd-history {
	background: #05141f;
	color: #e8edf2;
	font-family: 'Proxima Nova', sans-serif;
}

/* ---- Intro ---- */
.vnd-history-intro {
	position: relative;
	min-height: 70vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 160px 24px 100px;
	background:
		radial-gradient(ellipse at 70% 20%, rgba(255, 182, 5, 0.14) 0%, rgba(255, 182, 5, 0) 55%),
		linear-gradient(180deg, #041019 0%, #062138 60%, #05141f 100%);
}

.vnd-history-intro-eyebrow {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #FFB605;
	margin-bottom: 20px;
}

.vnd-history-intro h1 {
	font-size: 56px;
	font-weight: 800;
	color: #fff;
	text-transform: uppercase;
	line-height: 1.08;
	max-width: 16ch;
	margin: 0 auto 24px;
}

.vnd-history-intro p {
	font-size: 19px;
	color: #b9c6d1;
	max-width: 58ch;
	margin: 0 auto 40px;
}

.vnd-history-scroll-cue {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	color: #7ea0c8;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	animation: vnd-bounce 2s ease-in-out infinite;
}

.vnd-history-scroll-cue svg {
	width: 18px;
	height: 18px;
}

@keyframes vnd-bounce {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(8px); }
}

/* ---- Layout: sticky year rail + scrolling eras ---- */
.vnd-history-body {
	position: relative;
	display: grid;
	grid-template-columns: 260px 1fr;
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 24px;
}

/* position: fixed instead of sticky — the theme sets `overflow: auto` on
   <body> globally (for reasons unrelated to this page), and any ancestor
   with overflow other than visible becomes the containing block for
   position: sticky, which breaks it here since body itself never actually
   scrolls (html does). Fixed positioning sidesteps that entirely; visibility
   is toggled by history-timeline.js based on scroll position instead. */
.vnd-history-rail {
	position: fixed;
	top: 50%;
	left: max(24px, calc((100vw - 1400px) / 2 + 24px));
	transform: translateY(-50%);
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	gap: 28px;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
}

.vnd-history-rail.is-visible {
	opacity: 1;
}

.vnd-history-rail-year {
	font-size: 96px;
	font-weight: 800;
	line-height: 1;
	color: #fff;
	font-variant-numeric: tabular-nums;
	transition: opacity 0.35s ease, transform 0.35s ease;
}

.vnd-history-rail-label {
	font-size: 15px;
	font-weight: 600;
	color: #FFB605;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	max-width: 220px;
	transition: opacity 0.35s ease;
}

.vnd-history-rail-track {
	position: relative;
	width: 3px;
	height: 240px;
	background: rgba(255, 255, 255, 0.12);
	border-radius: 2px;
	margin-top: 8px;
}

.vnd-history-rail-progress {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	background: #FFB605;
	border-radius: 2px;
	height: 0%;
	transition: height 0.2s linear;
}

/* ---- Eras ---- */
.vnd-history-eras {
	/* Explicit placement: the rail is position: fixed (out of grid flow), so
	   without this, eras — now the only real grid item — auto-places into
	   column 1 (the narrow 260px rail gutter) instead of column 2. */
	grid-column: 2;
	display: flex;
	flex-direction: column;
	gap: 140px;
	padding: 120px 0 160px;
}

.vnd-history-era {
	scroll-margin-top: 40px;
}

.vnd-history-era-mobile-year {
	display: none;
	font-size: 15px;
	font-weight: 700;
	color: #FFB605;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 10px;
}

.vnd-history-era-heading {
	font-size: 30px;
	font-weight: 800;
	color: #fff;
	text-transform: uppercase;
	line-height: 1.2;
	margin-bottom: 18px;
	max-width: 26ch;
}

.vnd-history-era-body {
	font-size: 17px;
	line-height: 1.7;
	color: #c3cedb;
	max-width: 62ch;
	margin: 0 0 18px;
}

.vnd-history-era-body strong {
	color: #fff;
}

.vnd-history-era-body a {
	color: #FFB605;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.vnd-history-clients {
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	font-size: 14px;
	color: #8ea0b3;
}

.vnd-history-clients-label {
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 700;
	color: #5b7288;
	margin-right: 10px;
}

.vnd-history-clients a {
	color: #e8edf2;
	text-decoration: none;
	border-bottom: 1px solid rgba(232, 237, 242, 0.35);
}

.vnd-history-clients a:hover {
	color: #FFB605;
	border-color: #FFB605;
}

.vnd-history-clients span.no-link {
	color: #e8edf2;
}

/* ---- Media: single photo ---- */
.vnd-history-photo {
	margin-top: 28px;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
	max-width: 560px;
}

.vnd-history-photo img {
	display: block;
	width: 100%;
	height: auto;
}

.vnd-history-photo-caption {
	font-size: 13px;
	color: #7f92a5;
	margin-top: 10px;
	font-style: italic;
}

/* ---- Media: 360-degree drag viewer ---- */
.vnd-history-360 {
	position: relative;
	margin-top: 28px;
	max-width: 560px;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
	cursor: grab;
	-webkit-user-select: none;
	user-select: none;
	touch-action: pan-y;
}

.vnd-history-360.is-dragging {
	cursor: grabbing;
}

.vnd-history-360-img {
	display: block;
	width: 100%;
	height: auto;
	pointer-events: none;
}

.vnd-history-360-hint {
	position: absolute;
	left: 50%;
	bottom: 16px;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	gap: 8px;
	background: rgba(5, 20, 31, 0.75);
	backdrop-filter: blur(4px);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	padding: 8px 14px;
	border-radius: 100px;
	white-space: nowrap;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.vnd-history-360-hint svg {
	width: 16px;
	height: 16px;
	color: #FFB605;
}

.vnd-history-360.has-interacted .vnd-history-360-hint {
	opacity: 0;
}

/* ---- Media: gallery grid (for eras with multiple photos) ---- */
.vnd-history-gallery {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 8px;
	margin-top: 28px;
	max-width: 720px;
}

.vnd-history-gallery a,
.vnd-history-gallery div {
	display: block;
	aspect-ratio: 4 / 3;
	border-radius: 4px;
	overflow: hidden;
}

.vnd-history-gallery img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.vnd-history-gallery a:hover img {
	transform: scale(1.06);
}

/* ---- Two-photo side-by-side ---- */
.vnd-history-photo-pair {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-top: 28px;
	max-width: 620px;
}

.vnd-history-photo-pair img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 6px;
	display: block;
	aspect-ratio: 4 / 3;
}

/* ---- Founder spotlight (special era styling) ---- */
.vnd-history-era.is-founding .vnd-history-era-heading {
	font-size: 40px;
	color: #FFB605;
}

/* ---- Closing / what's next ---- */
.vnd-history-closing {
	position: relative;
	padding: 110px 24px 130px;
	text-align: center;
	background: linear-gradient(180deg, #05141f 0%, #002A3F 100%);
}

.vnd-history-closing h2 {
	font-size: 38px;
	font-weight: 800;
	color: #fff;
	text-transform: uppercase;
	max-width: 20ch;
	margin: 0 auto 20px;
}

.vnd-history-closing p {
	font-size: 17px;
	color: #c3cedb;
	max-width: 60ch;
	margin: 0 auto 36px;
}

.vnd-history-side-projects {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
	max-width: 900px;
	margin: 0 auto 40px;
	text-align: left;
}

.vnd-history-side-project {
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 8px;
	padding: 20px;
}

.vnd-history-side-project a {
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	font-size: 15px;
}

.vnd-history-side-project a:hover {
	color: #FFB605;
}

.vnd-history-side-project p {
	margin: 8px 0 0;
	font-size: 13.5px;
	color: #93a4b6;
}

.vnd-history-closing .vnd-btn {
	display: inline-block;
}

/* ---- Lightbox (static photos only, not the 360 viewer) ---- */
.vnd-history-photo img,
.vnd-history-photo-pair img,
.vnd-history-gallery img {
	cursor: zoom-in;
}

.vnd-history-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: rgba(2, 8, 13, 0.92);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease;
}

.vnd-history-lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

.vnd-history-lightbox img {
	max-width: 100%;
	max-height: 100%;
	border-radius: 6px;
	box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.7);
}

.vnd-history-lightbox-close {
	position: absolute;
	top: 24px;
	right: 24px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	border: none;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
}

.vnd-history-lightbox-close:hover {
	background: rgba(255, 182, 5, 0.9);
	color: #002A3F;
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
	.vnd-history-intro h1 {
		font-size: 38px;
	}

	.vnd-history-body {
		grid-template-columns: 1fr;
	}

	.vnd-history-rail {
		display: none;
	}

	.vnd-history-era-mobile-year {
		display: block;
	}

	.vnd-history-eras {
		gap: 90px;
		padding: 60px 0 100px;
	}

	.vnd-history-era-heading {
		font-size: 24px;
	}

	.vnd-history-gallery {
		grid-template-columns: repeat(3, 1fr);
	}

	.vnd-history-photo-pair {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 575px) {
	.vnd-history-intro {
		padding: 130px 20px 70px;
	}

	.vnd-history-intro h1 {
		font-size: 30px;
	}

	.vnd-history-gallery {
		grid-template-columns: repeat(2, 1fr);
	}
}
