/*
Theme Name: WPEX Theme
Theme URI: https://wordpressex.co.uk/
Author: WordPressEX
Author URI: https://wordpressex.co.uk/
Description: Native Gutenberg block theme foundation for the WPEX framework.
Version: 0.9.2
Requires at least: 6.6
Requires PHP: 8.0
Text Domain: wpex-theme
*/

:root {
	--wpex-container-max: 1830px;
	--wpex-container-wide: 1560px;
	--wpex-container-content: 1240px;
	--wpex-gutter: clamp(20px, 2vw, 40px);
	--wpex-section-space: clamp(60px, 6.25vw, 90px);
	--wpex-radius-s: 7px;
	--wpex-radius-m: 10px;
	--wpex-radius-l: 20px;
	--wpex-radius-xl: 30px;
}

html {
	scroll-behavior: smooth;
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

main.wp-block-group {
	min-height: 50vh;
}

.wpex-site-header,
.wpex-site-footer {
	margin-left: calc(var(--wp--style--root--padding-left, 0px) * -1);
	margin-right: calc(var(--wp--style--root--padding-right, 0px) * -1);
}

.wpex-site-header__inner,
.wpex-site-footer__inner {
	width: min(100% - (var(--wpex-gutter) * 2), var(--wpex-container-max));
	margin-inline: auto;
}

.wpex-site-header {
	border-bottom: 1px solid var(--wp--preset--color--border);
	background: rgba(255, 255, 255, 0.96);
}

.wpex-site-header__inner {
	min-height: 88px;
}

.wpex-site-footer {
	margin-top: var(--wpex-section-space);
	background: var(--wp--preset--color--dark);
	color: rgba(255, 255, 255, 0.9);
}

.wpex-site-footer a,
.wpex-site-footer .wp-block-site-title a {
	color: #fff;
}

.wpex-site-footer__inner {
	padding-block: clamp(40px, 5vw, 72px);
}

.wpex-main-shell {
	padding-top: var(--wpex-section-space);
	padding-bottom: var(--wpex-section-space);
}

.wpex-archive-list .wp-block-post,
.wpex-index-list .wp-block-post {
	padding-block: var(--wp--preset--spacing--l);
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.wp-block-post-title a {
	text-decoration: none;
}

.wp-block-query-pagination {
	margin-top: var(--wp--preset--spacing--2-xl);
}

.wp-block-post-featured-image img {
	border-radius: var(--wpex-radius-m);
}

/* Keep the editing canvas close to the frontend without simulating motion. */
.editor-styles-wrapper {
	color: var(--wp--preset--color--ink-soft);
}

.editor-styles-wrapper .wp-block[data-align="full"] {
	max-width: none;
}

@media (max-width: 781px) {
	.wpex-site-header__inner {
		min-height: 72px;
	}

	.wpex-site-header__inner > .wp-block-group {
		gap: var(--wp--preset--spacing--s);
	}
}


/* Stage 8R.1 — source-faithful header, hero and trusted-logo strip. */
.wpex-home-main { margin:0 !important; padding:0 !important; overflow:clip; }

/* Header ---------------------------------------------------------------- */
.home .wpex-site-header,
.front-page .wpex-site-header {
    position:absolute;
    inset:0 0 auto;
    z-index:80;
    width:100%;
    margin:0;
    border:0;
    background:transparent;
    color:#fff;
}
.wpex-site-header__inner {
    box-sizing:border-box;
    width:min(calc(100% - 40px), var(--wpex-container-max));
    min-height:100px;
    margin-inline:auto;
    gap:clamp(12px,1.4vw,26px);
}
.wpex-site-header__brand { flex:0 0 auto; min-width:0; background:transparent; }
.wpex-site-header__brand .wp-block-site-logo { margin:0; line-height:0; }
.wpex-site-header__brand .wp-block-site-logo img { display:block; width:220px; height:auto; max-width:100%; }
.wpex-site-header__nav {
    flex:0 1 auto;
    min-width:0;
    margin-inline:auto;
    padding:0 10px;
    border-radius:10px;
    background:rgba(0,0,0,.28);
    -webkit-backdrop-filter:blur(20px);
    backdrop-filter:blur(20px);
}
.wpex-site-header__nav .wp-block-navigation__container { gap:0; }
.wpex-site-header__nav .wp-block-navigation-item { margin:0; }
.wpex-site-header__nav .wp-block-navigation-item__content {
    position:relative;
    padding:0 10px;
    color:#fff !important;
    font-family:var(--wp--preset--font-family--heading);
    font-size:13px;
    font-weight:500;
    line-height:60px;
    letter-spacing:0;
    text-transform:uppercase;
    white-space:nowrap;
    overflow:hidden;
}
.wpex-site-header__nav .wp-block-navigation-item__content::after {
    content:attr(aria-label);
    position:absolute;
    inset:100% auto auto 10px;
}
.wpex-site-header__nav .wp-block-navigation__submenu-container {
    min-width:220px;
    padding:12px;
    border:0;
    border-bottom:3px solid var(--wp--preset--color--primary);
    border-radius:10px;
    background:#fff;
    box-shadow:0 16px 38px rgba(0,0,0,.18);
}
.wpex-site-header__nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
    padding:8px 10px;
    color:var(--wp--preset--color--ink) !important;
    line-height:1.4;
    text-transform:none;
}
.wpex-site-header__social { flex:0 0 auto; gap:2px; margin:0; }
.wpex-site-header__social .wp-social-link { background:transparent !important; }
.wpex-site-header__social .wp-social-link a { padding:7px; }
.wpex-site-header__cta { flex:0 0 auto; margin:0; }
.wpex-site-header__cta .wp-block-button__link {
    min-height:50px !important;
    padding:11px 20px 11px 24px !important;
    border-radius:9px !important;
    white-space:nowrap;
}
.wpex-site-header .wp-block-navigation__responsive-container-open,
.wpex-site-header .wp-block-navigation__responsive-container-close { color:#fff; }

/* Hero ------------------------------------------------------------------ */
.wpex-home-hero {
    position:relative;
    min-height:98svh;
    margin:0 !important;
    overflow:hidden;
    isolation:isolate;
    background:#061923;
    color:#fff;
}
.wpex-home-hero__viewport { position:relative; height:98svh; min-height:760px; overflow:hidden; }
.wpex-home-hero .wpex-carousel__slide {
    position:absolute !important;
    inset:0;
    width:100%;
    height:100%;
    min-height:0 !important;
    margin:0 !important;
    visibility:hidden;
    opacity:0;
    pointer-events:none;
    will-change:transform,clip-path,opacity;
    contain:paint;
}
.wpex-home-hero .wpex-carousel__slide.is-active {
    visibility:visible;
    opacity:1;
    pointer-events:auto;
}
.wpex-home-hero .wp-block-cover__image-background {
    transform:scale(1.001);
    will-change:transform;
}
.wpex-home-hero .wp-block-cover__inner-container {
    width:min(calc(100% - 40px), var(--wpex-container-max));
    height:100%;
    margin-inline:auto;
    padding:100px 0 50px;
    display:flex;
    align-items:stretch;
}
.wpex-home-hero__layout {
    display:grid !important;
    grid-template-columns:minmax(0,63fr) minmax(310px,37fr);
    width:100%;
    height:100%;
    gap:clamp(28px,4vw,72px);
    align-items:stretch;
}
.wpex-home-hero__primary {
    justify-content:center;
    align-items:flex-start !important;
    gap:10px !important;
    min-width:0;
    padding-bottom:92px;
}
.wpex-home-hero__eyebrow {
    width:max-content;
    max-width:100%;
    margin:0 0 4px;
    padding:5px 15px 5px 20px;
    border-radius:7px;
    background:rgba(255,255,255,.18);
    -webkit-backdrop-filter:blur(24px);
    backdrop-filter:blur(24px);
    color:#fff;
    font-family:var(--wp--preset--font-family--heading);
    font-size:14px;
    font-weight:500;
    line-height:28px;
    letter-spacing:.01em;
}
.wpex-home-hero__title {
    max-width:760px;
    margin:0 !important;
    color:#fff !important;
    font-family:var(--wp--preset--font-family--heading);
    font-size:clamp(60px,5.2vw,100px) !important;
    font-weight:600 !important;
    line-height:1.1 !important;
    letter-spacing:-.03em;
    text-wrap:balance;
}
.wpex-home-hero__secondary {
    align-items:flex-end !important;
    justify-content:flex-end !important;
    gap:18px !important;
    padding:100px 0 72px;
    min-width:0;
}
.wpex-home-hero__copy {
    max-width:390px;
    margin:0 !important;
    color:#fff;
    font-size:20px;
    line-height:1.4;
    text-align:right;
}
.wpex-home-hero__secondary .wp-block-buttons { justify-content:flex-end; }
.wpex-home-hero__secondary .wp-block-button__link {
    min-height:52px;
    border:0 !important;
    border-radius:10px !important;
    padding:12px 20px 12px 24px !important;
}
.wpex-home-hero__bottom {
    position:absolute;
    z-index:12;
    left:0;
    bottom:0;
    box-sizing:border-box;
    width:485px;
    height:185px;
    min-height:0;
    margin:0 !important;
    padding:26px 34px 24px max(30px,calc((100vw - var(--wpex-container-max))/2 + 20px));
    gap:28px !important;
    align-items:center !important;
    border-radius:0 10px 0 0;
    background:#fff;
    color:var(--wp--preset--color--ink);
    box-shadow:0 -1px 0 rgba(255,255,255,.15);
}
.wpex-home-hero__stat-block { flex:0 0 auto; gap:5px !important; }
.wpex-home-hero__stat {
    margin:0 !important;
    color:var(--wp--preset--color--ink) !important;
    font-size:clamp(48px,4vw,68px) !important;
    font-weight:500 !important;
    line-height:.95 !important;
    letter-spacing:-.04em;
    white-space:nowrap;
}
.wpex-home-hero__stat-label { margin:0 !important; color:var(--wp--preset--color--ink); font-size:14px; font-weight:600; line-height:1.3; }
.wpex-home-hero__stat-copy { max-width:180px; margin:0 !important; color:var(--wp--preset--color--ink-soft); font-size:14px; line-height:1.45; }
.wpex-carousel__controls {
    position:absolute;
    z-index:16;
    right:26px;
    bottom:22px;
    display:flex;
    gap:8px;
}
.wpex-carousel__control {
    display:grid;
    place-items:center;
    width:46px;
    height:46px;
    padding:0;
    border:1px solid rgba(255,255,255,.52);
    border-radius:50%;
    background:rgba(4,23,32,.24);
    color:#fff;
    -webkit-backdrop-filter:blur(12px);
    backdrop-filter:blur(12px);
    cursor:pointer;
    transition:background .25s ease,border-color .25s ease,transform .25s ease;
}
.wpex-carousel__control:hover { background:rgba(14,165,255,.78); border-color:#0ea5ff; transform:translateY(-2px); }
.wpex-carousel__control svg { width:17px; height:17px; fill:none; stroke:currentColor; stroke-width:1.8; }

/* First-paint hero entrance: no JS-dependent hidden state. */
@keyframes wpexHeroIntro { from { opacity:0; transform:translate3d(0,34px,0); filter:blur(5px); } to { opacity:1; transform:none; filter:blur(0); } }
.wpex-home-hero .wpex-carousel__slide:first-child .wpex-hero-anim { animation:wpexHeroIntro .9s cubic-bezier(.22,1,.36,1) both; }
.wpex-home-hero .wpex-carousel__slide:first-child .wpex-hero-anim:nth-child(2) { animation-delay:.10s; }
.wpex-home-hero .wpex-carousel__slide:first-child .wpex-home-hero__secondary .wpex-hero-anim:first-child { animation-delay:.20s; }
.wpex-home-hero .wpex-carousel__slide:first-child .wpex-home-hero__secondary .wpex-hero-anim:last-child { animation-delay:.28s; }
.wpex-home-hero__bottom { animation:wpexHeroBottom .9s .32s cubic-bezier(.22,1,.36,1) both; }
@keyframes wpexHeroBottom { from { opacity:0; transform:translate3d(-70px,70px,0); } to { opacity:1; transform:none; } }

/* Trusted client strip --------------------------------------------------- */
.wpex-client-strip {
    margin:0 !important;
    padding:86px 0 70px;
    overflow:hidden;
    background:#fff;
}
.wpex-client-strip__title {
    width:min(calc(100% - 40px),var(--wpex-container-wide));
    margin:0 auto 42px !important;
    color:var(--wp--preset--color--ink);
    text-align:center;
    font-family:var(--wp--preset--font-family--heading);
    font-size:14px;
    font-weight:500;
    line-height:28px;
    letter-spacing:.01em;
}
.wpex-client-strip__marquee { width:100%; overflow:hidden; border-bottom:1px solid rgba(11,31,42,.1); padding-bottom:15px; }
.wpex-client-strip__logos {
    display:flex !important;
    flex:none !important;
    flex-wrap:nowrap !important;
    align-items:center;
    gap:70px !important;
    width:max-content;
    padding-inline:35px;
    box-sizing:border-box;
    margin:0 !important;
}
.wpex-client-strip__logos .wp-block-image { flex:0 0 190px; width:190px; margin:0; display:flex; align-items:center; justify-content:center; }
.wpex-client-strip__logos img { display:block; width:auto; max-width:190px; height:42px; max-height:42px; object-fit:contain; opacity:.52; filter:none; }

@media (max-width: 1280px) {
    .wpex-site-header__social { display:none !important; }
    .wpex-site-header__brand .wp-block-site-logo img { width:185px; }
    .wpex-site-header__nav .wp-block-navigation-item__content { padding-inline:8px; font-size:12px; }
    .wpex-home-hero__title { font-size:clamp(54px,6vw,82px) !important; }
    .wpex-home-hero__bottom { width:425px; height:160px; padding-block:22px; }
}
@media (max-width: 1023px) {
    .wpex-site-header__inner { width:min(calc(100% - 28px),var(--wpex-container-max)); min-height:84px; }
    .wpex-site-header__nav { margin-left:auto; background:transparent; padding:0; }
    .wpex-site-header__cta { display:none !important; }
    .wpex-home-hero__viewport { height:94svh; min-height:680px; }
    .wpex-home-hero .wp-block-cover__inner-container { width:min(calc(100% - 40px),var(--wpex-container-max)); padding-top:92px; padding-bottom:44px; }
    .wpex-home-hero__layout { grid-template-columns:minmax(0,60fr) minmax(280px,40fr); gap:30px; }
    .wpex-home-hero__secondary { padding-top:80px; }
    .wpex-home-hero__copy { font-size:17px; }
    .wpex-home-hero__bottom { width:360px; height:150px; }
    .wpex-home-hero__stat-copy { display:none; }
}
@media (max-width: 767px) {
    .wpex-site-header__inner { width:calc(100% - 24px); min-height:76px; }
    .wpex-site-header__brand .wp-block-site-logo img { width:160px; }
    .wpex-home-hero__viewport { height:88svh; min-height:640px; }
    .wpex-home-hero .wp-block-cover__inner-container { width:calc(100% - 36px); padding-top:84px; padding-bottom:150px; }
    .wpex-home-hero__layout { display:block !important; }
    .wpex-home-hero__primary { height:100%; justify-content:center; padding:0; }
    .wpex-home-hero__secondary { display:none !important; }
    .wpex-home-hero__title { max-width:540px; font-size:clamp(43px,12vw,64px) !important; line-height:1.02 !important; }
    .wpex-home-hero__eyebrow { font-size:12px; line-height:22px; padding:4px 11px 4px 14px; }
    .wpex-home-hero__bottom { width:220px; height:147px; padding:20px 20px 18px; border-radius:0 10px 0 0; }
    .wpex-home-hero__stat { font-size:48px !important; }
    .wpex-carousel__controls { right:14px; bottom:18px; }
    .wpex-carousel__control { width:42px; height:42px; }
    .wpex-client-strip { padding:64px 0 54px; }
    .wpex-client-strip__title { margin-bottom:30px !important; }
    .wpex-client-strip__logos { gap:40px !important; padding-inline:20px; }
    .wpex-client-strip__logos .wp-block-image { flex-basis:150px; width:150px; }
    .wpex-client-strip__logos img { max-width:150px; height:36px; max-height:36px; }
}
@media (prefers-reduced-motion: reduce) {
    .wpex-home-hero .wpex-hero-anim, .wpex-home-hero__bottom { animation:none !important; }
}

/* Stage 8.4-8.8: remaining WPEX/Mercket homepage conversion. */
.wpex-home-services,
.wpex-home-performance,
.wpex-home-projects,
.wpex-home-blog { padding-block:var(--wpex-section-space); }
.wpex-home-services__inner,
.wpex-home-performance__inner,
.wpex-home-projects__inner,
.wpex-home-blog__inner { width:min(100% - (var(--wpex-gutter)*2),var(--wpex-container-wide)); margin-inline:auto; }
.wpex-home-services { background:var(--wp--preset--color--light); overflow:hidden; }
.wpex-home-services__heading { display:grid !important; grid-template-columns:minmax(220px,.5fr) minmax(0,1.5fr); gap:clamp(30px,6vw,100px); align-items:start; margin-bottom:clamp(36px,5vw,72px); }
.wpex-home-services__eyebrow,
.wpex-home-performance__eyebrow,
.wpex-home-projects__kicker { margin:0; color:var(--wp--preset--color--primary); text-transform:uppercase; font-family:var(--wp--preset--font-family--heading); font-size:14px; font-weight:600; letter-spacing:.08em; }
.wpex-home-services__title { max-width:900px; margin:0; font-size:clamp(38px,4.2vw,70px) !important; line-height:1.08 !important; letter-spacing:-.035em; }
.wpex-home-services__carousel { position:relative; }
.wpex-service-slide { display:grid !important; grid-template-columns:minmax(0,1.08fr) minmax(360px,.92fr); gap:clamp(30px,5vw,80px); align-items:center; min-height:560px; }
.wpex-service-slide__content { padding:clamp(28px,4vw,60px); background:#fff; border-radius:var(--wpex-radius-m); min-height:420px; display:flex !important; flex-direction:column; justify-content:center; }
.wpex-service-slide__number { color:var(--wp--preset--color--primary); font-family:var(--wp--preset--font-family--heading); font-size:18px; font-weight:600; margin-bottom:20px; }
.wpex-service-slide__title { font-size:clamp(38px,4vw,66px) !important; line-height:1.05 !important; letter-spacing:-.035em; margin:0 0 22px; }
.wpex-service-slide__copy { max-width:620px; margin:0; font-size:18px; line-height:1.6; }
.wpex-service-slide__media { margin:0; height:100%; min-height:560px; }
.wpex-service-slide__media img { width:100%; height:100%; min-height:560px; object-fit:cover; border-radius:var(--wpex-radius-m); }
.wpex-home-services__controls { display:flex; gap:8px; position:absolute; left:clamp(28px,4vw,60px); bottom:28px; z-index:5; }
.wpex-home-services .wpex-carousel__button { border-color:rgba(11,31,42,.28); color:var(--wp--preset--color--ink); background:#fff; }

.wpex-home-performance { background:#fff; }
.wpex-home-performance__inner { display:grid !important; grid-template-columns:minmax(0,1.1fr) minmax(380px,.9fr); gap:clamp(40px,7vw,120px); align-items:end; }
.wpex-home-performance__lead { max-width:860px; }
.wpex-home-performance__title { margin:12px 0 34px; font-size:clamp(44px,5vw,82px) !important; line-height:1.04 !important; letter-spacing:-.04em; }
.wpex-home-performance__features { display:grid !important; grid-template-columns:1fr 1fr; gap:14px; }
.wpex-performance-card { padding:28px; min-height:330px; border-radius:var(--wpex-radius-m); background:var(--wp--preset--color--light); display:flex !important; flex-direction:column; justify-content:flex-end; }
.wpex-performance-card:nth-child(2) { background:var(--wp--preset--color--primary); color:#fff; }
.wpex-performance-card:nth-child(2) h3 { color:#fff; }
.wpex-performance-card img { width:64px; height:64px; object-fit:contain; margin-bottom:auto; }
.wpex-performance-card h3 { font-size:24px; margin:30px 0 8px; }
.wpex-performance-card p { margin:0; }

.wpex-home-projects { background:var(--wp--preset--color--dark); color:#fff; overflow:hidden; }
.wpex-home-projects__kicker { color:var(--wp--preset--color--primary); }
.wpex-home-projects__title { color:#fff !important; font-size:clamp(60px,8vw,138px) !important; line-height:.95 !important; letter-spacing:-.055em; margin:12px 0 clamp(44px,6vw,90px); }
.wpex-home-projects__list { border-top:1px solid rgba(255,255,255,.22); }
.wpex-project-row { position:relative; display:grid !important; grid-template-columns:minmax(0,1.3fr) minmax(160px,.45fr) minmax(130px,.35fr); gap:24px; align-items:center; min-height:120px; padding:24px 0; border-bottom:1px solid rgba(255,255,255,.22); color:#fff; }
.wpex-project-row__name { font-family:var(--wp--preset--font-family--heading); font-size:clamp(26px,3vw,46px); font-weight:500; letter-spacing:-.025em; }
.wpex-project-row__date { color:rgba(255,255,255,.64); }
.wpex-project-row__link { justify-self:end; color:#fff; font-weight:600; }
.wpex-project-row__media { position:absolute; width:260px; height:170px; right:18%; top:50%; transform:translateY(-50%) scale(.92); opacity:0; pointer-events:none; transition:opacity .35s ease, transform .35s ease; z-index:4; }
.wpex-project-row__media img { width:100%; height:100%; object-fit:cover; border-radius:8px; box-shadow:0 18px 50px rgba(0,0,0,.3); }
.wpex-project-row:hover .wpex-project-row__media { opacity:1; transform:translateY(-50%) scale(1); }

.wpex-home-marquee { background:var(--wp--preset--color--primary); color:#fff; padding-block:28px; overflow:hidden; }
.wpex-home-marquee .wpex-marquee__track { display:flex; align-items:center; gap:28px; width:max-content; white-space:nowrap; font-family:var(--wp--preset--font-family--heading); font-size:clamp(46px,6.5vw,108px); line-height:1; font-weight:500; letter-spacing:-.045em; }
.wpex-home-marquee .wpex-marquee__track img { width:clamp(38px,4vw,70px); height:auto; filter:brightness(0) invert(1); }

.wpex-home-testimonials { padding-block:var(--wpex-section-space); overflow:hidden; background:#fff; }
.wpex-home-testimonials__track { display:flex; gap:16px; width:max-content; padding-inline:var(--wpex-gutter); }
.wpex-testimonial-card { width:min(420px,82vw); min-height:260px; display:grid; grid-template-columns:82px 1fr; gap:20px; align-items:start; padding:26px; border-radius:12px; background:var(--wp--preset--color--light); }
.wpex-testimonial-card img { width:82px; height:82px; object-fit:cover; border-radius:10px; }
.wpex-testimonial-card__author { color:var(--wp--preset--color--ink-soft); font-size:14px; margin-bottom:16px; }
.wpex-testimonial-card p { margin:0; color:var(--wp--preset--color--ink); font-family:var(--wp--preset--font-family--heading); font-size:22px; line-height:1.4; font-weight:500; }

.wpex-home-blog { background:#fff; }
.wpex-home-blog__heading { display:grid !important; grid-template-columns:minmax(0,1fr) minmax(280px,.8fr) auto; gap:32px; align-items:end; margin-bottom:48px; }
.wpex-home-blog__heading h2 { margin:0; font-size:clamp(44px,5vw,82px) !important; line-height:1 !important; letter-spacing:-.04em; }
.wpex-home-blog__heading p { max-width:560px; margin:0; }
.wpex-home-blog__grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; }
.wpex-blog-card a { color:inherit; display:block; text-decoration:none; }
.wpex-blog-card__image { height:clamp(300px,32vw,520px); overflow:hidden; border-radius:var(--wpex-radius-m); }
.wpex-blog-card__image img { width:100%; height:100%; object-fit:cover; transition:transform .5s cubic-bezier(.22,1,.36,1); }
.wpex-blog-card:hover .wpex-blog-card__image img { transform:scale(1.035); }
.wpex-blog-card__meta { display:flex; justify-content:space-between; gap:20px; margin:18px 0 14px; color:var(--wp--preset--color--ink-soft); font-size:14px; }
.wpex-blog-card h3 { margin:0 0 18px; font-size:clamp(28px,3vw,46px); line-height:1.14; letter-spacing:-.025em; }
.wpex-blog-card__author { display:flex; align-items:center; gap:12px; }
.wpex-blog-card__author img { width:42px; height:42px; border-radius:50%; object-fit:cover; }

@media (max-width:1023px) {
    .wpex-home-services__heading,
    .wpex-home-performance__inner { grid-template-columns:1fr; }
    .wpex-service-slide { grid-template-columns:1fr; min-height:0; }
    .wpex-service-slide__media, .wpex-service-slide__media img { min-height:440px; }
    .wpex-home-performance__features { max-width:760px; }
    .wpex-project-row { grid-template-columns:1fr auto; }
    .wpex-project-row__date { display:none; }
    .wpex-project-row__media { right:12%; width:220px; height:145px; }
    .wpex-home-blog__heading { grid-template-columns:1fr 1fr; }
    .wpex-home-blog__heading .wp-block-buttons { grid-column:1 / -1; }
}
@media (max-width:767px) {
    .wpex-service-slide__content { min-height:360px; padding:28px; }
    .wpex-service-slide__media, .wpex-service-slide__media img { min-height:360px; }
    .wpex-home-services__controls { position:static; margin-top:18px; }
    .wpex-home-performance__features { grid-template-columns:1fr; }
    .wpex-performance-card { min-height:260px; }
    .wpex-project-row { grid-template-columns:1fr auto; min-height:96px; gap:16px; }
    .wpex-project-row__media { display:none; }
    .wpex-project-row__name { font-size:28px; }
    .wpex-home-testimonials__track { overflow-x:auto; width:auto; scroll-snap-type:x mandatory; padding-bottom:8px; }
    .wpex-testimonial-card { scroll-snap-align:start; flex:0 0 82vw; }
    .wpex-home-blog__heading,
    .wpex-home-blog__grid { grid-template-columns:1fr; }
    .wpex-home-blog__heading .wp-block-buttons { grid-column:auto; }
}
@media (prefers-reduced-motion:reduce) {
    .wpex-project-row__media { display:none; }
    .wpex-blog-card__image img { transition:none; }
}
.wpex-home-marquee .wpex-marquee__track p { margin:0; color:inherit; font:inherit; line-height:inherit; white-space:nowrap; }
.wpex-home-marquee .wpex-marquee__track .wp-block-image { margin:0; flex:0 0 auto; }
.wpex-project-row__name,
.wpex-project-row__date,
.wpex-project-row__link { margin:0; }
.wpex-project-row__link a { color:#fff; text-decoration:none; }
.wpex-performance-card .wp-block-image { margin:0 0 auto; }
.wpex-performance-card .wp-block-image img { width:64px; height:64px; }
.wpex-testimonial-card > .wp-block-image { margin:0; }
.wpex-testimonial-card .wp-block-group { margin:0; }
.wpex-home-blog__grid.wp-block-group { display:grid; }
.wpex-blog-card__image.wp-block-image { margin:0; }
.wpex-blog-card__image a { display:block; height:100%; }
.wpex-blog-card__meta p,
.wpex-blog-card__author p { margin:0; }
.wpex-blog-card h3 a { color:inherit; text-decoration:none; }
.wpex-blog-card__author .wp-block-image { margin:0; }


/* Stage 8R.1 source correction — copied from the approved source geometry/interaction. */
.home .wpex-site-header,
.front-page .wpex-site-header { padding-top:10px; }

.wpex-site-header__inner {
    width:100% !important;
    max-width:1830px !important;
    min-height:100px;
    padding-inline:20px;
    margin-inline:auto;
    column-gap:10px !important;
    justify-content:space-between !important;
    box-sizing:border-box;
}
.wpex-site-header__brand {
    flex:0 0 185px;
    width:185px;
    height:60px;
    padding:5px 10px;
    border-radius:7px;
    background:rgba(0,0,0,.30);
    -webkit-backdrop-filter:blur(50px);
    backdrop-filter:blur(50px);
    display:flex;
    align-items:center;
    box-sizing:border-box;
}
.wpex-site-header__brand .wp-block-site-logo,
.wpex-site-header__brand .wp-block-site-logo img { width:185px !important; max-width:100% !important; }

.wpex-site-header__nav {
    flex:0 1 auto;
    margin:0 10px !important;
    padding:0 10px !important;
    border-radius:7px !important;
    background:rgba(0,0,0,.30) !important;
    -webkit-backdrop-filter:blur(50px) !important;
    backdrop-filter:blur(50px) !important;
}
.wpex-site-header__nav .wp-block-navigation-item__content {
    padding-inline:8px !important;
    font-size:14px !important;
    line-height:60px !important;
    font-weight:500 !important;
}
.wpex-site-header__social { gap:20px !important; }
.wpex-site-header__social .wp-social-link a { padding:0 !important; }

/* Source CTA: 14px vertical, 22/30px horizontal; vertical label swap + arrow-wrapper 45deg. */
.wpex-source-button {
    display:inline-flex;
    align-items:center;
    gap:14px;
    min-height:55px;
    padding:14px 22px 14px 30px;
    border:0;
    border-radius:30px;
    box-sizing:border-box;
    overflow:hidden;
    font-family:var(--wp--preset--font-family--heading);
    font-size:15px;
    line-height:27px;
    font-weight:600;
    letter-spacing:-.15px;
    text-decoration:none !important;
    white-space:nowrap;
}
.wpex-source-button--blue { background:#0EA5FF; color:#fff !important; }
.wpex-source-button--white { background:#fff; color:#23212f !important; }
.wpex-source-button__text-wrap {
    position:relative;
    display:block;
    height:27px;
    overflow:hidden;
}
.wpex-source-button__text {
    display:block;
    transform:translate3d(0,0,0);
    transition:transform 400ms ease;
}
.wpex-source-button__text--hover {
    position:absolute;
    inset:0 auto auto 0;
    transform:translate3d(0,105%,0);
}
.wpex-source-button__arrow {
    width:22px;
    min-width:22px;
    height:22px;
    display:grid;
    place-items:center;
    transform:rotate(0deg);
    transform-origin:50% 50%;
    transition:transform 400ms ease;
}
.wpex-source-button__arrow svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.wpex-source-button:hover .wpex-source-button__text,
.wpex-source-button:focus-visible .wpex-source-button__text { transform:translate3d(0,-105%,0); }
.wpex-source-button:hover .wpex-source-button__text--hover,
.wpex-source-button:focus-visible .wpex-source-button__text--hover { transform:translate3d(0,0,0); }
.wpex-source-button:hover .wpex-source-button__arrow,
.wpex-source-button:focus-visible .wpex-source-button__arrow { transform:rotate(45deg); }

/* Source hero container is 1830px with 20px side padding, not Gutenberg content width. */
.wpex-home-hero .wp-block-cover__inner-container {
    width:100% !important;
    max-width:1830px !important;
    padding-left:20px !important;
    padding-right:20px !important;
    box-sizing:border-box;
}
.wpex-home-hero__title {
    max-width:750px !important;
    font-size:86px !important;
    line-height:96px !important;
    letter-spacing:-2.5px !important;
    font-weight:600 !important;
}
.wpex-home-hero__eyebrow {
    margin-bottom:10px !important;
    padding:5px 15px 5px 20px !important;
    border-radius:7px !important;
    background:rgba(255,255,255,.20) !important;
    -webkit-backdrop-filter:blur(50px) !important;
    backdrop-filter:blur(50px) !important;
}
.wpex-home-hero__copy { max-width:390px; font-size:20px; line-height:28px; padding-bottom:25px; }

/* Exact source bottom-card shell: 485x185 with a 13px top/right reveal and 1fr/1.3fr inner grid. */
.wpex-home-hero__bottom {
    width:485px !important;
    height:185px !important;
    padding:13px 13px 0 0 !important;
    background:#fff !important;
    border-radius:0 10px 0 0 !important;
    display:block !important;
    overflow:visible;
}
.wpex-home-hero__bottom::before,
.wpex-home-hero__bottom::after {
    content:"";
    position:absolute;
    width:20px;
    height:40px;
    background:transparent;
    border-bottom-left-radius:10px;
    box-shadow:0 10px 0 0 #fff;
    pointer-events:none;
}
.wpex-home-hero__bottom::before { bottom:100%; left:0; }
.wpex-home-hero__bottom::after { bottom:0; left:100%; }
.wpex-home-hero__bottom-inner {
    width:100%;
    height:100%;
    padding:25px 20px 20px 35px;
    border-radius:7px;
    background:#F2F7FA;
    display:grid !important;
    grid-template-columns:1fr 1.3fr;
    grid-template-rows:auto;
    gap:20px !important;
    align-items:end !important;
    box-sizing:border-box;
}
.wpex-home-hero__stat-block { align-items:stretch !important; }
.wpex-home-hero__stat { font-size:48px !important; line-height:48px !important; font-weight:600 !important; letter-spacing:0 !important; }
.wpex-home-hero__stat-label { font-size:18px; line-height:26px; font-weight:600; }
.wpex-home-hero__stat-copy { max-width:none !important; line-height:22px; align-self:end; }

@media (min-width:1280px) {
    .wpex-home-hero__title { font-size:100px !important; line-height:110px !important; letter-spacing:-3px !important; }
}
@media (max-width:991px) {
    .wpex-site-header__inner { padding-inline:20px; }
    .wpex-site-header__brand { width:185px; flex-basis:185px; }
    .wpex-site-header__nav { margin-left:20px !important; margin-right:0 !important; }
    .wpex-home-hero__title { font-size:60px !important; line-height:70px !important; }
    .wpex-home-hero__bottom { width:425px !important; height:160px !important; padding-top:10px !important; padding-right:10px !important; }
    .wpex-home-hero__bottom-inner { padding:20px 15px; gap:10px !important; }
}
@media (max-width:767px) {
    .wpex-home-hero__title { font-size:54px !important; line-height:64px !important; letter-spacing:-1px !important; }
    .wpex-home-hero__bottom { width:220px !important; height:160px !important; }
    .wpex-home-hero__bottom-inner { display:block !important; }
    .wpex-home-hero__stat-copy { display:none !important; }
}
@media (max-width:479px) {
    .wpex-home-hero__title { font-size:36px !important; line-height:40px !important; letter-spacing:0 !important; }
    .wpex-home-hero__bottom { height:147px !important; }
}
