/* The Rail: every tee on a curved brass rail, under the hero (patterns/the-rail.php, assets/js/rail.js).
   --u is the design unit, set by rail.js from the band's width: 1440 design px across on desktop,
   390 on phones (<= 620px, the theme's phone breakpoint). Sizes below are design px x --u. */
.hp-rail-wrap { margin-block: 0; }
.hp-rail {
	--u: 1px;
	/* light band (owner 2026-12-01: "the page looks all black, give it contrast"): bone ground, dark ink */
	--hp-rail-ink: var(--wp--preset--color--base);
	--hp-rail-muted: #5E4E3B;   /* 7.0:1 on bone */
	--hp-rail-line: #CDBFA9;
	--hp-rail-gold: var(--wp--preset--color--accent-1);
	position: relative; overflow: hidden;
	padding: var(--hp-space-section) 0 calc(var(--hp-space-section) * .75);
	background: var(--wp--preset--color--contrast); color: var(--hp-rail-ink);
}
.hp-rail-head { text-align: center; padding: 0 var(--hp-gutter); }
.hp-rail .hp-rail-h {
	margin: 0; font-family: var(--wp--preset--font-family--headline); font-size: var(--wp--preset--font-size--x-large);
	font-weight: 600; letter-spacing: -.01em; line-height: 1.08; color: var(--hp-rail-ink); text-wrap: balance;
}
.hp-rail-sub { margin: 10px 0 0; font-size: clamp(16px, 1.5vw, 19px); color: var(--hp-rail-muted); }

/* rail zone */
.hp-rail-zone { position: relative; height: calc(480 * var(--u)); margin-top: calc(8 * var(--u)); outline-offset: -4px; }
.hp-rail--live:not(.is-static) .hp-rail-zone { touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.hp-rail--live .hp-rail-zone.is-drag { cursor: grabbing; }
.hp-rail-bar { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }

/* no-JS list (hidden once the rail is live) */
.hp-rail-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; margin: 0; padding: calc(160 * var(--u)) var(--hp-gutter) 0; list-style: none; }
.hp-rail-list a { color: var(--hp-rail-ink); font-size: 15px; text-underline-offset: 5px; }
.hp-rail-list span { color: var(--hp-rail-muted); }
.hp-rail--live .hp-rail-list { display: none; }

/* one piece: hook point > intro drop > sway (pivot on the hook) > hover lift > faces + tag */
.hp-rail-g { position: absolute; left: 0; top: 0; will-change: transform; }
/* only the hit button takes the pointer: a 330px-wide face would otherwise cover its neighbours' buttons */
.hp-rail-drop { pointer-events: none; }
.hp-rail-g.is-hov { z-index: 5; }
.hp-rail-sway, .hp-rail-lift { transform-origin: 0 0; }
.hp-rail-lift { transition: transform .42s var(--hp-ease-out); perspective: calc(700 * var(--u)); }
.hp-rail-g.is-hov .hp-rail-lift { transform: translateY(calc(10 * var(--u))) scale(1.16); }
.hp-rail-tag { transition: opacity .2s; }
.hp-rail-g.is-hov .hp-rail-tag { opacity: 0; } /* facing you, the tag would cover the print */
.hp-rail-face {
	position: absolute; top: 0; background-repeat: no-repeat; transform-origin: 50% 0;
	backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.hp-rail-face.is-side { transform: rotateY(0deg); transition: transform .15s cubic-bezier(.5, 0, 1, 1) .15s; }
.hp-rail-face.is-face { transform: rotateY(90deg); transition: transform .15s cubic-bezier(.5, 0, 1, 1); }
.hp-rail-g.is-hov .hp-rail-face.is-side { transform: rotateY(-90deg); transition: transform .15s cubic-bezier(.5, 0, 1, 1); }
.hp-rail-g.is-hov .hp-rail-face.is-face { transform: rotateY(0deg); transition: transform .15s cubic-bezier(0, 0, .3, 1) .15s; }
.hp-rail-tag {
	position: absolute; left: calc(-4 * var(--u)); padding: calc(3 * var(--u)) calc(7 * var(--u)) calc(3 * var(--u));
	background: var(--wp--preset--color--base); color: var(--wp--preset--color--contrast); border-radius: 2px;
	font: 600 calc(11 * var(--u))/1 var(--wp--preset--font-family--body); letter-spacing: .02em; white-space: nowrap;
	box-shadow: 0 calc(1 * var(--u)) calc(3 * var(--u)) rgba(0, 0, 0, .45); transform-origin: 50% 0;
}
.hp-rail-tag::before { content: ""; display: block; width: calc(3 * var(--u)); height: calc(3 * var(--u)); margin: 0 auto calc(2 * var(--u)); border-radius: 50%; background: var(--hp-rail-muted); }
.hp-rail-shadow {
	position: absolute; height: calc(16 * var(--u)); pointer-events: none;
	background: radial-gradient(closest-side, rgba(40, 28, 16, .32), transparent);
}
.hp-rail-hit { position: absolute; top: 0; padding: 0; border: 0; background: none; cursor: pointer; }
.hp-rail-zone.is-drag .hp-rail-hit { cursor: grabbing; }
.hp-rail-hit:focus-visible { outline: 2px solid var(--hp-rail-gold); outline-offset: 2px; }

/* footer row */
.hp-rail-foot {
	display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 24px;
	max-width: calc(var(--wp--style--global--wide-size) + 2 * var(--hp-gutter)); margin: 0 auto; padding: 0 var(--hp-gutter);
}
.hp-rail-say { display: grid; align-items: end; min-height: 48px; }
/* hint and hover label share one cell and swap outright, never both on screen (owner 2026-12-01: "the words are overlapping") */
.hp-rail-hint, .hp-rail-label { grid-area: 1 / 1; margin: 0; font-size: 15px; }
.hp-rail-hint { color: var(--hp-rail-muted); }
.hp-rail-label { display: grid; color: var(--hp-rail-ink); }
.hp-rail-label[hidden] { display: none; }
.hp-rail-label b { font-weight: 600; }
.hp-rail-say.is-on .hp-rail-hint { visibility: hidden; }
.hp-rail-progress { position: relative; width: 140px; height: 2px; margin-bottom: 8px; background: var(--hp-rail-line); }
.hp-rail-progress i { position: absolute; top: 0; left: 0; width: 58%; height: 100%; background: var(--hp-rail-ink); }
.hp-rail.is-static .hp-rail-progress { visibility: hidden; }
.hp-rail-copy { justify-self: end; text-align: right; }
.hp-rail-copy p { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.24; }

/* quick look */
.hp-rail-qv {
	/* the closer look stays dark: a spotlight over the light band */
	--hp-rail-ink: var(--wp--preset--color--contrast); --hp-rail-muted: var(--wp--preset--color--accent-4); --hp-rail-line: var(--wp--preset--color--accent-5);
	width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
	background: var(--wp--preset--color--base); color: var(--hp-rail-ink); overflow: hidden;
}
.hp-rail-qv::backdrop { background: rgba(8, 6, 4, .7); }
.hp-rail-qv[open] { display: block; }
.hp-rail-qv-img { position: absolute; inset: 0; pointer-events: none; }
.hp-rail-qv-rod { position: absolute; top: 0; width: 1.5px; background: var(--wp--preset--color--accent-4); opacity: 0; transition: opacity .3s .45s; }
.hp-rail-qv[open] .hp-rail-qv-rod { opacity: 1; }
.hp-rail-qv-art { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.hp-rail-qv-art .hp-rail-face { transition: opacity .25s; }
.hp-rail-qv-info {
	position: absolute; left: 62%; top: 50%; width: min(430px, 32vw); transform: translateY(-46%);
	display: grid; gap: 14px;
}
.hp-rail-qv-info > * { margin: 0; opacity: 0; transform: translateY(10px); transition: opacity .35s, transform .35s var(--hp-ease-out); }
.hp-rail-qv.is-in .hp-rail-qv-info > * { opacity: 1; transform: none; }
.hp-rail-qv-name { font-family: var(--wp--preset--font-family--headline); font-size: var(--wp--preset--font-size--title); font-weight: 600; line-height: 1.15; }
.hp-rail-qv-price { font-size: 16px; font-weight: 600; }
.hp-rail-qv-tabs { display: flex; gap: 28px; }
.hp-rail-qv-tabs button, .hp-rail-qv-sizes button, .hp-rail-qv-close {
	font: inherit; color: inherit; cursor: pointer; min-height: var(--hp-target);
}
.hp-rail-qv-tabs button { padding: 0 0 6px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--hp-rail-muted); font-size: 15px; }
.hp-rail-qv-tabs button[aria-pressed="true"] { color: var(--hp-rail-ink); border-bottom-color: var(--hp-rail-ink); }
.hp-rail-qv-k { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--hp-rail-muted); }
.hp-rail-qv-sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.hp-rail-qv-sizes button { min-width: 52px; padding: 0 12px; border: 1px solid var(--hp-rail-line); border-radius: 0; background: none; font-size: 14px; font-weight: 500; }
.hp-rail-qv-sizes button[aria-pressed="true"] { background: var(--hp-rail-ink); border-color: var(--hp-rail-ink); color: var(--wp--preset--color--base); }
.hp-rail-qv-sizes button:disabled { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.hp-rail-qv-add { width: 100%; min-height: 56px; justify-content: center; display: inline-flex; align-items: center; gap: 10px; }
.hp-rail-qv-add:disabled { opacity: .55; cursor: not-allowed; }
.hp-rail-qv-add .hp-rail-spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: hp-rail-spin .7s linear infinite; }
@keyframes hp-rail-spin { to { transform: rotate(360deg); } }
.hp-rail-qv-msg { min-height: 1.2em; font-size: 14px; color: var(--hp-rail-gold); }
.hp-rail-qv-meta { display: flex; justify-content: space-between; gap: 16px; padding-top: 14px; border-top: 1px solid var(--hp-rail-line); font-size: 14px; color: var(--hp-rail-muted); }
.hp-rail-qv-page { color: var(--hp-rail-ink); text-underline-offset: 4px; }
.hp-rail-qv button:focus-visible, .hp-rail-qv a:focus-visible { outline: 2px solid var(--hp-rail-gold); outline-offset: 3px; }
.hp-rail-qv-close {
	position: absolute; top: 18px; right: 24px; display: inline-flex; align-items: center; gap: 8px; padding: 0;
	border: 0; background: none; font-size: 15px; font-weight: 500;
	text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px;
}
@media (hover: hover) { .hp-rail-qv-close:hover, .hp-rail-qv-tabs button:hover, .hp-rail-qv-page:hover, .hp-rail-list a:hover { color: var(--hp-rail-gold); } }
.hp-rail-fly { position: fixed; z-index: 100000; pointer-events: none; transform-origin: 50% 42%; }

/* phones */
@media (max-width: 620px) {
	.hp-rail-zone { height: calc(258 * var(--u)); }
	.hp-rail-tag { font-size: calc(8 * var(--u)); padding: calc(2 * var(--u)) calc(5 * var(--u)); }
	.hp-rail-foot { grid-template-columns: 1fr; justify-items: start; gap: 14px; }
	.hp-rail-progress { width: 110px; }
	.hp-rail-copy { justify-self: start; text-align: left; }
	.hp-rail-copy p { font-size: 14px; }
	.hp-rail-qv-info {
		left: 0; right: 0; top: auto; bottom: 0; width: auto; transform: none; gap: 10px;
		padding: 18px 20px calc(20px + env(safe-area-inset-bottom)); background: rgba(20, 16, 13, .94);
	}
	.hp-rail-qv-meta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.hp-rail *, .hp-rail-qv * { transition-duration: 0s !important; animation-duration: 0s !important; }
}

/* before the intro (rail.js removes .is-pre once the sheets are in and the band is on screen) */
.hp-rail.is-pre .hp-rail-drop, .hp-rail.is-pre .hp-rail-shadow { opacity: 0; }
