/*
Theme Name: A to Z Workforce Solutions
Theme URI: https://atozworkforcesolutions.co.uk
Author: A to Z Workforce Solutions
Description: Custom WordPress theme built from the "Landmark Security Website Redesign" Stitch design — a dark, high-contrast security/guarding services site with Home, Services, About Us and Get a Quote pages.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: landmark
*/

@layer base {
	html,
	body {
		margin: 0;
		padding: 0;
	}
	body {
		overscroll-behavior: none;
	}
	main > :first-child {
		margin-top: 0 !important;
	}
	main > :last-child {
		margin-bottom: 0 !important;
	}
}

::-webkit-scrollbar {
	display: none;
}

.material-symbols-outlined {
	font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Off-canvas mobile nav drawer (checkbox hack, no JS required) */
#drawer-toggle:checked ~ #nav-drawer {
	transform: translateX(0);
	visibility: visible;
}
#drawer-toggle:checked ~ #drawer-backdrop {
	opacity: 1;
	pointer-events: auto;
}

/* Home hero — pure-CSS auto-rotating background photo carousel (4 slides, 20s loop) */
.hero-carousel {
	background: #0e1321;
}
.hero-carousel .hero-slide {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	opacity: 0;
	transform: scale(1);
	animation: heroFade 20s infinite;
}
.hero-carousel .hero-slide:nth-child(1) { animation-delay: 0s; }
.hero-carousel .hero-slide:nth-child(2) { animation-delay: -5s; }
.hero-carousel .hero-slide:nth-child(3) { animation-delay: -10s; }
.hero-carousel .hero-slide:nth-child(4) { animation-delay: -15s; }
@keyframes heroFade {
	0% { opacity: 0; transform: scale(1); }
	4% { opacity: 1; transform: scale(1.03); }
	21% { opacity: 1; transform: scale(1.13); }
	25% { opacity: 0; transform: scale(1.16); }
	100% { opacity: 0; transform: scale(1.16); }
}
@media (prefers-reduced-motion: reduce) {
	.hero-carousel .hero-slide {
		animation: none;
		opacity: 0;
		transform: none;
	}
	.hero-carousel .hero-slide:first-child {
		opacity: 1;
	}
}

/* ==================== "Get a Quote" popup modal ==================== */
.quote-modal {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.quote-modal.is-open {
	visibility: visible;
	opacity: 1;
	transition: opacity 0.25s ease;
}
.quote-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(9, 14, 28, 0.8);
	backdrop-filter: blur(4px);
}
.quote-modal-dialog {
	position: relative;
	display: grid;
	grid-template-columns: 1fr;
	width: 100%;
	max-width: 760px;
	max-height: calc(100vh - 32px);
	overflow-x: hidden;
	overflow-y: auto;
	background: #1a1f2e;
	border-radius: 16px;
	box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
	transform: translateY(24px) scale(0.98);
	transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	box-sizing: border-box;
}
.quote-modal.is-open .quote-modal-dialog {
	transform: translateY(0) scale(1);
}
@media (min-width: 1024px) {
	.quote-modal-dialog {
		grid-template-columns: 0.8fr 1.2fr;
		max-height: calc(100vh - 64px);
	}
}
.quote-modal-image {
	position: relative;
	min-height: 100%;
}
.quote-modal-image img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 20px 0 0 20px;
}
.quote-modal-image-overlay {
	position: absolute;
	inset: 0;
	border-radius: 20px 0 0 20px;
	background: linear-gradient(180deg, rgba(9, 14, 28, 0.1), rgba(9, 14, 28, 0.85));
}
.quote-modal-image-caption {
	position: absolute;
	left: 24px;
	bottom: 24px;
	right: 24px;
}
.quote-modal-form {
	padding: 22px 24px;
	position: relative;
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	overflow-wrap: break-word;
}
.quote-modal-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	border: none;
	background: rgba(255, 255, 255, 0.08);
	color: #dee2f6;
	cursor: pointer;
	z-index: 5;
	transition: background 0.2s ease;
}
.quote-modal-close:hover {
	background: rgba(255, 255, 255, 0.18);
}
.quote-modal-row-2 {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 10px;
}
.quote-modal-field {
	display: flex;
	flex-direction: column;
	gap: 3px;
	margin-bottom: 9px;
	min-width: 0;
	max-width: 100%;
}
.quote-modal-field label {
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #a08e7a;
}
.quote-modal-required {
	color: #ffc174;
}
.quote-modal-field input,
.quote-modal-field select,
.quote-modal-field textarea {
	background: #090e1c;
	color: #dee2f6;
	border: 1px solid #303444;
	border-radius: 8px;
	padding: 8px 10px;
	font-family: 'Inter', sans-serif;
	font-size: 13.5px;
	line-height: 1.3;
	resize: vertical;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}
.quote-modal-field textarea {
	min-height: 44px;
}
.quote-modal-field input:focus,
.quote-modal-field select:focus,
.quote-modal-field textarea:focus {
	outline: none;
	border-color: #ffc174;
}
.quote-modal-submit {
	width: 100%;
	background: #ffc174;
	color: #472a00;
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-weight: 700;
	font-size: 14px;
	padding: 11px;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 2px;
	transition: background 0.2s ease;
}
.quote-modal-submit:hover {
	background: #f59e0b;
}
.quote-modal-banner {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border-radius: 8px;
	font-size: 12.5px;
	margin-bottom: 10px;
}
.quote-modal-banner-success {
	background: rgba(86, 229, 169, 0.15);
	color: #56e5a9;
}
.quote-modal-banner-error {
	background: rgba(147, 0, 10, 0.6);
	color: #ffdad6;
}
body.quote-modal-open {
	overflow: hidden;
}
@media (max-width: 640px) {
	.quote-modal {
		padding: 10px;
	}
	.quote-modal-dialog {
		max-height: calc(100vh - 20px);
		border-radius: 14px;
	}
	.quote-modal-form {
		padding: 18px 16px;
	}
	.quote-modal-row-2 {
		grid-template-columns: 1fr;
	}
}
@media (prefers-reduced-motion: reduce) {
	.quote-modal,
	.quote-modal-dialog {
		transition: none;
	}
}

/* Sticky "Get A Quote" side tab */
.side-quote-tab {
	writing-mode: vertical-rl;
	transform: translateY(-50%) rotate(180deg);
}

/* Cookie consent banner (GDPR) */
.cookie-banner {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 90;
	padding: 16px;
	padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	background: rgba(9, 14, 28, 0.97);
	backdrop-filter: blur(8px);
	border-top: 1px solid #303444;
	transform: translateY(100%);
	transition: transform 0.35s ease;
}
.cookie-banner.is-visible {
	transform: translateY(0);
}
.cookie-banner-inner {
	max-width: 1280px;
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.cookie-banner-inner p {
	margin: 0;
	max-width: 640px;
}
.cookie-banner-accept {
	background: #ffc174;
	color: #472a00;
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-weight: 700;
	font-size: 14px;
	padding: 10px 24px;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.2s ease;
}
.cookie-banner-accept:hover {
	background: #f59e0b;
}
@media (prefers-reduced-motion: reduce) {
	.cookie-banner {
		transition: none;
	}
}

/* Generic scroll-reveal system used throughout the site — fade+slide in
   the first time an element scrolls into view, then stays put (see the
   IntersectionObserver in assets/js/main.js). Stagger multiple items in
   the same group with an inline style="transition-delay:0.1s" etc. */
.reveal-up,
.reveal-left,
.reveal-right {
	opacity: 0;
	transition: opacity 0.7s ease, transform 0.7s ease;
	will-change: opacity, transform;
}
.reveal-up { transform: translateY(28px); }
.reveal-left { transform: translateX(-36px); }
.reveal-right { transform: translateX(36px); }
.reveal-up.is-visible,
.reveal-left.is-visible,
.reveal-right.is-visible {
	opacity: 1;
	transform: translate(0, 0);
}
@media (prefers-reduced-motion: reduce) {
	.reveal-up,
	.reveal-left,
	.reveal-right {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* 4-Step Deployment Model — full-photo overlay cards, single row.
   Subtle lift on hover to pair with the image zoom set via Tailwind. */
.deploy-card {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.deploy-card:hover {
	transform: translateY(-6px);
}
@media (prefers-reduced-motion: reduce) {
	.deploy-card {
		transition: none;
	}
	.deploy-card:hover {
		transform: none;
	}
}

/* ---------------------------------------------------------------
   Portfolio lightbox — opens when a gallery item is clicked.
   Markup: inc/portfolio.php, behaviour: assets/js/main.js
   --------------------------------------------------------------- */
.portfolio-lightbox {
	position: fixed;
	inset: 0;
	z-index: 120;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	padding: 1.5rem;
	background: rgba(9, 14, 28, 0.92);
	backdrop-filter: blur(6px);
	opacity: 0;
	transition: opacity 0.25s ease;
}
.portfolio-lightbox[hidden] { display: none; }
.portfolio-lightbox.is-open { opacity: 1; }

.portfolio-lightbox-figure {
	margin: 0;
	max-width: min(1100px, 100%);
	max-height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
}
.portfolio-lightbox-figure img {
	max-width: 100%;
	max-height: 78vh;
	width: auto;
	height: auto;
	border-radius: 0.5rem;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
	object-fit: contain;
}
.portfolio-lightbox-figure figcaption {
	color: #dee2f6;
	font-size: 0.875rem;
	text-align: center;
	line-height: 1.4;
}

.portfolio-lightbox-close,
.portfolio-lightbox-nav {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 9999px;
	background: rgba(255, 255, 255, 0.1);
	color: #dee2f6;
	cursor: pointer;
	transition: background 0.2s ease;
}
.portfolio-lightbox-close:hover,
.portfolio-lightbox-nav:hover { background: rgba(255, 255, 255, 0.22); }
.portfolio-lightbox-close:focus-visible,
.portfolio-lightbox-nav:focus-visible { outline: 2px solid #ffc174; outline-offset: 2px; }

.portfolio-lightbox-close {
	position: absolute;
	top: 1rem;
	right: 1rem;
}

/* On phones the side arrows would crowd the image, so drop them to the
   bottom corners where they stay reachable with a thumb. */
@media (max-width: 640px) {
	.portfolio-lightbox-nav {
		position: absolute;
		bottom: 1rem;
	}
	.portfolio-lightbox-prev { left: 1rem; }
	.portfolio-lightbox-next { right: 1rem; }
	.portfolio-lightbox-figure img { max-height: 68vh; }
}

@media (prefers-reduced-motion: reduce) {
	.portfolio-lightbox { transition: none; }
}

/* ---------------------------------------------------------------
   Portfolio coverflow carousel — fanned cards, active one centred.
   Markup: inc/portfolio.php  ·  Behaviour: assets/js/main.js
   JS sets --pf-x / --pf-y / --pf-rot / --pf-scale / --pf-op per card;
   the transition below is what makes the movement read as a fan.
   --------------------------------------------------------------- */
.pf-carousel {
	--pf-card-w: 400px;
	--pf-card-h: 545px;
	position: relative;
	width: 100%;
	padding: 1rem 0 0;
	user-select: none;
}

.pf-stage {
	position: relative;
	height: calc(var(--pf-card-h) + 110px);
	perspective: 1600px;
	transform-style: preserve-3d;
	overflow: hidden;
	touch-action: pan-y;
}

.pf-card {
	position: absolute;
	left: 50%;
	top: 50%;
	width: var(--pf-card-w);
	height: var(--pf-card-h);
	margin-left: calc(var(--pf-card-w) / -2);
	margin-top: calc(var(--pf-card-h) / -2);
	padding: 0;
	border: 0;
	border-radius: 1rem;
	overflow: hidden;
	background: #161b2a;
	cursor: pointer;
	box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
	transform:
		translateX(var(--pf-x, 0px))
		translateY(var(--pf-y, 0px))
		rotate(var(--pf-rot, 0deg))
		scale(var(--pf-scale, 1));
	opacity: var(--pf-op, 1);
	z-index: var(--pf-z, 1);
	transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1),
	            opacity 0.45s ease,
	            box-shadow 0.45s ease;
	will-change: transform;
}

/* The centred card lifts out of the fan. */
.pf-card.is-active {
	box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
	cursor: zoom-in;
}

.pf-card-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	pointer-events: none;
}

/* Side cards are dimmed so the eye lands on the centre one. */
.pf-card-shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(9, 14, 28, 0.92) 0%, rgba(9, 14, 28, 0.15) 45%, rgba(9, 14, 28, 0.45) 100%);
	opacity: 0.75;
	transition: opacity 0.45s ease;
	pointer-events: none;
}
.pf-card.is-active .pf-card-shade { opacity: 1; }
.pf-card:not(.is-active)::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(9, 14, 28, 0.35);
	pointer-events: none;
}

.pf-card-meta {
	position: absolute;
	inset-inline: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	padding: 1rem;
	text-align: left;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.4s ease, transform 0.4s ease;
	pointer-events: none;
}
.pf-card.is-active .pf-card-meta { opacity: 1; transform: translateY(0); }

.pf-card-type {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #ffc174;
}
.pf-card-title {
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	color: #dee2f6;
}

/* Empty-state cards keep the same fan so the section still looks designed. */
.pf-card--empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	background: #161b2a;
	border: 1px dashed #303444;
	box-shadow: none;
	color: #d8c3ad;
	cursor: default;
}
.pf-card--empty .material-symbols-outlined { font-size: 30px; opacity: 0.45; }
.pf-card-empty-label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.45;
}

/* ---- arrows ---- */
.pf-nav {
	position: absolute;
	top: calc(50% - 20px);
	z-index: 60;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(222, 226, 246, 0.18);
	border-radius: 9999px;
	background: rgba(9, 14, 28, 0.72);
	backdrop-filter: blur(8px);
	color: #dee2f6;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.pf-nav:hover {
	background: #ffc174;
	border-color: #ffc174;
	color: #472a00;
	transform: scale(1.06);
}
.pf-nav:focus-visible { outline: 2px solid #ffc174; outline-offset: 3px; }
.pf-nav--prev { left: 0.5rem; }
.pf-nav--next { right: 0.5rem; }

/* ---- dots ---- */
.pf-dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 1.25rem;
}
.pf-dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 9999px;
	background: rgba(222, 226, 246, 0.28);
	cursor: pointer;
	transition: background 0.25s ease, width 0.25s ease;
}
.pf-dot:hover { background: rgba(222, 226, 246, 0.55); }
.pf-dot.is-active { width: 24px; background: #ffc174; }
.pf-dot:focus-visible { outline: 2px solid #ffc174; outline-offset: 3px; }

/* ---- responsive ---- */
@media (max-width: 1024px) {
	.pf-carousel { --pf-card-w: 320px; --pf-card-h: 435px; }
}
@media (max-width: 640px) {
	.pf-carousel { --pf-card-w: 240px; --pf-card-h: 325px; }
	.pf-nav { width: 42px; height: 42px; }
	.pf-nav--prev { left: 0; }
	.pf-nav--next { right: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.pf-card { transition: opacity 0.2s ease; }
}

/* ---------------------------------------------------------------
   Testimonials — client list (tabs) beside a featured quote card.
   Markup: template-parts/sections/testimonials.php
   Behaviour: assets/js/main.js
   Tabs, panels and the stage each carry data-accent; JS switches the
   stage's, so its glow and quote mark take the active quote's colour.
   Rules are scoped under .tm so they out-rank Tailwind's button reset.
   --------------------------------------------------------------- */
.tm [data-accent="primary"] { --tm-accent: #ffc174; --tm-accent-rgb: 255, 193, 116; }
.tm [data-accent="secondary"] { --tm-accent: #b4c5ff; --tm-accent-rgb: 180, 197, 255; }
.tm [data-accent="tertiary"] { --tm-accent: #56e5a9; --tm-accent-rgb: 86, 229, 169; }

/* ---- client list ---- */
.tm .tm-tabs { scrollbar-width: none; }

.tm .tm-tab {
	position: relative;
	flex: 0 0 auto;
	width: min(280px, 80vw);
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 0.875rem;
	border: 1px solid transparent;
	border-radius: 0.75rem;
	background: #161b2a;
	color: inherit;
	text-align: left;
	cursor: pointer;
	overflow: hidden;
	transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.tm .tm-tab:hover { background: #1a1f2e; }
.tm .tm-tab.is-active {
	background: #252a39;
	border-color: rgba(var(--tm-accent-rgb), 0.35);
}
.tm .tm-tab:focus-visible { outline: 2px solid #ffc174; outline-offset: 2px; }

/* Accent bar that grows in along the active client's left edge. */
.tm .tm-tab::before {
	content: "";
	position: absolute;
	left: 0;
	top: 14px;
	bottom: 14px;
	width: 3px;
	border-radius: 0 3px 3px 0;
	background: var(--tm-accent);
	transform: scaleY(0);
	transition: transform 0.35s ease;
}
.tm .tm-tab.is-active::before { transform: scaleY(1); }

.tm .tm-tab-icon {
	margin-left: auto;
	color: rgba(216, 195, 173, 0.45);
	transition: color 0.25s ease;
}
.tm .tm-tab.is-active .tm-tab-icon { color: var(--tm-accent); }

@media (min-width: 1024px) {
	.tm .tm-tab { width: 100%; }
	.tm .tm-tab.is-active { transform: translateX(6px); }
}

/* Autoplay timer along the bottom of the active client. The bar's
   animationend is what moves the carousel on (see main.js), so pausing
   the animation pauses the carousel. */
.tm .tm-tab-progress {
	position: absolute;
	left: 0.875rem;
	right: 0.875rem;
	bottom: 0;
	height: 2px;
	border-radius: 2px;
	background: rgba(222, 226, 246, 0.08);
	overflow: hidden;
	opacity: 0;
	transition: opacity 0.25s ease;
}
.tm .tm-tab-progress > span {
	display: block;
	width: 100%;
	height: 100%;
	background: var(--tm-accent);
	transform: scaleX(0);
	transform-origin: left center;
}
.tm.is-autoplay .tm-tab.is-active .tm-tab-progress { opacity: 1; }
.tm.is-autoplay .tm-tab.is-active .tm-tab-progress > span {
	animation: tmProgress var(--tm-duration, 8s) linear forwards;
}
.tm.is-paused .tm-tab.is-active .tm-tab-progress > span { animation-play-state: paused; }
@keyframes tmProgress {
	from { transform: scaleX(0); }
	to { transform: scaleX(1); }
}

/* ---- avatars (photo, or initials on the accent tint) ---- */
.tm .tm-avatar {
	position: relative;
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 9999px;
	overflow: hidden;
	font-weight: 700;
	letter-spacing: 0.02em;
	box-shadow: 0 0 0 1px rgba(var(--tm-accent-rgb), 0.25);
	transition: box-shadow 0.3s ease;
}
.tm .tm-tab.is-active .tm-avatar {
	box-shadow: 0 0 0 2px var(--tm-accent), 0 0 18px rgba(var(--tm-accent-rgb), 0.35);
}

/* ---- quote card ---- */
.tm .tm-stage {
	--tm-x: 50%;
	--tm-y: 0%;
	isolation: isolate;
	border: 1px solid rgba(222, 226, 246, 0.06);
	transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}
/* Only transformed while the mouse is over it, so the text stays crisp
   the rest of the time; leaving eases it back flat. */
.tm .tm-stage.is-tilting {
	transform: perspective(1400px) rotateX(var(--tm-rx, 0deg)) rotateY(var(--tm-ry, 0deg));
	transition: transform 0.12s linear;
}

.tm .tm-glow {
	position: absolute;
	top: -170px;
	right: -150px;
	width: 440px;
	height: 440px;
	border-radius: 9999px;
	background: var(--tm-accent);
	opacity: 0.13;
	filter: blur(90px);
	pointer-events: none;
	transition: background-color 0.7s ease;
}

/* Soft light that follows the pointer across the card. */
.tm .tm-spotlight {
	position: absolute;
	inset: 0;
	background: radial-gradient(480px circle at var(--tm-x) var(--tm-y), rgba(var(--tm-accent-rgb), 0.09), transparent 65%);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.35s ease;
}
.tm .tm-stage:hover .tm-spotlight { opacity: 1; }

.tm .tm-quote-glyph {
	position: absolute;
	top: -6px;
	right: 24px;
	font-size: 128px;
	line-height: 1;
	color: var(--tm-accent);
	opacity: 0.12;
	pointer-events: none;
	font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 48;
	transition: color 0.7s ease;
}
.tm .tm-stage.is-bumped .tm-quote-glyph { animation: tmBump 0.7s cubic-bezier(0.22, 0.61, 0.36, 1); }
@keyframes tmBump {
	0% { transform: none; }
	40% { transform: translateY(-6px) rotate(-10deg) scale(0.88); }
	100% { transform: none; }
}

/* Every quote sits in the same grid cell, so the card is always as tall
   as the longest one and never jumps. --tm-dir (1 or -1) is the
   direction of travel, set by JS. */
.tm .tm-panel {
	grid-area: 1 / 1;
	min-width: 0;
	opacity: 0;
	visibility: hidden;
	transform: translateX(calc(var(--tm-dir, 1) * 32px));
}
.tm .tm-panel.is-active {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity 0.5s ease 0.1s, transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1) 0.1s;
}
.tm .tm-panel.is-leaving {
	visibility: visible;
	opacity: 0;
	transform: translateX(calc(var(--tm-dir, 1) * -32px));
	transition: opacity 0.3s ease, transform 0.4s ease;
}

.tm .tm-star {
	font-size: 18px;
	color: #ffc174;
	font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}
.tm .tm-star.is-off { color: #303444; }

[data-tm-current] { display: inline-block; }
[data-tm-current].is-counting { animation: tmCount 0.45s ease; }
@keyframes tmCount {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: none; }
}

/* ---- arrows / pause (same look as the portfolio arrows) ---- */
.tm .tm-btn {
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(222, 226, 246, 0.18);
	border-radius: 9999px;
	background: rgba(9, 14, 28, 0.5);
	color: #dee2f6;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.tm .tm-btn:hover {
	background: #ffc174;
	border-color: #ffc174;
	color: #472a00;
	transform: scale(1.06);
}
.tm .tm-btn:focus-visible { outline: 2px solid #ffc174; outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
	.tm .tm-tab,
	.tm .tm-tab::before,
	.tm .tm-stage,
	.tm .tm-glow,
	.tm .tm-quote-glyph,
	.tm .tm-panel.is-active,
	.tm .tm-panel.is-leaving { transition: none; }
	.tm .tm-tab.is-active,
	.tm .tm-panel { transform: none; }
	.tm .tm-stage.is-bumped .tm-quote-glyph,
	[data-tm-current].is-counting { animation: none; }
	.tm .tm-spotlight { display: none; }
}

/* ---------------------------------------------------------------
   Safety net: nothing should ever scroll the page sideways on a
   phone. A single wide element (a long unbroken word, an oversized
   embed, a grid child spanning more tracks than exist) is enough to
   do it, so clamp at the root rather than chase each one.
   --------------------------------------------------------------- */
/* NOTE: deliberately NOT setting overflow-x:hidden on html/body. Doing so
   forces overflow-y to compute to `auto`, which creates nested scroll
   containers, breaks page scrolling and kills the sticky header. The real
   overflow fixes live in the templates themselves. */

/* Long words, URLs and email addresses wrap instead of pushing out. */
h1, h2, h3, h4, p, li, address, figcaption {
	overflow-wrap: break-word;
}

/* Media and embeds stay inside their column by default. */
img,
video,
iframe,
svg {
	max-width: 100%;
}

/* ---------------------------------------------------------------
   Elementor
   --------------------------------------------------------------- */
/* In the Elementor editor a section is redrawn every time it is edited,
   and the scroll-reveal animation would leave the fresh copy invisible
   until it scrolled into view again. Show everything straight away there. */
.elementor-editor-active .reveal-up,
.elementor-editor-active .reveal-left,
.elementor-editor-active .reveal-right {
	opacity: 1 !important;
	transform: none !important;
}

/* Elementor resets `.elementor img { height: auto }`, which would stop the
   portfolio images filling their cards. */
.elementor .pf-card-img {
	height: 100%;
}
