/* Rotating Tech Grid — front-end styles. Colours come from :root vars printed by functions.php. */

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
	margin: 0;
	background: var(--rt-bg);
	color: var(--rt-ink);
	font-family: Archivo, system-ui, -apple-system, sans-serif;
}

a { color: var(--rt-accent-deep); text-decoration: none; }
a:hover { color: var(--rt-ink); }
:focus-visible { outline: 2px solid var(--rt-accent); outline-offset: 2px; }
img { max-width: 100%; height: auto; display: block; }

.rt-skip {
	position: absolute; left: -9999px;
}
.rt-skip:focus {
	left: 12px; top: 12px; z-index: 99;
	background: var(--rt-ink); color: var(--rt-bg);
	padding: 10px 16px; border-radius: 999px;
	font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}

.rt-wrap { max-width: var(--rt-maxw); margin: 0 auto; padding: 0 28px; }
.rt-micro { font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.rt-kicker { font-size: 11px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--rt-accent-deep); }
.rt-accent-text { color: var(--rt-accent-deep); }
.rt-display { margin: 0; font-size: clamp(34px, 6cqw, 76px); line-height: .95; font-weight: 700; letter-spacing: -.03em; text-wrap: balance; }
.rt-display-invert { color: var(--rt-bg); max-width: 18ch; }
.rt-h2 { margin: 0; font-size: clamp(24px, 3.6cqw, 46px); font-weight: 700; letter-spacing: -.02em; }
.rt-lede { margin: 0; max-width: 34ch; font-size: clamp(14px, 1.4cqw, 17px); line-height: 1.5; color: var(--rt-muted); }

.rt-btn {
	display: inline-block;
	border: var(--rt-border) solid var(--rt-accent);
	border-radius: 999px;
	padding: 14px 28px;
	font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
	transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.rt-btn-accent { background: var(--rt-accent); color: var(--rt-bg); }
.rt-btn-accent:hover { background: var(--rt-ink); border-color: var(--rt-ink); color: var(--rt-bg); }
.rt-btn-invert { background: var(--rt-bg); border-color: var(--rt-bg); color: var(--rt-ink); }
.rt-btn-invert:hover { background: var(--rt-ink); border-color: var(--rt-ink); color: var(--rt-bg); }

/* ---------------------------------------------------------------- Hub */

.rt-hub { position: fixed; inset: 0; overflow: hidden; }
.rt-stage { position: absolute; inset: 0; display: grid; place-items: center; color: var(--rt-ink); }

.rt-rings {
	position: absolute; top: 50%; left: 50%;
	width: min(74vmin, 100vh - 300px, 100vw - 500px);
	aspect-ratio: 1;
	transform: translate(-50%, -50%);
	transition: opacity .5s ease;
	pointer-events: none;
}
.rt-stage.is-open .rt-rings { opacity: .55; }
.rt-stage.is-open .rt-rings * { animation-play-state: paused !important; }

.rt-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.rt-ring-1 { animation: rt-spin 120s linear infinite; }
.rt-ring-2 { animation: rt-spin 54s linear infinite reverse; }
.rt-ring-3 { animation: rt-spin 34s linear infinite; }
.rt-ring-4 { animation: rt-spin 22s linear infinite reverse; }

.rt-dash { animation: rt-dash 9s linear infinite; }
.rt-dash-rev { animation: rt-dash 6s linear infinite reverse; }
.rt-blink { animation: rt-blink 2.2s ease-in-out infinite; }
.rt-blink-b { animation-delay: .55s; }
.rt-blink-c { animation-delay: 1.1s; }
.rt-blink-d { animation-delay: 1.65s; }

.rt-wave {
	position: absolute; inset: 0; border-radius: 50%;
	border: var(--rt-border) solid var(--rt-accent);
	animation: rt-wave 3.6s ease-out infinite;
}
.rt-wave-2 { border-color: var(--rt-ink); animation-delay: 1.2s; }
.rt-wave-3 { border-width: 1px; animation-delay: 2.4s; }

.rt-breathe {
	position: absolute; inset: 22%; border-radius: 50%;
	border: var(--rt-border) solid var(--rt-ink);
	animation: rt-breathe 4.4s ease-in-out infinite;
}

.rt-center, .rt-spoke {
	width: 208px;
	border-radius: 999px;
	padding: 14px 22px;
	font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
	text-align: center; white-space: nowrap; cursor: pointer;
	transition: background .18s ease, border-color .18s ease, color .18s ease, opacity .4s ease, transform .55s cubic-bezier(.2,.9,.2,1);
}

.rt-center {
	position: relative; z-index: 3;
	appearance: none; font-family: inherit;
	border: var(--rt-border) solid var(--rt-accent);
	background: var(--rt-accent); color: var(--rt-bg);
}
.rt-center:hover { background: var(--rt-ink); border-color: var(--rt-ink); }

.rt-spoke {
	position: absolute; z-index: 4;
	display: block; box-sizing: border-box;
	border: var(--rt-border) solid var(--rt-accent);
	background: var(--rt-accent); color: var(--rt-bg);
	opacity: 0; pointer-events: none;
}
.rt-spoke:hover { background: var(--rt-ink); border-color: var(--rt-ink); color: var(--rt-bg); }
.rt-stage.is-open .rt-spoke { opacity: 1; pointer-events: auto; }

.rt-spoke-top { left: 50%; top: 50%; transform: translate(-50%, calc(-50% - min(37vmin, (100vh - 300px) / 2, (100vw - 500px) / 2) - 46px)) scale(.82); }
.rt-spoke-bottom { left: 50%; top: 50%; transform: translate(-50%, calc(-50% + min(37vmin, (100vh - 300px) / 2, (100vw - 500px) / 2) + 46px)) scale(.82); }
.rt-spoke-right { left: 50%; top: 50%; transform: translate(calc(-50% + min(37vmin, (100vh - 300px) / 2, (100vw - 500px) / 2) + 128px), -50%) scale(.82); }
.rt-spoke-left { left: 50%; top: 50%; transform: translate(calc(-50% - min(37vmin, (100vh - 300px) / 2, (100vw - 500px) / 2) - 128px), -50%) scale(.82); }

.rt-stage.is-open .rt-spoke-top { transform: translate(-50%, calc(-50% - min(37vmin, (100vh - 300px) / 2, (100vw - 500px) / 2) - 46px)) scale(1); }
.rt-stage.is-open .rt-spoke-bottom { transform: translate(-50%, calc(-50% + min(37vmin, (100vh - 300px) / 2, (100vw - 500px) / 2) + 46px)) scale(1); }
.rt-stage.is-open .rt-spoke-right { transform: translate(calc(-50% + min(37vmin, (100vh - 300px) / 2, (100vw - 500px) / 2) + 128px), -50%) scale(1); }
.rt-stage.is-open .rt-spoke-left { transform: translate(calc(-50% - min(37vmin, (100vh - 300px) / 2, (100vw - 500px) / 2) - 128px), -50%) scale(1); }

@media (max-width: 719px) {
	.rt-rings { width: min(74vmin, 100vh - 260px); }
	.rt-center, .rt-spoke { width: 158px; font-size: 10px; letter-spacing: .06em; padding: 12px 15px; }
	.rt-spoke-top { transform: translate(calc(-50% - 83px), calc(-50% - min(37vmin, (100vh - 260px) / 2) - 40px)) scale(.82); }
	.rt-spoke-right { transform: translate(calc(-50% + 83px), calc(-50% - min(37vmin, (100vh - 260px) / 2) - 40px)) scale(.82); }
	.rt-spoke-bottom { transform: translate(calc(-50% - 83px), calc(-50% + min(37vmin, (100vh - 260px) / 2) + 40px)) scale(.82); }
	.rt-spoke-left { transform: translate(calc(-50% + 83px), calc(-50% + min(37vmin, (100vh - 260px) / 2) + 40px)) scale(.82); }
	.rt-stage.is-open .rt-spoke-top { transform: translate(calc(-50% - 83px), calc(-50% - min(37vmin, (100vh - 260px) / 2) - 40px)) scale(1); }
	.rt-stage.is-open .rt-spoke-right { transform: translate(calc(-50% + 83px), calc(-50% - min(37vmin, (100vh - 260px) / 2) - 40px)) scale(1); }
	.rt-stage.is-open .rt-spoke-bottom { transform: translate(calc(-50% - 83px), calc(-50% + min(37vmin, (100vh - 260px) / 2) + 40px)) scale(1); }
	.rt-stage.is-open .rt-spoke-left { transform: translate(calc(-50% + 83px), calc(-50% + min(37vmin, (100vh - 260px) / 2) + 40px)) scale(1); }
}

/* -------------------------------------------------------- Flip pages */

.rt-flip {
	position: fixed; inset: 0;
	overflow-y: auto; overflow-x: hidden;
	scroll-snap-type: y mandatory; scroll-behavior: smooth;
	perspective: 1600px; perspective-origin: 50% 50%;
	container-type: size;
}
.rt-flip.rt-flip-off { perspective: none; }
.rt-flip::-webkit-scrollbar { width: 0; height: 0; }

.rt-panel { position: relative; height: 100%; scroll-snap-align: start; }
.rt-panel-in {
	position: absolute; inset: 0;
	transform-style: preserve-3d; will-change: transform, opacity;
	padding: clamp(24px, 5cqw, 72px);
	display: flex; flex-direction: column; justify-content: center;
	gap: clamp(18px, 3cqh, 40px);
	overflow: hidden;
}
.rt-flip-off .rt-panel-in { position: relative; inset: auto; min-height: 100vh; opacity: 1 !important; transform: none !important; }
.rt-panel-accent { background: var(--rt-accent); color: var(--rt-bg); }

.rt-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.rt-head h2 { margin: 0; font-size: clamp(24px, 3.6cqw, 46px); font-weight: 700; letter-spacing: -.02em; }

.rt-hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4cqw, 56px); align-items: center; }
.rt-hero-copy { display: flex; flex-direction: column; gap: clamp(14px, 2cqw, 22px); align-items: flex-start; min-width: 0; }
.rt-hero-media { position: relative; aspect-ratio: 1; max-height: 68cqh; width: 100%; justify-self: end; min-width: 0; }
.rt-hero-media .rt-frame { position: absolute; inset: 0; }

.rt-frame {
	position: relative;
	border: var(--rt-border) solid var(--rt-ink);
	border-radius: var(--rt-radius);
	overflow: hidden;
	background: var(--rt-bg);
}
.rt-frame-accent { border-color: var(--rt-accent); }
.rt-frame img, .rt-slide img { width: 100%; height: 100%; object-fit: cover; }
.rt-gray img { filter: grayscale(1); }

.rt-pill {
	position: absolute; z-index: 2;
	transform: translateY(-50%);
	background: var(--rt-bg);
	border: var(--rt-border) solid var(--rt-ink);
	border-radius: 999px;
	padding: 9px 16px;
	font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
	white-space: nowrap;
}
.rt-pill-1 { top: 16%; left: 14px; }
.rt-pill-2 { top: 52%; right: 14px; }
.rt-pill-3 { top: 86%; left: 14px; }

.rt-slide-empty {
	display: grid; place-items: center;
	width: 100%; height: 100%;
	font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
	color: var(--rt-muted); opacity: .5;
}

/* --------------------------------------------------------- Carousels */

.rt-car-shell { position: relative; }
.rt-carousel { position: relative; height: min(60cqh, 460px); }
.rt-carousel-square { height: min(62cqh, 480px); }

.rt-slide {
	position: absolute; left: 50%; margin: 0;
	border: var(--rt-border) solid var(--rt-ink);
	border-radius: calc(var(--rt-radius) - 2px);
	background: var(--rt-bg);
	overflow: hidden;
	transition: transform 1.1s cubic-bezier(.5,0,.2,1), opacity 1.1s ease, border-color .6s ease;
	will-change: transform, opacity;
}
.rt-carousel-arc .rt-slide { bottom: 0; }
.rt-carousel-square .rt-slide { top: 50%; }
.rt-slide.is-active { border-color: var(--rt-accent); }

.rt-car-nav {
	display: flex; justify-content: center; align-items: center; gap: 10px;
	margin-top: 18px;
}
.rt-car-prev, .rt-car-next {
	display: inline-flex; align-items: center; justify-content: center;
	width: 76px; height: 46px;
	padding: 0;
	appearance: none; cursor: pointer;
	border: 0;
	border-radius: 999px;
	background: var(--rt-ink); color: var(--rt-bg);
	transition: background .18s ease, transform .18s ease;
}
.rt-car-prev svg, .rt-car-next svg {
	display: block;
	width: 30px; height: 18px;
}
.rt-car-prev:hover, .rt-car-next:hover { background: var(--rt-accent); }
.rt-car-prev:active, .rt-car-next:active { transform: scale(.94); }

/* -------------------------------------------------------- Comparison */

.rt-compare { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 2cqw, 26px); }
.rt-col {
	border: var(--rt-border) solid var(--rt-ink);
	border-radius: var(--rt-radius);
	padding: clamp(18px, 2.4cqw, 28px);
	display: flex; flex-direction: column; gap: 14px;
	min-width: 0;
}
.rt-col-us { border-color: var(--rt-accent); }

.rt-tag {
	align-self: flex-start;
	border-radius: 999px;
	padding: 7px 15px;
	font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
}
.rt-tag-accent { background: var(--rt-bg); color: var(--rt-accent-deep); border: var(--rt-border) solid var(--rt-accent); }
.rt-tag-ink { background: var(--rt-ink); color: var(--rt-bg); }

.rt-row { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 15px; line-height: 1.35; font-weight: 500; }
.rt-mark { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.rt-yes { background: var(--rt-accent); color: var(--rt-bg); }
.rt-no { border: var(--rt-border) solid var(--rt-ink); color: var(--rt-ink); font-size: 12px; }

/* ------------------------------------------------------ Before/after */

.rt-ba { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; min-height: 0; }
.rt-ba-item { display: flex; flex-direction: column; gap: 10px; margin: 0; min-width: 0; }
.rt-ba-item .rt-frame { flex: 1; min-height: 160px; }

/* -------------------------------------------------------------- CTA */

.rt-cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.rt-cta-note { font-size: clamp(20px, 2.4cqw, 28px); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.rt-back {
	align-self: flex-start;
	color: var(--rt-bg);
	border-bottom: var(--rt-border) solid var(--rt-bg);
	padding-bottom: 3px;
	font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
}
.rt-back:hover { color: var(--rt-bg); opacity: .7; }

/* ------------------------------------------------------------- Docs */

.rt-doc { padding: 72px 0; }
.rt-article { display: flex; flex-direction: column; gap: 24px; }
.rt-prose { font-size: 17px; line-height: 1.6; color: var(--rt-muted); max-width: 68ch; }
.rt-prose h2, .rt-prose h3 { color: var(--rt-ink); }

.rt-footer { border-top: var(--rt-border) solid var(--rt-ink); }
.rt-footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; padding-top: 20px; padding-bottom: 20px; }
.rt-footer-contact { display: flex; gap: 20px; font-size: 13px; font-weight: 600; }

@media (max-width: 719px) {
	.rt-hero, .rt-compare, .rt-ba { grid-template-columns: 1fr; }
	.rt-pill { font-size: 11px; padding: 7px 12px; }
	.rt-row { font-size: 13px; }
	.rt-car-prev, .rt-car-next { width: 40px; height: 40px; }
}

/* --------------------------------------------------------- Keyframes */

@keyframes rt-spin { to { transform: rotate(360deg); } }
@keyframes rt-dash { to { stroke-dashoffset: -600; } }
@keyframes rt-blink { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }
@keyframes rt-wave { 0% { transform: scale(.62); opacity: 0; } 18% { opacity: .8; } 100% { transform: scale(1.18); opacity: 0; } }
@keyframes rt-breathe { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.035); opacity: .35; } }

@media (prefers-reduced-motion: reduce) {
	.rt-ring, .rt-wave, .rt-breathe, .rt-blink, .rt-dash, .rt-dash-rev { animation: none !important; }
	.rt-slide { transition-duration: .01ms; }
}

/* ------------------------------------------------------------------------
   Hardening. Page builders and old theme CSS leak global button/link rules
   onto the homepage; these win them back. Specificity + !important is
   deliberate here and confined to the hub controls.
   ------------------------------------------------------------------------ */

.rt-stage .rt-center,
.rt-stage a.rt-spoke {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-sizing: border-box !important;
	width: 208px !important;
	min-height: 48px !important;
	margin: 0 !important;
	padding: 14px 22px !important;
	border-radius: 999px !important;
	border: var(--rt-border) solid var(--rt-accent) !important;
	background-color: var(--rt-accent) !important;
	background-image: none !important;
	box-shadow: none !important;
	color: var(--rt-bg) !important;
	font-family: Archivo, system-ui, sans-serif !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	line-height: 1.1 !important;
	letter-spacing: .1em !important;
	text-transform: uppercase !important;
	text-align: center !important;
	text-decoration: none !important;
	text-indent: 0 !important;
	white-space: nowrap !important;
	overflow: visible !important;
	cursor: pointer !important;
	-webkit-appearance: none !important;
	appearance: none !important;
}

.rt-stage .rt-center:hover,
.rt-stage a.rt-spoke:hover,
.rt-stage .rt-center:focus,
.rt-stage a.rt-spoke:focus {
	background-color: var(--rt-ink) !important;
	border-color: var(--rt-ink) !important;
	color: var(--rt-bg) !important;
}

.rt-stage .rt-center::before,
.rt-stage .rt-center::after,
.rt-stage a.rt-spoke::before,
.rt-stage a.rt-spoke::after {
	content: none !important;
}

@media (max-width: 719px) {
	.rt-stage .rt-center,
	.rt-stage a.rt-spoke {
		width: 158px !important;
		min-height: 42px !important;
		padding: 12px 12px !important;
		font-size: 10px !important;
		letter-spacing: .04em !important;
	}
}

/* Carousel captions — the image title shows under each card. */
.rt-slide { display: flex; align-items: stretch; }
.rt-slide img { flex: 1; }

/* No site chrome on flip pages. */
.rt-flip ~ .rt-footer, body:has(.rt-flip) .rt-footer { display: none; }

/* Hero copy card — reads as a block on narrow screens. */
@media (max-width: 719px) {
	.rt-hero { gap: 18px; }
	.rt-hero-copy {
		align-items: center !important;
		text-align: center;
		border: var(--rt-border) solid var(--rt-ink);
		border-radius: var(--rt-radius);
		padding: 24px 20px;
		background: var(--rt-bg);
	}
	.rt-hero-copy .rt-lede { max-width: none; }
}

/* Lightbox */
.rt-slide { cursor: zoom-in; }

.rt-lightbox {
	position: fixed; inset: 0; z-index: 9999;
	display: none;
	background: var(--rt-bg);
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}
.rt-lightbox.is-open { display: block; }
.rt-lightbox-inner {
	display: flex; flex-direction: column; align-items: center; gap: 18px;
	padding: 84px 20px 60px;
	max-width: 1100px; margin: 0 auto;
}
.rt-lightbox img {
	width: 100%; height: auto;
	border: var(--rt-border) solid var(--rt-ink);
	border-radius: var(--rt-radius);
}
.rt-lightbox-close {
	position: fixed; top: 18px; right: 18px; z-index: 2;
	width: 48px; height: 48px;
	display: grid; place-items: center;
	appearance: none; cursor: pointer; border: 0;
	border-radius: 999px;
	background: var(--rt-ink); color: var(--rt-bg);
	font-size: 22px; line-height: 1;
	transition: background .18s ease;
}
.rt-lightbox-close:hover { background: var(--rt-accent); }
body.rt-locked { overflow: hidden; }
