/*
 * Home page additions (2026-10-13, after gunnar.com): hero slider, the carousel stage, Our Products and the
 * Made-in-Ogden band. Loaded on the front page only. The carousel itself keeps the port's inline styles.
 */

/* ---------- Hero slider ---------- */
.fh-hero {
	--fh-slide-ms: 6500ms;
	position: relative; margin-top: 64px; height: clamp(460px, 76svh, 800px); overflow: hidden;
	background: #0f0d0d; color: #F3EEE4; touch-action: pan-y;
}
.fh-hero-slides { position: absolute; inset: 0; }
.fh-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility 0s linear .9s; }
.fh-slide.is-active { opacity: 1; visibility: visible; z-index: 1; transition: opacity .9s ease, visibility 0s; }
.fh-slide-img {
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none;
	object-position: var(--pos, center); transform: scale(1.07); transition: transform 8s cubic-bezier(.2, .6, .3, 1);
}
.fh-slide.is-active .fh-slide-img { transform: scale(1); }
.fh-slide::after {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background:
		linear-gradient(90deg, rgba(10, 8, 8, .82) 0%, rgba(10, 8, 8, .5) 32%, rgba(10, 8, 8, 0) 62%),
		linear-gradient(0deg, rgba(10, 8, 8, .65) 0%, rgba(10, 8, 8, 0) 40%);
}
.fh-slide-copy {
	position: absolute; z-index: 2; left: clamp(1.5rem, 7vw, 7.5rem); right: 1.5rem; bottom: clamp(5rem, 15%, 8.5rem); max-width: 36rem;
}
.fh-slide-copy > * { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.fh-slide.is-active .fh-slide-copy > * { opacity: 1; transform: none; }
.fh-slide.is-active .fh-slide-copy > :nth-child(2) { transition-delay: .12s; }
.fh-slide.is-active .fh-slide-copy > :nth-child(3) { transition-delay: .24s; }
.fh-slide.is-active .fh-slide-copy > :nth-child(4) { transition-delay: .36s; }
.fh-slide-eyebrow {
	display: flex; align-items: center; gap: .8rem; margin: 0 0 1rem;
	font-size: .72rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: rgba(243, 238, 228, .85);
}
.fh-slide-eyebrow::before { content: ""; width: 2.25rem; height: 2px; background: #c0392b; }
.fh-slide-heading {
	margin: 0; font-family: var(--fh-display); font-weight: 800; text-transform: uppercase; line-height: .92; letter-spacing: .01em;
	font-size: clamp(2.5rem, 6vw, 5.4rem); text-shadow: 0 2px 30px rgba(0, 0, 0, .35);
}
.fh-slide-text { margin: 1.1rem 0 0; max-width: 30rem; font-size: clamp(.98rem, 1.3vw, 1.12rem); line-height: 1.6; color: rgba(243, 238, 228, .86); }
.fh-slide-btn {
	display: inline-block; margin-top: 1.7rem; padding: .95rem 1.9rem; background: #8B0000; color: #F3EEE4; text-decoration: none;
	font-size: .74rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; transition: background .2s ease;
}
.fh-slide-btn:hover { background: #6B0000; color: #F3EEE4; }

.fh-hero-arrow {
	position: absolute; z-index: 3; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%;
	display: none; align-items: center; justify-content: center; cursor: pointer; padding: 0;
	background: rgba(15, 13, 13, .35); border: 1px solid rgba(243, 238, 228, .35); color: #F3EEE4;
	transition: background .2s ease, border-color .2s ease;
}
.fh-hero-arrow:hover { background: #8B0000; border-color: #8B0000; }
.fh-hero-arrow svg, .fh-hero-pause svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fh-hero-prev { left: 1.5rem; }
.fh-hero-next { right: 1.5rem; }
@media (min-width: 768px) { .fh-hero-arrow { display: flex; } }

.fh-hero-nav { position: absolute; z-index: 3; left: 0; right: 0; bottom: 1.6rem; display: flex; justify-content: center; align-items: center; gap: .55rem; }
.fh-hero-dot { width: 44px; height: 24px; padding: 0; border: none; background: none; cursor: pointer; display: flex; align-items: center; }
.fh-hero-dot span { position: relative; display: block; width: 100%; height: 3px; background: rgba(243, 238, 228, .35); overflow: hidden; }
.fh-hero-dot span::after { content: ""; position: absolute; inset: 0; background: #F3EEE4; transform: scaleX(0); transform-origin: left; }
.fh-hero-dot.is-active span::after { transform: scaleX(1); }
.fh-hero.is-playing .fh-hero-dot.is-active span::after { animation: fh-hero-progress var(--fh-slide-ms) linear both; }
.fh-hero.is-held .fh-hero-dot.is-active span::after { animation-play-state: paused; }
.fh-hero-pause { width: 32px; height: 32px; margin-left: .4rem; padding: 0; border: none; background: none; color: rgba(243, 238, 228, .8); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.fh-hero-pause:hover { color: #fff; }
.fh-hero-pause .i-play { display: none; fill: currentColor; stroke: none; }
.fh-hero-pause[aria-pressed="true"] .i-play { display: block; }
.fh-hero-pause[aria-pressed="true"] .i-pause { display: none; }
.fh-hero button:focus-visible, .fh-hero a:focus-visible, .fh-home-band a:focus-visible { outline: 2px solid #F3EEE4; outline-offset: 3px; }
@keyframes fh-hero-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (max-width: 640px) {
	.fh-hero { height: calc(100svh - 64px); min-height: 520px; max-height: 900px; }
	.fh-slide::after { background: linear-gradient(0deg, rgba(10, 8, 8, .88) 0%, rgba(10, 8, 8, .55) 45%, rgba(10, 8, 8, .1) 75%); }
	.fh-slide-img { object-position: var(--pos-m, var(--pos, center)); }
	.fh-slide-copy { bottom: 4.6rem; }
	.fh-slide-text { font-size: .95rem; }
	.fh-slide-btn { margin-top: 1.3rem; }
}

/* ---------- Carousel stage: one screen, so the reveal sequence has the viewport to itself ---------- */
.fh-home-stage { height: 100vh; height: 100svh; min-height: 560px; }
html.fh-locked { overflow: hidden; }
.fh-stage-kicker {
	display: flex; align-items: center; gap: .8rem; margin: 0 0 1.4rem; font-size: .7rem; font-weight: 600; letter-spacing: .32em;
	text-transform: uppercase; color: rgba(100, 116, 139, .75); transition: opacity .4s ease;
}
.fh-stage-kicker::before, .fh-stage-kicker::after { content: ""; width: 1.5rem; height: 1px; background: rgba(139, 0, 0, .6); }
.fh-stage-hint { margin: 2.2rem 0 0; font-size: .68rem; letter-spacing: .24em; text-transform: uppercase; color: rgba(100, 116, 139, .6); transition: opacity .4s ease; }
.fh-hint-touch { display: none; }
@media (hover: none), (pointer: coarse) { .fh-hint-touch { display: inline; } .fh-hint-mouse { display: none; } }
html.fh-locked .fh-stage-kicker, html.fh-locked .fh-stage-hint { opacity: 0; }

/* Phones: the idle stage sizes to its content (no screen of empty cream); detail mode stacks image over copy. */
@media (max-width: 767px) {
	html:not(.fh-locked) .fh-home-stage { height: auto; min-height: 0; padding: 4.5rem 0 4rem; }
	#fh-titles { margin-bottom: 1.25rem !important; }
	.fh-home-stage .fh-arrow { top: auto; bottom: -64px; transform: none; }
	.fh-home-stage .fh-arrow-l { left: calc(50% - 56px); }
	.fh-home-stage .fh-arrow-r { right: calc(50% - 56px); }
	.fh-stage-hint { margin-top: 5.2rem; }

	#fh-detail { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 8px 0 120px !important; }
	#fh-detail .fh-d-media { padding: 20px 20px 0 !important; }
	#fh-d-clip { display: block !important; }
	#fh-d-title { white-space: normal !important; font-size: 1.15rem !important; margin-bottom: 14px !important; }
	#fh-detail .fh-d-img { width: 100% !important; max-width: 420px; margin: 0 auto; }
	#fh-d-outline { top: 20px !important; left: 20px !important; right: 20px; width: auto !important; height: calc(100% - 20px) !important; }
	#fh-detail .fh-d-divwrap { display: none; }
	#fh-panel {
		position: relative !important; left: auto !important; top: auto !important; transform: none !important;
		width: auto !important; max-width: none !important; margin: 22px 20px 0;
	}
	#fh-p-clip { padding: 20px 0 0; border-top: 1px solid rgba(100, 116, 139, .25); }
	#fh-panel .fh-p p { font-size: .95rem !important; }
	#fh-panel .fh-p p:first-child { font-size: .8rem !important; }
	#fh-panel .fh-p p:nth-child(2) { font-size: .7rem !important; }
	#fh-panel .fh-buy, #fh-panel .fh-see { flex: 1; padding: 14px 12px; font-size: .74rem; }
	#fh-back {
		bottom: max(16px, env(safe-area-inset-bottom)) !important; left: 50% !important; transform: translateX(-50%);
		padding: 12px 22px !important; background: rgba(243, 238, 228, .94) !important; border: 1px solid rgba(100, 116, 139, .3) !important;
		color: rgba(15, 13, 13, .75) !important; font-size: .7rem !important;
	}
}

/* ---------- Our Products ---------- */
.fh-home-products { position: relative; z-index: 10; background: #F3EEE4; border-top: 1px solid rgba(100, 116, 139, .18); }

/* ---------- Made-in-Ogden band ---------- */
.fh-home-band { position: relative; overflow: hidden; background: #0f0d0d; color: rgba(243, 238, 228, .86); min-height: 460px; display: flex; align-items: center; }
.fh-home-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 35% 50%; }
.fh-home-band::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(10, 8, 8, .1) 0%, rgba(10, 8, 8, .55) 48%, rgba(10, 8, 8, .9) 100%); }
.fh-home-band-copy { position: relative; z-index: 2; margin-left: auto; max-width: 32rem; padding: 4.5rem clamp(1.5rem, 7vw, 7.5rem); }
.fh-home-band-kicker { margin: 0 0 .9rem; font-size: .72rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: #d9534a; }
.fh-home-band h2 { margin: 0 0 1rem; font-family: var(--fh-display); font-weight: 800; text-transform: uppercase; line-height: .95; font-size: clamp(2.1rem, 4.2vw, 3.4rem); color: #F3EEE4; }
.fh-home-band p:not(.fh-home-band-kicker) { margin: 0; font-size: 1.05rem; line-height: 1.7; }
@media (max-width: 640px) {
	.fh-home-band { align-items: flex-end; min-height: 520px; }
	.fh-home-band::before { background: linear-gradient(0deg, rgba(10, 8, 8, .9) 0%, rgba(10, 8, 8, .55) 55%, rgba(10, 8, 8, .1) 100%); }
	.fh-home-band-copy { margin: 0; padding-bottom: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
	.fh-slide, .fh-slide-img, .fh-slide-copy > * { transition: none !important; }
	.fh-slide-img { transform: none !important; }
}
