/**
 * Access Control page — scoped styles
 *
 * Loaded by hifocus_access_assets() on the single access-control-solutions
 * 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-module (the delivery cards), product-showcase-grid,
 * venue-grid/venue (the SHARED sector cards, section 13.1 of main.css), sw-faq
 * and cta-panel. This sheet adds only the patterns main.css has no equivalent
 * for:
 *
 *   1. .ac-hero__grid      — hero graphic overlay + the hero highlight line
 *   2. .ac-cred            — THE FOUR CREDENTIALS, icon-led cards (light band)
 *   3. .ac-deliver--featured — the full-width permission-structure card
 *   4. .ac-equipment__more — the centred "browse all" action
 *   5. .ac-hw              — the door hardware cards (light band)
 *   6. .ac-process         — the four-step timeline (dark band)
 *   7. .ac-crosslink       — the credential/barrier/record panel
 *   8. .ac-contact         — the contact grid inside the closing CTA
 *
 * Every rule is scoped under .access-page, so no other page is affected. All
 * colours, radii, spacing and easing come from the existing :root tokens.
 *
 * THE VENUE CARDS ARE NOT HERE. They are the shared .venue-grid / .venue
 * component in main.css, which the CCTV page introduced and this page was the
 * second user of. Do not copy them into this sheet.
 *
 * ON THE DUPLICATION WITH turnstiles-speed-gates.css / wifi-solutions.css
 *
 * .ac-process, .ac-crosslink and .ac-contact restate shapes those sheets
 * already define as .tg-*, .wifi-* and .net-*. Same position as the note in
 * turnstiles-speed-gates.css: those rules are scoped under another page's class
 * and cannot be reached from here without editing a sheet that serves a live
 * page. A fourth page now shares them, which strengthens the case for lifting
 * the common set into main.css the way the venue cards just were — but with all
 * four pages open, deliberately, not as a side effect of adding this one.
 *
 * .ac-cred is genuinely new: an icon-led chooser card, where every other card
 * grid on this site is either image-led or a plain glass panel. See section 2.
 */

/* -------------------------------------------------- *
 * 1. Hero — graphic overlay and highlight line
 *
 * NO HERO PHOTOGRAPH, and no background-image hook for one. The hero is
 * single-column: main.css collapses .sw-hero__inner through
 * :not(:has(.sw-hero__visual)), and this page never prints that div. The
 * only product photography on this page is in the catalogue grid — supplier
 * cutouts on white, which against navy would read as white rectangles.
 *
 * The overlay motif is a door threshold — two uprights and a lintel, repeated
 * and masked from the top — rather than the Turnstiles page's lane verticals or
 * the CCTV page's technology grid.
 * -------------------------------------------------- */

.access-page .ac-hero__grid {
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image:
		linear-gradient(90deg, rgba(34, 211, 238, 0.16) 1px, transparent 1px),
		linear-gradient(0deg, rgba(22, 102, 232, 0.14) 1px, transparent 1px);
	background-size: 132px 100%, 100% 96px;
	-webkit-mask-image: radial-gradient(120% 85% at 50% 0%, #000 0%, transparent 72%);
	mask-image: radial-gradient(120% 85% at 50% 0%, #000 0%, transparent 72%);
	opacity: 0.5;
	pointer-events: none;
}

.access-page .ac-hero__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem 1.5rem;
	margin: var(--space-md) 0 0;
	padding: 0;
	list-style: none;
}

.access-page .ac-hero__meta li {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	color: rgba(255, 255, 255, 0.72);
	font-size: var(--fs-sm);
	font-weight: 600;
}

.access-page .ac-hero__meta svg {
	width: 18px;
	height: 18px;
	color: var(--cyan-400);
}

/* -------------------------------------------------- *
 * 2. The four credentials — icon-led cards on the light band
 *
 * ICONS, NOT PRODUCT PHOTOGRAPHS. These cards were briefly image-led, each
 * pulling a representative product from its term, and it did not work: a face
 * terminal and a fingerprint terminal are both a white slab on a wall bracket
 * and photograph almost identically, so the pictures said nothing about the
 * choice. The selector is about the method; the devices are in the catalogue
 * grid further down the page.
 *
 * The tile is kept at the same size a photograph occupied, so the section keeps
 * its proportions and the four cards read as one set.
 *
 * FOUR TRACKS, and the ladder has to divide four at every step: 4 -> 2 -> 1.
 * A three-column step would strand the fourth credential on a row of its own.
 * -------------------------------------------------- */

.access-page .ac-cred-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--space-md);
}

.access-page .ac-cred {
	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);
	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, not a promise of navigation.
 */
.access-page .ac-cred:hover {
	transform: translateY(-6px);
	border-color: rgba(22, 102, 232, 0.35);
	box-shadow: var(--shadow-md);
}

/*
 * The tile the glyph sits on: --color-surface, a hair darker than the card, so
 * the tile has an edge against the card body. 1/1 on desktop, where four cards
 * share a row and the square reads as a chooser tile.
 */
.access-page .ac-cred__figure {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	background-color: var(--color-surface);
	border-bottom: 1px solid var(--color-border);
}

.access-page .ac-cred__glyph {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 84px;
	height: 84px;
	border-radius: var(--radius-lg);
	background-image: var(--gradient-brand);
	color: var(--color-inverse);
	box-shadow: 0 12px 30px rgba(22, 102, 232, 0.3);
	transition: transform 0.35s var(--ease-out);
}

/*
 * 40px inside an 84px tile. The glyphs are 24x24 line art at stroke-width 1.6,
 * and below about 32px the keypad's dot grid stops resolving — so this is a
 * floor, not a preference.
 */
.access-page .ac-cred__glyph svg {
	width: 40px;
	height: 40px;
}

.access-page .ac-cred:hover .ac-cred__glyph {
	transform: scale(1.06);
}

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

.access-page .ac-cred__title {
	margin: 0;
	color: var(--color-text);
	font-size: 1.05rem;
	font-weight: 700;
}

.access-page .ac-cred__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 the row even when the descriptions differ in
 * length. Two sibling links, never nested inside a card anchor — see the note
 * in the template. The WhatsApp button is always present; the products link
 * appears only when that category has published stock behind it.
 */
.access-page .ac-cred__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem 1rem;
	margin-top: auto;
	padding-top: var(--space-md);
}

.access-page .ac-cred__wa {
	flex: 0 1 auto;
}

.access-page .ac-cred__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;
}

.access-page .ac-cred__more:hover,
.access-page .ac-cred__more:focus-visible {
	text-decoration: underline;
}

.access-page .ac-cred__more svg {
	width: 18px;
	height: 18px;
	transition: transform var(--transition);
}

.access-page .ac-cred__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.
 */
.access-page .ac-cred__wa:focus-visible,
.access-page .ac-cred__more:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: 3px;
}

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

/* -------------------------------------------------- *
 * 3. What a door installation includes — dark band
 *
 * The cards are .sw-module from main.css. Only the grid and the featured card
 * are set here: six cards across two rows of three, then the
 * permission-structure card spanning the full width beneath them, because it is
 * the part that decides whether the installation is any good.
 *
 * THREE TRACKS, so the plain cards have to stay a multiple of three or the last
 * row shows a hole -- which is exactly what five of them did. Add a seventh
 * plain card and this needs revisiting, not just a new array entry.
 * -------------------------------------------------- */

.access-page .ac-deliver-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-md);
}

.access-page .ac-deliver--featured {
	grid-column: 1 / -1;
	background-color: rgba(255, 255, 255, 0.07);
}

.access-page .ac-deliver--featured .sw-module__title {
	font-size: 1.12rem;
}

.access-page .ac-deliver--featured .sw-module__desc {
	max-width: 72ch;
}

/* -------------------------------------------------- *
 * 4. Equipment showcase — closing action
 * -------------------------------------------------- */

.access-page .ac-equipment__more {
	margin-top: var(--space-lg);
	text-align: center;
}

/* -------------------------------------------------- *
 * 5. Door hardware — product cards on the light band
 *
 * The same card shape as the credential selector above, but carrying a real
 * product photograph instead of a glyph: a break-glass unit, a magnetic lock, a
 * touchless sensor and a push button look nothing like each other, so here the
 * picture does work that a name alone cannot.
 *
 * object-fit is contain, not cover, for the reason the Turnstiles sheet gives:
 * these are supplier cutouts, and cover would slice the top or bottom off the
 * very thing the card exists to show.
 *
 * FLEX, CENTRED, not grid. The product count grows as the catalogue does, and a
 * trailing row that does not fill the track count reads as deliberate when it
 * is centred and as a mistake when it is left-aligned. Five products today go
 * four across and one centred beneath; eight fill two rows.
 *
 * The whole card is one anchor — see the note in the template for why this one
 * may be and the credential card may not.
 * -------------------------------------------------- */

.access-page .ac-hw-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--space-md);
}

.access-page .ac-hw {
	display: flex;
	flex: 0 1 calc((100% - 3 * var(--space-md)) / 4);
	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);
}

.access-page .ac-hw:hover {
	transform: translateY(-6px);
	border-color: rgba(22, 102, 232, 0.35);
	box-shadow: var(--shadow-md);
}

.access-page .ac-hw:focus-visible {
	outline: 2px solid var(--color-primary);
	outline-offset: 3px;
}

/*
 * The tile is --color-surface, a hair darker than the card, so the white ground
 * of a cutout has an edge to sit against instead of dissolving into it.
 */
.access-page .ac-hw__figure {
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	background-color: var(--color-surface);
	border-bottom: 1px solid var(--color-border);
}

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

.access-page .ac-hw:hover .ac-hw__img {
	transform: scale(1.04);
}

.access-page .ac-hw__body {
	display: block;
	flex: 1;
	padding: var(--space-md);
}

.access-page .ac-hw__title {
	margin: 0;
	color: var(--color-text);
	font-size: 0.98rem;
	font-weight: 700;
	line-height: 1.35;
}

.access-page .ac-hw:hover .ac-hw__title {
	color: var(--color-primary);
}

.access-page .ac-hw__desc {
	display: block;
	margin-top: 0.4rem;
	color: var(--color-muted);
	font-size: var(--fs-sm);
	line-height: 1.6;
}

/* -------------------------------------------------- *
 * 6. Process — four-step timeline on the dark band
 *
 * The dark-band sibling of .tg-process, same geometry as .sec-process.
 * -------------------------------------------------- */

.access-page .ac-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;
}

.access-page .ac-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. The
 * last step drops it.
 */
.access-page .ac-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(34, 211, 238, 0.55), rgba(34, 211, 238, 0.12));
}

.access-page .ac-process__step:last-child::before {
	display: none;
}

.access-page .ac-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.4);
}

.access-page .ac-process__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-top: 1rem;
	border-radius: 14px;
	background-color: rgba(34, 211, 238, 0.1);
	color: var(--cyan-400);
}

.access-page .ac-process__icon svg {
	width: 22px;
	height: 22px;
}

.access-page .ac-process__title {
	margin: 0.9rem 0 0;
	color: var(--color-inverse);
	font-size: 1.05rem;
	font-weight: 700;
}

.access-page .ac-process__desc {
	max-width: 26ch;
	margin: 0.4rem 0 0;
	color: rgba(255, 255, 255, 0.62);
	font-size: var(--fs-sm);
	line-height: 1.6;
}

/* -------------------------------------------------- *
 * 7. Cross-link panel — "The Credential Is One Layer of Three"
 *
 * The reciprocal half of .tg-crosslink on the Turnstiles page, and deliberately
 * the same shape: a visitor who follows the link from there and back should not
 * meet two different components saying the same thing. Two destinations,
 * because the barrier and the record are separate products here.
 * -------------------------------------------------- */

.access-page .ac-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);
}

.access-page .ac-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);
}

.access-page .ac-crosslink__icon svg {
	width: 27px;
	height: 27px;
}

.access-page .ac-crosslink__body {
	flex: 1 1 auto;
	min-width: 0;
}

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

.access-page .ac-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. */
.access-page .ac-crosslink__actions {
	display: flex;
	flex-shrink: 0;
	flex-wrap: wrap;
	gap: var(--space-sm);
}

/*
 * .btn--ghost is the DARK-BACKGROUND ghost: white text on a translucent white
 * fill. This panel is white, where that button was close to invisible, so the
 * ghost here is restated in dark ink with a visible border. Scoped to this
 * panel only; every other .btn--ghost on the page sits on navy and keeps the
 * main.css treatment. Same fix as .ta-crosslink and .tg-crosslink.
 */
.access-page .ac-crosslink__actions .btn--ghost {
	border-color: var(--color-border);
	background-color: var(--color-bg);
	color: var(--color-text);
	backdrop-filter: none;
}

.access-page .ac-crosslink__actions .btn--ghost:hover,
.access-page .ac-crosslink__actions .btn--ghost:focus-visible {
	border-color: var(--color-primary);
	background-color: var(--color-bg);
	color: var(--color-primary);
}

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

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

.access-page .ac-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);
}

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

.access-page .ac-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);
}

.access-page .ac-contact__icon svg {
	width: 20px;
	height: 20px;
}

.access-page .ac-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;
}

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

.access-page .ac-contact__value a {
	color: var(--color-inverse);
}

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

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

@media (prefers-reduced-motion: reduce) {
	.access-page .ac-cred:hover,
	.access-page .ac-hw:hover,
	.access-page .ac-contact__card:hover {
		transform: none;
	}

	.access-page .ac-cred:hover .ac-cred__glyph,
	.access-page .ac-hw:hover .ac-hw__img,
	.access-page .ac-cred__more:hover svg {
		transform: none;
	}
}

/*
 * Laptop: the four credential cards halve, the delivery grid halves and the
 * contact grid halves. Two divides four, so the credential row stays even at
 * every step — see the ladder note in section 2.
 */
@media (max-width: 1024px) {
	.access-page .ac-cred-grid,
	.access-page .ac-contact {
		grid-template-columns: repeat(2, 1fr);
	}

	/* Halves: two divides both four and eight, and five centres its last card. */
	.access-page .ac-hw {
		flex-basis: calc((100% - var(--space-md)) / 2);
	}

	.access-page .ac-deliver-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Tablet: delivery cards stack and the process timeline goes vertical. */
@media (max-width: 900px) {
	.access-page .ac-deliver-grid {
		grid-template-columns: 1fr;
	}

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

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

	.access-page .ac-process__desc {
		max-width: 40ch;
	}
}

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

	.access-page .ac-crosslink__lead {
		margin-inline: auto;
	}

	.access-page .ac-crosslink__actions {
		justify-content: center;
	}
}

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

	/*
	 * One card per row on a phone makes a 1/1 tile absurdly tall for a single
	 * glyph. A fixed height instead of a ratio: the tile no longer has to hold
	 * anything that scales.
	 */
	.access-page .ac-cred__figure {
		aspect-ratio: auto;
		height: 140px;
	}

	.access-page .ac-hw {
		flex-basis: 100%;
	}

	/* One card per row: a square tile is needlessly tall for a small part. */
	.access-page .ac-hw__figure {
		aspect-ratio: auto;
		height: 200px;
	}
}
