/* ==========================================================================
   Home 3D landing — perspective stage, floating jewellery, parallax
   Light canvas only; keeps Dhirsons brand as the hero signal
   ========================================================================== */

.home-3d {
  --stage-depth: 520px;
}

/* Full-bleed 3D hero */
.hero-3d {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 248, 235, 0.95), transparent 55%),
    radial-gradient(90% 70% at 100% 100%, rgba(201, 155, 63, 0.18), transparent 50%),
    radial-gradient(80% 60% at 0% 80%, rgba(169, 123, 18, 0.12), transparent 45%),
    #faf7f2;
  perspective: 1200px;
  perspective-origin: 50% 45%;
}

.hero-3d-atmosphere {
  position: absolute;
  inset: -8%;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(250, 247, 242, 0.35) 0%, rgba(250, 247, 242, 0.82) 100%),
    url("../assets/images/hero-3d-atmosphere.webp") center / cover no-repeat;
  transform: translateZ(-200px) scale(1.18);
  pointer-events: none;
  filter: saturate(1.05) contrast(1.02);
}

.hero-3d-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, transparent 20%, rgba(250, 247, 242, 0.55) 100%),
    linear-gradient(180deg, transparent 60%, rgba(250, 247, 242, 0.9) 100%);
}

.hero-3d-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  min-height: 0;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.18s var(--ease-out);
  will-change: transform;
  pointer-events: none;
}

.hero-3d-copy {
  position: relative;
  z-index: 5;
  max-width: 640px;
  margin: 0 auto;
  padding: 100px 20px 56px;
  text-align: center;
  pointer-events: auto;
}

.hero-3d-copy::before {
  content: "";
  position: absolute;
  inset: 72px -24px 12px;
  z-index: -1;
  border-radius: 28px;
  background: radial-gradient(
    ellipse 70% 60% at 50% 45%,
    rgba(250, 247, 242, 0.88) 0%,
    rgba(250, 247, 242, 0.55) 55%,
    transparent 78%
  );
  pointer-events: none;
}

.hero-3d-brand {
  font-family: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  font-size: clamp(42px, 8.5vw, 92px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 10px;
}

.hero-3d-brand em {
  font-style: italic;
  font-weight: 500;
  color: #a97b12;
  background: var(--gradient-gold);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 8s ease-in-out infinite;
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero-3d-brand em {
    -webkit-text-fill-color: #a97b12;
    color: #a97b12;
  }
}

.hero-3d-loc {
  display: block;
  margin-top: 8px;
  font-family: var(--font-sans);
  font-size: clamp(13px, 1.6vw, 16px);
  font-weight: 600;
  font-style: normal;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-dim);
  -webkit-text-fill-color: var(--text-dim);
  background: none;
}

.hero-3d-copy h2 {
  font-family: var(--font-sans);
  font-size: clamp(22px, 3.2vw, 34px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
  margin: 22px 0 14px;
}

.hero-3d-copy > p.hero-3d-lede {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 28px;
  font-weight: 500;
  line-height: 1.55;
}

.hero-3d-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 6;
}

.hero-3d-actions .btn,
.hero-3d-actions .btn-outline {
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

/* Floating jewellery planes */
.hero-3d-orbit {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  transform-style: preserve-3d;
}

.jewel-plane {
  position: absolute;
  transform-style: preserve-3d;
  will-change: transform;
  backface-visibility: hidden;
  filter: drop-shadow(0 28px 40px rgba(40, 24, 8, 0.28))
    drop-shadow(0 8px 16px rgba(169, 123, 18, 0.18));
}

.jewel-plane img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 4px;
  transform: translateZ(1px);
}

.jewel-plane.p1 {
  width: min(300px, 30vw);
  aspect-ratio: 4 / 3;
  left: -1%;
  top: 20%;
  transform: translate3d(0, 0, 16px) rotateY(18deg) rotateX(6deg);
  animation: float-a 7.5s ease-in-out infinite;
}

.jewel-plane.p2 {
  width: min(280px, 28vw);
  aspect-ratio: 4 / 3;
  right: -1%;
  top: 16%;
  transform: translate3d(0, 0, 28px) rotateY(-20deg) rotateX(4deg);
  animation: float-b 8.5s ease-in-out infinite;
}

.jewel-plane.p3 {
  width: min(190px, 20vw);
  aspect-ratio: 4 / 5;
  left: 8%;
  bottom: 10%;
  transform: translate3d(0, 0, 36px) rotateY(12deg) rotateX(-8deg);
  animation: float-c 9s ease-in-out infinite;
}

.jewel-plane.p4 {
  width: min(180px, 18vw);
  aspect-ratio: 1 / 1;
  right: 9%;
  bottom: 12%;
  transform: translate3d(0, 0, 20px) rotateY(-12deg) rotateX(-4deg);
  animation: float-a 8s ease-in-out infinite reverse;
}

.jewel-plane.p5 {
  width: min(150px, 16vw);
  aspect-ratio: 3 / 4;
  left: 43%;
  bottom: 4%;
  transform: translate3d(0, 0, 40px) rotateX(6deg);
  animation: float-b 6.8s ease-in-out infinite;
  opacity: 0.95;
}

@keyframes float-a {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -14px;
  }
}

@keyframes float-b {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -20px;
  }
}

@keyframes float-c {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -12px;
  }
}

.hero-3d-scroll {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 6;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.hero-3d-scroll span {
  width: 1px;
  height: 28px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scroll-line 1.8s ease-in-out infinite;
}

@keyframes scroll-line {
  0% {
    transform: scaleY(0.4);
    opacity: 0.3;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
  100% {
    transform: scaleY(0.4);
    opacity: 0.3;
  }
}

/* 3D collection tiles under the fold */
.section-3d .rail-card {
  transform-style: preserve-3d;
  transition: transform 0.45s var(--ease-spring), box-shadow 0.45s var(--ease-out),
    border-color 0.4s;
}

.section-3d .rail-card:hover {
  transform: translateY(-10px) rotateX(4deg) rotateY(-3deg) scale(1.01);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.16), 0 0 40px rgba(176, 128, 27, 0.1);
}

.storefront-3d {
  perspective: 1000px;
}

.storefront-3d .storefront-frame {
  transform: rotateX(2deg);
  transform-style: preserve-3d;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.16), 0 0 50px rgba(176, 128, 27, 0.1);
  transition: transform 0.5s var(--ease-spring);
}

.storefront-3d .storefront-frame:hover {
  transform: rotateX(0deg) translateY(-6px);
}

.storefront-3d .storefront-frame img {
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  width: 100%;
}

.insta-strip {
  margin-top: 36px;
  text-align: center;
}

.insta-strip a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  transition: transform 0.35s var(--ease-spring), border-color 0.3s, box-shadow 0.35s;
}

.insta-strip a:hover {
  transform: translateY(-3px);
  border-color: rgba(169, 123, 18, 0.4);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  color: var(--text);
  text-decoration: none;
}

.insta-strip a img {
  width: 20px;
  height: 20px;
}

@media (prefers-reduced-motion: reduce) {
  .jewel-plane,
  .hero-3d-scroll span {
    animation: none !important;
  }

  .hero-3d-stage {
    transition: none;
  }
}

@media screen and (max-width: 900px) {
  .jewel-plane.p1,
  .jewel-plane.p2 {
    width: min(180px, 28vw);
  }

  .jewel-plane.p3,
  .jewel-plane.p4 {
    width: min(150px, 24vw);
  }

  .jewel-plane.p5 {
    width: min(130px, 20vw);
  }

  .hero-3d-copy {
    padding-top: 100px;
  }
}

@media screen and (max-width: 640px) {
  .hero-3d {
    min-height: 100svh;
    min-height: 100vh;
    padding-bottom: 28px;
  }

  .hero-3d-stage {
    min-height: 0;
  }

  .hero-3d-orbit {
    position: absolute;
    inset: 0;
  }

  .hero-3d-copy::before {
    display: none;
  }

  .hero-3d-orbit {
    z-index: 3;
  }

  .jewel-plane.p1 {
    top: 9%;
    left: -8%;
    width: 38vw;
    aspect-ratio: 4 / 3;
    transform: translate3d(0, 0, 12px) rotateY(14deg) rotateX(5deg);
  }

  .jewel-plane.p2 {
    top: 7%;
    right: -8%;
    width: 36vw;
    aspect-ratio: 4 / 3;
    transform: translate3d(0, 0, 20px) rotateY(-16deg) rotateX(4deg);
  }

  .jewel-plane.p3 {
    display: block;
    left: -12%;
    top: auto;
    bottom: 22%;
    width: 34vw;
    aspect-ratio: 4 / 5;
    transform: translate3d(0, 0, 24px) rotateY(12deg) rotateX(-6deg);
  }

  .jewel-plane.p4 {
    display: block;
    right: -12%;
    top: auto;
    bottom: 24%;
    width: 32vw;
    aspect-ratio: 1 / 1;
    transform: translate3d(0, 0, 16px) rotateY(-14deg) rotateX(-4deg);
  }

  .jewel-plane.p5 {
    display: block;
    left: 50%;
    top: auto;
    bottom: 3%;
    width: 30vw;
    aspect-ratio: 3 / 4;
    transform: translate3d(-50%, 0, 28px) rotateX(5deg);
  }

  .hero-3d-copy {
    padding: 96px 22px 72px;
    z-index: 6;
  }

  .hero-3d-lede,
  .hero-3d-copy h2 {
    text-shadow: 0 1px 12px rgba(250, 247, 242, 0.9);
  }

  .hero-3d-copy::before {
    inset: 88px -12px 80px;
  }

  .hero-3d-actions .btn,
  .hero-3d-actions .btn-outline {
    width: 100%;
    text-align: center;
  }

  .hero-3d-scroll {
    display: none;
  }
}
