/* Superside's hero uses a light grotesk + a condensed serif italic.
   Closest free match: Inter (regular) + Instrument Serif (italic). */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Montserrat:wght@400;700&family=Instrument+Serif:ital@0;1&display=swap");

/* Grift (button) — same font files as the New Landing Page */
@font-face {
	font-family: "Grift";
	src: url("../../new-landing-assets/fonts/Grift-ExtraBold.woff2") format("woff2"),
		url("../../new-landing-assets/fonts/Grift-ExtraBold.woff") format("woff");
	font-weight: 700 900;
	font-style: normal;
	font-display: swap;
}

/* ==========================================================================
   Hero Showcase
   Template part: templates/template-parts/hero-showcase.php
   Script:        assets/js/hero-showcase.js

   Sizes and spacing follow superside.com's hero (measured from their CSS and
   a screen recording at several widths):
   - 1600px and wider: 1624px container, 88px headline, 248px card columns.
   - 1280-1599px: 1216px container, 72px headline, 182px card columns.
     Both: text left, 3 scrolling columns on the right, 16px gaps,
     160px top/bottom padding, text centred vertically.
   - Tablet and phone (below 1280px): centred text, then 2 scrolling rows of
     140 x 200px cards, 16px gaps (cards fade at the edges on tablets).
   Superside's header sits over its hero and adds 80px on top; this theme's
   header sits above the hero, so that 80px is left out here.
   Colours sampled from superside.com; to use your brand colours instead,
   change the variables below.
   ========================================================================== */

.ss-hero,
.ss-hero-cursor,
.ss-hero-lightbox {
	/* Colours (superside.com) */
	--ss-bg: #ffffff;            /* section background */
	--ss-mint: #000000;          /* headline */
	--ss-text: #000000;          /* paragraph */
	--ss-lime: #d9fc84;          /* button + lightbox close */
	--ss-lime-hover: #cdf46e;
	--ss-btn-text: #0a1e1f;

	/* Fonts */
	--ss-font-title: "Inter", system-ui, sans-serif;
	--ss-font-title-em: "Instrument Serif", Georgia, serif;
	--ss-font-text: "Inter", system-ui, sans-serif;

	/* Superside sizes */
	--ss-gap: 16px;              /* between cards */
	--ss-container: 1216px;      /* content width on desktop */
	--ss-col: 182px;             /* desktop card width */
	--ss-row-gap: 96px;          /* text-to-gallery gap (Superside lg:gap-24) */
	--ss-edge: 12px;             /* smallest space after the last column */
	/* Gallery ends one gap past the container's right edge, but never closer than --ss-edge to the screen edge */
	--ss-gallery-right: max(var(--ss-edge), calc((100vw - var(--ss-container)) / 2 - var(--ss-row-gap)));

	/* If your theme has a fixed header that sits over the hero, set its height here */
	--ss-hero-offset: 0px;
}

.ss-hero *,
.ss-hero *::before,
.ss-hero *::after,
.ss-hero-lightbox * {
	box-sizing: border-box;
}

/* ---------- Layout (desktop, 1280px and wider) ---------- */
.ss-hero {
	position: relative; /* the gallery is positioned against the section */
	overflow: hidden;
	background: var(--ss-bg);
}

.ss-hero__container {
	position: static;
	display: flex;
	align-items: center;
	width: min(var(--ss-container), 100% - 64px);
	min-height: 576px; /* Superside 656px minus its 80px header space */
	margin: 0 auto;
	padding: 160px 0;
	color: var(--ss-text);
	font-family: var(--ss-font-text);
}

/* Text: left half of the container, centred vertically */
.ss-hero__content {
	position: relative;
	z-index: 1;
	width: 50%;
	max-width: 608px;
	padding: 0;
}

.ss-hero__title {
	margin: 0;
    font-family: 'Montserrat', 'Montserrat-Bold', sans-serif; /* theme's own Montserrat-Bold if Google Fonts doesn't load */
    font-weight: 700;
    font-size: 72px;
    line-height: 1.1;
    letter-spacing: -0.027em; /* "Your creative team's" = 568px wide at 72px, like Superside */
	color: var(--ss-mint);
}

.ss-hero__title em {
	font-family: var(--ss-font-title-em);
	font-style: italic;
	font-weight: 400;
}

/* Last part of the headline always starts on a new line, like Superside */
.ss-hero__title-end {
	/*display: block;*/
}

.ss-hero__text {
max-width: 500px;
	margin: 24px 0 0;
	font-family: 'Montserrat', 'Montserrat-Medium', sans-serif;
	font-weight: 400;
	font-size: 18px;
	line-height: 1.6;
	color: var(--ss-text);
}

/* Button */
.ss-hero__btn {
	display: inline-flex;
	height: 66px;
	margin-top: 40px;
	padding: 0 51px 0 46px;
	align-items: center;
	border-radius: 88px;
	background: #227D0D;
	box-shadow: 0 0 34px 0 #BFFAB1;
	color: #FFF;
	font-family: 'Grift';
	font-size: 20px;
	font-style: normal;
	font-weight: 900;
	line-height: 140%;
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: all 0.8s ease !important;
}

.ss-hero__btn:hover,
.ss-hero__btn:focus-visible {
	color: #FFF;
	background: #227D0D;
	box-shadow: 0 0 64px 0 #BFFAB1;
	transform: scale(1.03);
}

/* Gallery: 3 columns of 182px cards, full section height, 16px from the right edge */
.ss-hero__gallery {
	position: absolute;
	top: var(--ss-hero-offset);
	bottom: 0;
	right: var(--ss-gallery-right);
	width: calc(var(--ss-col) * 3 + var(--ss-gap) * 2);
	display: grid;
	grid-template-columns: repeat(3, var(--ss-col));
	align-content: stretch;
	gap: var(--ss-gap);
	overflow: hidden;
}

.ss-hero__col {
	min-width: 0;
	overflow: hidden;
}

.ss-hero__track {
	display: flex;
	flex-direction: column;
	gap: var(--ss-gap);
	will-change: transform;
}

/* Card: 182 x 200px or 182 x 266px (shape set per image in hero-showcase.php) */
.ss-hero__card {
	position: relative;
	flex-shrink: 0;
	margin: 0;
	border-radius: 8px;
	overflow: hidden;
	aspect-ratio: var(--r, 0.91);
	background: var(--c, #1d3b37);
	cursor: pointer;
}

/* 1536px and wider: bigger text-to-gallery gap (Superside xl:gap-32) */
@media (min-width: 1536px) {
	.ss-hero,
	.ss-hero-cursor,
	.ss-hero-lightbox {
		--ss-row-gap: 128px;
	}
}

/* Large screens (1600px and wider): bigger container, headline and cards, like Superside */
@media (min-width: 1600px) {
	.ss-hero,
	.ss-hero-cursor,
	.ss-hero-lightbox {
		--ss-container: 1624px;
		--ss-col: 248px;
		--ss-edge: 24px;
	}

	.ss-hero__container {
		min-height: 885px; /* Superside 965px minus its 80px header space */
	}

	.ss-hero__content {
		max-width: 760px;
	}

	.ss-hero__title {
		font-size: 88px;
	}
}

.ss-hero .ss-hero__card img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform 0.6s ease;
}

.ss-hero__card:hover img {
	transform: scale(1.04);
}

.ss-hero__brand {
	position: absolute;
	top: 22px;
	left: 0;
	right: 0;
	text-align: center;
	font-weight: 700;
	font-size: clamp(18px, 1.7vw, 30px);
	letter-spacing: -0.03em;
	color: #fff;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
	pointer-events: none;
}

/* ---------- "Expand +" circle following the mouse ---------- */
.ss-hero-cursor {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 9998;
	width: 96px;
	height: 96px;
	margin: -48px 0 0 -48px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: rgba(18, 38, 35, 0.72);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	color: #fff;
	font-family: "Inter", system-ui, sans-serif;
	font-size: 14px;
	font-weight: 500;
	pointer-events: none;
	opacity: 0;
	transform: translate3d(-200px, -200px, 0) scale(0.4);
	transition: opacity 0.25s ease;
}

.ss-hero-cursor.is-visible {
	opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
	.ss-hero__card {
		cursor: none;
	}
}

/* ---------- Lightbox ---------- */
.ss-hero-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: grid;
	place-items: center;
	padding: 24px;
	background: rgba(5, 16, 15, 0.88);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ss-hero-lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

.ss-hero-lightbox figure {
	margin: 0;
	max-width: min(900px, 100%);
	transform: scale(0.96);
	transition: transform 0.3s ease;
}

.ss-hero-lightbox.is-open figure {
	transform: scale(1);
}

.ss-hero-lightbox img {
	display: block;
	max-width: 100%;
	max-height: 80vh;
	height: auto;
	border-radius: 16px;
	object-fit: contain;
}

.ss-hero-lightbox figcaption {
	margin-top: 14px;
	text-align: center;
	color: var(--ss-text);
	font-family: "Inter", system-ui, sans-serif;
	font-size: 18px;
	font-weight: 500;
}

.ss-hero-lightbox figcaption:empty {
	display: none;
}

.ss-hero-lightbox__close {
	position: absolute;
	top: 20px;
	right: 20px;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--ss-lime);
	color: #000;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

/* ---------- Tablet and phone (below 1280px): text on top, 2 rows of cards ---------- */
@media (max-width: 1279px) {
	.ss-hero__container {
		display: block;
		width: 100%;
		min-height: 0;
		padding: 100px 16px 40px; /* phone: 24px under the header */
		text-align: center;
	}

	.ss-hero__content {
		width: auto;
		max-width: 720px;
		margin: 0 auto;
	}

	.ss-hero__title {
		font-size: clamp(36px, calc(3.3vw + 24.8px), 72px); /* 37px phone, 60px tablet */
		line-height: 1.2;
	}

	.ss-hero__text {
		margin: 16px auto 0;
		font-size: 15px;
		line-height: 1.6; /* 24px */
	}

	/* Tablet: text starts right under the header; cards fade into the background
	   over 200px at both edges (not on phones) */
	@media (min-width: 768px) {
		.ss-hero__container {
			padding-top: 133px;
		}

		/* 2 lines, breaking after "industry-" like Superside */
		.ss-hero__text {
			max-width: 556px;
		}

		.ss-hero__gallery {
			-webkit-mask-image: linear-gradient(to right, transparent 0, #000 200px, #000 calc(100% - 200px), transparent 100%);
			mask-image: linear-gradient(to right, transparent 0, #000 200px, #000 calc(100% - 200px), transparent 100%);
		}
	}

	.ss-hero__btn {
		margin-top: 24px;
	}

	/* Gallery: full screen width under the text, 2 rows */
	.ss-hero__gallery {
		position: relative;
		top: auto;
		bottom: auto;
		right: auto;
		width: auto;
		height: auto;
		margin: 24px -16px 0;
		grid-template-columns: minmax(0, 1fr);
		align-content: start;
		touch-action: pan-y; /* vertical swipe still scrolls the page */
	}

	.ss-hero__track {
		flex-direction: row;
		width: max-content;
	}

	/* Every card 140 x 200px, like Superside on tablet and phone */
	.ss-hero__card {
		width: 140px;
		height: auto;
		aspect-ratio: 0.7;
		border-radius: 8px;
	}

	.ss-hero__brand {
		top: 12px;
		font-size: 15px;
	}

	/* Before the script runs: show cards in one plain row */
	.ss-hero__gallery:not(.is-ready) {
		display: flex;
		gap: var(--ss-gap);
	}
}

/* Phone: full-width button; paragraph tracked in slightly so its lines break like Superside's */
@media (max-width: 767px) {
	.ss-hero__text {
		letter-spacing: -0.015em;
	}

	.ss-hero__btn {
		display: flex;
		justify-content: center;
		width: 100%;
	}
}