/* Variation 3 scroll scene + agency triangle (from home-variation-3). */
:root {
  --hero-perspective: 1400px;
  --globe-opening-projection: 1.085714;
  --globe-crest-offset: .14;
  --hero-frame: 100svh;
  --nebula-scroll-distance: clamp(168px, 31svh, 270px);
  --triangle-scroll-distance: clamp(454px, 83svh, 854px);
  --story-distance: calc(var(--nebula-scroll-distance) + var(--triangle-scroll-distance));
  --agency-distance: clamp(330px, 52svh, 540px);
  --story-anchor-offset: 92px;
  --nebula-align-x: 58%;
  --nebula-position: var(--nebula-align-x) 50%;
  --nebula-vignette: linear-gradient(180deg, #03071652, transparent 30%, #03071620 68%, #03071690),
    radial-gradient(ellipse at 50% 53%, transparent 22%, #03071670 100%);
  --nebula-artwork: url(../../media/brand-nebula-hd.webp);
  --brand-nebula: var(--nebula-vignette), var(--nebula-artwork);
  --agency-scrim: radial-gradient(ellipse 62% 44% at 50% 58%, #040612f2, #040612e8 35%, #0406129c 65%, #04061215 96%, transparent),
    linear-gradient(180deg, #04061210, #04061235);
}
html, body, .wp-site-blocks { min-height: 100%; background: #03040b; overflow-x: clip; }
.wp-site-blocks { min-height: 100vh; }

/* Front page: remove WP 760px content constraint so Variation 3 stays full-bleed. */
body.home .space-main,
body.home .space-entry,
body.home .wp-block-post-content,
body.home-page .space-main,
body.home-page .space-entry,
body.home-page .wp-block-post-content {
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-bottom: 0 !important;
}
body.home .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
body.home .wp-block-post-content.is-layout-constrained > *,
body.home-page .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
body.home-page .wp-block-post-content.is-layout-constrained > * {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
body.home .wp-site-blocks > *,
body.home .is-layout-constrained > *,
body.home .wp-block-post-content > *,
body.home-page .wp-site-blocks > *,
body.home-page .is-layout-constrained > *,
body.home-page .wp-block-post-content > * {
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
}
.universe-canvas { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.universe-sky {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #03040c24, #03040c44 45%, #03040cdb 72%, #03040b 100%),
    url(../../media/sky.webp) center top / cover no-repeat;
  filter: brightness(var(--sky-brightness, .79));
}
.universe-sky::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 46%, #030611df 74%, #03040b 100%);
  opacity: var(--sky-horizon-shade, 0);
}
.universe-stars {
  position: absolute;
  inset: 0 0 auto;
  width: 100%;
  height: 54%;
  pointer-events: none;
}
.globe-frame {
  position: absolute; inset: 0 0 auto; height: var(--hero-frame);
  perspective: var(--hero-perspective);
}
.space-globe {
  --globe-radius: max(97vw, 43svh);
  --globe-image: url(../../media/globe-hd.webp);
  position: absolute; left: 50%; top: 50%;
  width: calc(2 * var(--globe-radius) * var(--globe-opening-projection));
  aspect-ratio: 1; border-radius: 50%;
  /* Align the opening crest to 36% of the frame at the original camera depth. */
  transform: translate3d(-50%, calc(-100svh * var(--globe-crest-offset) * var(--globe-opening-projection)), var(--globe-depth, -120px));
  /* Rendered sphere with lunar terrain from Solar System Scope. See globe-credits.txt. */
  background: #030407 var(--globe-image) center / 100% 100% no-repeat;
  opacity: var(--globe-opacity, 1);
  box-shadow: 0 -1px 1px #a8ccf08c, 0 -4px 10px #3f86dd58,
    0 -13px 30px 2px #256bd44d, 0 -23px 55px 3px #1c3b8133;
}
.space-globe::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: min(61vw, 840px);
  height: clamp(42px, 8svh, 105px);
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse 20% 19% at center, #e1efff69, #91caff43 34%, transparent),
    radial-gradient(ellipse at center, #3678b74a, #2353951d 49%, transparent 75%);
  pointer-events: none;
}
.universe-nebula.is-formed, .variation-triangle-section {
  background-color: #061021;
  background-image: var(--brand-nebula);
  background-position: var(--nebula-position);
  background-size: cover;
  background-repeat: no-repeat;
}
.universe-nebula { position: absolute; inset: 0; }
.nebula-formation { display: block; width: 100%; height: 100%; }
.universe-nebula.is-formed .nebula-formation { visibility: hidden; }
.nebula-motion {
  position: absolute;
  inset: 0;
  display: none;
  overflow: hidden;
  container-type: size;
  opacity: var(--nebula-settled-opacity, 0);
}
.nebula-stars {
  height: 100%;
  visibility: hidden;
  opacity: 0;
  transition: opacity .55s ease;
}
.universe-nebula:is(.is-settling, .is-formed) .nebula-motion { display: block; }
.universe-nebula.is-formed .nebula-stars { visibility: visible; opacity: 1; }
.nebula-motion::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--nebula-vignette);
}
.nebula-art {
  --nebula-core: 73.5% 54%;
  position: absolute;
  left: var(--nebula-align-x);
  top: 50%;
  width: max(100cqw, calc(100cqh * 1672 / 941));
  aspect-ratio: 1672 / 941;
  background: var(--nebula-artwork) center / 100% 100% no-repeat;
  animation: nebula-drift 18s ease-in-out infinite paused;
}
.nebula-art::before {
  content: '';
  position: absolute;
  inset: 0;
  background: inherit;
  mask-image: radial-gradient(ellipse 29% 51% at var(--nebula-core), #000 28%, #000d 52%, transparent 100%);
  transform-origin: var(--nebula-core);
  animation: nebula-whirl 14s ease-in-out infinite paused;
}
.nebula-star {
  position: absolute;
  left: var(--star-x);
  top: var(--star-y);
  width: clamp(24px, 5cqh, 62px);
  aspect-ratio: 1;
  background: radial-gradient(circle, #efffff, #b7f9ff 10%, #6fe1ffb3 25%, #339dff42 46%, transparent 70%);
  mix-blend-mode: screen;
  animation: nebula-star-twinkle var(--star-period) ease-in-out var(--star-delay) infinite paused;
}
.is-ambient-moving .is-formed .nebula-art,
.is-ambient-moving .is-formed .nebula-art::before,
.is-ambient-moving .is-formed .nebula-star { animation-play-state: running; }
@keyframes nebula-drift {
  0%, 100% { transform: translate(calc(-1 * var(--nebula-align-x)), -50%); }
  48% { transform: translate(calc(-1 * var(--nebula-align-x) + .85cqw), calc(-50% - .95cqh)) scale(1.058); }
  76% { transform: translate(calc(-1 * var(--nebula-align-x) - .6cqw), calc(-50% + .65cqh)) scale(1.04); }
}
@keyframes nebula-whirl {
  0%, 100% { transform: rotate(0deg); }
  37% { transform: rotate(15deg); }
  78% { transform: rotate(-9deg); }
}
@keyframes nebula-star-twinkle {
  0%, 100% {
    opacity: .09;
    transform: translate(-50%, -50%) scale(.62);
  }
  39% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.18);
  }
  68% {
    opacity: .3;
    transform: translate(-50%, -50%) scale(.83);
  }
}
.universe-nebula::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--agency-scrim);
  opacity: var(--agency-scrim-opacity, 0);
}
.universe-nebula::after {
  content: ''; position: absolute; inset: 0;
  z-index: 2;
  background: #03040b; opacity: var(--nebula-content-shade, 0);
}
.case-studies-section, .clients-section, .services-section, .site-footer,
.home-contact {
  position: relative; z-index: 1; background: transparent !important;
}
.case-studies-section::before, .case-studies-section::after,
.clients-section::before, .clients-section::after,
.services-section::before, .services-section::after,
.site-footer::before, .site-footer::after { display: none !important; }
.hero-story { position: relative; z-index: 2; }
.hero-scroll-marker { display: none; }
#marketing.story-jump {
  position: absolute; top: calc(var(--hero-frame) + var(--story-anchor-offset));
  width: 1px; height: 1px; scroll-margin: 0; pointer-events: none;
}
.variation-hero {
  position: relative; min-height: var(--hero-frame); overflow: hidden;
  perspective: var(--hero-perspective);
}
.variation-copy {
  --headline-size: clamp(27px, min(4.04vw, 11svh), 86px);
  --headline-placement: 61.5%;
  --headline-tracking: .245em;
  --headline-default-center: calc(36% + var(--headline-size) * 1.12 + clamp(22px, 3.5svh, 46px));
  position: absolute; left: 50%; top: max(var(--headline-placement), var(--headline-safe-center, var(--headline-default-center))); width: min(94vw, 1400px);
  transform: translate3d(-50%, -50%, var(--globe-depth, -120px));
  text-align: center; opacity: var(--headline-opacity, 1);
}
.variation-copy h1 {
  display: flex; flex-direction: column; align-items: center;
  margin: 0; color: #f7f6f8; font-family: Sora, Inter, Arial, sans-serif;
  font-size: var(--headline-size); font-style: normal; font-weight: 500;
  line-height: 1.12; letter-spacing: var(--headline-tracking); text-transform: uppercase;
  white-space: nowrap;
  transform: scaleX(var(--headline-fit, 1));
  text-shadow: 0 5px 38px #0007;
}
.variation-copy h1 span { width: max-content; color: inherit; background: none; transform: translateX(calc(var(--headline-tracking) / 2)); }
.hero-scroll-guide {
  display: none;
  position: absolute; z-index: 2; inset-inline: 0;
  bottom: max(clamp(18px, 5svh, 48px), calc(env(safe-area-inset-bottom, 0px) + 12px));
  margin: 0; padding-inline: 16px;
  align-items: center; justify-content: center; gap: 10px;
  color: #eef1ff; font-size: clamp(12px, 1vw, 14px); font-weight: 500;
  line-height: 1.4; letter-spacing: .10em; text-align: center;
  text-shadow: 0 2px 10px #02030a, 0 0 16px #02030ae0;
  pointer-events: none;
}
.has-hero-motion .hero-scroll-guide:not([hidden]) { display: flex; }
.hero-scroll-guide span { font-size: 17px; line-height: 1; }
.variation-triangle-section {
  position: relative; display: grid; place-items: center; min-height: var(--hero-frame);
  padding: clamp(104px, 14svh, 144px) clamp(20px, 6vw, 95px) clamp(58px, 10svh, 90px);
}
.variation-triangle-section::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(0deg, #03040b, transparent 22%), var(--agency-scrim);
}
.marketing-triangle {
  --agency-title-top: 66%;
  position: relative;
  isolation: isolate;
  width: min(100%, 84rem);
  aspect-ratio: auto;
  container-type: inline-size;
}
.triangle-decor { display: none; }
.marketing-triangle-outline {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.marketing-triangle-outline line {
  fill: none; stroke: url(#triangle-edge-light); stroke-width: 1.65;
  stroke-linecap: round; vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 4px #7badff8c);
}
.marketing-edge-label {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 17px;
  border: 1px solid rgba(174, 202, 255, 0.52);
  border-radius: 999px;
  background: rgba(8, 15, 39, 0.94);
  box-shadow: 0 7px 20px rgba(1, 5, 20, 0.42);
  color: #f8f7ff;
  font-size: clamp(10px, 0.82vw, 12px);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  white-space: nowrap;
}
.marketing-edge-label--strategy {
  left: 25%;
  top: 51%;
  transform: translate(-50%, -50%) rotate(-60deg);
}
.marketing-edge-label--performance {
  left: 75%;
  top: 51%;
  transform: translate(-50%, -50%) rotate(60deg);
  border-color: rgba(228, 182, 240, 0.62);
}
.marketing-edge-label--creativity {
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  min-height: 35px;
  padding: 0 21px;
  border-color: rgba(240, 165, 222, 0.66);
}
.variation-triangle-title {
  display: block; margin: 0; color: #fff;
  font-size: clamp(17px, 5.3vw, 50px);
  font-size: clamp(17px, 6.5cqw, 50px);
  font-weight: 750; line-height: 1.05; letter-spacing: -.048em;
  text-shadow: 0 2px 22px #050c21c9;
}
.variation-triangle-title span { display: block; }
.variation-triangle-title span:first-child {
  color: #ece5ff;
}
.agency-copy {
  --agency-copy-gap: clamp(10px, 1.8svh, 24px);
  --agency-heading-gap: clamp(20px, 3.6svh, 48px);
  --agency-heading-size: clamp(40px, min(6.9vw, 9.5svh), 102px);
  --agency-statement-size: clamp(23px, min(3.7vw, 5.2svh), 55px);
  --agency-statement-line: calc(var(--agency-statement-size) * 1.38);
  text-align: center;
}
.agency-section-heading {
  margin: 0 0 var(--agency-heading-gap);
  color: #f7f5ff;
  font-size: var(--agency-heading-size);
  font-weight: 850;
  letter-spacing: -.025em;
  line-height: 1.04;
  -webkit-text-stroke: .008em currentColor;
}
.agency-statement { margin: 0; }
.agency-leadin, .agency-continuation {
  display: block;
  color: #eeedf8;
  font-size: var(--agency-statement-size);
  font-weight: 400;
  letter-spacing: -.02em;
  line-height: var(--agency-statement-line);
  text-shadow: 0 2px 18px #03040bc0;
}
.agency-leadin { margin-bottom: var(--agency-copy-gap); }
.agency-continuation {
  margin-top: var(--agency-copy-gap);
  text-wrap: balance;
}
.agency-highlight { color: #f0ccff; font-weight: 600; white-space: nowrap; }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .agency-highlight {
    color: transparent;
    text-shadow: none;
    background-image: linear-gradient(108deg, transparent 40%, #ffc8ee 45%, #fff8ff 50%, #ecdfff 55%, transparent 60%),
      linear-gradient(105deg, #dac2ff, #ffd1ea);
    background-repeat: no-repeat;
    background-size: 300% 100%, 100% 100%;
    background-position: 100% 50%, center;
    -webkit-background-clip: text;
    background-clip: text;
  }
  .has-hero-motion .agency-highlight { animation: agency-word-shine 5.8s linear var(--agency-shine-delay, 0s) infinite paused; }
  .has-hero-motion .is-agency-reading .agency-highlight { animation-play-state: running; }
  .ambient-paused.has-hero-motion .is-agency-reading .agency-highlight { animation-play-state: paused; }
}
@keyframes agency-word-shine {
  0% { background-position: 100% 50%, center; }
  23%, 100% { background-position: 0% 50%, center; }
}
.marketing-wordmark { display: none; }
/* Match HTML: S P / C E letters flank the triangle on desktop-width viewports. */
@media (min-width: 1024px) and (min-height: 541px) {
  .marketing-triangle { --triangle-composition-scale: .90; }
  .marketing-wordmark {
    --wordmark-inset: clamp(22px, 1.5vw, 34px);
    --wordmark-clearance: clamp(18px, 2.2vw, 40px);
    /* Fit the wider C E pair beside the slope at the bottom of the letters. */
    --wordmark-height: min(44cqw, calc((50vw - var(--wordmark-inset) - var(--wordmark-clearance) - 25cqw) / 2.25));
    --wordmark-offset: calc(25cqw + .283 * var(--wordmark-height) + var(--wordmark-clearance));
    display: block;
    position: absolute;
    top: 50%;
    width: auto;
    height: var(--wordmark-height);
    fill: #dce9ff;
    fill-opacity: .76;
    pointer-events: none;
    opacity: var(--wordmark-opacity, 1);
    transform: translate3d(calc(var(--wordmark-travel, 0) * var(--letter-direction) * 48vw), -50%, 0);
  }
  .marketing-wordmark--left {
    --letter-direction: -1;
    right: calc(50% + var(--wordmark-offset));
  }
  .marketing-wordmark--right {
    --letter-direction: 1;
    left: calc(50% + var(--wordmark-offset));
  }
  .has-hero-motion .marketing-wordmark { opacity: var(--wordmark-opacity, 0); }
}
.has-hero-motion .hero-story { height: calc(var(--hero-frame) + var(--story-distance) + var(--agency-distance)); }
.has-hero-motion .hero-scroll-marker { display: block; position: absolute; width: 1px; height: 1px; pointer-events: none; }
.nebula-scroll-end { top: var(--nebula-scroll-distance); }
.agency-scroll-start { top: var(--story-distance); }
.has-hero-motion #marketing.story-jump { top: calc(var(--story-distance) * .94 + var(--story-anchor-offset)); }
.has-hero-motion .hero-story-stage {
  position: sticky; top: 0; height: var(--hero-frame); overflow: clip; isolation: isolate;
}
.has-hero-motion :is(.variation-hero, .variation-triangle-section) {
  position: absolute; inset: 0; min-height: 0; background: none; pointer-events: none;
}
.has-hero-motion .variation-triangle-section { padding: 0; }
.has-hero-motion .variation-triangle-section::before { display: none; }
.has-hero-motion .marketing-triangle { width: min(86vw, 82svh, 860px); aspect-ratio: 386 / 344; }
.has-hero-motion .triangle-decor {
  display: block;
  position: absolute;
  inset: 0;
  opacity: calc(1 - var(--triangle-recede, 0));
  transform: scale(calc(var(--triangle-composition-scale, 1) * (1 - .1 * var(--triangle-recede, 0))));
}
.has-hero-motion .marketing-triangle-outline line {
  opacity: var(--edge-opacity, 0);
}
.has-hero-motion .marketing-edge-label { opacity: var(--edge-label-opacity, 0); }
.has-hero-motion .agency-copy {
  position: absolute;
  left: 50%;
  top: var(--agency-title-top);
  width: 62%;
  transform: translate(-50%, -50%);
}
.has-hero-motion .variation-triangle-title {
  opacity: var(--triangle-title-opacity, 0);
  white-space: nowrap;
}
.has-hero-motion .agency-section-heading,
.has-hero-motion .agency-leadin,
.has-hero-motion .agency-continuation {
  position: absolute;
  left: 50%;
  width: min(calc(100vw - clamp(40px, 12vw, 190px)), 84rem);
  margin: 0;
  opacity: var(--agency-intro-reveal, 0);
  transform: translate(-50%, calc(10px * (1 - var(--agency-intro-reveal, 0))));
}
.has-hero-motion .agency-section-heading {
  bottom: calc(100% + var(--agency-copy-gap) + var(--agency-statement-line) + var(--agency-heading-gap));
}
.has-hero-motion .agency-leadin { bottom: calc(100% + var(--agency-copy-gap)); }
.has-hero-motion .agency-continuation {
  top: calc(100% + var(--agency-copy-gap));
  opacity: var(--agency-body-reveal, 0);
  transform: translate(-50%, calc(16px * (1 - var(--agency-body-reveal, 0))));
}
@media (max-width: 760px) {
  :root {
    --hero-perspective: 900px;
    --globe-opening-projection: 1.133333;
    --nebula-scroll-distance: clamp(156px, 29svh, 236px);
    --triangle-scroll-distance: clamp(432px, 78svh, 659px);
    --agency-distance: clamp(280px, 48svh, 430px);
    --story-anchor-offset: 82px;
    --nebula-align-x: 73%;
    --agency-scrim: radial-gradient(ellipse 100% 39% at 50% 57%, #040612f2, #040612e8 35%, #0406129c 65%, #04061215 96%, transparent),
      linear-gradient(180deg, #04061210, #04061235);
  }
  .universe-sky { background-position: center, 61% top; }
  .space-globe { --globe-image: url(../../media/globe-mobile.webp); }
  .variation-copy {
    --headline-size: clamp(22px, 6.6vw, 47px);
    --headline-placement: 58.5%;
    --headline-tracking: .18em;
  }
  .agency-copy {
    --agency-copy-gap: clamp(8px, 1.5svh, 16px);
    --agency-heading-gap: clamp(16px, 3svh, 28px);
    --agency-heading-size: clamp(34px, min(11.6vw, 8.1svh), 62px);
    --agency-statement-size: clamp(19px, min(6.3vw, 3.9svh), 30px);
  }
  .has-hero-motion .marketing-triangle { width: min(88vw, 78svh, 620px); }
}
@media (max-width: 760px), (max-height: 540px) and (orientation: landscape) {
  .marketing-triangle { --agency-title-top: 68%; }
  .marketing-edge-label { min-height: 29px; padding-inline: 12px; font-size: 9px; }
  .marketing-edge-label--creativity { min-height: 30px; padding-inline: 16px; }
}
@media (max-height: 540px) and (orientation: landscape) {
  .has-hero-motion .marketing-triangle { width: min(86vw, 72svh); --agency-title-top: 69%; }
  .has-hero-motion .variation-triangle-title { font-size: clamp(14px, 6.5cqw, 50px); }
  .variation-copy {
    --headline-size: clamp(22px, min(5.9vw, 9svh), 48px);
    --headline-tracking: .18em;
  }
}
@media (max-height: 440px) {
  .agency-copy {
    --agency-copy-gap: 7px;
    --agency-heading-gap: 14px;
    --agency-statement-size: clamp(16px, min(5.5vw, 5.2svh), 23px);
  }
}
@media (max-width: 480px) and (max-height: 480px) {
  .agency-copy { --agency-statement-size: clamp(15px, min(5.3vw, 4svh), 19px); }
}
@media (prefers-reduced-motion: reduce) {
  .universe-stars, .universe-nebula.is-formed .nebula-motion { display: none; }
}
