/*
 * EVO-X 10O-B1
 * UX Excellence Layer
 *
 * Goals:
 * - premium Hero depth
 * - consultant image presence
 * - zero content obstruction
 * - desktop pointer parallax readiness
 * - mobile-first composition
 * - accessible touch targets
 * - reduced-motion safety
 */

/* ==========================================================
   GLOBAL INTERACTION QUALITY
   ========================================================== */

.v12-home button,
.v12-home a,
.v12-header button,
.v12-header a,
.p93d-language-toggle,
.p52-menu-toggle {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.v12-home button,
.v12-header button,
.p93d-language-toggle,
.p52-menu-toggle {
  min-width: 44px;
  min-height: 44px;
}


/* ==========================================================
   HEADER — PREMIUM / STABLE / ACCESSIBLE
   ========================================================== */

.v12-header {
  isolation: isolate;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.v12-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  pointer-events: none;
  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(255,255,255,.14) 18%,
      rgba(255,255,255,.14) 82%,
      transparent
    );
}

.v12-header a,
.v12-header button {
  transition:
    color .18s ease,
    background-color .18s ease,
    border-color .18s ease,
    opacity .18s ease,
    transform .18s ease;
}


/* ==========================================================
   HERO — 3D COMPOSITION
   ========================================================== */

.v12-hero {
  --evox-depth-x: 0px;
  --evox-depth-y: 0px;

  position: relative;
  isolation: isolate;
  overflow: hidden;

  perspective: 1200px;
  perspective-origin: 65% 46%;

  transform-style: preserve-3d;

  background:
    radial-gradient(
      circle at 78% 42%,
      rgba(68,120,150,.13),
      transparent 38%
    ),
    linear-gradient(
      180deg,
      rgba(4,14,21,.06),
      rgba(4,14,21,.20)
    );
}


/* atmospheric depth */
.v12-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;

  background:
    radial-gradient(
      ellipse at 68% 45%,
      rgba(127,197,218,.12) 0,
      rgba(15,52,68,.04) 28%,
      transparent 58%
    ),
    linear-gradient(
      90deg,
      rgba(3,12,18,.30) 0,
      rgba(3,12,18,.12) 38%,
      transparent 67%
    );

  transform:
    translate3d(
      calc(var(--evox-depth-x) * -.16),
      calc(var(--evox-depth-y) * -.16),
      -30px
    )
    scale(1.03);

  will-change: transform;
}


/* optical foreground / cinematic vignette */
.v12-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;

  background:
    linear-gradient(
      180deg,
      rgba(0,0,0,.05) 0,
      transparent 27%,
      transparent 69%,
      rgba(0,0,0,.22) 100%
    ),
    radial-gradient(
      ellipse at center,
      transparent 52%,
      rgba(0,0,0,.17) 100%
    );
}


/* network = background plane */
.v12-hero #evo-network {
  z-index: 2;

  transform:
    translate3d(
      calc(var(--evox-depth-x) * -.28),
      calc(var(--evox-depth-y) * -.28),
      -20px
    )
    scale(1.035);

  transform-origin: center;
  will-change: transform;
}


/* primary photographic plane with consultants */
.v12-hero img[src*="/media/future/hero.webp"] {
  position: relative;
  z-index: 2;

  transform:
    translate3d(
      var(--evox-depth-x),
      var(--evox-depth-y),
      18px
    )
    scale(1.035);

  transform-origin: 66% 50%;
  backface-visibility: hidden;
  will-change: transform;

  filter:
    saturate(1.025)
    contrast(1.025);

  transition:
    transform .18s cubic-bezier(.2,.8,.2,1),
    filter .25s ease;
}


/* copy and CTA = foreground plane */
.v12-hero .v12-wrap,
.v12-hero .v12-hero-grid {
  position: relative;
  z-index: 5;

  transform:
    translate3d(
      calc(var(--evox-depth-x) * -.08),
      calc(var(--evox-depth-y) * -.08),
      30px
    );

  transform-style: preserve-3d;
}


/* text optical separation without boxed appearance */
.v12-hero h1,
.v12-hero p,
.v12-hero .v12-eyebrow {
  text-shadow:
    0 2px 18px rgba(0,0,0,.30),
    0 1px 2px rgba(0,0,0,.38);
}


/* CTA tactile feedback */
.v12-hero .v12-btn {
  transform: translateZ(38px);

  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background-color .18s ease;
}

@media (hover:hover) and (pointer:fine) {

  .v12-hero .v12-btn:hover {
    transform:
      translate3d(0,-2px,38px);
  }

}


/* ==========================================================
   DESKTOP
   ========================================================== */

@media (min-width: 901px) {

  .v12-hero {
    min-height:
      min(
        780px,
        calc(100svh - 108px)
      );
  }

  .v12-hero img[src*="/media/future/hero.webp"] {
    object-position:
      64% 50%;
  }

}


/* ==========================================================
   TABLET
   ========================================================== */

@media (min-width: 720px) and (max-width: 900px) {

  .v12-hero {
    perspective: 900px;
  }

  .v12-hero img[src*="/media/future/hero.webp"] {
    transform:
      translate3d(0,0,8px)
      scale(1.025);

    object-position:
      61% 50%;
  }

}


/* ==========================================================
   MOBILE — COMPOSITION, NOT SHRUNK DESKTOP
   ========================================================== */

@media (max-width: 719px) {

  .v12-hero {
    --evox-depth-x: 0px !important;
    --evox-depth-y: 0px !important;

    min-height:
      auto;

    perspective: none;
    transform-style: flat;
  }

  .v12-hero::before {
    transform: none;

    background:
      linear-gradient(
        180deg,
        rgba(4,13,19,.08) 0,
        rgba(4,13,19,.06) 32%,
        rgba(4,13,19,.18) 75%,
        rgba(4,13,19,.32) 100%
      ),
      radial-gradient(
        ellipse at 58% 45%,
        rgba(104,175,197,.10),
        transparent 54%
      );
  }

  .v12-hero::after {
    background:
      linear-gradient(
        180deg,
        rgba(0,0,0,.04),
        transparent 42%,
        rgba(0,0,0,.20)
      );
  }

  .v12-hero #evo-network {
    transform: none;
    opacity: .78;
  }

  .v12-hero img[src*="/media/future/hero.webp"] {
    transform:
      translate3d(0,0,0)
      scale(1.01);

    object-position:
      61% 50%;

    filter:
      saturate(1.02)
      contrast(1.02);
  }

  .v12-hero .v12-wrap,
  .v12-hero .v12-hero-grid {
    transform: none;
  }

  .v12-hero .v12-btn {
    transform: none;

    min-height: 52px;
  }

  .p93d-language-toggle,
  .p52-menu-toggle {
    min-width: 48px;
    min-height: 48px;
  }

}


/* very narrow phones */
@media (max-width: 390px) {

  .v12-hero img[src*="/media/future/hero.webp"] {
    object-position:
      59% 50%;
  }

  .v12-hero h1 {
    text-wrap: balance;
  }

}


/* ==========================================================
   ACCESSIBILITY / POWER / MOTION
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

  .v12-hero,
  .v12-hero *,
  .v12-header *,
  .v12-home * {
    scroll-behavior: auto !important;
  }

  .v12-hero::before,
  .v12-hero #evo-network,
  .v12-hero img[src*="/media/future/hero.webp"],
  .v12-hero .v12-wrap,
  .v12-hero .v12-hero-grid {
    transform: none !important;
    transition: none !important;
  }

}


/* coarse/touch devices: no pointer parallax */
@media (hover:none), (pointer:coarse) {

  .v12-hero {
    --evox-depth-x: 0px !important;
    --evox-depth-y: 0px !important;
  }

  .v12-hero img[src*="/media/future/hero.webp"] {
    transform:
      translate3d(0,0,0)
      scale(1.01);
  }

}

/* ==========================================================
   EVO-X 10O-C2
   NARROW MOBILE WIDTH SAFETY
   ========================================================== */

@media (max-width: 380px) {

  html,
  body,
  .v12-home,
  .v12-header,
  .v12-hero,
  main,
  section {
    max-width: 100%;
  }

  body {
    overflow-x: clip;
  }

  .v12-home *,
  .v12-header *,
  .v12-hero * {
    min-width: 0;
  }

  .v12-profile-grid,
  .profile-pills,
  .v12-market-grid,
  .v12-choice-grid {
    width: 100%;
    max-width: 100%;
  }

  .v12-profile-grid button,
  .profile-pill,
  .v12-market-grid button,
  .v12-choice,
  .v12-home button {
    max-width: 100%;
  }

  .v12-profile-grid button,
  .profile-pill {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .v12-profile-grid small,
  .profile-pill small,
  .v12-profile-grid span,
  .profile-pill span {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .v12-home figure,
  .v12-home img {
    max-width: 100%;
  }

  .v12-home img {
    height: auto;
  }

  .v12-hero {
    width: 100%;
  }

  .v12-hero .v12-wrap,
  .v12-hero .v12-hero-grid {
    max-width: 100%;
  }

}
