/* ═══════════════════════════════════════════════════════════════════════
   MAYKAGRUP — JOURNEY V3  ·  "The Global Trade Journey"
   Full visual & UX redesign layer. Loaded AFTER motion2 CSS so it overrides.
   Concept: scroll = world transformation
   WORLD → ROUTES → NETWORK → DATA → GTOS → AGENTS → OPERATIONS → GLOBAL LOOP

   This is an ADDITIVE cinematic layer. It reuses the working motion infra
   (Lenis+GSAP pins from motion-trade-flow / motion-chapters-v2) and only
   upgrades composition, image treatment, hierarchy and transitions.
   ═══════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────
   1 · TOKENS  — dark atmosphere + gold-signal discipline
   ───────────────────────────────────────────────────────────── */
html:has(body.grup-home) {
  overflow-x: clip;
}

body.grup-home {
  overflow-x: clip;
  --mg-j-ink: #05070a;
  --mg-j-ink-2: #080b11;
  --mg-j-panel: #0b0f16;
  --mg-j-line: rgba(255, 255, 255, 0.08);
  --mg-j-line-soft: rgba(255, 255, 255, 0.05);

  /* Gold is a SIGNAL, not a wash — used only on accents/reveals */
  --mg-j-gold: #e8c547;
  --mg-j-gold-soft: rgba(232, 197, 71, 0.14);
  --mg-j-gold-line: rgba(232, 197, 71, 0.32);

  /* Chapter tint accents (used sparingly per scene) */
  --mg-j-trade: #8fdfa8;   /* materials / hammadde */
  --mg-j-data: #7ec8ff;    /* gtos / intelligence */
  --mg-j-agents: #d4b5ff;  /* maykops orchestration */

  /* Journey scroll progress 0..1 (whole page) — written by motion-journey-v3.js */
  --mg-journey-p: 0;

  /* type rhythm */
  --mg-j-kicker: clamp(0.6rem, 0.9vw, 0.72rem);
}

/* Deepen the global atmosphere: richer vignette + finer grid */
body.grup-home::before {
  background:
    radial-gradient(ellipse 90% 55% at 50% -25%, rgba(232, 197, 71, 0.04), transparent 55%),
    radial-gradient(ellipse 70% 60% at 100% 40%, rgba(56, 89, 140, 0.10), transparent 55%),
    radial-gradient(ellipse 80% 80% at 50% 120%, rgba(0, 0, 0, 0.6), transparent 60%),
    var(--mg-j-ink) !important;
}

/* ─────────────────────────────────────────────────────────────
   2 · TYPOGRAPHY V3 — dramatic display, disciplined micro-labels
   ───────────────────────────────────────────────────────────── */
body.grup-home {
  --mg-type-display: clamp(3.2rem, 9vw, 7.25rem);
  --mg-type-section: clamp(1.9rem, 3.6vw, 3rem);
  --mg-type-micro: clamp(0.62rem, 0.9vw, 0.74rem);
}

body.grup-home .mg-type-display,
body.grup-home .uc-story__display,
body.grup-home .uc-reliability__display,
body.grup-home .uc-footer-cta__display,
body.grup-home .mg-hero__title {
  letter-spacing: -0.03em;
  line-height: 0.98;
}

/* Chapter kicker — the GLOBAL TRADE / INTELLIGENCE / OPERATIONS micro-labels */
.mg-chapter-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mayka-font);
  font-size: var(--mg-j-kicker);
  font-weight: 800;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 1.1rem;
}
.mg-chapter-kicker::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: linear-gradient(90deg, var(--mg-j-gold), transparent);
  flex: none;
}
.mg-chapter-kicker--gold { color: var(--mg-j-gold); }
.mg-chapter-kicker--data { color: var(--mg-j-data); }
.mg-chapter-kicker--data::before { background: linear-gradient(90deg, var(--mg-j-data), transparent); }
.mg-chapter-kicker--trade { color: var(--mg-j-trade); }
.mg-chapter-kicker--trade::before { background: linear-gradient(90deg, var(--mg-j-trade), transparent); }

/* ─────────────────────────────────────────────────────────────
   3 · NAV / HEADER — minimal premium corporate TradeTech
   ───────────────────────────────────────────────────────────── */
body.grup-home .site-header--uc {
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  background: linear-gradient(180deg, rgba(5, 7, 10, 0.82), rgba(5, 7, 10, 0.4));
  border-bottom: 1px solid var(--mg-j-line-soft);
  transition: background 0.4s ease, border-color 0.4s ease;
}
body.grup-home .site-header--uc[data-mg-scrolled] {
  background: rgba(5, 7, 10, 0.92);
  border-bottom-color: var(--mg-j-line);
}
body.grup-home .brand-mark--lg { letter-spacing: 0.02em; }
body.grup-home .brand-mark__gtos {
  color: var(--mg-j-gold);
  letter-spacing: 0.34em;
}
body.grup-home .mg-nav a[data-copy-nav] {
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  opacity: 0.82;
  transition: opacity 0.2s ease, color 0.2s ease;
}
body.grup-home .mg-nav a[data-copy-nav]:hover { opacity: 1; }

/* Mode strip — turn into a refined scene index */
body.grup-home .uc-modes {
  background: rgba(5, 7, 10, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
body.grup-home .uc-modes__item {
  position: relative;
  letter-spacing: 0.04em;
}
body.grup-home .uc-modes__item.is-active::after {
  content: "";
  position: absolute;
  left: 0.9rem; right: 0.9rem; bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--mg-j-gold), transparent);
}

/* ─────────────────────────────────────────────────────────────
   4 · HERO V3 — full-screen cinematic, layered world→data
   ───────────────────────────────────────────────────────────── */
body.grup-home .mg-hero--env {
  min-height: 100vh;
  min-height: 100dvh;
}

/* Deep atmosphere gradient with stronger cinematic depth + vignette */
body.grup-home .mg-hero__atmosphere {
  overflow: hidden;
  background:
    radial-gradient(ellipse 95% 75% at 70% 34%, rgba(20, 32, 50, 0.92), transparent 58%),
    radial-gradient(ellipse 55% 45% at 22% 82%, rgba(232, 197, 71, 0.06), transparent 55%),
    linear-gradient(180deg, #05070a 0%, #0a0f17 48%, #05070a 100%);
}
/* full-bleed hero photo treatment — becomes a real scene, not a dim wash */
body.grup-home .mg-hero__atmosphere-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  opacity: 0.68;
  transform: scale(1.06);
  mix-blend-mode: normal;
  filter: saturate(1.08) contrast(1.06) brightness(0.88);
  mask-image: linear-gradient(105deg, rgba(0,0,0,0.15) 0%, #000 28%, #000 72%, rgba(0,0,0,0.35) 100%);
  -webkit-mask-image: linear-gradient(105deg, rgba(0,0,0,0.15) 0%, #000 28%, #000 72%, rgba(0,0,0,0.35) 100%);
  will-change: transform;
}
/* cinematic vignette + film grain on the hero */
body.grup-home .mg-hero--env::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 90% at 50% 42%, transparent 52%, rgba(0, 0, 0, 0.55) 100%),
    linear-gradient(180deg, rgba(5, 7, 10, 0.35) 0%, transparent 22%, transparent 74%, rgba(5, 7, 10, 0.85) 100%);
}

/* Foreground content — stronger hierarchy, centered cinematic */
body.grup-home .mg-hero__content--centered {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
body.grup-home .uc-hero-eyebrow {
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.6);
}
body.grup-home .mg-hero__pillars {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0.65rem;
  padding: 0;
  margin: 1.1rem 0 0.5rem;
}
body.grup-home .mg-hero__pillars li {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.32rem 0.72rem;
  border: 1px solid var(--mg-j-line);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(4px);
}
body.grup-home .mg-hero__pillars li:first-child {
  border-color: var(--mg-j-gold-line);
  color: var(--mg-j-gold);
}
body.grup-home .mg-hero__title {
  margin: 0.6rem 0 0;
  max-width: 16ch !important;
}
body.grup-home .mg-hero__title .accent {
  background: linear-gradient(115deg, var(--mg-j-gold) 8%, #fff2b0 52%, var(--mayka-gold-dim) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
body.grup-home .mg-hero__lead {
  max-width: 44ch;
  color: rgba(242, 244, 248, 0.82);
}
body.grup-home .mg-hero__actions { justify-content: center; }
body.grup-home .mg-hero__corridors {
  text-align: center;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.14em;
}

/* Hero phase micro-caption (WORLD/ROUTES/NETWORK/DATA/GTOS) */
.mg-hero__phase-hud {
  position: absolute;
  left: 50%;
  bottom: clamp(1.5rem, 4vh, 3rem);
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}
.mg-hero__phase-hud b {
  color: var(--mg-j-gold);
  font-weight: 800;
  min-width: 4.5rem;
  text-align: left;
}
.mg-hero__phase-hud i {
  font-style: normal;
  width: 4rem;
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
  position: relative;
  overflow: hidden;
}
.mg-hero__phase-hud i::after {
  content: "";
  position: absolute;
  inset: 0;
  width: calc(var(--mg-hero-chapter-p, 0) * 100%);
  background: linear-gradient(90deg, var(--mg-j-gold), transparent);
}
@media (prefers-reduced-motion: reduce) { .mg-hero__phase-hud { display: none; } }

/* Scroll cue */
.mg-hero__scroll-cue {
  position: absolute;
  right: clamp(1.25rem, 4vw, 3rem);
  bottom: clamp(1.5rem, 4vh, 3rem);
  z-index: 3;
  writing-mode: vertical-rl;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}
.mg-hero__scroll-cue::after {
  content: "";
  display: block;
  margin: 0.6rem auto 0;
  width: 1px;
  height: 2.4rem;
  background: linear-gradient(180deg, var(--mg-j-gold), transparent);
  animation: mgScrollCue 2.2s ease-in-out infinite;
}
@keyframes mgScrollCue {
  0%, 100% { transform: scaleY(0.4); opacity: 0.4; transform-origin: top; }
  50% { transform: scaleY(1); opacity: 1; transform-origin: top; }
}
@media (max-width: 719px), (prefers-reduced-motion: reduce) { .mg-hero__scroll-cue { display: none; } }

/* ─────────────────────────────────────────────────────────────
   5 · mg-visual-stage — cinematic full-bleed image treatment
   Retrofits .uc-svc-band__photo/.uc-svc-band__bg-photo and
   .uc-reliability__bg into real SCENE elements (scale>1, mask,
   directional atmosphere, scroll zoom via --mg-stage-p).
   ───────────────────────────────────────────────────────────── */

/* Background photos: promote from dim wash → cinematic scene */
body.grup-home .uc-svc-band__bg-photo {
  opacity: 0.62;
  transform: scale(calc(1.14 - var(--mg-stage-p, 0) * 0.1));
  filter: saturate(1.05) contrast(1.05) brightness(0.92);
  transition: none;
  will-change: transform;
}
body.grup-home .uc-reliability__bg-img {
  opacity: 0.5;
  mix-blend-mode: normal;
  transform: scale(calc(1.12 - var(--mg-stage-p, 0) * 0.08));
  filter: saturate(1.02) contrast(1.05) brightness(0.85);
}

/* Directional cinematic gradient — content side stays legible, image breathes */
body.grup-home .uc-svc-band--trade .uc-svc-band__photo::before {
  background:
    linear-gradient(90deg, var(--mg-j-ink) 0%, rgba(5, 7, 10, 0.72) 42%, rgba(5, 7, 10, 0.15) 100%),
    radial-gradient(ellipse 60% 90% at 88% 50%, rgba(46, 160, 100, 0.14), transparent 60%);
}
body.grup-home .uc-svc-band--customs .uc-svc-band__photo::before {
  background:
    linear-gradient(270deg, var(--mg-j-ink) 0%, rgba(5, 7, 10, 0.72) 42%, rgba(5, 7, 10, 0.15) 100%),
    radial-gradient(ellipse 60% 90% at 12% 50%, rgba(80, 120, 170, 0.12), transparent 60%);
}
body.grup-home .uc-svc-band--tech .uc-svc-band__photo::before {
  background:
    linear-gradient(90deg, var(--mg-j-ink) 0%, rgba(5, 7, 10, 0.7) 46%, rgba(5, 7, 10, 0.12) 100%),
    radial-gradient(ellipse 70% 90% at 84% 46%, rgba(52, 152, 219, 0.16), transparent 60%);
}

/* Top/bottom scene seam — makes consecutive bands feel continuous, not stacked cards */
body.grup-home .uc-svc-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 7, 10, 0.9) 0%, transparent 14%, transparent 86%, rgba(5, 7, 10, 0.95) 100%);
}
body.grup-home .uc-svc-band { border-top: none; }

/* THE drag-drop fix: floating rectangular cutouts → integrated scene silhouettes.
   Blend into the scene, kill the pasted drop-shadow look, add atmospheric fade. */
body.grup-home .uc-svc-band__cutout {
  opacity: 0.42;
  filter: grayscale(0.15) contrast(1.05) brightness(0.9)
          drop-shadow(0 40px 60px rgba(0, 0, 0, 0.55));
  mix-blend-mode: luminosity;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
}
body.grup-home .uc-svc-band__cutout--truck {
  opacity: 0.3;
  mix-blend-mode: luminosity;
}

/* ─────────────────────────────────────────────────────────────
   6 · SECTION RHYTHM — each chapter a different composition
   ───────────────────────────────────────────────────────────── */

/* Consulting story: cinematic map-scene, offset editorial (not plain split) */
body.grup-home #hikaye .uc-story__split {
  align-items: end;
  gap: clamp(2rem, 6vw, 6rem);
}
body.grup-home #hikaye .uc-story__display { font-size: clamp(2.4rem, 6vw, 4.6rem); }
body.grup-home #hikaye .uc-story__right { padding-bottom: 0.6rem; }
body.grup-home #hikaye .mg-chapter-viz--consulting .mg-chapter-viz__map-node {
  box-shadow: 0 0 16px rgba(232, 197, 71, 0.5);
}

/* Trade band → warehouse scene: content anchored left, wide */
body.grup-home .uc-svc-band { min-height: clamp(28rem, 78vh, 46rem); }
body.grup-home .uc-svc-band__content {
  /* chapter bar + sticky header clearance — prevents TRADE/TECH axis clip */
  padding-top: clamp(3.25rem, 6.5vw, 4.75rem) !important;
}
body.grup-home .uc-svc-band__axis {
  font-size: clamp(2.75rem, 7vw, 5.5rem);
  line-height: 1.12;
  padding-top: 0.08em;
  margin-bottom: 0.15rem;
  background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.35) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.95;
}
body.grup-home .uc-svc-band--trade .uc-svc-band__axis { color: var(--mg-j-trade); }

@media (max-width: 768px) {
  /* Customs band: full-bleed cinematic bg — photo stays absolute, not a flex-column strip */
  body.grup-home .uc-svc-band--customs {
    position: relative;
    overflow: hidden;
    min-height: clamp(22rem, 72vh, 34rem);
    display: flex;
    align-items: flex-end;
  }
  body.grup-home .uc-svc-band--customs .uc-svc-band__photo {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
    justify-content: center !important;
    z-index: 0;
    overflow: hidden;
  }
  body.grup-home .uc-svc-band--customs .uc-svc-band__photo picture {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
  }
  body.grup-home .uc-svc-band--customs .uc-svc-band__bg-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
  }
  body.grup-home .uc-svc-band--customs .uc-svc-band__cutout {
    display: none;
  }
  body.grup-home .uc-svc-band--customs .uc-svc-band__content {
    position: relative;
    z-index: 2;
    text-align: left;
    margin-left: 0;
    width: 100%;
  }
}

/* Materials flow — turn the pill chain into a lit signal path */
body.grup-home .mg-chapter-viz--materials .mg-chapter-viz__flow {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  width: min(40rem, 84vw);
  gap: 0.5rem;
}
body.grup-home .mg-chapter-viz--materials .mg-chapter-viz__flow-connector {
  width: 1.4rem; height: 1px;
  background: linear-gradient(90deg, var(--mg-j-trade), transparent);
}
body.grup-home .mg-chapter-viz__flow-node {
  border-color: rgba(143, 223, 168, 0.4);
  box-shadow: 0 0 0 1px rgba(143, 223, 168, 0.05), 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ─────────────────────────────────────────────────────────────
   7 · GTOS COMMAND CENTER V3 — rich node graph (not 4 circles)
   DATA → INTELLIGENCE → REASONING → DECISION → ACTION
   ───────────────────────────────────────────────────────────── */
.mg-gtos-graph {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: calc(0.15 + var(--mg-chapter-p, 0) * 0.85);
}
.mg-gtos-graph__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mg-gtos-graph__link {
  fill: none;
  stroke: rgba(126, 200, 255, 0.28);
  stroke-width: 1;
  stroke-dasharray: 4 6;
  animation: mgGtosFlow 3.5s linear infinite;
}
@keyframes mgGtosFlow { to { stroke-dashoffset: -40; } }
.mg-gtos-graph__node {
  position: absolute;
  transform: translate(-50%, -50%) scale(calc(0.4 + var(--n, 0) * 0.6));
  opacity: var(--n, 0);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}
.mg-gtos-graph__dot {
  width: 0.7rem; height: 0.7rem;
  border-radius: 50%;
  background: radial-gradient(circle, #cfe9ff 0%, var(--mg-j-data) 60%, transparent 72%);
  box-shadow: 0 0 14px rgba(126, 200, 255, 0.6);
}
.mg-gtos-graph__tag {
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(126, 200, 255, 0.85);
  white-space: nowrap;
}
/* satellite feed nodes (data sources) */
.mg-gtos-graph__node--feed .mg-gtos-graph__dot {
  width: 0.45rem; height: 0.45rem;
  background: radial-gradient(circle, #fff 0%, rgba(255,255,255,0.4) 60%, transparent 72%);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}
.mg-gtos-graph__node--core .mg-gtos-graph__dot {
  width: 1.1rem; height: 1.1rem;
  background: radial-gradient(circle, #fff6d8 0%, var(--mg-j-gold) 55%, transparent 72%);
  box-shadow: 0 0 26px rgba(232, 197, 71, 0.7);
}
.mg-gtos-graph__node--core .mg-gtos-graph__tag { color: var(--mg-j-gold); }
/* pipeline stage positions (revealed in sequence) */
.mg-gtos-graph__node[data-g="feed1"] { left: 10%; top: 22%; --n: clamp(0,(var(--mg-chapter-p,0)-0.05)*5,1); }
.mg-gtos-graph__node[data-g="feed2"] { left: 8%;  top: 52%; --n: clamp(0,(var(--mg-chapter-p,0)-0.10)*5,1); }
.mg-gtos-graph__node[data-g="feed3"] { left: 12%; top: 80%; --n: clamp(0,(var(--mg-chapter-p,0)-0.14)*5,1); }
.mg-gtos-graph__node[data-g="data"]  { left: 30%; top: 50%; --n: clamp(0,(var(--mg-chapter-p,0)-0.20)*5,1); }
.mg-gtos-graph__node[data-g="intel"] { left: 46%; top: 30%; --n: clamp(0,(var(--mg-chapter-p,0)-0.30)*5,1); }
.mg-gtos-graph__node[data-g="core"]  { left: 52%; top: 55%; --n: clamp(0,(var(--mg-chapter-p,0)-0.38)*5,1); }
.mg-gtos-graph__node[data-g="reason"]{ left: 66%; top: 34%; --n: clamp(0,(var(--mg-chapter-p,0)-0.46)*5,1); }
.mg-gtos-graph__node[data-g="decide"]{ left: 78%; top: 56%; --n: clamp(0,(var(--mg-chapter-p,0)-0.56)*5,1); }
.mg-gtos-graph__node[data-g="action"]{ left: 90%; top: 40%; --n: clamp(0,(var(--mg-chapter-p,0)-0.66)*5,1); }
.mg-gtos-graph__link { opacity: calc(clamp(0,(var(--mg-chapter-p,0)-0.24)*3,0.8)); }

@media (max-width: 719px) {
  .mg-gtos-graph__node[data-g="feed1"],
  .mg-gtos-graph__node[data-g="feed2"],
  .mg-gtos-graph__node[data-g="feed3"] { display: none; }
  .mg-gtos-graph__tag { font-size: 0.44rem; }
}

/* ─────────────────────────────────────────────────────────────
   8 · OPERATIONS FLOW V3 — traveling signal (not a vertical list)
   ORDER → DOCUMENT → CUSTOMS·PARTNER → LOGISTICS → WAREHOUSE → DELIVERY
   ───────────────────────────────────────────────────────────── */
body.grup-home .mg-trade-flow-viz {
  position: relative;
  gap: 0;
  max-width: 52rem;
  padding: 1rem 0.5rem 0;
}
body.grup-home .mg-trade-flow-viz::before {
  content: "";
  position: absolute;
  left: 4%; right: 4%;
  top: 1.9rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--mg-j-line) 8%, var(--mg-j-line) 92%, transparent);
}
/* traveling gold signal along the rail, driven by section chapter progress */
body.grup-home .mg-trade-flow-viz::after {
  content: "";
  position: absolute;
  top: 1.75rem;
  left: 4%;
  width: 3rem;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--mg-j-gold), transparent);
  filter: drop-shadow(0 0 8px var(--mg-j-gold));
  transform: translateX(calc(var(--mg-chapter-p, 0) * 88vw));
  max-width: 44rem;
  opacity: calc(clamp(0, var(--mg-chapter-p, 0) * 3, 1));
}
body.grup-home .mg-trade-flow-viz__arrow { display: none; }
body.grup-home .mg-trade-flow-viz__step {
  position: relative;
  flex: 1 1 auto;
  text-align: center;
  padding: 0.55rem 0.35rem;
  background: transparent;
  border: none;
  border-radius: 0;
}
body.grup-home .mg-trade-flow-viz__step::before {
  content: "";
  display: block;
  width: 0.55rem; height: 0.55rem;
  margin: 0 auto 0.55rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid var(--mg-j-line);
  transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
body.grup-home .mg-trade-flow-viz__step.is-active::before {
  background: var(--mg-j-gold);
  box-shadow: 0 0 14px rgba(232, 197, 71, 0.7);
  transform: scale(1.25);
}
body.grup-home .mg-trade-flow-viz__step.is-partner::before {
  border-style: dashed;
}
@media (max-width: 719px) {
  body.grup-home .mg-trade-flow-viz { flex-direction: row; flex-wrap: wrap; }
  body.grup-home .mg-trade-flow-viz::before,
  body.grup-home .mg-trade-flow-viz::after { display: none; }
  body.grup-home .mg-trade-flow-viz__step { flex: 1 0 30%; }
}

/* ─────────────────────────────────────────────────────────────
   9 · CROSS-SCENE TRANSITION SYSTEM
   Burst becomes the transition mechanism; scene backdrops morph
   between chapters using --mg-journey-p.
   ───────────────────────────────────────────────────────────── */

/* Global journey rail — a thin progress spine down the right edge */
.mg-journey-rail {
  position: fixed;
  top: 50%;
  right: clamp(0.5rem, 1.4vw, 1.1rem);
  transform: translateY(-50%);
  z-index: 60;
  width: 2px;
  height: min(38vh, 22rem);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
  overflow: hidden;
}
.mg-journey-rail::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: calc(var(--mg-journey-p, 0) * 100%);
  background: linear-gradient(180deg, var(--mg-j-gold), rgba(126, 200, 255, 0.8));
  box-shadow: 0 0 10px rgba(232, 197, 71, 0.5);
}
@media (max-width: 959px), (prefers-reduced-motion: reduce) { .mg-journey-rail { display: none; } }

/* Burst as transition: intensify at chapter handoff (peak of --mg-chapter-p) */
body.grup-home .mg-data-burst {
  opacity: calc(var(--mg-burst-p, 0) * 0.9);
  filter: brightness(calc(0.8 + var(--mg-burst-p, 0) * 0.5))
          drop-shadow(0 0 calc(var(--mg-burst-p, 0) * 30px) rgba(232, 197, 71, 0.25));
}

/* Proof band — connective tissue between story & pillars */
body.grup-home .uc-proof {
  background: linear-gradient(180deg, transparent, rgba(232, 197, 71, 0.03), transparent);
}
body.grup-home .uc-proof__beat strong { color: #fff; }
body.grup-home .uc-proof__icon { color: var(--mg-j-gold); }

/* Cloud overlap bridge — softer, atmospheric */
body.grup-home .uc-cloud-overlap__shape {
  filter: blur(40px);
  opacity: 0.5;
}

/* ─────────────────────────────────────────────────────────────
   10 · FINAL CTA — global network loop back to hero world
   ───────────────────────────────────────────────────────────── */
body.grup-home .uc-footer-cta {
  position: relative;
  overflow: hidden;
}
body.grup-home .uc-footer-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 50% 120%, rgba(232, 197, 71, 0.12), transparent 60%),
    radial-gradient(circle at 20% 30%, rgba(126, 200, 255, 0.08), transparent 45%);
}
body.grup-home .uc-footer-cta__inner { position: relative; z-index: 1; }
/* the loop — orbit rings echoing the hero globe */
.mg-loop-orbit {
  position: absolute;
  left: 50%;
  bottom: -30%;
  transform: translateX(-50%);
  width: min(60rem, 100vw);
  height: min(60rem, 100vw);
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
}
.mg-loop-orbit span {
  position: absolute;
  inset: 0;
  margin: auto;
  border: 1px solid var(--mg-j-gold-line);
  border-radius: 50%;
  opacity: 0.25;
}
.mg-loop-orbit span:nth-child(1) { width: 40%; height: 40%; }
.mg-loop-orbit span:nth-child(2) { width: 65%; height: 65%; border-color: rgba(126, 200, 255, 0.2); }
.mg-loop-orbit span:nth-child(3) { width: 90%; height: 90%; border-color: rgba(255, 255, 255, 0.08); }
@media (prefers-reduced-motion: reduce) { .mg-loop-orbit { opacity: 0.25; } }

/* ─────────────────────────────────────────────────────────────
   11 · RESPONSIVE — cinematic desktop, simplified mobile
   ───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  body.grup-home { --mg-type-display: clamp(2.6rem, 8vw, 4.4rem); }
}
@media (max-width: 768px) {
  body.grup-home .uc-svc-band { min-height: auto; }
  body.grup-home .uc-svc-band__cutout { opacity: 0.28; }
  body.grup-home .mg-hero__pillars li { font-size: 0.58rem; padding: 0.26rem 0.55rem; }
}
@media (max-width: 375px) {
  body.grup-home { --mg-type-display: clamp(2.1rem, 11vw, 3rem); }
  body.grup-home .mg-chapter-kicker { letter-spacing: 0.2em; }
}

/* ─────────────────────────────────────────────────────────────
   12 · REDUCED MOTION — resolve to a calm, legible static state
   ───────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  body.grup-home .uc-svc-band__bg-photo,
  body.grup-home .uc-reliability__bg-img,
  body.grup-home .mg-hero__atmosphere-photo {
    transform: none !important;
  }
  .mg-gtos-graph__link { animation: none !important; }
  body.grup-home .mg-trade-flow-viz::after { transform: none !important; opacity: 0.6; }
  .mg-journey-rail::after { height: 30%; }
}

/* ─────────────────────────────────────────────────────────────
   13 · JOURNEY 3D — UC parity pass (performance-safe composition)
   ───────────────────────────────────────────────────────────── */

/* Hero: photo-forward, globe as ambient (not dashboard) */
body.grup-home .mg-hero__network {
  opacity: 0.42;
  filter: saturate(0.85);
}
body.grup-home .mg-hero__routes,
body.grup-home .mg-hero__fragment-grid,
body.grup-home [data-hero-fragment-grid] {
  display: none !important;
}
body.grup-home .mg-hero__content--centered {
  max-width: min(52rem, 92vw);
  padding-top: clamp(4.5rem, 12vh, 7rem);
}
body.grup-home .mg-hero__title {
  max-width: 14ch !important;
}
body.grup-home .mg-hero__pillars {
  display: none;
}
body.grup-home .uc-hero-metric {
  margin-top: 1.75rem;
  opacity: 0.75;
}

/* Chapter atmosphere — hue shifts per scroll chapter (not flat gold) */
body.grup-home [data-mg-chapter="global-corridor"] { --mg-scroll-hue: 212; }
body.grup-home [data-mg-chapter="story-ownership"] { --mg-scroll-hue: 38; }
body.grup-home [data-mg-chapter="proof-beat"] { --mg-scroll-hue: 44; }
body.grup-home [data-mg-chapter="trade-hammadde-liman"] { --mg-scroll-hue: 142; }
body.grup-home [data-mg-chapter="customs-passage"] { --mg-scroll-hue: 205; }
body.grup-home [data-mg-chapter="digital-backbone"] { --mg-scroll-hue: 198; }
body.grup-home [data-mg-chapter="reliability-trust"] { --mg-scroll-hue: 28; }
body.grup-home [data-mg-chapter="why-single-roof"] { --mg-scroll-hue: 36; }
body.grup-home [data-mg-chapter="resolution-cta"] { --mg-scroll-hue: 42; }

body.grup-home .mg-scene__layer--bg {
  background:
    radial-gradient(
      ellipse 80% 60% at 50% 20%,
      hsla(var(--mg-scroll-hue, 38), 38%, 42%, calc(0.04 + var(--mg-chapter-p, 0) * 0.12)),
      transparent 62%
    ),
    linear-gradient(180deg, rgba(5, 7, 10, 0.92), rgba(8, 11, 17, 0.98));
}

/* Desktop service bands — photo owns 55%+ viewport (UC composition) */
@media (min-width: 769px) {
  body.grup-home .uc-svc-band__photo {
    width: 58%;
    max-width: 58vw;
    inset: 0;
  }
  body.grup-home .uc-svc-band--trade .uc-svc-band__photo,
  body.grup-home .uc-svc-band--tech .uc-svc-band__photo {
    left: auto;
    right: 0;
  }
  body.grup-home .uc-svc-band--customs .uc-svc-band__photo {
    left: 0;
    right: auto;
  }
  body.grup-home .uc-svc-band__bg-photo {
    opacity: 0.78;
    object-position: center 38%;
  }
  body.grup-home .uc-svc-band__content {
    width: min(46rem, 46%);
  }
  body.grup-home .uc-svc-band--customs .uc-svc-band__content {
    margin-left: auto;
  }
}

/* Cutouts — embedded on desktop, hidden on mobile (option C) */
@media (min-width: 769px) {
  body.grup-home .uc-svc-band__cutout {
    opacity: 0.22;
    mix-blend-mode: soft-light;
    filter: contrast(1.08) brightness(0.92)
            drop-shadow(0 24px 48px rgba(0, 0, 0, 0.45));
    -webkit-mask-image: radial-gradient(ellipse 90% 85% at 50% 40%, #000 35%, transparent 78%);
    mask-image: radial-gradient(ellipse 90% 85% at 50% 40%, #000 35%, transparent 78%);
  }
  body.grup-home .uc-svc-band__cutout--truck {
    display: none;
  }
}

/* Mobile/tablet — full-bleed cinematic bands (all three pillars) */
@media (max-width: 768px) {
  body.grup-home .uc-svc-band--trade,
  body.grup-home .uc-svc-band--customs,
  body.grup-home .uc-svc-band--tech {
    position: relative;
    overflow: hidden;
    min-height: clamp(22rem, 72vh, 34rem);
    display: flex;
    align-items: flex-end;
    padding: 0;
  }
  body.grup-home .uc-svc-band--trade .uc-svc-band__photo,
  body.grup-home .uc-svc-band--customs .uc-svc-band__photo,
  body.grup-home .uc-svc-band--tech .uc-svc-band__photo {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
    justify-content: center !important;
    z-index: 0;
  }
  body.grup-home .uc-svc-band__photo picture {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }
  body.grup-home .uc-svc-band__bg-photo {
    opacity: 0.72;
    object-position: center 35%;
  }
  body.grup-home .uc-svc-band__cutout {
    display: none !important;
  }
  body.grup-home .uc-svc-band__content {
    position: relative;
    z-index: 2;
    width: 100%;
    text-align: left;
    margin-left: 0;
  }
  body.grup-home .uc-svc-band--customs .uc-svc-band__content {
    text-align: left;
    margin-left: 0;
  }
  body.grup-home .mg-hero__network {
    opacity: 0.22;
    transform: scale(0.85);
  }
  body.grup-home .mg-hero__atmosphere-photo {
    opacity: 0.58;
    object-position: center 40%;
  }
}

/* Proof band — UC metrics strip rhythm */
body.grup-home .uc-proof {
  padding: clamp(2.5rem, 6vw, 4rem) 0;
  border-block: 1px solid var(--mg-j-line-soft);
}
body.grup-home .uc-proof__inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
}
body.grup-home .uc-proof__beat {
  padding: 0.25rem 0;
}
body.grup-home .uc-proof__beat strong {
  display: block;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}
body.grup-home .uc-proof__beat span {
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.45;
}
@media (max-width: 719px) {
  body.grup-home .uc-proof__inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Journey steps — editorial rail, not card grid */
body.grup-home .uc-journey__steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1.5rem);
  border-top: 1px solid var(--mg-j-line);
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
}
body.grup-home .uc-journey__step {
  background: transparent;
  border: none;
  border-left: 1px solid var(--mg-j-line-soft);
  border-radius: 0;
  padding: 0 0 0 clamp(0.75rem, 1.5vw, 1rem);
  box-shadow: none;
}
body.grup-home .uc-journey__step:first-child {
  border-left: none;
  padding-left: 0;
}
@media (max-width: 959px) {
  body.grup-home .uc-journey__steps {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  body.grup-home .uc-journey__step {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--mg-j-line-soft);
    padding-top: 1rem;
  }
  body.grup-home .uc-journey__step:first-child {
    border-top: none;
    padding-top: 0;
  }
}

/* Reliability — stronger full-bleed ship scene */
body.grup-home .uc-reliability__bg-img {
  opacity: 0.62;
  mix-blend-mode: normal;
  filter: saturate(1.05) contrast(1.04) brightness(0.82);
}

/* Motion-lite: suppress decorative layers that still cost paint */
html.mg-motion-lite body.grup-home .mg-data-burst,
html.mg-motion-lite body.grup-home .mg-gtos-graph,
html.mg-motion-lite body.grup-home .mg-chapter-viz {
  opacity: 0.35 !important;
  animation: none !important;
}
html.motion-phase3-ready body.grup-home .mg-hero--uc .mg-hero__atmosphere-photo {
  opacity: 0.68 !important;
  mix-blend-mode: normal !important;
}
html.mg-motion-lite body.grup-home .mg-hero__network {
  opacity: 0.18;
}
