/* Homepage (front-page.php). Builds on product-story.css: black, Apple-style type, logo red. */

.hm { --hm-gap: clamp(12px, 1.4vw, 20px); }
.hm-main { overflow-x: clip; }
.hm h3 { margin: 0; }

/* Nav: product links on wider screens, Cart + Shop on phones */
.hm-nav .buy { padding: 7px 16px; }
@media (max-width: 600px) {
	.hm-nav nav a.hm-nav-prod { display: none; }
	.hm-nav .buy { padding: 6px 13px; }
}

/* Hero: two tiles, side by side on desktop, stacked (Prime first) on phones */
.hm-hero { display: grid; gap: var(--hm-gap); padding: var(--hm-gap); }
@media (min-width: 900px) { .hm-hero { grid-template-columns: 1fr 1fr; } }
.hm-tile { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; background: #000; border-radius: 28px; overflow: hidden; padding: clamp(36px, 5vw, 56px) 20px 0; border: 1px solid #141417; }
@media (min-width: 900px) {
	/* One screen tall: copy on top, the clip fills the rest. */
	.hm-tile { display: grid; grid-template-rows: auto minmax(0, 1fr); justify-items: center; height: clamp(660px, calc(100svh - 52px - 2 * var(--hm-gap)), 940px); }
	.hm-media { height: 100%; margin-top: 0; padding-top: 24px; }
}
/* The Prime render's black is #040404; matching it hides the clip's edges. */
.story .hm-tile-prime { background-color: #040404; }
.hm-tile-prime .hm-media::after { background: linear-gradient(to top, rgba(4,4,4,.85), transparent); }
.hm-tile-copy { position: relative; z-index: 1; max-width: 520px; }
.hm-tile h2 { font-size: clamp(40px, 5vw, 64px); margin-bottom: 12px; }
.hm-line { color: var(--muted); font-size: clamp(17px, 1.6vw, 20px); margin: 0 auto 22px; max-width: 30em; }
.hm-ctas { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 22px; }
.hm-ctas .cta-2 { margin: 0; display: inline-block; }
.hm-ctas .cta-2 .woocommerce-Price-amount { color: inherit; }

.hm-media { position: relative; flex: 1; width: 100%; display: flex; justify-content: center; align-items: flex-end; margin-top: clamp(16px, 2vw, 28px); min-height: 0; }
.story .hm-video { display: block; width: auto; max-width: 100%; height: min(62svh, 600px); aspect-ratio: 9 / 16; object-fit: contain; background: transparent; }
@media (min-width: 900px) { .story .hm-video { height: 100%; } }
/* Fade the clip's bottom edge into the tile */
.hm-media::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18%; background: linear-gradient(to top, rgba(0,0,0,.85), transparent); pointer-events: none; }

.hm-pause { position: absolute; right: 14px; bottom: 14px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: rgba(20,20,24,.7); color: var(--text); cursor: pointer; display: grid; place-items: center; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.hm-pause span { width: 10px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.hm-pause.is-paused span { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; margin-left: 3px; }
.hm-pause:focus-visible, .hm-rail-btn:focus-visible, .hm-rail:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* About */
.hm-about .lede { max-width: 760px; }
.hm-points { display: grid; gap: 28px; margin: 48px 0 56px; }
@media (min-width: 900px) { .hm-points { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.hm-point { border-top: 2px solid var(--accent); padding-top: 18px; }
.hm-point b { font-size: 21px; display: block; margin-bottom: 6px; }
.hm-point p { color: var(--muted); margin: 0; }
.hm-origin { max-width: 760px; }
.hm-origin p:not(.eyebrow) { font-size: clamp(19px, 2vw, 24px); line-height: 1.45; margin: 0 0 14px; }
.hm-origin .cta-2 { margin: 0; }
.hm-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--hm-gap); margin-top: 48px; max-width: 900px; }
.hm-photos figure { margin: 0; }
.hm-photos img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 18px; }
.hm-photos figcaption { color: var(--muted); font-size: 14px; margin-top: 10px; }
.hm-sim-note { color: var(--muted); font-size: 15px; margin: -8px 0 22px; }

/* Shop carousel: CSS scroll-snap, no library */
.hm-shop-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.hm-rail-btns { display: flex; gap: 10px; margin-bottom: 22px; }
.hm-rail-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 26px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0 0 3px; }
.hm-rail-btn:hover:not(:disabled) { border-color: #4a4a50; }
.hm-rail-btn:disabled { opacity: .35; cursor: default; }
@media (max-width: 600px) { .hm-rail-btns { display: none; } }

.hm-rail {
	--edge: max(16px, (100% - 1120px) / 2);
	list-style: none; margin: 0; padding: 4px var(--edge) 12px;
	display: grid; grid-auto-flow: column; grid-auto-columns: clamp(240px, 72vw, 300px); gap: var(--hm-gap);
	overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--edge);
	-webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.hm-rail::-webkit-scrollbar { display: none; }
.hm-card { scroll-snap-align: start; }
.hm-card a { display: flex; flex-direction: column; height: 100%; text-decoration: none; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; transition: border-color .2s; }
.hm-card a:hover { border-color: #4a4a50; }
.hm-card a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hm-card-img { aspect-ratio: 1; background: #0b0b0d; }
.story .hm-card-img img { width: 100%; height: 100%; object-fit: cover; }
.hm-card-noimg { display: grid; place-items: center; height: 100%; padding: 20px; text-align: center; color: var(--muted); font-weight: 600; }
.hm-card-copy { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.hm-card h3 { font-size: 19px; line-height: 1.25; }
.hm-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.4; flex: 1; }
.hm-price { font-weight: 600; margin-top: 6px; }
.hm-price .woocommerce-Price-amount { color: var(--text); }
.hm-all { margin: 20px 0 0 !important; display: inline-block !important; }

/* Shop by bike */
.hm-bike-grid { display: grid; gap: var(--hm-gap); margin-top: 36px; }
@media (min-width: 900px) { .hm-bike-grid { grid-template-columns: repeat(3, 1fr); } }
.hm-bike { padding: 24px; }
.hm-bike h3 { font-size: 21px; margin-bottom: 14px; }
.hm-bike ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hm-bike a { color: var(--accent-text); text-decoration: none; }
.hm-bike a:hover { text-decoration: underline; }
.hm-bike small { color: var(--muted); font-size: 13px; }
.hm-note { color: var(--muted); margin: 24px 0 0; }

/* Why not heavier oil */
.chart .line.hm-prime { stroke: var(--accent); stroke-width: 4.5; }
.chart .label.hm-prime { fill: var(--accent-text); }
.hm-chart { margin: 0; }
.hm-oil h2 { font-size: clamp(30px, 4.4vw, 52px); }

/* Simulator */
.hm-sim-card { text-align: center; padding: clamp(40px, 7vw, 88px) clamp(20px, 5vw, 64px); border-radius: 28px; border: 1px solid var(--line); background: radial-gradient(90% 120% at 50% 0%, rgba(248,0,0,.16) 0%, rgba(248,0,0,0) 60%), var(--panel); }
.hm-sim-card .lede { margin-left: auto; margin-right: auto; }
.hm-sim-card .ph { margin: 18px auto 0; max-width: 620px; font-size: 15px; }

/* Reviews */
.hm-quotes { display: grid; gap: var(--hm-gap); margin: 32px 0 24px; }
@media (min-width: 900px) { .hm-quotes { grid-template-columns: repeat(3, 1fr); } }
.hm-review { margin: 0; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.hm-stars { color: var(--accent); letter-spacing: 2px; }
.hm-review blockquote { margin: 0; font-size: 18px; line-height: 1.45; flex: 1; }
.hm-review figcaption { color: var(--muted); font-size: 14px; }

/* Shipping + contact strip */
.hm-strip { border-top: 1px solid var(--line); padding: 28px 0; }
.hm-strip .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; color: var(--muted); }
.hm-strip p { margin: 0; }
.hm-strip b { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
	.hm-rail { scroll-behavior: auto; }
}
