/* Full-screen cinematic trade-network intro and seamless hero settle. */
.cinematic-intro {
  position: fixed;
  inset: 0;
  z-index: 98;
  overflow: hidden;
  color: #173d30;
  pointer-events: none;
  opacity: 1;
  visibility: visible;
  transition: opacity 900ms cubic-bezier(0.22, 1, 0.36, 1), visibility 900ms ease;
}

/* The cinematic brand keeps its existing motion while using the EHAI mark. */
.cinematic-brand-lockup .cinematic-logo-mark {
  width: min(1040px, 76vw);
  max-width: none;
  margin: 17px auto 0;
  line-height: 0;
  letter-spacing: 0;
  text-shadow: none;
}

.cinematic-logo-mark img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 20px 42px rgba(23, 61, 48, 0.13));
}

@media (min-width: 981px) {
  .cinematic-intro .cinematic-brand-lockup {
    width: min(1180px, 78vw);
  }

  .cinematic-brand-lockup .cinematic-logo-mark {
    width: min(1040px, 72vw);
    margin-left: 0;
  }
}

@media (max-width: 980px) {
  .cinematic-brand-lockup .cinematic-logo-mark {
    width: min(82vw, 650px);
  }
}

@media (max-width: 680px) {
  .cinematic-brand-lockup .cinematic-logo-mark {
    width: min(84vw, 500px);
    margin-top: 13px;
  }

  .cinematic-logo-mark img {
    filter: drop-shadow(0 12px 26px rgba(23, 61, 48, 0.1));
  }
}

.home-page.is-loading .hero-scene {
  position: fixed;
  inset: 0;
  z-index: 96;
  width: 100vw;
  height: 100svh;
  filter: none !important;
  transform: none !important;
}

.home-page.is-loading .hero-atmosphere {
  opacity: 0;
}

.home-page.is-loading.intro-home .hero-scene {
  position: absolute;
  inset: -4% -2%;
  z-index: 0;
  width: auto;
  height: auto;
  transform: translate3d(0, var(--scene-shift, 0px), 0) scale(1.04) !important;
}

.home-page.is-loading:not(.intro-home) .hero-copy,
.home-page.is-loading:not(.intro-home) .hero-visual {
  opacity: 0 !important;
  visibility: hidden;
}

.home-page.intro-home .cinematic-intro,
.home-page.is-ready .cinematic-intro {
  opacity: 0;
  visibility: hidden;
}

.cinematic-topline {
  position: absolute;
  top: 25px;
  right: 128px;
  left: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #60766d;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.17em;
}

.cinematic-topline > span {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.cinematic-topline i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #25a879;
  box-shadow: 0 0 0 6px rgba(37, 168, 121, 0.09), 0 0 18px rgba(37, 168, 121, 0.32);
  animation: cinematic-live 1.7s ease-in-out infinite;
}

.cinematic-topline strong {
  color: #9b7843;
  font-size: 8px;
  letter-spacing: 0.15em;
}

.cinematic-side-index {
  position: absolute;
  top: 50%;
  left: 28px;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 10px;
  color: #789087;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.13em;
  transform: translateY(-50%);
}

.cinematic-side-index > span:first-child {
  color: #ae7a32;
  font-size: 18px;
  letter-spacing: 0;
}

.cinematic-side-index i {
  width: 1px;
  height: 76px;
  margin: 4px 0;
  background: linear-gradient(#1b8b68, rgba(27, 139, 104, 0.08));
}

.cinematic-brand-lockup {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(760px, calc(100% - 80px));
  text-align: center;
  opacity: 0;
  filter: blur(10px);
  transform: translate(-50%, -44%) scale(1.08);
  transition: opacity 1100ms ease, filter 1100ms ease, transform 1500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-page.intro-branding .cinematic-brand-lockup {
  opacity: 1;
  filter: blur(0);
  transform: translate(-50%, -50%) scale(1);
}

.home-page.intro-home .cinematic-brand-lockup {
  opacity: 0;
  filter: blur(5px);
  transform: translate(-50%, -56%) scale(0.96);
}

.cinematic-brand-lockup small {
  display: block;
  color: #a77732;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.34em;
}

.cinematic-brand-lockup strong {
  display: block;
  margin-top: 17px;
  color: #173d30;
  font-size: clamp(62px, 10vw, 148px);
  line-height: 0.85;
  font-family: "Poppins", "Inter", "Microsoft YaHei UI", sans-serif;
  font-weight: 800;
  letter-spacing: -0.075em;
  text-shadow: 0 1px rgba(255, 255, 255, 0.96), 0 24px 70px rgba(34, 103, 77, 0.15);
}

.cinematic-brand-lockup strong::after {
  width: min(420px, 60%);
  height: 1px;
  display: block;
  margin: 27px auto 0;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(15, 118, 110, 0.7), #c18a3a, transparent);
  box-shadow: 0 0 18px rgba(15, 118, 110, 0.14);
  transform: scaleX(0);
  transition: transform 1400ms cubic-bezier(0.22, 1, 0.36, 1) 280ms;
}

.home-page.intro-branding .cinematic-brand-lockup strong::after {
  transform: scaleX(1);
}

.cinematic-brand-lockup p {
  margin: 17px 0 0;
  color: #526f63;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.cinematic-route-readout {
  position: absolute;
  right: 30px;
  bottom: 112px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #71867d;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.13em;
}

.cinematic-route-readout i {
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, rgba(15, 118, 110, 0.16), #2cab80);
}

.cinematic-console {
  position: absolute;
  bottom: 55px;
  left: 29px;
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(2, minmax(106px, 0.55fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(30, 100, 74, 0.1);
  border-radius: 13px;
  background: rgba(30, 100, 74, 0.09);
  box-shadow: 0 18px 50px rgba(37, 80, 62, 0.08);
}

.cinematic-console > div {
  min-height: 62px;
  display: flex;
  justify-content: center;
  flex-direction: column;
  padding: 0 15px;
  background: rgba(255, 255, 252, 0.78);
  backdrop-filter: blur(12px);
}

.cinematic-console span,
.cinematic-console strong {
  display: block;
}

.cinematic-console span {
  color: #8a9993;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.cinematic-console strong {
  margin-top: 7px;
  color: #31574a;
  font-size: 10px;
  font-weight: 900;
}

.home-page .hero-atmosphere {
  opacity: 0.2;
  pointer-events: none;
  background:
    radial-gradient(circle at 67% 48%, rgba(40, 180, 128, 0.045), transparent 28%),
    radial-gradient(circle at 29% 67%, rgba(193, 139, 58, 0.03), transparent 24%),
    linear-gradient(90deg, rgba(255, 254, 250, 0.14), rgba(255, 255, 252, 0.02) 58%, transparent);
  transition: opacity 900ms ease;
}

.home-page .intro-skip {
  z-index: 110;
  min-height: 40px;
  padding: 0 16px;
  color: #49685c;
  border-color: rgba(15, 118, 110, 0.16);
  background: rgba(255, 255, 252, 0.78);
  box-shadow: 0 12px 32px rgba(37, 82, 64, 0.09);
}

.home-page .hero-network-embedded .hero-visual {
  inset: 44px -6vw 0 -5vw;
  opacity: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.12) 15%, rgba(0, 0, 0, 0.78) 36%, #000 70%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.12) 15%, rgba(0, 0, 0, 0.78) 36%, #000 70%, #000 100%);
  transform: translate3d(0, 24px, 0) scale(1.035);
  transition: opacity 1200ms ease, transform 1600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.home-page.intro-home .hero-network-embedded .hero-visual,
.home-page.is-ready .hero-network-embedded .hero-visual {
  opacity: 0.58;
  transform: translate3d(0, 0, 0) scale(1);
}

.home-page .hero-network-embedded .hero-copy::before {
  inset: -90px -170px -90px -10vw;
  background: radial-gradient(ellipse at 32% 50%, rgba(255, 255, 250, 0.76) 0%, rgba(251, 253, 249, 0.42) 40%, rgba(251, 253, 249, 0.1) 61%, transparent 77%);
}

@keyframes cinematic-live {
  50% { opacity: 0.38; transform: scale(0.72); }
}

@media (max-width: 980px) {
  .cinematic-topline {
    right: 112px;
  }

  .cinematic-topline strong,
  .cinematic-side-index,
  .cinematic-route-readout {
    display: none;
  }

  .cinematic-console {
    right: 20px;
    bottom: 54px;
    left: 20px;
    grid-template-columns: minmax(190px, 1.4fr) repeat(2, minmax(90px, 0.6fr));
  }

  .home-page .hero-network-embedded .hero-visual {
    inset: 286px -24vw 0 -18vw;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 14%, #000 38%, #000 100%);
    mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 14%, #000 38%, #000 100%);
  }
}

@media (max-width: 680px) {
  .cinematic-topline {
    top: 22px;
    right: 102px;
    left: 18px;
    font-size: 7px;
    letter-spacing: 0.11em;
  }

  .cinematic-brand-lockup {
    top: 44%;
    width: calc(100% - 34px);
  }

  .cinematic-brand-lockup small {
    font-size: 7px;
    letter-spacing: 0.23em;
  }

  .cinematic-brand-lockup strong {
    margin-top: 13px;
    font-size: clamp(49px, 16vw, 70px);
  }

  .cinematic-brand-lockup p {
    font-size: 11px;
    letter-spacing: 0.08em;
  }

  .cinematic-console {
    grid-template-columns: 1fr 1fr;
  }

  .cinematic-console > div {
    min-height: 55px;
    padding: 0 11px;
  }

  .cinematic-console > div:first-child {
    grid-column: 1 / -1;
  }

  .home-page .hero-network-embedded .hero-visual {
    inset: 330px -36vw 0 -34vw;
    opacity: 0;
  }

  .home-page.intro-home .hero-network-embedded .hero-visual,
  .home-page.is-ready .hero-network-embedded .hero-visual {
    opacity: 0.66;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cinematic-intro {
    display: none;
  }

  .cinematic-topline i {
    animation: none;
  }

  .home-page .hero-network-embedded .hero-visual {
    transition: none;
  }
}

/* Keep the cinematic focal area clear: brand and hero copy live in the upper-left quiet zone. */
@media (min-width: 981px) {
  .cinematic-brand-lockup {
    top: 19%;
    left: max(68px, 7vw);
    width: min(570px, 43vw);
    text-align: left;
    transform: translateY(12px) scale(1.045);
    transform-origin: left top;
  }

  .home-page.intro-branding .cinematic-brand-lockup {
    transform: translateY(0) scale(1);
  }

  .home-page.intro-home .cinematic-brand-lockup {
    transform: translateY(-18px) scale(0.97);
  }

  .cinematic-brand-lockup strong {
    font-size: clamp(58px, 7.2vw, 112px);
  }

  .cinematic-brand-lockup strong::after {
    width: min(360px, 72%);
    margin-right: 0;
    margin-left: 0;
  }

  .home-page .hero-network-embedded .hero-inner {
    padding-top: 106px;
  }

  .home-page .hero-network-embedded .hero-copy {
    max-width: 570px;
    padding: 22px 0 30px;
  }

  .home-page .hero-network-embedded .hero-copy::before {
    background: none;
  }

  .home-page .hero-main-title {
    max-width: 570px;
    font-size: clamp(42px, 4.05vw, 60px);
    line-height: 1.08;
  }

  .home-page .hero-copy > p {
    max-width: 540px;
  }
}

/* Mobile cinematic mode: keep the center clear and use inexpensive compositing. */
@media (max-width: 820px) {
  .home-page .hero-scene,
  .home-page.is-loading.intro-home .hero-scene {
    inset: 0;
    filter: none !important;
    transform: translate3d(0, 0, 0) !important;
    will-change: auto;
  }

  .trade-canvas,
  .network-signal-canvas {
    image-rendering: auto;
    transform: none;
  }

  .cinematic-console,
  .cinematic-console > div,
  .home-page .intro-skip,
  .home-page .hero-network-embedded .network-signal-map .region-node {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .home-page .hero-network-embedded {
    min-height: max(100svh, 720px);
  }

  .home-page .hero-network-embedded .hero-inner {
    min-height: max(100svh, 720px);
    padding: 96px 0 30px;
  }

  .home-page .hero-network-embedded .hero-copy {
    max-width: 560px;
    padding: 10px 0 24px;
  }

  .home-page .hero-network-embedded .hero-copy::before {
    background: none;
  }

  .home-page .hero-main-title {
    max-width: 560px;
    font-size: clamp(36px, 7.8vw, 48px);
  }
}

@media (max-width: 680px) {
  .cinematic-topline {
    top: 20px;
    right: 96px;
    left: 18px;
  }

  .cinematic-brand-lockup {
    top: 112px;
    left: 18px;
    width: calc(100% - 36px);
    text-align: left;
    transform: translateY(10px) scale(1.025);
    transform-origin: left top;
  }

  .home-page.intro-branding .cinematic-brand-lockup {
    transform: translateY(0) scale(1);
  }

  .home-page.intro-home .cinematic-brand-lockup {
    transform: translateY(-12px) scale(0.98);
  }

  .cinematic-brand-lockup strong {
    max-width: 100%;
    font-size: clamp(44px, 14vw, 60px);
    letter-spacing: -0.065em;
  }

  .cinematic-brand-lockup strong::after {
    width: 58%;
    margin: 18px 0 0;
  }

  .cinematic-brand-lockup p {
    max-width: 300px;
    margin-top: 13px;
    font-size: 10px;
    line-height: 1.55;
  }

  .cinematic-console {
    right: 18px;
    bottom: 18px;
    left: 18px;
    grid-template-columns: minmax(0, 1fr) auto;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(37, 80, 62, 0.06);
  }

  .cinematic-console > div {
    min-height: 48px;
    padding: 0 10px;
    background: rgba(255, 255, 252, 0.9);
  }

  .cinematic-console > div:first-child {
    grid-column: auto;
  }

  .cinematic-console > div:nth-child(2) {
    display: none;
  }

  .cinematic-console strong {
    margin-top: 5px;
    font-size: 8px;
  }

  .home-page .intro-skip {
    top: 14px;
    right: 14px;
    min-height: 44px;
    padding: 0 12px;
    font-size: 10px;
  }

  .home-page .hero-network-embedded,
  .home-page .hero-network-embedded .hero-inner {
    min-height: max(100svh, 720px);
  }

  .home-page .hero-network-embedded .hero-inner {
    width: min(100% - 28px, 560px);
    padding: 94px 0 28px;
  }

  .home-page .hero-network-embedded .hero-copy {
    max-width: 100%;
    padding: 6px 0 20px;
  }

  .home-page .hero-copy .eyebrow {
    font-size: 8px;
    letter-spacing: 0.13em;
  }

  .home-page .hero h1 {
    margin: 12px 0 14px;
  }

  .home-page .hero-main-title,
  .home-page .hero h1 {
    font-size: clamp(31px, 9.5vw, 38px);
    line-height: 1.1;
  }

  .home-page .hero p {
    max-width: 96%;
    font-size: 14px;
    line-height: 1.66;
  }

  .home-page .hero-actions {
    width: min(100%, 310px);
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .home-page .hero-actions .btn {
    width: 100%;
  }

  .home-page .hero-inline-link {
    font-size: 11px;
  }

  .home-page .hero-network-embedded .hero-visual {
    inset: 390px -44vw -10px -38vw;
    transform: translate3d(0, 10px, 0) scale(1);
  }

  .home-page.intro-home .hero-network-embedded .hero-visual,
  .home-page.is-ready .hero-network-embedded .hero-visual {
    opacity: 0.58;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

/* Mobile performance profile: crisp artwork without expensive live blur layers. */
@media (max-width: 820px) {
  .home-page .hero-scene {
    contain: paint;
  }

  .home-page .hero-atmosphere {
    opacity: 0.08;
    background:
      linear-gradient(180deg, rgba(255, 254, 250, 0.28), rgba(248, 252, 248, 0.04) 48%, transparent 76%),
      radial-gradient(circle at 72% 60%, rgba(45, 177, 126, 0.045), transparent 48%);
  }

  .cinematic-brand-lockup,
  .home-page.intro-branding .cinematic-brand-lockup,
  .home-page.intro-home .cinematic-brand-lockup,
  .home-page .hero-copy .eyebrow,
  .home-page .hero-brand-title {
    filter: none !important;
  }

  .cinematic-brand-lockup,
  .home-page .hero-copy .eyebrow,
  .home-page .hero-brand-title {
    transition-property: opacity, transform;
  }

  .cinematic-logo-mark img {
    filter: none;
  }

  .home-page.intro-home .hero-network-embedded .hero-visual,
  .home-page.is-ready .hero-network-embedded .hero-visual {
    opacity: 0.78;
  }

  .home-page .hero-network-embedded .hero-visual {
    filter: none;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.58) 11%, #000 28%, #000 100%);
    mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.58) 11%, #000 28%, #000 100%);
  }

  .home-page .hero-network-embedded .hero-signal-map {
    contain: layout paint;
  }

  .home-page .topbar,
  .home-page .topbar.is-scrolled {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
