/* ============================================================
   HERO — full-bleed dark stage with kinetic typography.

   Background system (no blur, no noise — clean stacked layers):
     1. Subtle 1px grid that fades at edges
     2. Three giant outline-text marquees crawling at different speeds
     3. Four drifting colored shapes (no filter blur — pure transforms)

   Foreground:
     - Eyebrow + meta strip
     - Massive split headline with a CYCLING italic accent that morphs
       through "One Expert." → each CMS name → repeat.
     - Intro + dual magnetic CTAs
     - Platform list bottom strip
   ============================================================ */

.ced-hero {
	position: relative;
	min-height: 100svh;
	min-height: 100dvh;
	display: grid;
	overflow: clip;
	color: var(--wp--preset--color--paper);
	background: var(--wp--preset--color--ink);
	padding-top: calc(var(--header-height) + clamp(2rem, 6vw, 4rem));
	padding-bottom: clamp(2rem, 6vw, 4rem);
	padding-inline: var(--gutter-x);
	/* Full-bleed override of .ced-section */
	max-width: none;
	width: 100%;
	margin-inline: 0;
}

/* ============== BG SYSTEM ============== */
.ced-hero__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	overflow: hidden;
}

/* Subtle 1px grid that fades at edges */
.ced-hero__grid {
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(to right,  var(--ced-line-04) 1px, transparent 1px),
		linear-gradient(to bottom, var(--ced-line-04) 1px, transparent 1px);
	background-size: clamp(56px, 7vw, 96px) clamp(56px, 7vw, 96px);
	mask-image: radial-gradient(80% 60% at 50% 50%, black 30%, transparent 85%);
	-webkit-mask-image: radial-gradient(80% 60% at 50% 50%, black 30%, transparent 85%);
}

/* ─── Crawling marquees ─── */
.ced-hero__marquee {
	position: absolute;
	left: 0;
	white-space: nowrap;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	letter-spacing: -0.04em;
	user-select: none;
	display: flex;
	align-items: center;
}
.ced-hero__marquee span {
	display: inline-block;
	padding-right: 1ch;
	color: transparent;
	-webkit-text-stroke: 1px var(--ced-line-10);
	will-change: transform;
}
.ced-hero__marquee--top {
	top: 8%;
	font-size: clamp(5rem, 14vw, 13rem);
	line-height: 0.9;
}
.ced-hero__marquee--top span { animation: ced-hero-mar-l 65s linear infinite; }

.ced-hero__marquee--mid {
	top: 42%;
	font-size: clamp(7rem, 20vw, 18rem);
	line-height: 0.85;
	mix-blend-mode: screen;
}
.ced-hero__marquee--mid span {
	-webkit-text-stroke: 1px rgba(203, 108, 230, 0.12);
	animation: ced-hero-mar-r 80s linear infinite;
}

.ced-hero__marquee--bot {
	bottom: 6%;
	font-size: clamp(4rem, 11vw, 10rem);
	line-height: 0.9;
}
.ced-hero__marquee--bot span {
	-webkit-text-stroke: 1px rgba(203, 108, 230, 0.16);
	animation: ced-hero-mar-l 50s linear infinite;
}

@keyframes ced-hero-mar-l {
	from { transform: translate3d(0, 0, 0); }
	to   { transform: translate3d(-50%, 0, 0); }
}
@keyframes ced-hero-mar-r {
	from { transform: translate3d(-50%, 0, 0); }
	to   { transform: translate3d(0, 0, 0); }
}

/* ─── Drifting colored shapes ─── */
.ced-hero__shape {
	position: absolute;
	display: block;
	will-change: transform;
}
.ced-hero__shape--coral {
	width: clamp(80px, 8vw, 140px);
	aspect-ratio: 1;
	border-radius: 50%;
	background: var(--wp--preset--color--coral);
	left: 8%;
	top: 18%;
	animation: ced-hero-drift-1 22s ease-in-out infinite;
	mix-blend-mode: screen;
	opacity: 0.85;
}
.ced-hero__shape--lavender {
	width: clamp(40px, 4vw, 70px);
	aspect-ratio: 1;
	background: var(--wp--preset--color--lavender);
	right: 12%;
	top: 26%;
	transform: rotate(45deg);
	animation: ced-hero-drift-2 30s ease-in-out infinite;
	mix-blend-mode: screen;
	opacity: 0.85;
}
.ced-hero__shape--lime {
	width: clamp(12px, 1.2vw, 16px);
	height: clamp(12px, 1.2vw, 16px);
	border-radius: 50%;
	background: var(--wp--preset--color--lime);
	left: 38%;
	top: 70%;
	box-shadow: 0 0 24px rgba(203, 108, 230, 0.6);
	animation: ced-hero-drift-1 14s ease-in-out infinite reverse;
}
.ced-hero__shape--ring {
	width: clamp(120px, 13vw, 240px);
	aspect-ratio: 1;
	border-radius: 50%;
	border: 1px solid rgba(203, 108, 230, 0.45);
	right: 20%;
	bottom: 22%;
	animation: ced-hero-drift-2 36s ease-in-out infinite;
}
@keyframes ced-hero-drift-1 {
	0%, 100% { transform: translate(0, 0)        rotate(0deg); }
	33%      { transform: translate(40px, -28px) rotate(8deg); }
	66%      { transform: translate(-32px, 20px) rotate(-6deg); }
}
@keyframes ced-hero-drift-2 {
	0%, 100% { transform: translate(0, 0)        rotate(45deg); }
	50%      { transform: translate(-40px, 30px) rotate(60deg); }
}

@media (prefers-reduced-motion: reduce) {
	.ced-hero__marquee span,
	.ced-hero__shape { animation: none !important; }
}

/* ============== FOREGROUND ============== */
.ced-hero__inner {
	position: relative;
	z-index: 2;
	max-width: var(--page-max);
	margin-inline: auto;
	width: 100%;
	display: grid;
	grid-template-rows: auto 1fr auto auto;
	gap: var(--wp--preset--spacing--lg);
}

.ced-hero__top {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: center;
	justify-content: space-between;
}
.ced-hero__meta {
	display: inline-flex;
	gap: 1.5rem;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--micro);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--fog);
}
.ced-hero__status {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--wp--preset--color--paper);
}
.ced-hero__status span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--wp--preset--color--lime);
	box-shadow: 0 0 12px rgba(203, 108, 230, 0.6);
}

/* --- Headline + cycling word --- */
.ced-hero__headline {
	font-size: var(--wp--preset--font-size--display);
	font-weight: 600;
	letter-spacing: -0.05em;
	line-height: 0.92;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
	max-width: 14ch;
	color: var(--wp--preset--color--paper);
}
.ced-hero__line { display: block; }

.ced-hero__line--accent {
	font-style: italic;
	font-family: var(--wp--preset--font-family--serif-display);
	font-weight: 300;
	padding-left: 1.5ch;
}
@media (max-width: 720px) {
	.ced-hero__line--accent { padding-left: 0.5ch; }
}

/* The cycle wrapper — clips animating words */
.ced-hero__cycle {
	display: inline-flex;
	overflow: hidden;
	vertical-align: top;
	line-height: 1;
}
.ced-hero__cycle-word {
	display: inline-block;
	transition:
		transform 600ms var(--ease-emph),
		opacity   320ms var(--ease-smooth),
		color     480ms ease;
	will-change: transform, opacity, color;
	color: var(--wp--preset--color--lime);
}
/* Per-CMS color cycle — direct brand hex values so the rest of the site
   stays monochrome but this hero accent keeps each platform's real brand
   color. Index 0 is the static first paint ("One Team.") and stays black;
   the rest map to each platform's brand identity. */
.ced-hero__cycle-word[data-idx="0"]  { color: var(--wp--preset--color--lime);     }
.ced-hero__cycle-word[data-idx="1"]  { color: var(--wp--preset--color--sky);      }   /* Webflow */
.ced-hero__cycle-word[data-idx="2"]  { color: var(--wp--preset--color--lavender); }   /* Framer */
.ced-hero__cycle-word[data-idx="3"]  { color: var(--wp--preset--color--rose);     }   /* Wix */
.ced-hero__cycle-word[data-idx="4"]  { color: var(--wp--preset--color--sky);      }   /* WP */
.ced-hero__cycle-word[data-idx="5"]  { color: var(--wp--preset--color--coral);    }   /* HubSpot — brand orange */
.ced-hero__cycle-word[data-idx="6"]  { color: var(--wp--preset--color--sunset);   }   /* Craft — brand red */
.ced-hero__cycle-word[data-idx="7"]  { color: var(--wp--preset--color--sage);     }   /* Shopify */
.ced-hero__cycle-word[data-idx="8"]  { color: var(--wp--preset--color--lavender); }   /* Squarespace */
.ced-hero__cycle-word[data-idx="9"]  { color: var(--wp--preset--color--lavender); }   /* WooCommerce */
.ced-hero__cycle-word[data-idx="10"] { color: var(--wp--preset--color--coral);    }   /* Strapi */
.ced-hero__cycle-word[data-idx="11"] { color: var(--wp--preset--color--sky);      }   /* Contentful */
.ced-hero__cycle-word[data-idx="12"] { color: var(--wp--preset--color--rose);     }   /* Sanity — brand pink */

/* JS toggles these to choreograph slide-out / slide-in */
.ced-hero__cycle-word.is-leaving {
	transform: translateY(-110%);
	opacity: 0;
}
.ced-hero__cycle-word.is-arriving {
	transform: translateY(110%);
	opacity: 0;
	transition: none;
}

/* --- Bottom row: intro + CTAs --- */
.ced-hero__bottom {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--wp--preset--spacing--md);
	align-items: end;
}
@media (min-width: 900px) {
	.ced-hero__bottom { grid-template-columns: minmax(auto, 56ch) auto; }
}
.ced-hero__intro {
	font-size: var(--wp--preset--font-size--lg);
	color: var(--wp--preset--color--mist);
	max-width: 56ch;
	letter-spacing: -0.005em;
	line-height: 1.45;
	margin: 0;
}
.ced-hero__ctas {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
}

/* --- Platforms strip --- */
.ced-hero__platforms {
	border-top: var(--wp--custom--grid--hairline);
	padding-top: var(--wp--preset--spacing--sm);
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}
@media (min-width: 900px) {
	.ced-hero__platforms { grid-template-columns: 220px 1fr; align-items: center; }
}
.ced-hero__platforms-label {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--micro);
	text-transform: uppercase;
	letter-spacing: 0.18em;
	color: var(--wp--preset--color--fog);
}
.ced-hero__platforms ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--xs);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--wp--preset--color--mist);
}
.ced-hero__platforms li {
	position: relative;
	transition:
		color 320ms var(--ease-smooth),
		transform 320ms var(--ease-smooth);
	cursor: default;
}
.ced-hero__platforms li::before {
	content: attr(data-cat);
	position: absolute;
	bottom: 100%;
	left: 0;
	font-size: 0.55rem;
	color: var(--wp--preset--color--lime);
	letter-spacing: 0.2em;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity 200ms ease, transform 200ms ease;
}
.ced-hero__platforms li:hover {
	color: var(--wp--preset--color--lime);
	transform: translateY(-2px);
}
.ced-hero__platforms li:hover::before {
	opacity: 1;
	transform: translateY(-2px);
}

/* --- Scroll indicator --- */
.ced-hero__scroll {
	position: absolute;
	right: var(--wp--preset--spacing--gutter);
	bottom: 2rem;
	display: none;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--micro);
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--wp--preset--color--fog);
	text-decoration: none;
	z-index: 3;
}
@media (min-width: 1100px) {
	.ced-hero__scroll { display: inline-flex; }
}
.ced-hero__scroll-line {
	display: block;
	width: 1px;
	height: 56px;
	background: var(--ced-line-16);
	overflow: hidden;
	position: relative;
}
.ced-hero__scroll-line span {
	position: absolute;
	top: -100%;
	left: 0;
	width: 100%;
	height: 50%;
	background: var(--wp--preset--color--lime);
	animation: ced-scroll-line 1.8s var(--ease-smooth) infinite;
}
@keyframes ced-scroll-line {
	0%   { top: -100%; }
	100% { top: 200%; }
}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE — Tablet (≤ 1024px) and Mobile (≤ 640px)
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
	.ced-hero__inner { gap: clamp(1.5rem, 4vw, 2.5rem); }
	.ced-hero__marquee--top { font-size: clamp(4rem, 11vw, 8rem); }
	.ced-hero__marquee--mid { font-size: clamp(5rem, 16vw, 12rem); }
	.ced-hero__marquee--bot { font-size: clamp(3rem, 9vw, 6.5rem); }
}

/* Phone landscape — short viewport. Strip min-height, tighten paddings,
   shrink marquees so the hero stays usable. */
@media (max-width: 1024px) and (orientation: landscape) and (max-height: 540px) {
	.ced-hero {
		min-height: auto;
		padding-top: calc(var(--header-height) + 1.25rem);
		padding-bottom: 1.5rem;
	}
	.ced-hero__inner { gap: 1rem; }
	.ced-hero__headline { font-size: clamp(2.5rem, 9vw, 4rem); }
	.ced-hero__marquee--top { font-size: clamp(2.5rem, 8vw, 5rem); top: 6%; }
	.ced-hero__marquee--mid { font-size: clamp(3.5rem, 12vw, 8rem); top: 38%; }
	.ced-hero__marquee--bot { font-size: clamp(2rem, 6vw, 4rem); bottom: 4%; }
	.ced-hero__intro { font-size: 0.9rem; }
}

@media (max-width: 640px) {
	.ced-hero {
		min-height: auto;
		padding-bottom: 3rem;
	}
	.ced-hero__inner {
		grid-template-rows: auto auto auto auto;
		gap: 1.5rem;
	}
	.ced-hero__top {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.75rem;
	}
	.ced-hero__meta {
		flex-direction: column;
		gap: 0.5rem;
	}
	.ced-hero__headline {
		font-size: clamp(3.25rem, 14vw, 5rem);
		max-width: 100%;
	}
	.ced-hero__line--accent {
		padding-left: 0;
	}
	.ced-hero__intro {
		font-size: var(--wp--preset--font-size--base);
	}
	.ced-hero__bottom { gap: 1.25rem; }
	.ced-hero__ctas {
		flex-direction: column;
		align-items: stretch;
		gap: 0.6rem;
		width: 100%;
	}
	.ced-hero__ctas .ced-btn {
		justify-content: center;
		width: 100%;
	}
	.ced-hero__platforms {
		grid-template-columns: 1fr;
		gap: 0.5rem;
	}
	.ced-hero__platforms ul {
		gap: 0.4rem 0.9rem;
	}
	.ced-hero__platforms li::before { display: none; }

	/* On phone, the marquees compete with the headline. Hide the top
	   and bottom strips entirely; keep the middle one as a subtle
	   background presence at low opacity. */
	.ced-hero__marquee--top,
	.ced-hero__marquee--bot { display: none; }
	.ced-hero__marquee--mid {
		top: 38%;
		font-size: clamp(3rem, 14vw, 5rem);
		opacity: 0.55;
	}
	.ced-hero__marquee--mid span {
		-webkit-text-stroke: 0.5px rgba(203, 108, 230, 0.18);
	}

	/* Decorative shapes — compact + de-emphasised */
	.ced-hero__shape--coral    { width: 64px;  opacity: 0.55; left: 5%; top: 10%; }
	.ced-hero__shape--lavender { width: 32px;  opacity: 0.55; right: 6%; top: 14%; }
	.ced-hero__shape--lime     { display: none; }
	.ced-hero__shape--ring     { width: 90px;  opacity: 0.5;  right: 4%; bottom: 18%; }

	.ced-hero__scroll { display: none; }
}
