/* =========================================
   IRON FITNESS HERO
   Ported from the Iron Fitness site. Every rule is scoped to
   .if-hero so Powerlift's styles and these don't collide.
========================================= */

.if-hero {
	--if-red: #db3832;
	--if-red-bright: #a72a26;
	--if-gray: #a8a8a8;

	/* Shared page grid: content sits in one centred column */
	--if-gutter: clamp(24px, 6vw, 96px);
	--if-content-max: 1200px;

	/* Equal space above and below the hero content so it centres vertically.
	   Top clears Powerlift's header; bottom holds the scroll arrow. */
	--if-hero-edge-space: clamp(96px, 12vh, 120px);

	/* Hero type scales with screen height too, so it fits short windows */
	--if-countdown-size: clamp(32px, min(4.5vw, 6vh), 56px);

	position: relative;
	min-height: 100vh;
	padding-block: var(--if-hero-edge-space);
	grid-template-rows: 1fr;
	overflow: hidden;
	background: #050505;
	color: #ffffff;
	font-family: "Lato", sans-serif;
}

.if-hero,
.if-hero *,
.if-hero *::before,
.if-hero *::after {
	box-sizing: border-box;
}

.if-hero a {
	color: inherit;
	text-decoration: none;
}

/* =========================================
   LAYOUT GRID
========================================= */

.if-layout-grid {
	display: grid;
	grid-template-columns:
		[full-start] minmax(var(--if-gutter), 1fr)
		[content-start] minmax(0, var(--if-content-max))
		[content-end] minmax(var(--if-gutter), 1fr)
		[full-end];
	width: 100%;
}

.if-layout-grid > * {
	grid-column: content;
}

/* Backgrounds and overlays bleed edge to edge */
.if-layout-grid > .if-hero-bg,
.if-layout-grid > .if-hero-overlay {
	grid-column: full;
}

.if-hero-bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	background-position: center center;
	background-size: cover;
	background-repeat: no-repeat;
}

.if-hero-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(
		90deg,
		rgba(0, 0, 0, 0.95) 0%,
		rgba(0, 0, 0, 0.78) 32%,
		rgba(0, 0, 0, 0.3) 70%,
		rgba(0, 0, 0, 0.55) 100%
	);
}

/* =========================================
   CONTENT
========================================= */

.if-hero-content {
	position: relative;
	z-index: 5;
	grid-row: 1;
	align-self: center;
	width: min(650px, 100%);
}

.if-hero h1 {
	margin: 0;
	color: #ffffff;
	font-family: "Bebas Neue", sans-serif;
	font-size: clamp(48px, min(7vw, 10vh), 40px);
	line-height: 0.92;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
}

.if-hero hr {
	width: 140px;
	height: 0;
	border: 0;
	border-top: 1px solid var(--if-gray);
	background: none;
	margin: clamp(8px, 1.2vh, 10px) 0 clamp(12px, 2.2vh, 20px) 0;
}

.if-hero .if-hero-intro {
	max-width: 530px;
	margin: 0 0 clamp(16px, 3.5vh, 34px);
	color: #b7b7b7;
	font-size: 18px;
	line-height: 1.5;
	font-weight: 300;
}

/* =========================================
   BUTTON
========================================= */

.if-hero .if-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 200px;
	height: 50px;
	padding: 0 20px;
	background: var(--if-red);
	color: #ffffff;
	font-family: "Bebas Neue", sans-serif;
	font-size: 20px;
	font-weight: 700;
	letter-spacing: 1px;
	border: 0;
	cursor: pointer;
	overflow: hidden;
	clip-path: polygon(0 0, 100% 0, 100% 55%, 89% 100%, 0 100%);
	transition:
		transform 0.3s ease,
		background 0.3s ease,
		box-shadow 0.3s ease;
}

.if-hero .if-btn::before {
	content: "";
	position: absolute;
	top: 0;
	left: -120%;
	width: 80%;
	height: 100%;
	background: rgba(255, 255, 255, 0.22);
	transform: skewX(-20deg);
	transition: left 0.55s ease;
}

.if-hero .if-btn:hover {
	color: #ffffff;
	background: var(--if-red-bright);
	transform: translateY(-4px);
	box-shadow: 0 12px 30px rgba(219, 56, 50, 0.35);
}

.if-hero .if-btn:hover::before {
	left: 140%;
}

.if-hero .if-btn:active {
	transform: translateY(-1px);
}

/* =========================================
   COUNTDOWN
========================================= */

.if-countdown {
	margin-bottom: clamp(18px, 3.5vh, 30px);
}

.if-hero .if-countdown-label {
	margin: 0 0 12px;
	color: #ffffff;
	font-family: "Lato", sans-serif;
	font-size: 12px;
	font-weight: 300;
	letter-spacing: 6px;
	text-transform: uppercase;
}

.if-countdown-timer {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}

.if-countdown-segment {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.if-countdown-value,
.if-countdown-open,
.if-countdown-colon {
	font-family: "Bebas Neue", sans-serif;
	font-size: var(--if-countdown-size);
	line-height: 1;
	letter-spacing: 1px;
}

.if-countdown-open {
	color: var(--if-red-bright);
}

.if-countdown-colon {
	color: var(--if-red);
	align-self: flex-start;
}

.if-countdown-caption {
	margin-top: 4px;
	color: #b7b7b7;
	font-size: 10px;
	font-weight: 400;
	letter-spacing: 2px;
}

/* =========================================
   FLOATING FEATURES
========================================= */

.if-hero-features {
	position: relative;
	z-index: 5;
	grid-row: 1;
	justify-self: end;
	width: min(560px, 45%);

	/* keep badges clear of the scroll indicator */
	margin-bottom: 40px;
}

.if-feature-item {
	position: absolute;
	z-index: 5;
}

.if-feature {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 16px;
	border-radius: 40px;
	background: #eeeeee;
	color: #17202d;
	font-size: 10px;
	box-shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
	animation: if-float 5s ease-in-out infinite;
}

.if-feature span {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #17202d;
}

.if-feature span img {
	width: 17px;
	height: 17px;
	object-fit: contain;
}

.if-feature-item-one {
	top: 22%;
	right: 60%;
}

.if-feature-item-two {
	top: 30%;
	right: 0;
}

.if-feature-item-three {
	top: 48%;
	right: 55%;
}

.if-feature-item-four {
	top: 70%;
	right: 48%;
}

.if-feature-item-five {
	top: 62%;
	right: 2%;
}

.if-feature-item-six {
	top: 45%;
	right: 10%;
}

.if-feature-two {
	animation-delay: 0.7s;
}

.if-feature-three {
	animation-delay: 1.2s;
}

.if-feature-four {
	animation-delay: 1.7s;
}

.if-feature-five {
	animation-delay: 2.2s;
}

.if-feature-six {
	animation-delay: 2.7s;
}

@keyframes if-float {
	0%,
	100% {
		transform: translateY(0);
	}

	50% {
		transform: translateY(-8px);
	}
}

/* =========================================
   SCROLL INDICATOR
========================================= */

/* Absolute inside the content column: right edge matches the grid,
   vertically centred in the hero's bottom space */
.if-scroll-indicator {
	position: absolute;
	z-index: 10;
	right: 6px;
	bottom: calc(var(--if-hero-edge-space) / 2 - -40px);
	width: 30px;
	height: 30px;
	transform: rotate(45deg);
	border-right: 4px solid var(--if-red);
	border-bottom: 4px solid var(--if-red);
	animation: if-arrow-bounce 1.5s infinite;
}

@keyframes if-arrow-bounce {
	0%,
	100% {
		transform: translateY(0) rotate(45deg);
	}

	50% {
		transform: translateY(8px) rotate(45deg);
	}
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 1000px) {
	.if-hero-features {
		width: min(360px, 40%);
	}

	/* Narrower badge area: stagger all six down the column so none overlap */
	.if-feature-item-one {
		top: 16%;
		right: 30%;
	}

	.if-feature-item-two {
		top: 28%;
		right: 0;
	}

	.if-feature-item-six {
		top: 40%;
		right: 26%;
	}

	.if-feature-item-three {
		top: 52%;
		right: 2%;
	}

	.if-feature-item-four {
		top: 64%;
		right: 34%;
	}

	.if-feature-item-five {
		top: 76%;
		right: 6%;
	}
}

/* Too narrow for badges beside the hero text */
@media (max-width: 900px) {
	.if-hero-features {
		display: none;
	}
}

@media (max-width: 700px) {
	.if-hero-bg {
		background-position: 62% center;
	}

	.if-hero-overlay {
		background: linear-gradient(
			90deg,
			rgba(0, 0, 0, 0.95),
			rgba(0, 0, 0, 0.68)
		);
	}

	.if-hero h1 {
		font-size: clamp(46px, 13vw, 70px);
	}

	.if-hero .if-hero-intro {
		font-size: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.if-feature,
	.if-scroll-indicator {
		animation: none;
	}
}
