/* Hero — logo background */
.hero {
  background-color: #0b1220;
}

.hero-logo-bg {
  --logo-url: url("../images/logo.png");
  position: absolute;
  inset: 0 0 auto 0;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 75% 45%, rgba(201, 168, 76, 0.14) 0%, transparent 55%),
    linear-gradient(165deg, #0b1220 0%, #0f1828 40%, #0b1220 100%);
}

.hero-logo-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201, 168, 76, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 168, 76, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
}

.hero-logo-watermark {
  --logo-url: url("../images/logo.png");
  position: absolute;
  z-index: 2;
  pointer-events: none;
  background-image: var(--logo-url);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;

  /* Default: centered in viewport — phones, tablets, small laptops */
  top: 45%;
  left: 50%;
  right: auto;
  transform: translate(-50%, -50%);
  width: min(88vw, 28rem);
  height: min(88vw, 28rem);
  opacity: 0.52;
  filter:
    brightness(1.3)
    contrast(1.2)
    saturate(1.12)
    drop-shadow(0 0 30px rgba(201, 168, 76, 0.55))
    drop-shadow(0 0 80px rgba(201, 168, 76, 0.28));
}

.hero-logo-watermark::before {
  content: "";
  position: absolute;
  inset: -15%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.28) 0%, transparent 68%);
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  inset: 0 0 auto 0;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  background:
    radial-gradient(
      ellipse 88% 78% at 50% 45%,
      rgba(11, 18, 32, 0.62) 0%,
      rgba(11, 18, 32, 0.86) 100%
    );
}

.hero-logo-feature {
  display: none;
}

.hero-logo-tile--1,
.hero-logo-tile--2,
.hero-logo-tile--3,
.hero-logo-tile--4,
.hero-logo-tile--5,
.hero-logo-tile--6 {
  display: none;
}

/* Tablet sizing (481px – 1279px) */
@media (min-width: 481px) and (max-width: 1279px) {
  .hero-logo-watermark {
    top: 44%;
    width: min(62vw, 36rem);
    height: min(62vw, 36rem);
    opacity: 0.46;
  }
}

/* Phone — bolder logo */
@media (max-width: 480px) {
  .hero-logo-watermark {
    top: 44%;
    width: min(96vw, 24rem);
    height: min(96vw, 24rem);
    opacity: 0.62;
    filter:
      brightness(1.4)
      contrast(1.28)
      saturate(1.18)
      drop-shadow(0 0 35px rgba(201, 168, 76, 0.65))
      drop-shadow(0 0 90px rgba(201, 168, 76, 0.35));
  }
}

/* Compact hero typography & layout (< 1280px) */
@media (max-width: 1279px) {
  #hero h1 {
    color: #ffffff;
    text-shadow: 0 2px 14px rgba(11, 18, 32, 0.85);
  }

  #hero .hero-item-2 {
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 1px 10px rgba(11, 18, 32, 0.8);
  }

  #hero .gold-gradient-text {
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    color: #e2c878 !important;
    text-shadow: 0 2px 14px rgba(11, 18, 32, 0.9);
  }

  #hero .hero-shimmer {
    animation: none !important;
  }

  #hero .hero-stat p.font-serif {
    color: #dfc06a;
  }

  #hero .hero-stat p:last-child {
    color: rgba(255, 255, 255, 0.65);
  }

  #hero .grid {
    gap: 1.5rem;
  }

  #hero .scroll-indicator {
    bottom: 5rem;
  }
}

/* Desktop wide (1280px+) — two-column hero with side logo */
@media (min-width: 1280px) {
  .hero-logo-bg {
    inset: 0;
    height: auto;
    background:
      radial-gradient(ellipse 55% 65% at 78% 48%, rgba(201, 168, 76, 0.22) 0%, transparent 58%),
      linear-gradient(165deg, #0b1220 0%, #0f1828 40%, #0b1220 100%);
  }

  .hero-overlay {
    inset: 0;
    height: auto;
    background:
      linear-gradient(
        105deg,
        rgba(11, 18, 32, 0.9) 0%,
        rgba(11, 18, 32, 0.75) 35%,
        rgba(11, 18, 32, 0.42) 58%,
        rgba(11, 18, 32, 0.12) 100%
      );
  }

  .hero-logo-watermark {
    top: 50%;
    left: auto;
    right: 4%;
    transform: translateY(-50%);
    width: min(48vw, 36rem);
    height: min(48vw, 36rem);
    opacity: 0.42;
    filter:
      brightness(1.25)
      contrast(1.18)
      saturate(1.1)
      drop-shadow(0 0 40px rgba(201, 168, 76, 0.5))
      drop-shadow(0 0 100px rgba(201, 168, 76, 0.25));
  }

  .hero-logo-watermark::before {
    inset: -12%;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.28) 0%, transparent 68%);
  }

  .hero-logo-tile--1,
  .hero-logo-tile--2,
  .hero-logo-tile--3,
  .hero-logo-tile--4,
  .hero-logo-tile--5,
  .hero-logo-tile--6 {
    display: block;
    opacity: 0.1;
  }

  .hero-logo-tile--2 {
    opacity: 0.14;
  }

  .hero-logo-feature {
    display: flex;
    min-height: 26rem;
  }

  .hero-logo-feature-ring {
    width: 22rem;
    height: 22rem;
    border-color: rgba(201, 168, 76, 0.65);
    box-shadow: 0 0 40px rgba(201, 168, 76, 0.2);
  }

  .hero-logo-feature-ring::before {
    border-color: rgba(201, 168, 76, 0.45);
  }

  .hero-logo-feature-img {
    width: min(20rem, 88%);
    filter:
      drop-shadow(0 16px 48px rgba(201, 168, 76, 0.55))
      drop-shadow(0 0 30px rgba(201, 168, 76, 0.35));
  }
}

/* Repeating logo watermark tiles */
.hero-logo-tile {
  position: absolute;
  background-image: var(--logo-url);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.07;
  pointer-events: none;
  filter: brightness(1.15);
}

.hero-logo-tile--1 { top: 6%; left: 55%; width: 8rem; height: 8rem; transform: rotate(-12deg); opacity: 0.1; }
.hero-logo-tile--2 { top: 22%; right: 8%; width: 10rem; height: 10rem; opacity: 0.12; transform: rotate(8deg); }
.hero-logo-tile--3 { bottom: 18%; right: 12%; width: 7rem; height: 7rem; opacity: 0.09; transform: rotate(-6deg); }
.hero-logo-tile--4 { top: 48%; left: 42%; width: 6rem; height: 6rem; opacity: 0.08; }
.hero-logo-tile--5 { bottom: 8%; left: 30%; width: 5rem; height: 5rem; opacity: 0.09; transform: rotate(15deg); }
.hero-logo-tile--6 { top: 12%; left: 72%; width: 5.5rem; height: 5.5rem; opacity: 0.08; }

/* Main logo — above overlay (legacy stage removed) */
.hero-logo-feature {
  position: relative;
  align-items: center;
  justify-content: center;
  min-height: 14rem;
}

@media (min-width: 1280px) {
  .hero-logo-feature {
    order: 0;
    min-height: 26rem;
  }
}

.hero-logo-feature-ring {
  position: absolute;
  width: min(16rem, 70vw);
  height: min(16rem, 70vw);
  border: 2px solid rgba(201, 168, 76, 0.45);
  border-radius: 50%;
  animation: heroOrbitSpin 30s linear infinite;
}

@media (min-width: 1280px) {
  .hero-logo-feature-ring {
    width: 22rem;
    height: 22rem;
  }
}

.hero-logo-feature-ring::before {
  content: "";
  position: absolute;
  inset: 8%;
  border: 1px dashed rgba(201, 168, 76, 0.3);
  border-radius: 50%;
}

.hero-logo-feature-img {
  position: relative;
  z-index: 1;
  width: min(11rem, 55vw);
  height: auto;
  filter: drop-shadow(0 12px 40px rgba(201, 168, 76, 0.4));
  animation: heroLogoBreath 8s ease-in-out infinite;
}

@media (min-width: 1280px) {
  .hero-logo-feature-img {
    width: min(20rem, 88%);
  }
}

@keyframes heroLogoBreath {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes heroOrbitSpin {
  to {
    transform: rotate(360deg);
  }
}


@media (prefers-reduced-motion: reduce) {
  .hero-logo-orbit-ring,
  .hero-logo-feature-img,
  .hero-logo-feature-ring {
    animation: none !important;
  }

  .hero-item,
  .hero-stat,
  .hero-btn {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .hero-shimmer {
    animation: none !important;
  }

  .hero::after {
    animation: none !important;
    transform: scaleX(1);
  }

  .back-to-home {
    transition: opacity 0.2s ease !important;
  }
}

/* Hero entrance animations */
.hero-item {
  opacity: 0;
  transform: translateY(2rem);
}

body.hero-ready .hero-item {
  animation: heroFadeUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

body.hero-ready .hero-item-0 { animation-delay: 0s; }
body.hero-ready .hero-item-1 { animation-delay: 0.15s; }
body.hero-ready .hero-item-2 { animation-delay: 0.35s; }
body.hero-ready .hero-item-3 { animation-delay: 0.55s; }
body.hero-ready .hero-item-4 { animation-delay: 0.75s; }

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(2rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-stat {
  opacity: 0;
  transform: translateY(1rem) scale(0.95);
}

body.hero-ready .hero-stat {
  animation: heroStatPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

body.hero-ready .hero-item-4 .hero-stat:nth-child(1) { animation-delay: 0.9s; }
body.hero-ready .hero-item-4 .hero-stat:nth-child(2) { animation-delay: 1.05s; }
body.hero-ready .hero-item-4 .hero-stat:nth-child(3) { animation-delay: 1.2s; }

@keyframes heroStatPop {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero-btn {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-btn:hover {
  transform: translateY(-2px);
}

.hero-shimmer {
  background-size: 200% auto;
  animation: heroShimmer 4s ease-in-out infinite;
}

@keyframes heroShimmer {
  0%, 100% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
}

/* Decorative line sweep on hero */
.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 10;
  background: linear-gradient(90deg, transparent, #c9a84c, transparent);
  transform: scaleX(0);
  transform-origin: left;
  animation: heroLineSweep 1.2s ease 1.4s forwards;
}

@keyframes heroLineSweep {
  to {
    transform: scaleX(1);
  }
}

/* Back to top button */
.back-to-home {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  background: #0b1220;
  color: #c9a84c;
  text-decoration: none;
  border-radius: 50%;
  border: 2px solid rgba(201, 168, 76, 0.5);
  box-shadow: 0 8px 28px rgba(11, 18, 32, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(1.25rem) scale(0.9);
  transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease, border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.back-to-home.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-home:hover {
  background: #c9a84c;
  color: #0b1220;
  border-color: #c9a84c;
  box-shadow: 0 12px 32px rgba(201, 168, 76, 0.4);
  transform: translateY(-4px) scale(1.05);
}

.back-to-home-icon {
  width: 1.35rem;
  height: 1.35rem;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.back-to-home:hover .back-to-home-icon {
  transform: translateY(-3px);
}

.back-to-home-icon .arrow-line {
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  animation: arrowDraw 0.6s ease forwards;
}

.back-to-home.visible .back-to-home-icon .arrow-line {
  animation: arrowDraw 0.6s ease 0.2s forwards;
}

@keyframes arrowDraw {
  to {
    stroke-dashoffset: 0;
  }
}
