/* SLB Engineering - motion + polish layer.
   Loaded after style.css. Everything here is transform/opacity only (GPU friendly)
   and is switched off for visitors who ask for reduced motion. */

html { scroll-behavior: smooth; }
img[height] { height: auto; } /* width/height attrs reserve space but never distort on mobile */

/* ---------- Hero: slow "Ken Burns" drift + light sweep ---------- */
#head {
	background: #181015;
	position: relative;
	overflow: hidden;
	isolation: isolate;
}
#head::before {
	content: "";
	position: absolute;
	inset: -4%;
	z-index: -2;
	background: url(../Images/Background.webp) center / cover no-repeat;
	animation: heroDrift 28s ease-in-out infinite alternate;
	will-change: transform;
}
#head::after { /* soft diagonal glint that crosses the board every few seconds */
	content: "";
	position: absolute;
	top: 0; bottom: 0; left: 0;
	width: 40%;
	z-index: -1;
	background: linear-gradient(105deg, transparent 0%, rgba(244, 185, 5, .16) 50%, transparent 100%);
	transform: translateX(-120%) skewX(-18deg);
	animation: heroSweep 9s ease-in-out 2s infinite;
	pointer-events: none;
}
@keyframes heroDrift {
	from { transform: scale(1)    translate3d(0, 0, 0); }
	to   { transform: scale(1.12) translate3d(-1.5%, -1%, 0); }
}
@keyframes heroSweep {
	0%   { transform: translateX(-120%) skewX(-18deg); }
	35%, 100% { transform: translateX(380%) skewX(-18deg); }
}

/* ---------- Page load ---------- */
.navbar-brand img { animation: dropIn .8s cubic-bezier(.2, .7, .2, 1) both; }
.navbar-nav > li { animation: dropIn .7s cubic-bezier(.2, .7, .2, 1) both; }
.navbar-nav > li:nth-child(1) { animation-delay: .10s; }
.navbar-nav > li:nth-child(2) { animation-delay: .18s; }
.navbar-nav > li:nth-child(3) { animation-delay: .26s; }
.navbar-nav > li:nth-child(4) { animation-delay: .34s; }
@keyframes dropIn {
	from { opacity: 0; transform: translate3d(0, -14px, 0); }
	to   { opacity: 1; transform: none; }
}

/* ---------- Scroll reveal (class added by animations.js) ---------- */
.js .reveal {
	opacity: 0;
	transform: translate3d(0, 28px, 0);
	transition: opacity .7s cubic-bezier(.2, .7, .2, 1) var(--d, 0s),
	            transform .7s cubic-bezier(.2, .7, .2, 1) var(--d, 0s);
	will-change: opacity, transform;
}
.js .reveal.in {
	opacity: 1;
	transform: none;
	will-change: auto;
}

/* ---------- Hover / interaction ---------- */
.navbar-nav > li > a,
.navbar-nav > li { transition: background-color .25s ease, color .25s ease; }

.h-caption i { transition: transform .35s cubic-bezier(.3, 1.6, .5, 1), color .25s ease; }
.highlight:hover .h-caption i { transform: scale(1.18) rotate(-8deg); color: #f4b905; }
.highlight .h-caption h4 { transition: color .25s ease; }
.highlight:hover .h-caption h4 { color: #ddd; }

.blockquote-box .square { transition: transform .3s ease, box-shadow .3s ease; }
.blockquote-box:hover .square { transform: translateY(-4px); box-shadow: 0 8px 18px rgba(0, 0, 0, .25); }

.serviceslist .thumbnail {
	overflow: hidden;
	transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.serviceslist .thumbnail:hover {
	transform: translateY(-6px);
	box-shadow: 0 12px 24px rgba(0, 0, 0, .18);
	border-color: #f4b905;
}
.serviceslist .thumbnail img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: contain; /* the four service photos have different shapes: give them equal-height frames but never crop the picture */
	background: #fff;
	transition: transform .5s ease;
}
.serviceslist .thumbnail:hover img { transform: scale(1.06); }

.btn, .follow-me-icons a, .footer2 a, .footer1 a { transition: background-color .25s ease, color .25s ease, transform .25s ease; }
.btn:hover { transform: translateY(-2px); }
/* Fixed box per icon so hovering only moves it visually (transform), never reflows its neighbours */
.follow-me-icons a { display: block; float: left; }
.follow-me-icons a i { float: none; display: block; }
/* Lift the glyph, not the link: the link (hover target) never moves, so the pointer can't slip off its edge and re-trigger */
.follow-me-icons a i { transition: transform .25s ease; }
.follow-me-icons a:hover i { transform: translateY(-3px); }
.follow-me-icons a:hover { transform: none; }

.img-rounded { transition: transform .4s ease, box-shadow .4s ease; }
.img-rounded:hover { transform: scale(1.02); box-shadow: 0 10px 24px rgba(0, 0, 0, .2); }

/* X (formerly Twitter) icon - Font Awesome 4 has no X glyph, so draw it as a mask in the current text colour */
.follow-me-icons i.icon-x {
	display: block;
	float: none;
	width: 25px;
	height: 25px;
	margin: 0 10px 0 0;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z'/%3E%3C/svg%3E") center / 80% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z'/%3E%3C/svg%3E") center / 80% no-repeat;
}

/* About / Services / Contact (all screen sizes): plain black header bar behind the logo and menu */
#head.secondary { background: #000; }
#head.secondary::before, #head.secondary::after { display: none; }

/* Home page yellow intro bar: ~20% shorter (tighter padding, slightly smaller type) */
.herotxt .sectionBox { padding-top: 24px; padding-bottom: 26px; }
.herotxt span { font-size: 30px; line-height: 38px; margin-bottom: 8px; }
.herotxt p { font-size: 18px; }
.herotxt .container { text-align: center; }
.herotxt p a { color: #222; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .2s ease; }
.herotxt p a:hover { color: #fff; }

/* ---------- Data collection / operator display section (services page) ---------- */
.datasw { text-align: center; }
.datasw .lead { color: #555; margin-bottom: 30px; }
.datasw-features {
	display: flex; flex-wrap: wrap; justify-content: center;
	gap: 24px 40px; margin: 0 0 35px; padding: 0;
}
.datasw-features li { flex: 1 1 260px; max-width: 340px; display: flex; flex-direction: column; align-items: center; }
.datasw-features i {
	flex: 0 0 44px; width: 44px; height: 44px; margin: 0 0 12px;
	border-radius: 50%; background: #f4b905; color: #222;
	font-size: 20px; line-height: 44px; text-align: center;
}
.datasw-features strong { display: block; font-size: 17px; color: #222; }
.datasw-features span { display: block; color: #666; font-size: 15px; }
.datasw-shots { margin-top: 10px; }
.datasw-shots a.lightbox {
	position: relative; display: block; overflow: hidden;
	border: 1px solid #ddd; border-radius: 4px; background: #0e1117;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
	transition: transform .3s ease, box-shadow .3s ease;
	cursor: zoom-in;
}
.datasw-shots a.lightbox:hover, .datasw-shots a.lightbox:focus {
	transform: translateY(-4px); box-shadow: 0 12px 26px rgba(0, 0, 0, .28); outline: none;
}
.datasw-shots a.lightbox img { display: block; width: 100%; transition: transform .5s ease; }
.datasw-shots a.lightbox:hover img { transform: scale(1.03); }
.lb-hint {
	position: absolute; right: 10px; bottom: 10px; padding: 4px 10px;
	background: rgba(0, 0, 0, .72); color: #fff; font-size: 13px; border-radius: 3px;
}
.datasw-cap { margin: 10px 0 25px; color: #666; font-size: 14px; }

/* Lightbox */
.lb-open { overflow: hidden; }
.lb-overlay {
	position: fixed; inset: 0; z-index: 10000;
	display: flex; align-items: center; justify-content: center;
	background: rgba(0, 0, 0, .9);
	animation: lbFade .25s ease both;
}
.lb-overlay[hidden] { display: none; }
@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }
.lb-fig { margin: 0; max-width: 96vw; max-height: 96vh; text-align: center; }
.lb-img {
	display: block; margin: 0 auto;
	max-width: 96vw; max-height: calc(96vh - 48px);
	object-fit: contain; cursor: zoom-in;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .6);
}
.lb-cap { padding-top: 10px; color: #ddd; font-size: 14px; }
.lb-overlay.zoomed { align-items: flex-start; justify-content: flex-start; overflow: auto; }
.lb-overlay.zoomed .lb-fig { max-width: none; max-height: none; }
.lb-overlay.zoomed .lb-img { max-width: none; max-height: none; width: auto; cursor: zoom-out; }
.lb-btn {
	position: fixed; z-index: 2; width: 44px; height: 44px; padding: 0;
	border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff;
	font-size: 30px; line-height: 44px; cursor: pointer;
	transition: background-color .2s ease;
}
.lb-btn:hover, .lb-btn:focus { background: #f4b905; color: #222; outline: none; }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 14px; top: 50%; margin-top: -22px; }
.lb-next { right: 14px; top: 50%; margin-top: -22px; }
@media (max-width: 767px) {
	.lb-prev, .lb-next { top: auto; bottom: 14px; margin-top: 0; }
}

/* ---------- Home page AMR video (click-to-load YouTube facade) ---------- */
.amr-video { background: #111; padding: 35px 0 15px; text-align: center; }
.amr-video-title { margin: 0 0 20px; color: #fff; font-size: 26px; font-weight: 300; }
.yt-facade {
	position: relative; max-width: 900px; margin: 0 auto;
	aspect-ratio: 16 / 9; background: #000;
	border-radius: 4px; overflow: hidden;
	box-shadow: 0 8px 28px rgba(0, 0, 0, .55);
}
.yt-facade .yt-link, .yt-facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.yt-facade img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease, opacity .3s ease; }
.yt-facade .yt-link:hover img, .yt-facade .yt-link:focus img { transform: scale(1.04); opacity: .85; }
.yt-play {
	position: absolute; top: 50%; left: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px;
	border-radius: 50%; background: #f4b905;
	box-shadow: 0 0 0 0 rgba(244, 185, 5, .55);
	animation: ytPulse 2.4s ease-out infinite;
	transition: transform .25s ease;
}
.yt-play::after {
	content: ""; position: absolute; top: 50%; left: 50%; margin: -13px 0 0 -9px;
	border-style: solid; border-width: 13px 0 13px 22px; border-color: transparent transparent transparent #222;
}
.yt-link:hover .yt-play, .yt-link:focus .yt-play { transform: scale(1.1); }
@keyframes ytPulse {
	0%   { box-shadow: 0 0 0 0 rgba(244, 185, 5, .55); }
	70%, 100% { box-shadow: 0 0 0 22px rgba(244, 185, 5, 0); }
}
.amr-video-cap { margin: 12px 0 0; color: #888; font-size: 13px; }
.amr-video-cap a { color: #aaa; text-decoration: underline; }
.amr-video-cap a:hover { color: #fff; }
@media (max-width: 767px) {
	.amr-video { padding-top: 25px; }
	.amr-video-title { font-size: 22px; }
	.yt-play { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
	.yt-play::after { margin: -10px 0 0 -7px; border-width: 10px 0 10px 17px; }
}

/* ---------- Looping muted video in place of a picture (About page) ---------- */
.vid-loop { display: block; width: 52%; max-width: 480px; margin: 0 0 12px 18px; }
.vid-loop .vid-poster {
	position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
	background: #000; border-radius: 4px; box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
}
.vid-loop .vid-poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.vid-loop iframe {
	position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;
	pointer-events: none; opacity: 0; transition: opacity .6s ease;
}
.vid-loop.playing iframe { opacity: 1; }
.vid-loop .vid-cap { display: block; margin-top: 6px; font-size: 12px; color: #888; text-align: right; }
.vid-loop .vid-cap a { color: #888; text-decoration: underline; }
@media (max-width: 767px) {
	.vid-loop { float: none !important; width: 100%; max-width: none; margin: 0 0 15px; }
}

/* "What is a Controls Integrator?" block (Services): centered text with the diagram centered below it */
.ci-center { text-align: center; }
.ci-center .ci-img img {
	display: block; width: 100%; max-width: 780px; height: auto;
	margin: 20px auto 0;
}

/* ---------- Respect "reduce motion" ---------- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	#head::before, #head::after,
	.navbar-brand img, .navbar-nav > li { animation: none !important; }
	#head::after { display: none; }
	.js .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
	*, *::before, *::after { transition-duration: .01ms !important; }
}
