/* =========================================================================
   Ray Grafix — Homepage sections.
   Rhythm: quiet paper hero (bold type, playful annotation) → dark pinned
   philosophy sequence → editorial positioning → conversion band.
   ========================================================================= */

/* --- Hero ----------------------------------------------------------------- */
/* When the head guard has confirmed JS + motion, the hero hides until the
   GSAP entrance reveals it (autoAlpha). Without JS or with reduced motion the
   guard never fires and the hero renders instantly. */
.rgx-js .rgx-hero { visibility: hidden; }

.rgx-hero {
	position: relative;
	min-height: 100svh;
	display: grid;
	align-content: center;
	padding-top: calc(84px + env(safe-area-inset-top));
	padding-bottom: var(--rgx-s7);
	position: relative;
}
.rgx-hero-eyebrow { margin-bottom: clamp(1.4rem, 3vh, 2.6rem); }
.rgx-hero-stack { display: grid; gap: 0.04em; }
.rgx-hero-line { position: relative; }
.rgx-hero-line--indent { margin-left: 0; }
@media (min-width: 640px) { .rgx-hero-line--indent { margin-left: clamp(24px, 9vw, 150px); } }

/* The highlighted word inherits hero sizing; keep the pill proportional */
.rgx-hero .rgx-hl::before { inset: 0.07em -0.04em; }

.rgx-hero-foot {
	margin-top: clamp(2rem, 5vh, 3.6rem);
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: var(--rgx-s5) var(--rgx-s7);
}
.rgx-hero-sub { max-width: 34ch; font-size: var(--rgx-text-lead); line-height: 1.5; margin: 0; }
.rgx-hero-cta { display: flex; align-items: center; flex-wrap: wrap; gap: var(--rgx-s4); position: relative; }

/* Margin doodle: arrow + caption aimed at the primary CTA */
.rgx-hero-doodle {
	position: absolute;
	right: max(var(--rgx-gutter), 4vw);
	bottom: 16vh;
	width: clamp(120px, 14vw, 190px);
	color: var(--rgx-purple);
	display: none;
	rotate: 8deg;
}
.rgx-hero-doodle .rgx-note { color: var(--rgx-purple-deep); display: block; margin-bottom: 6px; }
@media (min-width: 1080px) { .rgx-hero-doodle { display: block; } }

/* Scroll hint */
.rgx-hero-scroll {
	position: absolute;
	left: var(--rgx-gutter);
	bottom: max(20px, env(safe-area-inset-bottom));
	font-size: var(--rgx-text-label);
	font-weight: var(--rgx-weight-bold);
	letter-spacing: var(--rgx-track-label);
	text-transform: uppercase;
	color: var(--rgx-gray);
	display: inline-flex;
	align-items: center;
	gap: 10px;
}
.rgx-hero-scroll::after {
	content: "";
	width: 2px; height: 34px;
	background: linear-gradient(var(--rgx-black), transparent);
	animation: rgx-drip 1.8s var(--rgx-ease) infinite;
}
@keyframes rgx-drip {
	0% { transform: scaleY(0); transform-origin: top; }
	55% { transform: scaleY(1); transform-origin: top; }
	56% { transform-origin: bottom; }
	100% { transform: scaleY(0); transform-origin: bottom; }
}

/* --- Philosophy (pinned dark word sequence) -------------------------------- */
.rgx-philosophy { position: relative; }
.rgx-philosophy-pin {
	min-height: 100svh;
	display: grid;
	place-items: center;
	text-align: center;
	overflow: clip;
	position: relative;
}
.rgx-philosophy-words { display: grid; grid-template-areas: "w"; place-items: center; }
.rgx-philosophy-word {
	grid-area: w;
	font-family: var(--rgx-font-display);
	font-weight: var(--rgx-weight-black);
	font-stretch: var(--rgx-display-stretch);
	font-size: clamp(1.55rem, 0.1rem + 7.4vw, 6.5rem); /* 13-char strikes fit 320 up */
	line-height: 1;
	letter-spacing: var(--rgx-track-display);
	text-transform: uppercase;
	white-space: nowrap;
}
.rgx-philosophy-word .rgx-strike { position: relative; }
.rgx-philosophy-word .rgx-strike::after {
	content: "";
	position: absolute;
	left: -2%; right: -2%;
	top: 52%;
	height: 0.075em;
	background: var(--rgx-lime);
	transform: scaleX(var(--rgx-strike-x, 1)) rotate(-2deg);
	transform-origin: left center;
}
.rgx-philosophy-final .rgx-underline { position: relative; display: inline-block; }
.rgx-philosophy-final .rgx-underline::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: -0.08em;
	height: 0.09em;
	background: var(--rgx-lime);
	transform: scaleX(var(--rgx-under-x, 1));
	transform-origin: left center;
}
.rgx-philosophy-copy {
	margin: var(--rgx-s5) auto 0;
	max-width: 44ch;
	font-size: var(--rgx-text-lead);
	line-height: 1.55;
	color: var(--rgx-gray-dark);
}
.rgx-philosophy-count {
	position: absolute;
	top: calc(var(--rgx-s6) + env(safe-area-inset-top));
	right: var(--rgx-gutter);
	font-family: var(--rgx-font-display);
	font-weight: var(--rgx-weight-display);
	font-size: var(--rgx-text-sm);
	letter-spacing: 0.08em;
	color: var(--rgx-gray-dark);
}

/* No-JS / reduced-motion: show the sequence as a stacked editorial list */
.rgx-no-motion .rgx-philosophy-pin { min-height: 0; padding-block: var(--rgx-section); }
.rgx-no-motion .rgx-philosophy-words { grid-template-areas: none; display: grid; gap: 0.2em; }
.rgx-no-motion .rgx-philosophy-word { grid-area: auto; white-space: normal; }
.rgx-no-motion .rgx-philosophy-count { display: none; }

/* --- Positioning (annotated editorial) -------------------------------------- */
.rgx-position .rgx-label { margin-bottom: var(--rgx-s6); }
.rgx-position-statement {
	font-family: var(--rgx-font-display);
	font-weight: var(--rgx-weight-display);
	font-stretch: 108%;
	font-size: clamp(1.7rem, 1rem + 3.4vw, 3.4rem);
	line-height: 1.22;
	letter-spacing: -0.015em;
	margin: 0;
	max-width: 22ch;
	text-wrap: balance;
}
.rgx-position-statement .rgx-hl::before { inset: 0.1em -0.05em; }
.rgx-position-note {
	margin-top: var(--rgx-s4);
	color: var(--rgx-purple-deep);
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.rgx-pillars {
	margin-top: var(--rgx-s8);
	display: grid;
	gap: var(--rgx-s5);
}
.rgx-pillar {
	border-top: 2px solid var(--rgx-black);
	padding-top: var(--rgx-s4);
	display: grid;
	gap: var(--rgx-s2);
	align-content: start;
}
.rgx-pillar-index {
	font-family: var(--rgx-font-display);
	font-weight: var(--rgx-weight-display);
	font-size: var(--rgx-text-sm);
	color: var(--rgx-purple-deep);
}
.rgx-pillar p { margin: 0; color: var(--rgx-gray); max-width: 34ch; }
@media (min-width: 880px) {
	.rgx-pillars { grid-template-columns: repeat(3, 1fr); gap: var(--rgx-s6); }
}

/* --- Conversion band ---------------------------------------------------------- */
.rgx-cta-band { text-align: left; }
.rgx-cta-band .rgx-d1 { max-width: 16ch; }
.rgx-cta-band .rgx-hl::before { background: var(--rgx-lime); }
.rgx-cta-actions {
	margin-top: var(--rgx-s6);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--rgx-s4) var(--rgx-s5);
}
.rgx-cta-meta { color: var(--rgx-gray-dark); font-size: var(--rgx-text-sm); }

/* --- Selected work (typographic rows) ----------------------------------- */
.rgx-work { padding-bottom: 0; }
.rgx-work-head {
	display: flex; align-items: flex-end; justify-content: space-between;
	gap: var(--rgx-s5); flex-wrap: wrap; margin-bottom: var(--rgx-s6);
}
.rgx-work-head .rgx-label { margin-bottom: var(--rgx-s4); }
.rgx-work-all { white-space: nowrap; }
.rgx-work-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--rgx-black); }
.rgx-work-row a { display: block; text-decoration: none; border-bottom: 2px solid var(--rgx-black); position: relative; overflow: clip; }
.rgx-work-row a::before {
	content: ""; position: absolute; inset: 0;
	background: var(--rgx-black);
	transform: scaleY(0); transform-origin: bottom;
	transition: transform var(--rgx-dur-fast) var(--rgx-ease);
}
.rgx-work-row[data-accent="purple"] a::before { background: var(--rgx-purple); }
.rgx-work-row[data-accent="lime"] a::before { background: var(--rgx-lime); }
.rgx-work-row a:hover::before, .rgx-work-row a:focus-visible::before { transform: scaleY(1); }
.rgx-work-row-in {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: baseline;
	gap: var(--rgx-s3) var(--rgx-s5);
	padding-block: clamp(1.2rem, 3.4vw, 2.2rem);
	transition: color var(--rgx-dur-fast) var(--rgx-ease);
}
.rgx-work-row a:hover .rgx-work-row-in, .rgx-work-row a:focus-visible .rgx-work-row-in { color: var(--rgx-white); }
.rgx-work-row[data-accent="lime"] a:hover .rgx-work-row-in,
.rgx-work-row[data-accent="lime"] a:focus-visible .rgx-work-row-in { color: var(--rgx-on-lime); }
.rgx-work-index {
	font-family: var(--rgx-font-display); font-weight: var(--rgx-weight-display);
	font-size: var(--rgx-text-sm); color: var(--rgx-purple-deep);
	transition: color var(--rgx-dur-fast);
}
.rgx-work-row a:hover .rgx-work-index, .rgx-work-row a:focus-visible .rgx-work-index { color: inherit; }
.rgx-work-name {
	font-family: var(--rgx-font-display); font-weight: var(--rgx-weight-display);
	font-stretch: 112%; text-transform: uppercase; letter-spacing: -0.015em;
	font-size: clamp(1.5rem, 0.7rem + 3.6vw, 3.4rem); line-height: 1.05;
}
.rgx-work-meta { font-size: var(--rgx-text-sm); color: var(--rgx-gray); display: grid; text-align: right; gap: 2px; }
.rgx-work-meta b { font-weight: var(--rgx-weight-medium); }
.rgx-work-row a:hover .rgx-work-meta, .rgx-work-row a:focus-visible .rgx-work-meta { color: inherit; opacity: 0.8; }
.rgx-work-arrow {
	font-size: 1.4em;
	transition: transform var(--rgx-dur-fast) var(--rgx-ease);
	align-self: center;
	display: none;
}
.rgx-work-row a:hover .rgx-work-arrow { transform: translateX(6px); }
@media (min-width: 700px) {
	.rgx-work-row-in { grid-template-columns: 3.5rem 1fr auto 2.5rem; }
	.rgx-work-arrow { display: inline; }
}

/* --- Services accordion --------------------------------------------------- */
.rgx-services .rgx-d2 { margin-bottom: var(--rgx-s7); max-width: 18ch; }
.rgx-services .rgx-label { margin-bottom: var(--rgx-s4); }
.rgx-svc-list { border-top: 1px solid var(--rgx-line-strong); }
.rgx-svc { border-bottom: 1px solid var(--rgx-line-strong); }
.rgx-svc-head {
	appearance: none; background: none; border: 0; cursor: pointer;
	width: 100%; text-align: left; font: inherit; color: inherit;
	display: grid; grid-template-columns: auto 1fr auto; align-items: center;
	gap: var(--rgx-s4) var(--rgx-s5);
	padding-block: clamp(1.1rem, 3vw, 1.7rem);
}
.rgx-svc-index {
	font-family: var(--rgx-font-display); font-weight: var(--rgx-weight-display);
	font-size: var(--rgx-text-sm); color: var(--rgx-purple-deep);
}
.rgx-svc-title { display: grid; gap: 4px; min-width: 0; }
.rgx-svc-sub { color: var(--rgx-gray); font-size: var(--rgx-text-sm); }
.rgx-svc-plus { position: relative; width: 18px; height: 18px; flex: none; }
.rgx-svc-plus::before, .rgx-svc-plus::after {
	content: ""; position: absolute; background: var(--rgx-black);
	transition: transform var(--rgx-dur-fast) var(--rgx-ease);
}
.rgx-svc-plus::before { left: 0; right: 0; top: 8px; height: 2px; }
.rgx-svc-plus::after { top: 0; bottom: 0; left: 8px; width: 2px; }
.rgx-svc.is-open .rgx-svc-plus::after { transform: scaleY(0); }
.rgx-svc.is-open .rgx-svc-head .rgx-h3 { color: var(--rgx-purple-deep); }
.rgx-svc-body {
	display: grid; grid-template-rows: 0fr;
	transition: grid-template-rows var(--rgx-dur) var(--rgx-ease);
}
.rgx-svc.is-open .rgx-svc-body { grid-template-rows: 1fr; }
.rgx-svc-body-in { overflow: hidden; }
.rgx-svc-body-in > p { margin: 0 0 var(--rgx-s4); max-width: 56ch; color: var(--rgx-gray); }
.rgx-svc-body-in > .rgx-textlink { display: inline-block; margin-bottom: var(--rgx-s5); }
.rgx-svc-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--rgx-s4); }
.rgx-svc-tags span {
	font-size: var(--rgx-text-label); font-weight: var(--rgx-weight-medium);
	border: 1px solid var(--rgx-line-strong); border-radius: var(--rgx-radius-pill);
	padding: 6px 13px;
}
@media (min-width: 700px) {
	.rgx-svc-head { grid-template-columns: 3.5rem 1fr auto; }
	.rgx-svc-body-in { padding-left: calc(3.5rem + var(--rgx-s5)); }
}

/* --- Calculator: the RAY-42 ------------------------------------------------ */
.rgx-calc-grid { display: grid; gap: var(--rgx-s7); align-items: center; }
.rgx-calc-machine {
	max-width: 270px; margin-inline: auto;
	rotate: -5deg;
	filter: drop-shadow(0 34px 50px rgba(0, 0, 0, 0.55)) drop-shadow(0 6px 14px rgba(0, 0, 0, 0.4));
}
.rgx-calc-svg { width: 100%; height: auto; overflow: visible; }
.rgx-calc-brand {
	font-family: var(--rgx-font-display); font-weight: 800; font-stretch: 115%;
	font-size: 17px; letter-spacing: 0.16em; fill: rgba(255, 255, 255, 0.9);
}
.rgx-lcd {
	font-family: var(--rgx-font-display); font-weight: 700; font-stretch: 105%;
	fill: var(--rgx-lime); letter-spacing: 0.06em;
}
.rgx-lcd-1 { font-size: 17px; opacity: 0.92; }
.rgx-lcd-2 { font-size: 20px; }
.rgx-key-label {
	font-family: var(--rgx-font-body); font-weight: 700; font-size: 17px;
}
.rgx-key { cursor: default; }
.rgx-calc-copy .rgx-label { margin-bottom: var(--rgx-s4); }
.rgx-calc-copy .rgx-d2 { max-width: 22ch; }
.rgx-calc-sub { margin: var(--rgx-s4) 0 var(--rgx-s6); max-width: 44ch; font-size: var(--rgx-text-lead); }
@media (min-width: 880px) {
	.rgx-calc-grid { grid-template-columns: 1fr 1.5fr; }
	.rgx-calc-machine { max-width: 330px; margin-top: calc(-1 * clamp(20px, 4vw, 56px)); }
}

/* --- Process ---------------------------------------------------------------- */
.rgx-process { background: var(--rgx-paper-2); }
.rgx-steps {
	list-style: none; margin: var(--rgx-s6) 0 0; padding: 0;
	display: grid; gap: var(--rgx-s5);
	counter-reset: none;
}
.rgx-step {
	border-top: 2px solid var(--rgx-black);
	padding-top: var(--rgx-s4);
	display: grid; gap: var(--rgx-s2); align-content: start;
}
.rgx-step-index {
	font-family: var(--rgx-font-display); font-weight: var(--rgx-weight-display);
	font-size: var(--rgx-text-sm); color: var(--rgx-purple-deep);
}
.rgx-step p { margin: 0; color: var(--rgx-gray); font-size: var(--rgx-text-sm); max-width: 30ch; }
@media (min-width: 880px) {
	.rgx-steps { grid-template-columns: repeat(5, 1fr); gap: var(--rgx-s5); }
}

/* --- Statement: who it's for ------------------------------------------------ */
.rgx-statement .rgx-label { margin-bottom: var(--rgx-s4); }
.rgx-statement-line { max-width: 16ch; }
.rgx-underline-wrap { position: relative; display: inline-block; white-space: nowrap; }
.rgx-underline {
	position: absolute; left: 0; right: 0; bottom: -0.12em;
	width: 100%; height: 0.18em; overflow: visible;
}
.rgx-underline path {
	fill: none; stroke: var(--rgx-lime); stroke-width: 7;
	stroke-linecap: round;
}
.rgx-statement-sub {
	margin: var(--rgx-s5) 0 0; max-width: 46ch;
	font-size: var(--rgx-text-lead); line-height: 1.5;
}
.rgx-statement-sub .rgx-textlink { margin-left: 6px; }

.rgx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* --- Hero art direction: live design session ------------------------------ */
.rgx-hero::before, .rgx-hero::after {
	content: ""; position: absolute; border-radius: 50%;
	filter: blur(70px); pointer-events: none; z-index: -1;
}
.rgx-hero::before {
	width: clamp(280px, 40vw, 620px); height: clamp(280px, 40vw, 620px);
	right: -8%; top: -6%;
	background: color-mix(in srgb, var(--rgx-purple) 13%, transparent);
}
.rgx-hero::after {
	width: clamp(200px, 26vw, 420px); height: clamp(200px, 26vw, 420px);
	left: -10%; bottom: 4%;
	background: color-mix(in srgb, var(--rgx-lime) 9%, transparent);
}

/* Selection frame: the word as a design object being worked on. */
.rgx-mask--select.is-free, .rgx-no-motion .rgx-mask--select { overflow: visible; } /* unlocked after the masked rise */
.rgx-select-wrap { position: relative; display: inline-block; transform: rotate(0deg); }
.rgx-select-frame {
	position: absolute; inset: -0.06em -0.14em;
	border: 2.5px solid var(--rgx-purple);
	opacity: 0; pointer-events: none;
}
.rgx-handle {
	position: absolute; width: 11px; height: 11px;
	background: var(--rgx-paper); border: 2.5px solid var(--rgx-purple);
}
.rgx-handle--tl { top: -6px; left: -6px; }
.rgx-handle--tr { top: -6px; right: -6px; }
.rgx-handle--bl { bottom: -6px; left: -6px; }
.rgx-handle--br { bottom: -6px; right: -6px; }

/* Multiplayer cursor with a name tag; JS flies it in and "applies" the lime. */
.rgx-cursor {
	position: absolute; z-index: 5; pointer-events: none;
	top: 34%; right: 8%;
	opacity: 0;
}
.rgx-cursor-arrow { width: 20px; height: 22px; display: block; }
.rgx-cursor-arrow path { fill: var(--rgx-purple); stroke: var(--rgx-paper); stroke-width: 1.4; }
.rgx-cursor-tag {
	position: absolute; left: 16px; top: 18px;
	font-style: normal; font-family: var(--rgx-font-body);
	font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
	color: #fff; background: var(--rgx-purple);
	padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.rgx-swatch {
	position: absolute; left: 30px; top: -14px;
	width: 20px; height: 20px; border-radius: 6px;
	background: var(--rgx-lime); border: 2px solid var(--rgx-black);
	opacity: 0; transform: scale(.5);
}

/* Static composition when motion is off: frame on, cursor parked, slight tilt. */
.rgx-no-motion .rgx-select-frame { opacity: 1; }
.rgx-no-motion .rgx-select-wrap { transform: rotate(-1.4deg); }
.rgx-no-motion .rgx-cursor { opacity: 1; top: 30%; right: 14%; }
@media (max-width: 700px) {
	.rgx-cursor-tag { font-size: 10.5px; }
	.rgx-handle { width: 9px; height: 9px; }
}

/* --- Service demos: each service demonstrates itself ----------------------- */
.rgx-svc-demo {
	display: flex; align-items: center; gap: 12px;
	height: 96px; margin-bottom: var(--rgx-s4);
}
.rgx-svc-demo i, .rgx-svc-demo b { display: inline-block; font-style: normal; }

/* 01 Branding — identity elements assemble into a lockup */
.rgx-demo-brand .d-dot { width: 34px; height: 34px; border-radius: 50%; background: var(--rgx-purple); }
.rgx-demo-brand .d-sq { width: 30px; height: 30px; background: var(--rgx-black); rotate: 8deg; }
.rgx-demo-brand .d-word {
	font-family: var(--rgx-font-display); font-weight: 800; font-stretch: 115%;
	font-size: 30px; letter-spacing: -0.02em;
}
.rgx-demo-brand .d-rule { flex: 0 0 56px; height: 7px; background: var(--rgx-lime); border-radius: 4px; }
.rgx-svc.is-open .rgx-demo-brand .d-dot { animation: rgxIn .45s .05s var(--rgx-ease) both; }
.rgx-svc.is-open .rgx-demo-brand .d-sq { animation: rgxIn .45s .15s var(--rgx-ease) both; }
.rgx-svc.is-open .rgx-demo-brand .d-word { animation: rgxIn .45s .25s var(--rgx-ease) both; }
.rgx-svc.is-open .rgx-demo-brand .d-rule { animation: rgxRule .5s .4s var(--rgx-ease) both; }

/* 02 Graphic design — posters fan into an overlapping collage */
.rgx-demo-design { position: relative; }
.rgx-demo-design .d-poster { width: 52px; height: 72px; border-radius: 6px; box-shadow: 0 6px 16px rgba(0,0,0,.14); }
.rgx-demo-design .d-p1 { background: var(--rgx-purple); rotate: -7deg; }
.rgx-demo-design .d-p2 { background: var(--rgx-black); rotate: 3deg; margin-left: -18px; }
.rgx-demo-design .d-p3 { background: var(--rgx-lime); rotate: 11deg; margin-left: -16px; }
.rgx-svc.is-open .rgx-demo-design .d-p1 { animation: rgxFan .5s .05s var(--rgx-ease) both; }
.rgx-svc.is-open .rgx-demo-design .d-p2 { animation: rgxFan .5s .18s var(--rgx-ease) both; }
.rgx-svc.is-open .rgx-demo-design .d-p3 { animation: rgxFan .5s .31s var(--rgx-ease) both; }

/* 03 Web — an interface builds itself */
.rgx-demo-web .d-browser {
	position: relative; width: 168px; height: 88px;
	border: 2px solid var(--rgx-black); border-radius: 9px;
	background: var(--rgx-white); overflow: hidden;
}
.rgx-demo-web .d-chrome { position: absolute; top: 0; left: 0; right: 0; height: 16px; border-bottom: 2px solid var(--rgx-black); background: var(--rgx-paper-2); }
.rgx-demo-web .d-bar { position: absolute; left: 10px; border-radius: 3px; transform-origin: left center; }
.rgx-demo-web .d-b1 { top: 26px; width: 96px; height: 12px; background: var(--rgx-black); }
.rgx-demo-web .d-b2 { top: 46px; width: 130px; height: 8px; background: var(--rgx-purple); }
.rgx-demo-web .d-b3 { top: 62px; width: 74px; height: 8px; background: var(--rgx-paper-2); border: 1px solid var(--rgx-black); }
.rgx-demo-web .d-caret { position: absolute; right: 12px; bottom: 10px; width: 3px; height: 14px; background: var(--rgx-lime); animation: rgxBlink 1s steps(1) infinite; }
.rgx-svc.is-open .rgx-demo-web .d-b1 { animation: rgxGrow .4s .1s var(--rgx-ease) both; }
.rgx-svc.is-open .rgx-demo-web .d-b2 { animation: rgxGrow .4s .28s var(--rgx-ease) both; }
.rgx-svc.is-open .rgx-demo-web .d-b3 { animation: rgxGrow .4s .46s var(--rgx-ease) both; }

/* 04 SEO/AI — relationships connect */
.rgx-demo-seo svg { width: 200px; height: 84px; overflow: visible; }
.rgx-demo-seo .d-node { fill: var(--rgx-paper); stroke: var(--rgx-black); stroke-width: 2.5; }
.rgx-demo-seo .d-node--lime { fill: var(--rgx-lime); }
.rgx-demo-seo .d-link { fill: none; stroke: var(--rgx-purple); stroke-width: 2.5; stroke-dasharray: 4 6; stroke-linecap: round; }
.rgx-demo-seo text { font-family: var(--rgx-font-body); font-size: 11px; font-weight: 600; text-anchor: middle; fill: var(--rgx-gray); }
.rgx-svc.is-open .rgx-demo-seo .d-l1 { animation: rgxDash .8s .15s linear both; }
.rgx-svc.is-open .rgx-demo-seo .d-l2 { animation: rgxDash .8s .45s linear both; }
.rgx-svc.is-open .rgx-demo-seo .d-node { animation: rgxIn .4s .05s var(--rgx-ease) both; }

/* 05 E-commerce — product to cart */
.rgx-demo-ecom .d-product { position: relative; width: 60px; height: 74px; border: 2px solid var(--rgx-black); border-radius: 8px; background: var(--rgx-white); }
.rgx-demo-ecom .d-img { position: absolute; inset: 7px 7px 26px; background: var(--rgx-purple); border-radius: 4px; }
.rgx-demo-ecom .d-price { position: absolute; left: 7px; bottom: 8px; width: 30px; height: 8px; background: var(--rgx-lime); border-radius: 4px; }
.rgx-demo-ecom .d-go { width: 34px; height: 20px; }
.rgx-demo-ecom .d-go path { fill: none; stroke: var(--rgx-black); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.rgx-demo-ecom .d-cart { position: relative; width: 44px; height: 44px; border-radius: 50%; background: var(--rgx-black); display: grid; place-items: center; }
.rgx-demo-ecom .d-cart b { color: var(--rgx-lime); font-family: var(--rgx-font-body); font-weight: 800; font-size: 15px; }
.rgx-svc.is-open .rgx-demo-ecom .d-product { animation: rgxIn .4s .05s var(--rgx-ease) both; }
.rgx-svc.is-open .rgx-demo-ecom .d-go { animation: rgxIn .4s .3s var(--rgx-ease) both; }
.rgx-svc.is-open .rgx-demo-ecom .d-cart { animation: rgxPop .45s .5s cubic-bezier(.3,1.6,.4,1) both; }

@keyframes rgxIn { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
@keyframes rgxRule { from { opacity: 0; scale: 0 1; } to { opacity: 1; scale: 1 1; } }
@keyframes rgxFan { from { opacity: 0; translate: 0 18px; rotate: 0deg; } }
@keyframes rgxGrow { from { scale: 0 1; } to { scale: 1 1; } }
@keyframes rgxDash { from { stroke-dashoffset: 90; opacity: 0; } to { stroke-dashoffset: 0; opacity: 1; } }
@keyframes rgxPop { from { scale: 0.2; opacity: 0; } to { scale: 1; opacity: 1; } }
@keyframes rgxBlink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
	.rgx-svc-demo *, .rgx-svc.is-open .rgx-svc-demo * { animation: none !important; }
}

/* --- Process: the project moves forward ------------------------------------ */
.rgx-steps { position: relative; --rgx-line-p: 1; }
@media (min-width: 880px) {
	.rgx-steps::before {
		content: ""; position: absolute; top: -2px; left: 0; right: 0; height: 2px;
		background: var(--rgx-lime);
		transform: scaleX(var(--rgx-line-p));
		transform-origin: left center;
		z-index: 1;
	}
}

/* --- Work peek: real project screenshots follow the cursor ------------------ */
.rgx-peek {
	position: fixed; top: 0; left: 0;
	width: clamp(240px, 24vw, 340px); aspect-ratio: 16 / 11;
	border-radius: 12px; overflow: hidden;
	border: 2px solid var(--rgx-black);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
	pointer-events: none; z-index: 40;
	opacity: 0; transform: scale(0.9) rotate(-2deg);
	background: var(--rgx-paper-2);
}
.rgx-peek img {
	width: 100%; height: 100%; object-fit: cover; object-position: top;
	filter: grayscale(1) contrast(1.06);
	display: block;
}
.rgx-peek::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(150deg, color-mix(in srgb, var(--rgx-purple) 42%, transparent), transparent 55%, color-mix(in srgb, var(--rgx-lime) 22%, transparent));
	mix-blend-mode: multiply;
}

/* --- Hero benefit checks --------------------------------------------------- */
.rgx-hero-checks { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 18px 0 0; padding: 0; }
.rgx-hero-checks li { display: inline-flex; align-items: center; gap: 8px; font-size: var(--rgx-text-sm); color: var(--rgx-gray); font-weight: var(--rgx-weight-medium); }
.rgx-hero-checks li::before { content: "✓"; flex: none; width: 17px; height: 17px; border-radius: 50%; background: var(--rgx-lime); color: var(--rgx-on-lime); font-size: 11px; font-weight: 800; display: grid; place-items: center; }

/* --- Honest numbers band --------------------------------------------------- */
.rgx-stats { border-block: 2px solid var(--rgx-black); background: var(--rgx-paper); }
.rgx-stats-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.rgx-stat { padding: clamp(18px, 3.5vw, 30px) clamp(4px, 2vw, 18px); display: grid; gap: 4px; align-content: start; border-right: 1px solid var(--rgx-line-strong); }
.rgx-stat:nth-child(even) { border-right: none; }
.rgx-stat:nth-child(-n+2) { border-bottom: 1px solid var(--rgx-line-strong); }
.rgx-stat-n { font-family: var(--rgx-font-display); font-weight: var(--rgx-weight-display); font-stretch: 112%; font-size: clamp(1.9rem, 1.2rem + 3vw, 3.2rem); line-height: 1; color: var(--rgx-purple-deep); }
.rgx-stat-n b { font-weight: inherit; }
.rgx-stat-l { font-size: var(--rgx-text-sm); color: var(--rgx-gray); max-width: 20ch; }
@media (min-width: 880px) {
	.rgx-stats-row { grid-template-columns: repeat(4, 1fr); }
	.rgx-stat, .rgx-stat:nth-child(even) { border-right: 1px solid var(--rgx-line-strong); border-bottom: none; }
	.rgx-stat:last-child { border-right: none; }
}

/* --- The Lead Engine -------------------------------------------------------- */
.rgx-engine .rgx-label { margin-bottom: var(--rgx-s4); }
.rgx-engine-title { max-width: 16ch; }
.rgx-engine-sub { margin: var(--rgx-s4) 0 var(--rgx-s7); max-width: 52ch; }
.rgx-engine-stage { position: relative; display: grid; grid-template-columns: 1fr; gap: var(--rgx-s6); }
.rgx-engine-col { position: relative; display: grid; gap: 12px; align-content: center; justify-items: start; }
.rgx-engine-tag { font-size: var(--rgx-text-label); font-weight: var(--rgx-weight-semibold); letter-spacing: var(--rgx-tracking-wide); text-transform: uppercase; color: var(--rgx-faint-dark, #7f7d75); color: rgba(250,248,241,.45); margin-top: 2px; }

.rgx-query { display: inline-flex; align-items: center; gap: 11px; background: #1A1A1D; border: 1px solid rgba(255,255,255,.09); border-radius: var(--rgx-radius-pill); padding: 12px 18px 12px 12px; max-width: 100%; }
.rgx-query-ico { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(122,47,242,.25); color: var(--rgx-lavender); }
.rgx-query-ico svg { width: 15px; height: 15px; }
.rgx-query-ico--spark { background: rgba(207,242,38,.14); color: var(--rgx-lime); }
.rgx-query-text { font-size: var(--rgx-text-sm); color: var(--rgx-paper); display: inline-flex; align-items: center; white-space: nowrap; overflow: hidden; }
.rgx-query-text i { font-style: normal; }
.rgx-caret { width: 2px; height: 1em; background: var(--rgx-lime); margin-left: 3px; animation: rgx-caret 1s steps(1) infinite; }
@keyframes rgx-caret { 50% { opacity: 0; } }

.rgx-minisite { position: relative; width: min(200px, 70vw); background: var(--rgx-paper); border-radius: 14px; padding: 30px 16px 14px; box-shadow: 0 18px 50px rgba(0,0,0,.45); }
.rgx-minisite-chrome { position: absolute; top: 9px; left: 12px; display: flex; gap: 5px; }
.rgx-minisite-chrome i { width: 7px; height: 7px; border-radius: 50%; background: rgba(14,14,16,.22); }
.rgx-minisite-logo { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--rgx-purple); color: #fff; font-family: var(--rgx-font-display); font-weight: 800; margin-bottom: 9px; }
.rgx-minisite-bar { display: block; height: 8px; border-radius: 4px; background: rgba(14,14,16,.14); margin-bottom: 6px; }
.rgx-mb1 { width: 78%; } .rgx-mb2 { width: 56%; }
.rgx-minisite-chip { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 700; background: var(--rgx-lime); color: var(--rgx-on-lime); border-radius: 99px; padding: 3px 9px; }
.rgx-minisite-ring { position: absolute; inset: -7px; border: 2px solid var(--rgx-lavender); border-radius: 19px; opacity: 0; pointer-events: none; }
.rgx-engine.is-live .rgx-minisite-ring { animation: rgx-ring 2.6s var(--rgx-ease) infinite; }
@keyframes rgx-ring { 0% { opacity: .8; transform: scale(.97); } 70% { opacity: 0; transform: scale(1.06); } 100% { opacity: 0; } }

.rgx-lead { display: flex; align-items: center; gap: 11px; background: #1A1A1D; border: 1px solid rgba(255,255,255,.09); border-left: 3px solid var(--rgx-lime); border-radius: 12px; padding: 11px 16px; min-width: min(250px, 100%); }
.rgx-lead-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--rgx-lime); }
.rgx-engine.is-live .rgx-lead-dot { animation: rgx-leadpulse 2.2s ease infinite; }
@keyframes rgx-leadpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(207,242,38,.5); } 45% { box-shadow: 0 0 0 7px rgba(207,242,38,0); } }
.rgx-lead-body { display: grid; line-height: 1.35; }
.rgx-lead-body b { font-size: var(--rgx-text-sm); font-weight: var(--rgx-weight-semibold); color: var(--rgx-paper); }
.rgx-lead-body i { font-style: normal; font-size: 12px; color: rgba(250,248,241,.55); }

.rgx-engine-stage .rgx-engine-wires { display: none; }
.rgx-engine-note { margin: var(--rgx-s6) 0 0; font-size: var(--rgx-text-sm); color: rgba(250,248,241,.55); max-width: 54ch; }

@media (min-width: 880px) {
	.rgx-engine-stage { grid-template-columns: 1.1fr .9fr 1.1fr; gap: var(--rgx-s5); min-height: 360px; }
	.rgx-engine-col--site { justify-items: center; }
	.rgx-engine-col--out { justify-items: end; }
	.rgx-engine-col--out .rgx-engine-tag { justify-self: end; }
	.rgx-engine-stage .rgx-engine-wires { display: block; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
	.rgx-wire { fill: none; stroke: rgba(188,180,255,.5); stroke-width: 2; stroke-dasharray: 7 7; }
	.rgx-wire--lime { stroke: rgba(207,242,38,.45); }
	.rgx-engine.is-live .rgx-wire { animation: rgx-flow 1.1s linear infinite; }
	@keyframes rgx-flow { to { stroke-dashoffset: -14; } }
}
@media (prefers-reduced-motion: reduce) {
	.rgx-caret, .rgx-engine.is-live .rgx-wire, .rgx-engine.is-live .rgx-minisite-ring, .rgx-engine.is-live .rgx-lead-dot { animation: none; }
}

/* --- Client portal feature -------------------------------------------------- */
.rgx-portal { background: var(--rgx-paper); }
.rgx-portal-grid { display: grid; grid-template-columns: 1fr; gap: var(--rgx-s7); align-items: center; }
.rgx-portal-copy .rgx-label { margin-bottom: var(--rgx-s4); }
.rgx-portal-sub { margin: var(--rgx-s4) 0 var(--rgx-s5); max-width: 46ch; }
.rgx-portal-list { list-style: none; margin: 0 0 var(--rgx-s5); padding: 0; display: grid; gap: 10px; }
.rgx-portal-list li { display: flex; align-items: center; gap: 10px; font-size: var(--rgx-text-base); }
.rgx-portal-list li::before { content: "✓"; flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--rgx-lime); color: var(--rgx-on-lime); font-size: 11px; font-weight: 800; display: grid; place-items: center; }

/* The mock speaks the actual portal's palette: charcoal, lavender, apricot. */
.rgx-portal-mock { background: #222223; border-radius: 20px; padding: 22px; max-width: 400px; width: 100%; box-shadow: var(--rgx-shadow-lg, 0 30px 70px rgba(14,14,16,.28)); color: #FFFEEC; justify-self: center; rotate: 1.5deg; }
.rgx-pm-top { display: flex; align-items: center; gap: 10px; font-size: 13px; color: rgba(255,254,236,.75); }
.rgx-pm-top i { width: 9px; height: 9px; border-radius: 50%; background: #BCB4FF; }
.rgx-pm-bell { margin-left: auto; position: relative; width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(255,254,236,.2); display: grid; place-items: center; font-style: normal; }
.rgx-pm-bell::before { content: "🔔"; font-size: 11px; }
.rgx-pm-bell u { position: absolute; top: -5px; right: -5px; width: 15px; height: 15px; border-radius: 50%; background: #BCB4FF; color: #1C1436; font-size: 9px; font-weight: 800; text-decoration: none; display: grid; place-items: center; }
.rgx-pm-code { font-family: var(--rgx-font-mono, ui-monospace, monospace); font-size: 12px; letter-spacing: .05em; color: #BCB4FF; background: rgba(188,180,255,.14); border-radius: 99px; padding: 4px 11px; display: inline-block; margin: 14px 0; }
.rgx-pm-stage { display: flex; gap: 10px; align-items: flex-start; }
.rgx-pm-dot { flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: #BCB4FF; box-shadow: 0 0 0 4px rgba(188,180,255,.18); }
.rgx-pm-stage b { display: block; font-size: 15px; }
.rgx-pm-stage i { font-style: normal; font-size: 12.5px; color: rgba(255,254,236,.6); }
.rgx-pm-bar { height: 5px; border-radius: 99px; background: rgba(255,254,236,.12); margin: 13px 0; overflow: hidden; }
.rgx-pm-bar i { display: block; height: 100%; width: 38%; border-radius: 99px; background: linear-gradient(90deg, #7A2FF2, #BCB4FF); }
.rgx-pm-steps { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rgx-pm-steps li { font-size: 11px; font-weight: 600; border: 1px solid rgba(255,254,236,.16); border-radius: 99px; padding: 3px 9px; color: rgba(255,254,236,.5); }
.rgx-pm-steps li.is-done { color: #CAC426; border-color: rgba(202,196,38,.4); }
.rgx-pm-steps li.is-done::before { content: "✓ "; }
.rgx-pm-steps li.is-now { color: #1C1436; background: #BCB4FF; border-color: #BCB4FF; }
.rgx-pm-update { background: rgba(255,254,236,.06); border: 1px solid rgba(255,254,236,.1); border-radius: 12px; padding: 11px 13px; }
.rgx-pm-update b { display: block; font-size: 12.5px; }
.rgx-pm-update i { font-style: normal; font-size: 12px; color: rgba(255,254,236,.6); }
@media (min-width: 900px) {
	.rgx-portal-grid { grid-template-columns: 1.1fr 1fr; }
}

/* --- FAQ -------------------------------------------------------------------- */
.rgx-faq .rgx-d2 { margin-bottom: var(--rgx-s6); }
.rgx-faq-q { font-size: clamp(1.02rem, .9rem + .6vw, 1.3rem); }
.rgx-faq-list .rgx-svc-body-in > p { max-width: 62ch; }
.rgx-faq-more { margin: var(--rgx-s5) 0 0; font-size: var(--rgx-text-sm); }

/* =========================================================================
   Render 4 — mobile-first pass: hero composition, work media cards,
   calculator fit, CTA next-steps.
   ========================================================================= */

/* Hero: keep the design-session props on the canvas at every size. */
@media (max-width: 879px) {
	.rgx-cursor { right: 14%; }
}
@media (max-width: 700px) {
	.rgx-cursor { right: 24%; top: 30%; }
	.rgx-cursor-tag { left: auto; right: 14px; top: 20px; }
	.rgx-swatch { left: -26px; top: -12px; }
	.rgx-no-motion .rgx-cursor { right: 24%; }
	.rgx-hero { padding-bottom: var(--rgx-s6); }
	.rgx-hero-sub { margin-top: clamp(0.9rem, 2.6vh, 1.6rem); }
	.rgx-hero-checks { margin-top: 14px; }
	.rgx-hero-cta { margin-top: clamp(1.1rem, 3vh, 1.8rem); }
}

/* Work: on touch screens the proof is on the page, not behind a hover. */
.rgx-work-media { display: none; }
@media (max-width: 879px) {
	.rgx-work-list { border-top: 0; display: grid; gap: clamp(2.4rem, 6.5vw, 3.4rem); }
	.rgx-work-row a { border-bottom: 0; }
	.rgx-work-row a::before { display: none; }
	.rgx-work-row-in {
		grid-template-columns: auto 1fr auto;
		grid-template-areas: "media media media" "index name arrow" "meta meta meta";
		align-items: center;
		gap: 8px var(--rgx-s4);
		padding-block: 0;
	}
	.rgx-work-media {
		display: block; position: relative; grid-area: media;
		aspect-ratio: 16 / 10;
		border: 2px solid var(--rgx-black); border-radius: 18px;
		overflow: hidden;
		background: var(--rgx-paper-2);
		margin-bottom: 8px;
	}
	.rgx-work-media img {
		width: 100%; height: 100%; object-fit: cover; object-position: top;
		display: block;
		filter: grayscale(1) contrast(1.04);
	}
	.rgx-work-media::after {
		content: ""; position: absolute; inset: 0;
		background: color-mix(in srgb, var(--rgx-purple) 16%, transparent);
		mix-blend-mode: multiply;
	}
	.rgx-work-row[data-accent="lime"] .rgx-work-media::after { background: color-mix(in srgb, var(--rgx-lime) 20%, transparent); }
	.rgx-work-row[data-accent="ink"] .rgx-work-media::after { background: rgba(14, 14, 16, 0.16); }
	.rgx-work-media-tag {
		position: absolute; right: 10px; top: 10px;
		font-family: var(--rgx-font-display); font-weight: var(--rgx-weight-display);
		font-size: 12px; letter-spacing: 0.04em;
		background: var(--rgx-paper); color: var(--rgx-ink);
		border: 2px solid var(--rgx-black); border-radius: 999px;
		padding: 4px 11px;
	}
	.rgx-work-name { font-size: clamp(1.6rem, 6.2vw, 2.5rem); grid-area: name; }
	.rgx-work-index { grid-area: index; font-size: var(--rgx-text-base); }
	.rgx-work-arrow { grid-area: arrow; }
	.rgx-work-meta { grid-area: meta; text-align: left; display: block; }
	.rgx-work-meta b { display: none; } /* year lives on the media tag */
}

/* Calculator copy: never wider than the phone. */
@media (max-width: 480px) {
	.rgx-calc-copy { max-width: 100%; }
	.rgx-calc-copy .rgx-d2 { font-size: clamp(1.45rem, 7.6vw, 2.1rem); }
	.rgx-calc-sub { font-size: var(--rgx-text-base); }
}

/* Statement underline: cap the drawn stroke to the shell. */
.rgx-underline-wrap { max-width: 100%; }
.rgx-underline-wrap svg { max-width: 100%; }

/* Conversion band: what actually happens next, in three honest steps. */
.rgx-cta-next {
	list-style: none;
	display: flex; flex-wrap: wrap;
	gap: 12px 30px;
	margin: var(--rgx-s6) 0 0; padding: 0;
}
.rgx-cta-next li {
	display: flex; align-items: center; gap: 10px;
	color: rgba(250, 248, 241, 0.72);
	font-size: var(--rgx-text-sm);
}
.rgx-cta-next b {
	flex: none; width: 26px; height: 26px;
	display: grid; place-items: center;
	border: 1.5px solid var(--rgx-lavender); border-radius: 50%;
	color: var(--rgx-lavender);
	font-family: var(--rgx-font-display); font-weight: var(--rgx-weight-display);
	font-size: 12px;
}
@media (max-width: 700px) {
	.rgx-cta-next { display: grid; gap: 10px; }
}
