/**
 * Turnstiles & Speed Gates page — scoped styles
 *
 * Loaded by hifocus_turnstiles_assets() on the single turnstiles-speed-gates
 * solution post only, with hifocus-main as its declared dependency.
 *
 * The page reuses main.css components wholesale — sw-hero, sw-crumbs, sw-band,
 * section-head, sw-faq and cta-panel. This sheet adds only the patterns
 * main.css has no equivalent for:
 *
 *   1. .tg-hero__grid    — hero graphic overlay + the hero highlight line
 *   2. .tg-type          — THE SIX TYPES, image-led cards (light band)
 *   3. .tg-core          — the three capabilities, one featured (dark band)
 *   4. .tg-process       — the four-step timeline (plain white section)
 *   5. .tg-crosslink     — the "only half the system" panel, two destinations
 *   6. .tg-contact       — the contact grid inside the closing CTA
 *
 * Every rule is scoped under .turnstiles-page, so no other page is affected.
 *
 * All colours, radii, spacing and easing come from the existing :root tokens.
 * No new palette, no new fonts, no third-party framework.
 *
 * ON THE DUPLICATION WITH wifi-solutions.css / networking-solutions.css
 *
 * .tg-core, .tg-process and .tg-contact restate shapes those sheets already
 * define as .wifi-* and .net-*. That is deliberate and matches the note in
 * both of them: those rules are scoped under .wifi-page / .networking-page and
 * cannot be reached from here without editing a sheet that serves a live page.
 * A third page now shares these shapes, which strengthens the case for pulling
 * the common set into one sheet scoped to a class all three carry — but that
 * is a refactor to do deliberately, with all three pages open, not a side
 * effect of adding this one.
 *
 * .tg-type has no equivalent anywhere and is genuinely new. See section 2.
 */

/* -------------------------------------------------- *
 * 1. Hero — graphic overlay and highlight line
 *
 * NO HERO PHOTOGRAPH, and no background-image hook for one either. The hero is
 * single-column: main.css collapses .sw-hero__inner to one full-width column
 * through :not(:has(.sw-hero__visual)), and this page never prints that div.
 *
 * The six images this page owns are supplier product renders on white
 * backgrounds. They belong on the light band in section 2 and would read as
 * white rectangles against the navy hero, so none of them is used here. When a
 * photograph of an installed turnstile in situ exists, add it as a real <img>
 * in a .sw-hero__visual column — see the note in the template. Do not add a
 * full-bleed background image: that pattern was tried on the WiFi and
 * Networking pages and dropped.
 * -------------------------------------------------- */

/*
 * Interlocking verticals, masked from the top. A lane motif rather than the
 * WiFi page's broadcast rings or the Networking page's square grid — the
 * subject here is a row of barriers, so the overlay reads as uprights.
 */
.turnstiles-page .tg-hero__grid {
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image:
		repeating-linear-gradient(
			90deg,
			rgba(34, 211, 238, 0.09) 0 2px,
			transparent 2px 96px
		);
	-webkit-mask-image: radial-gradient(90% 75% at 50% 0%, #000 0%, transparent 78%);
	mask-image: radial-gradient(90% 75% at 50% 0%, #000 0%, transparent 78%);
	pointer-events: none;
}

.turnstiles-page .tg-hero__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	gap: 0.6rem 1.4rem;
	margin: var(--space-lg) 0 0;
	padding: 0;
	list-style: none;
	color: rgba(255, 255, 255, 0.6);
	font-size: var(--fs-sm);
	font-weight: 600;
}

.turnstiles-page .tg-hero__meta li {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
}

.turnstiles-page .tg-hero__meta svg {
	width: 16px;
	height: 16px;
	color: var(--cyan-400);
}

/* -------------------------------------------------- *
 * 2. The six types — image-led cards on the LIGHT band
 *
 * The core of the page. A buyer cannot choose a turnstile from text alone, so
 * these cards are carried by the picture and the copy is support.
 *
 * WHY THIS SECTION IS LIGHT AND MUST STAY LIGHT. The six images are supplier
 * product renders on white backgrounds. On sw-band--dark each one would read
 * as a white rectangle pasted onto navy. If this section is ever moved to a
 * dark band, replace the photography first — do not try to solve it with a
 * blend mode, which will grey the product as well as the background.
 *
 * WHY object-fit IS contain, NOT cover. Everywhere else in this theme a card
 * image is cropped with cover, because those are photographs and the subject
 * survives a crop. These are product cutouts: a turnstile is a tall object in
 * a square frame, and cover would slice the top or bottom off the very thing
 * the card exists to show. contain keeps the whole unit visible and lets the
 * white of the render meet the white of the tile.
 * -------------------------------------------------- */

.turnstiles-page .tg-type-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-md);
}

.turnstiles-page .tg-type {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: var(--radius-lg);
	border: 1px solid var(--color-border);
	background-color: var(--color-bg);
	box-shadow: var(--shadow-sm);
	text-decoration: none;
	transition: transform 0.35s var(--ease-out), border-color var(--transition),
		box-shadow 0.35s var(--ease-out);
}

/*
 * Hover lift on the card. The card is NOT a link — it is a plain <div> in every
 * state, and the two links it contains are its footer actions. The lift is a
 * grouping cue ("this one"), not a promise of navigation; the WhatsApp button
 * and the products link are what actually navigate.
 */
.turnstiles-page .tg-type:hover {
	transform: translateY(-6px);
	border-color: rgba(22, 102, 232, 0.35);
	box-shadow: var(--shadow-md);
}

/*
 * 1/1 matches the 800x800 sources exactly, so nothing is letterboxed today.
 * The ratio lives on the figure rather than the image so that a future render
 * with different dimensions still lines up with the other five.
 *
 * The tile is --color-surface, a hair darker than the card, so the white of
 * the product render has an edge to sit against instead of dissolving into it.
 */
.turnstiles-page .tg-type__figure {
	margin: 0;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	background-color: var(--color-surface);
	border-bottom: 1px solid var(--color-border);
}

.turnstiles-page .tg-type__img {
	display: block;
	width: 100%;
	height: 100%;
	padding: var(--space-sm);
	object-fit: contain;
	object-position: center;
	transition: transform 0.5s var(--ease-out);
}

.turnstiles-page .tg-type:hover .tg-type__img {
	transform: scale(1.04);
}

/* flex: 1 keeps card bottoms aligned when one description wraps further. */
.turnstiles-page .tg-type__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: var(--space-md);
}

.turnstiles-page .tg-type__title {
	margin: 0;
	color: var(--color-text);
	font-size: 1.05rem;
	font-weight: 700;
}

.turnstiles-page .tg-type__desc {
	margin: 0.4rem 0 0;
	color: var(--color-muted);
	font-size: var(--fs-sm);
	line-height: 1.65;
}

/*
 * Footer actions. margin-top: auto pins the row to the bottom of the body, so
 * the buttons line up across a row even when the descriptions differ in length.
 *
 * Two sibling links, never nested inside a card anchor — see the note in the
 * template for why the card is not a link and why the stretched-link overlay
 * was rejected. column-gap is generous so the two are not mistaken for one
 * control; the WhatsApp button is always present, the products link only when
 * that category has stock behind it.
 */
.turnstiles-page .tg-type__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem 1rem;
	margin-top: auto;
	padding-top: var(--space-md);
}

/*
 * .btn-enquire from main.css supplies the WhatsApp green, the pill and the
 * type scale. Only the flex behaviour is set here: the button leads the row and
 * may grow to fill it when the products link is absent, which is every card
 * today.
 */
.turnstiles-page .tg-type__wa {
	flex: 0 1 auto;
}

.turnstiles-page .tg-type__more {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: var(--color-primary);
	font-size: var(--fs-sm);
	font-weight: 700;
	text-decoration: none;
}

.turnstiles-page .tg-type__more:hover,
.turnstiles-page .tg-type__more:focus-visible {
	text-decoration: underline;
}

.turnstiles-page .tg-type__more svg {
	width: 18px;
	height: 18px;
	transition: transform var(--transition);
}

.turnstiles-page .tg-type__more:hover svg {
	transform: translateX(3px);
}

/*
 * Both card links share one focus treatment. The card itself is not focusable,
 * so this is the only focus ring in the grid and it has to be obvious.
 */
.turnstiles-page .tg-type__wa:focus-visible,
.turnstiles-page .tg-type__more:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: 3px;
}

/* Closing line under the grid, for the visitor who still cannot decide. */
.turnstiles-page .tg-type-foot {
	max-width: 60ch;
	margin: var(--space-lg) auto 0;
	color: var(--color-muted);
	font-size: var(--fs-sm);
	text-align: center;
}

/* -------------------------------------------------- *
 * 3. The three capabilities — dark band
 *
 * Two equal cards on the first row, then the featured access-control card
 * spanning the full width beneath them. Same shape as .wifi-core.
 * -------------------------------------------------- */

.turnstiles-page .tg-core-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--space-md);
}

.turnstiles-page .tg-core {
	position: relative;
	isolation: isolate;
	display: flex;
	gap: var(--space-sm);
	padding: var(--space-md);
	border-radius: var(--radius-lg);
	border: 1px solid rgba(120, 170, 255, 0.18);
	background-color: rgba(255, 255, 255, 0.04);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	transition: transform 0.35s var(--ease-out), border-color var(--transition),
		background-color var(--transition);
}

.turnstiles-page .tg-core:hover {
	transform: translateY(-6px);
	border-color: rgba(34, 211, 238, 0.45);
	background-color: rgba(255, 255, 255, 0.07);
}

.turnstiles-page .tg-core__icon {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: var(--radius-md);
	background-color: rgba(34, 211, 238, 0.1);
	color: var(--cyan-400);
	transition: background-image var(--transition), color var(--transition);
}

.turnstiles-page .tg-core__icon svg {
	width: 24px;
	height: 24px;
}

.turnstiles-page .tg-core:hover .tg-core__icon {
	background-image: var(--gradient-brand);
	color: var(--color-inverse);
}

.turnstiles-page .tg-core__title {
	margin: 0;
	color: var(--color-inverse);
	font-size: 1.05rem;
	font-weight: 700;
}

.turnstiles-page .tg-core__desc {
	margin: 0.4rem 0 0;
	color: rgba(255, 255, 255, 0.62);
	font-size: var(--fs-sm);
	line-height: 1.7;
}

/* ---------- Featured: access control integration ---------- */

.turnstiles-page .tg-core--featured {
	grid-column: 1 / -1;
	padding: clamp(1.5rem, 3.5vw, 2.25rem);
	border-color: rgba(34, 211, 238, 0.35);
	background:
		radial-gradient(90% 140% at 0% 0%, rgba(34, 211, 238, 0.12) 0%, transparent 60%),
		rgba(255, 255, 255, 0.05);
}

.turnstiles-page .tg-core--featured .tg-core__icon {
	width: 60px;
	height: 60px;
	background-image: var(--gradient-brand);
	color: var(--color-inverse);
	box-shadow: 0 10px 28px rgba(22, 102, 232, 0.38);
}

.turnstiles-page .tg-core--featured .tg-core__icon svg {
	width: 30px;
	height: 30px;
}

.turnstiles-page .tg-core--featured .tg-core__title {
	font-size: clamp(1.15rem, 2.2vw, 1.5rem);
}

.turnstiles-page .tg-core--featured .tg-core__desc {
	max-width: 68ch;
	font-size: var(--fs-base);
}

.turnstiles-page .tg-core__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.6rem 1.5rem;
	margin: var(--space-md) 0 0;
	padding: 0;
	list-style: none;
}

.turnstiles-page .tg-core__list li {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	color: rgba(255, 255, 255, 0.78);
	font-size: var(--fs-sm);
	line-height: 1.6;
}

.turnstiles-page .tg-core__check {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	margin-top: 0.1rem;
	border-radius: 999px;
	background-color: rgba(34, 211, 238, 0.16);
	color: var(--cyan-400);
}

.turnstiles-page .tg-core__check svg {
	width: 13px;
	height: 13px;
}

/* -------------------------------------------------- *
 * 4. Process — four-step timeline on a plain white section
 *
 * The light-background sibling of .sec-process, same geometry as .wifi-process.
 * -------------------------------------------------- */

.turnstiles-page .tg-process {
	--pgap: clamp(1rem, 2.5vw, 1.75rem);
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--pgap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.turnstiles-page .tg-process__step {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-top: 0.5rem;
	text-align: center;
}

/*
 * Connector: a gradient hairline from this step's badge centre to the next.
 * The badge is 52px, so its centre sits 0.5rem + 26px below the step top.
 */
.turnstiles-page .tg-process__step::before {
	content: "";
	position: absolute;
	top: calc(0.5rem + 26px);
	left: 50%;
	z-index: 0;
	width: calc(100% + var(--pgap));
	height: 2px;
	background: linear-gradient(90deg, rgba(22, 102, 232, 0.45), rgba(22, 102, 232, 0.12));
}

.turnstiles-page .tg-process__step:last-child::before {
	display: none;
}

.turnstiles-page .tg-process__num {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 999px;
	background-image: var(--gradient-brand);
	color: var(--color-inverse);
	font-size: 1rem;
	font-weight: 800;
	box-shadow: 0 8px 24px rgba(22, 102, 232, 0.32);
}

.turnstiles-page .tg-process__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-top: 1rem;
	border-radius: 14px;
	background-color: rgba(22, 102, 232, 0.09);
	color: var(--color-primary);
}

.turnstiles-page .tg-process__icon svg {
	width: 22px;
	height: 22px;
}

.turnstiles-page .tg-process__title {
	margin: 0.9rem 0 0;
	color: var(--color-text);
	font-size: 1.02rem;
	font-weight: 700;
}

.turnstiles-page .tg-process__desc {
	max-width: 30ch;
	margin: 0.4rem 0 0;
	color: var(--color-muted);
	font-size: var(--fs-sm);
	line-height: 1.6;
}

/* -------------------------------------------------- *
 * 5. Cross-link panel — "A Turnstile Is Only Half the System"
 *
 * Two destinations rather than the WiFi page's one: access control and time
 * attendance are separate products here, and a turnstile job commonly touches
 * both. .tg-crosslink__actions is the only structural difference from
 * .wifi-crosslink.
 * -------------------------------------------------- */

.turnstiles-page .tg-crosslink__panel {
	display: flex;
	align-items: center;
	gap: var(--space-md);
	padding: var(--space-md) clamp(1.25rem, 3vw, 2rem);
	border-radius: var(--radius-lg);
	border: 1px solid rgba(22, 102, 232, 0.22);
	background:
		radial-gradient(70% 160% at 0% 50%, rgba(34, 211, 238, 0.10) 0%, transparent 62%),
		var(--color-bg);
	box-shadow: var(--shadow-sm);
}

.turnstiles-page .tg-crosslink__icon {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	border-radius: var(--radius-md);
	background-image: var(--gradient-brand);
	color: var(--color-inverse);
	box-shadow: 0 10px 26px rgba(22, 102, 232, 0.32);
}

.turnstiles-page .tg-crosslink__icon svg {
	width: 27px;
	height: 27px;
}

.turnstiles-page .tg-crosslink__body {
	flex: 1 1 auto;
	min-width: 0;
}

.turnstiles-page .tg-crosslink__title {
	margin: 0;
	color: var(--color-text);
	font-size: clamp(1.1rem, 2.2vw, 1.35rem);
	font-weight: 800;
	letter-spacing: -0.015em;
}

.turnstiles-page .tg-crosslink__lead {
	max-width: 68ch;
	margin: 0.35rem 0 0;
	color: var(--color-muted);
	font-size: var(--fs-sm);
	line-height: 1.7;
}

/* Wraps rather than squeezing the two buttons at narrow desktop widths. */
.turnstiles-page .tg-crosslink__actions {
	display: flex;
	flex-shrink: 0;
	flex-wrap: wrap;
	gap: var(--space-sm);
}

/* -------------------------------------------------- *
 * 6. Contact grid inside the closing CTA
 * -------------------------------------------------- */

.turnstiles-page .tg-contact {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--space-sm);
	margin-top: var(--space-lg);
	text-align: left;
}

.turnstiles-page .tg-contact__card {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	padding: var(--space-md);
	border-radius: var(--radius-lg);
	border: 1px solid rgba(120, 170, 255, 0.18);
	background-color: rgba(255, 255, 255, 0.05);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	transition: transform 0.35s var(--ease-out), border-color var(--transition),
		background-color var(--transition);
}

.turnstiles-page .tg-contact__card:hover {
	transform: translateY(-6px);
	border-color: rgba(34, 211, 238, 0.5);
	background-color: rgba(255, 255, 255, 0.08);
}

.turnstiles-page .tg-contact__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin-bottom: 0.35rem;
	border-radius: 12px;
	background-color: rgba(34, 211, 238, 0.12);
	color: var(--cyan-400);
}

.turnstiles-page .tg-contact__icon svg {
	width: 20px;
	height: 20px;
}

.turnstiles-page .tg-contact__label {
	margin: 0;
	color: rgba(255, 255, 255, 0.55);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.turnstiles-page .tg-contact__value {
	margin: 0;
	color: var(--color-inverse);
	font-size: 0.98rem;
	font-weight: 700;
	overflow-wrap: anywhere;
}

.turnstiles-page .tg-contact__value a {
	color: var(--color-inverse);
}

.turnstiles-page .tg-contact__value a:hover,
.turnstiles-page .tg-contact__value a:focus-visible {
	color: var(--cyan-300);
}

/* -------------------------------------------------- *
 * Motion + responsive
 * -------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.turnstiles-page .tg-type:hover,
	.turnstiles-page .tg-core:hover,
	.turnstiles-page .tg-contact__card:hover {
		transform: none;
	}

	.turnstiles-page .tg-type:hover .tg-type__img,
	.turnstiles-page .tg-type__more:hover svg {
		transform: none;
	}
}

/*
 * Laptop: the six type cards drop from three tracks to two, the contact grid
 * halves. Two tracks divides six evenly — three rows, no stranded card. Every
 * step in the type ladder (3 -> 2 -> 1) has to keep that property.
 */
@media (max-width: 1024px) {
	.turnstiles-page .tg-type-grid,
	.turnstiles-page .tg-contact {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Tablet: capability cards stack and the process timeline goes vertical. */
@media (max-width: 900px) {
	.turnstiles-page .tg-core-grid {
		grid-template-columns: 1fr;
	}

	.turnstiles-page .tg-core__list {
		grid-template-columns: 1fr;
	}

	.turnstiles-page .tg-process {
		grid-template-columns: 1fr;
		max-width: 30rem;
		margin-inline: auto;
		gap: var(--space-md);
	}

	/* Vertical stack: the horizontal connector no longer applies. */
	.turnstiles-page .tg-process__step::before {
		display: none;
	}

	.turnstiles-page .tg-process__desc {
		max-width: 40ch;
	}
}

@media (max-width: 760px) {
	.turnstiles-page .tg-crosslink__panel {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.turnstiles-page .tg-crosslink__lead {
		margin-inline: auto;
	}

	.turnstiles-page .tg-crosslink__actions {
		justify-content: center;
	}
}

/* Mobile: single column throughout. */
@media (max-width: 620px) {
	.turnstiles-page .tg-type-grid,
	.turnstiles-page .tg-contact {
		grid-template-columns: 1fr;
	}

	.turnstiles-page .tg-core {
		flex-direction: column;
	}

	/*
	 * One card per row on a phone makes a 1/1 tile very tall. 4/3 keeps the
	 * whole unit visible — the image is contain, not cover, so a wider frame
	 * letterboxes it against the tile rather than cropping it.
	 */
	.turnstiles-page .tg-type__figure {
		aspect-ratio: 4 / 3;
	}
}
