/* Homepage hero — animated overlays (AB Development) */
.page-home .hero {
  isolation: isolate;
}

.page-home .hero__media {
  overflow: hidden;
}

.page-home .hero__media img {
  animation: hero-ken-burns 28s ease-in-out infinite alternate;
  transform-origin: 55% 45%;
}

.page-home .hero__fx {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.page-home .hero__fx-texture {
  position: absolute;
  inset: -10%;
  opacity: 0;
  transition: opacity 1.4s ease;
  background-size: 420px 420px;
  background-repeat: repeat;
  mix-blend-mode: screen;
}

.page-home .hero__fx-texture--blueprint {
  background-image: url("img/hero-fx-blueprint.png");
  animation: hero-grid-drift 48s linear infinite;
}

.page-home .hero__fx-texture--trade {
  background-image: url("img/hero-fx-trade-routes.png");
  background-size: cover;
  background-position: 70% 50%;
  background-repeat: no-repeat;
  mix-blend-mode: soft-light;
}

.page-home .hero--mode-dev .hero__fx-texture--blueprint,
.page-home .hero--mode-invest .hero__fx-texture--blueprint {
  opacity: 0.22;
}

.page-home .hero--mode-trade .hero__fx-texture--trade {
  opacity: 0.55;
}

.page-home .hero__scene {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.2s ease, visibility 1.2s ease;
}

.page-home .hero--mode-dev .hero__scene--dev,
.page-home .hero--mode-invest .hero__scene--invest,
.page-home .hero--mode-trade .hero__scene--trade {
  opacity: 1;
  visibility: visible;
}

.page-home .hero__scene svg {
  position: absolute;
  display: block;
}

/* Development — building outline + rising floors */
.page-home .hero__scene--dev svg.hero__svg-building {
  right: 8%;
  bottom: 12%;
  width: min(38vw, 420px);
  height: auto;
  opacity: 0.85;
}

.page-home .hero__scene--dev .hero__stroke-draw {
  stroke-dasharray: 520;
  stroke-dashoffset: 520;
  animation: hero-stroke-draw 4s ease forwards;
}

.page-home .hero--mode-dev .hero__stroke-draw {
  animation: hero-stroke-draw 4s ease forwards;
}

.page-home .hero__floor-bar {
  position: absolute;
  bottom: 14%;
  width: 3px;
  background: linear-gradient(to top, var(--gold), rgba(212, 175, 55, 0.1));
  border-radius: 2px;
  transform-origin: bottom;
  transform: scaleY(0);
  opacity: 0.7;
}

.page-home .hero--mode-dev .hero__floor-bar {
  animation: hero-floor-rise 2.8s ease-out forwards;
}

.page-home .hero__floor-bar:nth-child(1) { right: 22%; height: 18%; animation-delay: 0.2s; }
.page-home .hero__floor-bar:nth-child(2) { right: 26%; height: 28%; animation-delay: 0.45s; }
.page-home .hero__floor-bar:nth-child(3) { right: 30%; height: 38%; animation-delay: 0.7s; }
.page-home .hero__floor-bar:nth-child(4) { right: 34%; height: 48%; animation-delay: 0.95s; }

/* Investment — chart pulse */
.page-home .hero__scene--invest svg.hero__svg-chart {
  right: 6%;
  top: 22%;
  width: min(42vw, 480px);
  height: auto;
  opacity: 0.9;
}

.page-home .hero__chart-line {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
}

.page-home .hero--mode-invest .hero__chart-line {
  animation: hero-chart-draw 3.5s ease-out forwards;
}

.page-home .hero__chart-dot {
  opacity: 0;
  transform: scale(0);
  transform-origin: center;
  transform-box: fill-box;
}

.page-home .hero--mode-invest .hero__chart-dot {
  animation: hero-dot-pop 0.5s ease forwards;
}

.page-home .hero--mode-invest .hero__chart-dot:nth-of-type(1) { animation-delay: 1.2s; }
.page-home .hero--mode-invest .hero__chart-dot:nth-of-type(2) { animation-delay: 1.5s; }
.page-home .hero--mode-invest .hero__chart-dot:nth-of-type(3) { animation-delay: 1.8s; }
.page-home .hero--mode-invest .hero__chart-dot:nth-of-type(4) { animation-delay: 2.1s; }

/* Trade — route travellers (SVG animateMotion) */
.page-home .hero__scene--trade .hero__svg-routes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.page-home .hero__scene--trade .hero__route-path {
  fill: none;
  stroke: rgba(212, 175, 55, 0.35);
  stroke-width: 1.5;
  stroke-dasharray: 8 10;
  animation: hero-route-dash 12s linear infinite;
}

.page-home .hero__scene--trade .hero__route-path--alt {
  opacity: 0.55;
  animation-delay: -4s;
}

.page-home .hero__route-marker {
  opacity: 0;
  filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.75));
}

.page-home .hero--mode-trade .hero__route-marker {
  opacity: 1;
}

.page-home .hero__scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(212, 175, 55, 0.04) 48%,
    transparent 52%
  );
  transform: translateY(-100%);
  opacity: 0;
}

.page-home .hero--mode-dev .hero__scan {
  opacity: 1;
  animation: hero-scan 6s ease-in-out infinite;
}

.page-home .hero__particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

.page-home .hero__overlay {
  z-index: 1;
}

.page-home .hero__content {
  z-index: 2;
  animation: hero-content-in 1s ease-out both;
}

.page-home .hero__mode-nav {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  z-index: 3;
  display: flex;
  gap: 0.35rem;
  align-items: center;
  pointer-events: auto;
}

.page-home .hero__mode-btn {
  position: relative;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: transform 0.25s;
}

.page-home .hero__mode-btn::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: transparent;
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
}

.page-home .hero__mode-btn:hover::after {
  border-color: var(--gold);
  transform: scale(1.15);
}

.page-home .hero__mode-btn.is-active::after {
  background: var(--gold);
  border-color: var(--gold);
}

.page-home .hero__mode-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.page-home .hero__mode-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Section scroll reveals */
.page-home .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.page-home .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.page-home .pillar.reveal:nth-child(1) { transition-delay: 0.05s; }
.page-home .pillar.reveal:nth-child(2) { transition-delay: 0.15s; }
.page-home .pillar.reveal:nth-child(3) { transition-delay: 0.25s; }

.page-home .project-card.reveal:nth-child(1) { transition-delay: 0.05s; }
.page-home .project-card.reveal:nth-child(2) { transition-delay: 0.12s; }
.page-home .project-card.reveal:nth-child(3) { transition-delay: 0.19s; }

.page-home .pillar:hover {
  transform: translateY(-4px);
  transition: transform 0.3s ease, box-shadow 0.25s, border-color 0.25s;
}

.page-home .project-card:hover .project-card__img img {
  transform: scale(1.05);
  transition: transform 0.45s ease;
}

.page-home .project-card__img img {
  transition: transform 0.45s ease;
}

.page-home .contact-strip {
  position: relative;
  overflow: hidden;
}

.page-home .contact-strip::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  animation: hero-strip-shine 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes hero-strip-shine {
  0%, 100% { left: -100%; }
  50% { left: 120%; }
}

@keyframes hero-ken-burns {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.08) translate(-1.5%, -1%); }
}

@keyframes hero-grid-drift {
  0% { background-position: 0 0; }
  100% { background-position: 420px 420px; }
}

@keyframes hero-stroke-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes hero-floor-rise {
  to { transform: scaleY(1); }
}

@keyframes hero-chart-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes hero-dot-pop {
  to { opacity: 1; transform: scale(1.2); }
}

@keyframes hero-route-dash {
  to { stroke-dashoffset: -120; }
}

@keyframes hero-scan {
  0%, 100% { transform: translateY(-100%); opacity: 0; }
  15% { opacity: 0.6; }
  50% { transform: translateY(100%); opacity: 0.35; }
  85% { opacity: 0; }
}

@keyframes hero-content-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .hero__media img,
  .page-home .hero__fx-texture,
  .page-home .hero__scene *,
  .page-home .hero__scan,
  .page-home .contact-strip::after,
  .page-home .reveal {
    animation: none !important;
    transition: none !important;
  }

  .page-home .hero__fx-texture--blueprint {
    opacity: 0.12;
  }

  .page-home .hero__route-marker {
    opacity: 0 !important;
  }

  .page-home .hero__particles {
    display: none;
  }

  .page-home .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 900px) {
  .page-home .hero__scene--dev svg.hero__svg-building,
  .page-home .hero__scene--invest svg.hero__svg-chart {
    opacity: 0.55;
    max-width: 55vw;
  }

  .page-home .hero__floor-bar {
    display: none;
  }

  .page-home .hero__title {
    font-size: 1.85rem;
  }
}
