/* Grouth 1.10 — interactive advertising sections.
   Colours, type and motion come from the theme (--text, --muted, --bg-2, --ed-rule, --primary, .ed-reveal),
   so light and dark modes and the Design Studio palette apply without extra rules.
   html.gx-motion is set by ad-sections.js only when motion is allowed and the page is not the Studio preview. */

.gw-type-showcase,
.gw-type-reviews,
.gw-type-showreel { overflow: hidden; }

/* Shared heading ----------------------------------------------------------- */

.gx-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; margin-bottom: 48px; }
.gx-head-copy { max-width: 760px; }
.ed-widget .gx-head h2 { margin: 0 0 14px; }
.ed-widget .gx-head p { max-width: 620px; }
.gx-head .gw-button { flex: none; }
.gx-head .gx-kicker { display: block; margin-bottom: 16px; }

/* Statement: lines light up while scrolling, figure counts up ---------------- */

.gx-statement { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(240px, .9fr); gap: 28px 72px; align-items: end; }
.gx-statement .gx-kicker { grid-column: 1 / -1; }
.ed-widget .gx-statement-text { grid-column: 1; margin: 0; font-size: clamp(27px, 3.3vw, 52px); line-height: 1.5; font-weight: 600; letter-spacing: -.02em; color: var(--text); --gx-p: 1; }
html.gx-motion .ed-widget .gx-statement-text[data-gx-light] {
	color: transparent;
	background-image: linear-gradient(180deg, var(--text) 0, var(--text) calc(var(--gx-p) * 100%), color-mix(in srgb, var(--text) 20%, transparent) calc(var(--gx-p) * 100% + 1.1em));
	-webkit-background-clip: text;
	background-clip: text;
}
.gx-figure-block { grid-column: 2; padding-top: 22px; border-top: 1px solid var(--ed-rule); }
.ed-widget .gx-figure { display: flex; justify-content: flex-end; align-items: flex-start; gap: 6px; margin: 0 0 12px; direction: ltr; font-size: clamp(96px, 12vw, 188px); line-height: .9; font-weight: 700; letter-spacing: -.05em; color: var(--text); font-variant-numeric: tabular-nums; }
.gx-figure-suffix { margin-top: .1em; font-size: .36em; line-height: 1; color: var(--primary); }
.ed-widget .gx-figure-label { max-width: 330px; margin: 0 0 22px; font-size: 15px; color: var(--muted); }

.gx-statement-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }
.gx-ghost { display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; border: 1px solid var(--ed-rule); color: var(--text); font-weight: 500; text-decoration: none; transition: border-color .25s, color .25s; }
.gx-ghost:hover,
.gx-ghost:focus-visible { border-color: var(--primary); color: var(--primary); }
.gx-ghost:not([href]) { display: none; }
/* Optional parts stay out of sight until the owner fills them in. */
.gx-figure-block .gx-figure:has(.gx-figure-num[hidden]),
.gx-figure-block:has(.gx-figure-num[hidden]) .gx-figure-label { display: none; }
.gx-figure-block:has(.gx-figure-num[hidden]):not(:has(a[href])) { display: none; }
.gx-stat:has(.gx-stat-num[hidden]) { display: none; }
.gx-play { display: inline-flex; align-items: center; gap: 14px; color: var(--text); font-weight: 500; text-decoration: none; }
.gx-play:not([href]) { display: none; }
.gx-play:hover { color: var(--primary); }
.gx-play-icon { position: relative; display: grid; place-items: center; flex: none; width: 54px; height: 54px; border-radius: 50%; background: var(--primary); color: #18141c; }
.gx-play-icon svg { margin-inline-start: 3px; }
.gx-play-icon::after { content: ""; position: absolute; inset: -6px; border: 1px solid var(--primary); border-radius: 50%; opacity: 0; }
html.gx-motion .gx-play-icon::after { animation: gx-pulse 2.4s ease-out infinite; }
@keyframes gx-pulse { from { transform: scale(.85); opacity: .6; } to { transform: scale(1.35); opacity: 0; } }

/* Showcase: project rows, image preview and cursor that follow the pointer ---- */

.gx-showcase { position: relative; }
.gx-rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ed-rule); counter-reset: gx-row; }
.gx-row { border-bottom: 1px solid var(--ed-rule); counter-increment: gx-row; }
.gx-row-link { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 28px; padding: 30px 0; color: var(--text); text-decoration: none; transition: color .3s ease; }
.gx-row-link::before { content: counter(gx-row, decimal-leading-zero); min-width: 2.2em; direction: ltr; font-size: 13px; color: var(--muted); }
.gx-row-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 28px; min-width: 0; }
.gx-row-title { font-size: clamp(28px, 4.2vw, 64px); line-height: 1.15; font-weight: 600; letter-spacing: -.03em; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.gx-row-text { font-size: 14px; color: var(--muted); }
.gx-row-thumb { display: none; }
.gx-row-arrow { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--ed-rule); border-radius: 50%; transition: background .3s, color .3s, border-color .3s, transform .5s cubic-bezier(.2, .7, .2, 1); }
.gx-row-link:hover .gx-row-title,
.gx-row-link:focus-visible .gx-row-title { transform: translateX(-14px); }
.gx-row-link:hover .gx-row-arrow,
.gx-row-link:focus-visible .gx-row-arrow { border-color: var(--primary); background: var(--primary); color: #18141c; transform: rotate(-45deg); }

.gx-preview,
.gx-cursor { position: absolute; top: 0; left: 0; pointer-events: none; opacity: 0; }
.gx-preview { z-index: 3; width: clamp(240px, 24vw, 380px); aspect-ratio: 3 / 2; overflow: hidden; background: var(--bg-2); scale: .82; transition: opacity .3s ease, scale .45s cubic-bezier(.2, .7, .2, 1); }
.gx-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s ease; }
.gx-preview img.is-current { opacity: 1; }
.gx-cursor { z-index: 4; display: grid; place-items: center; width: 92px; height: 92px; margin: -46px 0 0 -46px; border-radius: 50%; background: var(--primary); color: #18141c; font-size: 14px; font-weight: 600; scale: .3; transition: opacity .25s ease, scale .35s cubic-bezier(.2, .7, .2, 1); }
.gx-showcase.is-previewing.has-image .gx-preview { opacity: 1; scale: 1; }
.gx-showcase.is-previewing .gx-cursor { opacity: 1; scale: 1; }

@media (hover: hover) and (pointer: fine) {
	.gx-showcase.has-pointer .gx-row-link { cursor: none; }
	.gx-showcase.is-previewing .gx-row-link { color: color-mix(in srgb, var(--text) 45%, transparent); }
	.gx-showcase.is-previewing .gx-row-link:hover { color: var(--text); }
}
@media (hover: none), (pointer: coarse), (max-width: 700px) {
	.gx-preview,
	.gx-cursor { display: none; }
	.gx-row-link { gap: 16px; padding: 22px 0; }
	.gx-row-thumb { display: block; width: 92px; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
	.gx-row-thumb[hidden] { display: none; }
	.gx-row-arrow { display: none; }
}

/* Stats ---------------------------------------------------------------------- */

.gx-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); border-top: 1px solid var(--ed-rule); }
.gx-stat { padding: 34px 28px 8px; border-inline-start: 1px solid var(--ed-rule); }
.gx-stat:first-child { padding-inline-start: 0; border-inline-start: 0; }
.ed-widget .gx-stat-figure { display: flex; justify-content: flex-end; align-items: flex-start; gap: 4px; margin: 0 0 12px; direction: ltr; font-size: clamp(56px, 7vw, 104px); line-height: 1; font-weight: 700; letter-spacing: -.04em; color: var(--text); font-variant-numeric: tabular-nums; }
.gx-stat-suffix { margin-top: .08em; font-size: .4em; color: var(--primary); }
.ed-widget .gx-stat-label { margin: 0; font-size: 15px; color: var(--muted); }
.ed-motion .gx-stat:nth-child(2) { transition-delay: .08s; }
.ed-motion .gx-stat:nth-child(3) { transition-delay: .16s; }
.ed-motion .gx-stat:nth-child(4) { transition-delay: .24s; }

/* Reviews -------------------------------------------------------------------- */

.gx-reviews-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px 48px; }
.gx-reviews-top .gx-head { flex: 1 1 420px; margin-bottom: 0; }
.ed-widget .gx-rating { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0; font-size: 14px; color: var(--muted); }
.gx-rating:has(> .gx-rating-value[hidden]) { display: none; }
.gx-rating-value { font-size: 46px; line-height: 1; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.gx-stars {
	--gx-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5l2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6-4.9-4.6 6.6-.8z'/%3E%3C/svg%3E");
	display: inline-block; flex: none; width: 92px; height: 17px;
	background: linear-gradient(to left, var(--primary) calc(var(--n, 5) / 5 * 100%), color-mix(in srgb, var(--text) 20%, transparent) 0);
	-webkit-mask: var(--gx-star) 0 0 / 18.4px 17px repeat-x;
	mask: var(--gx-star) 0 0 / 18.4px 17px repeat-x;
}
.gx-track { display: flex; gap: 20px; padding: 40px 0 8px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.gx-track::-webkit-scrollbar { display: none; }
.gx-track:focus-visible { outline: 1px solid var(--primary); outline-offset: 6px; }
.gx-track.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; user-select: none; }
.gx-review { display: flex; flex: 0 0 min(460px, 86%); flex-direction: column; gap: 22px; margin: 0; padding: 30px; border: 1px solid var(--ed-rule); background: var(--bg-2); scroll-snap-align: start; }
.ed-widget .gx-review-text { flex: 1; margin: 0; padding: 0; border: 0; font-size: 17px; line-height: 1.9; color: var(--text); }
.gx-review figcaption { display: flex; align-items: center; gap: 14px; }
.gx-review figcaption img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.gx-review strong { display: block; font-size: 15px; }
.gx-review small { font-size: 13px; color: var(--muted); }
.gx-carousel-nav { display: flex; gap: 10px; margin-top: 20px; }
.gx-track:has(> :only-child) + .gx-carousel-nav { display: none; }
.gx-nav-btn { display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 1px solid var(--ed-rule); background: none; color: var(--text); cursor: pointer; transition: background .25s, color .25s, border-color .25s; }
.gx-nav-btn:hover,
.gx-nav-btn:focus-visible { border-color: var(--primary); background: var(--primary); color: #18141c; }
.gx-nav-prev svg { transform: scaleX(-1); }

/* Latest posts ----------------------------------------------------------------- */

.gx-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.gx-post > a { display: flex; flex-direction: column; height: 100%; padding: 28px; border: 1px solid var(--ed-rule); color: var(--text); text-decoration: none; transition: border-color .3s, transform .5s cubic-bezier(.2, .7, .2, 1); }
.gx-post > a:hover,
.gx-post > a:focus-visible { border-color: var(--primary); transform: translateY(-6px); }
.gx-post-index { margin-bottom: 44px; font-size: 46px; line-height: 1; font-weight: 700; color: transparent; -webkit-text-stroke: 1px var(--muted); transition: -webkit-text-stroke-color .3s; }
.gx-post > a:hover .gx-post-index { -webkit-text-stroke-color: var(--primary); }
.gx-post-media { display: block; margin: -28px -28px 24px; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-2); }
.gx-post-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.gx-post > a:hover .gx-post-media img { transform: scale(1.06); }
.gx-post-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 12px; font-size: 12px; color: var(--muted); }
.gx-post-meta > span:first-child { color: var(--primary); }
.ed-widget .gx-post h3 { margin: 0 0 12px; font-size: 21px; line-height: 1.55; }
.ed-widget .gx-post p { margin: 0 0 24px; font-size: 14px; }
.gx-post-more { display: inline-flex; align-items: center; gap: 10px; margin-top: auto; font-size: 14px; font-weight: 500; }
.ed-motion .gx-post:nth-child(2) { transition-delay: .08s; }
.ed-motion .gx-post:nth-child(3) { transition-delay: .16s; }
.ed-widget .gx-empty { padding: 28px 0; border-top: 1px solid var(--ed-rule); }

/* Showreel ------------------------------------------------------------------------ */

.gx-reel { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-2); color: #fff; text-decoration: none; }
.gx-reel img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.gx-reel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8, 6, 18, .6), transparent 55%); pointer-events: none; }
.gx-reel[href]:hover img { transform: scale(1.04); }
.gx-reel-play { position: absolute; bottom: 28px; inset-inline-start: 32px; z-index: 1; display: flex; align-items: center; gap: 14px; font-size: 17px; font-weight: 600; }
.gx-reel:not([href]) .gx-reel-play { display: none; }
.gx-reel .gx-play-icon { width: 76px; height: 76px; }
.ed-motion .gx-reel.ed-reveal { transition: opacity .65s ease, transform .75s cubic-bezier(.2, .65, .3, 1), clip-path 1.1s cubic-bezier(.2, .7, .2, 1); }
.ed-motion .gx-reel.ed-reveal.ed-pending { clip-path: inset(0 0 0 100%); transform: none; }

/* Video lightbox --------------------------------------------------------------- */

.gx-lightbox { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; }
.gx-lightbox::backdrop { background: rgba(6, 4, 14, .9); }
.gx-lightbox-inner { position: fixed; inset: 0; display: grid; place-items: center; padding: clamp(16px, 4vw, 56px); }
.gx-lightbox-media { width: min(1100px, 100%); aspect-ratio: 16 / 9; background: #000; }
.gx-lightbox-media iframe,
.gx-lightbox-media video { display: block; width: 100%; height: 100%; border: 0; }
.gx-lightbox-close { position: fixed; top: 18px; inset-inline-end: 18px; width: 52px; height: 52px; border: 1px solid rgba(255, 255, 255, .45); background: transparent; color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.gx-lightbox-close:hover,
.gx-lightbox-close:focus-visible { border-color: #fff; }

/* Responsive ---------------------------------------------------------------------- */

@media (max-width: 980px) {
	.gx-statement { grid-template-columns: 1fr; }
	.gx-figure-block { grid-column: 1; }
	.gx-posts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
	.gx-head { margin-bottom: 32px; }
	.gx-stat { padding: 26px 0 6px; border-inline-start: 0; border-top: 1px solid var(--ed-rule); }
	.gx-stat:first-child { border-top: 0; }
	.gx-stats { grid-template-columns: 1fr 1fr; column-gap: 20px; }
	.gx-stat:nth-child(2) { border-top: 0; }
	.gx-posts { grid-template-columns: 1fr; }
	.gx-review { padding: 24px; }
	.gx-reel-play { bottom: 18px; inset-inline-start: 18px; }
	.gx-reel .gx-play-icon { width: 60px; height: 60px; }
}

@media (prefers-reduced-motion: reduce) {
	.gx-row-title,
	.gx-row-arrow,
	.gx-post > a,
	.gx-post-media img,
	.gx-reel img,
	.gx-preview,
	.gx-cursor { transition: none; }
	.gx-track { scroll-behavior: auto; }
}
