/*
  NURYA — Hero V2
  Asymmetric perfume-house composition. Pulls up under the (transparent,
  overlay-mode) header using the theme's own existing --header-height
  custom property, already set by header.liquid's unmodified sticky-header
  script — no JS change required here.
*/

.nurya-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  background: linear-gradient(165deg, var(--nurya-color-black-soft) 0%, var(--nurya-color-black) 55%);
  margin-top: calc(-1 * var(--header-height, 8rem));
  padding-top: calc(var(--header-height, 8rem) + var(--nurya-space-xl));
  /* Bottom padding deliberately larger than the top clearance — within a
     centered flex layout this is what actually lifts the content block
     upward in the scene, rather than sitting dead-center. */
  padding-bottom: var(--nurya-space-3xl);
}

/* Atmosphere — depth only, never a busy background */
.nurya-hero__atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.nurya-hero__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 38%, transparent 45%, rgba(0, 0, 0, 0.6) 100%);
}

.nurya-hero__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(46% 38% at 72% 26%, rgba(198, 161, 91, 0.1), transparent 72%);
}

.nurya-hero__grain {
  position: absolute;
  inset: -20%;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Layout grid — mobile: stacked, visual between heading and subtitle.
   Desktop (990px+): true 45/55 asymmetric split via named areas. */
.nurya-hero__grid {
  position: relative;
  z-index: 1;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    'brand'
    'heading'
    'visual'
    'secondary'
    'actions'
    'tagline';
  row-gap: var(--nurya-space-sm);
  align-items: center;
  text-align: center;
}

.nurya-hero__brand {
  grid-area: brand;
}

.nurya-hero__heading {
  grid-area: heading;
  max-width: 34rem;
  margin-inline: auto;
}

.nurya-hero__secondary {
  grid-area: secondary;
  max-width: 40rem;
  margin-inline: auto;
  margin-top: var(--nurya-space-sm);
  opacity: 0.92;
}

.nurya-hero__actions {
  grid-area: actions;
  display: flex;
  flex-direction: column;
  gap: var(--nurya-space-sm);
  width: 100%;
  max-width: 34rem;
  margin-inline: auto;
  margin-top: var(--nurya-space-lg);
}

/* Secondary CTA — editorial link, never a second identical button */
.nurya-hero__cta-ghost {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--nurya-font-body);
  font-size: var(--nurya-text-sm);
  letter-spacing: var(--nurya-tracking-wide);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--nurya-ctx-fg);
  padding-bottom: 0.6rem;
  transition: letter-spacing 420ms cubic-bezier(0.4, 0, 0.2, 1), color 420ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nurya-hero__cta-ghost::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
  transition: opacity 420ms cubic-bezier(0.4, 0, 0.2, 1), background-color 420ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nurya-hero__cta-ghost-mark {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  color: var(--nurya-color-gold-light);
  transition: transform 420ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nurya-hero__cta-ghost:hover,
.nurya-hero__cta-ghost:focus-visible {
  color: var(--nurya-color-gold-light);
  letter-spacing: calc(var(--nurya-tracking-wide) + 0.02em);
}

.nurya-hero__cta-ghost:hover::after,
.nurya-hero__cta-ghost:focus-visible::after {
  opacity: 1;
  background: var(--nurya-color-gold-light);
}

.nurya-hero__cta-ghost:hover .nurya-hero__cta-ghost-mark,
.nurya-hero__cta-ghost:focus-visible .nurya-hero__cta-ghost-mark {
  transform: translateX(0.3rem);
}

.nurya-hero__cta-ghost[aria-disabled='true'] {
  opacity: 0.5;
  pointer-events: none;
}

.nurya-hero__cta-ghost:focus-visible {
  outline: 2px solid var(--nurya-color-gold-light);
  outline-offset: 4px;
}

.nurya-hero__tagline {
  grid-area: tagline;
  margin: 0;
  margin-top: var(--nurya-space-sm);
  font-family: var(--nurya-font-body);
  font-size: var(--nurya-text-xs);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--nurya-ctx-fg);
  opacity: 0.55;
  animation: nurya-fade-rise var(--nurya-transition-slow) ease-out 480ms both;
}

.nurya-hero__visual {
  grid-area: visual;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30vh;
  animation: nurya-hero-visual-in 900ms cubic-bezier(0.4, 0, 0.2, 1) 200ms both;
}

.nurya-hero__halo {
  position: absolute;
  /* Biased downward (not a plain inset:0) and tightened — concentrates
     the glow behind the bottle's body/label rather than the whole scene. */
  inset: 19% 0 -19% 0;
  margin: auto;
  width: 56%;
  max-width: 32rem;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(232, 217, 184, 0.34) 0%, rgba(198, 161, 91, 0.14) 42%, transparent 70%);
  filter: blur(4.8rem);
  z-index: 0;
}

/* Second, wider and fainter layer — reads as ambient light in the room
   rather than a single flat glow. Kept extremely subtle on purpose. */
.nurya-hero__halo::after {
  content: '';
  position: absolute;
  inset: -22%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(198, 161, 91, 0.08) 0%, transparent 68%);
}

/* ============ THE PORTAL — the scene reserved for the future flacon ============
   One primary ring, one fainter secondary ring (ellipses fake the tilt —
   reliable across browsers, no 3D transform needed), a handful of rare
   "diamond facet" points of light, and a barely-there floor reflection.
   --nurya-hero-portal-intensity (0–1) is set inline from the Theme Editor
   range setting and scales the whole system's presence at once. */

.nurya-hero__portal {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 84%;
  max-width: 50rem;
  height: auto;
  overflow: visible;
  z-index: 0;
  opacity: var(--nurya-hero-portal-intensity, 0.7);
  /* A few degrees of true perspective — enough to read as a space seen
     at an angle, subtle enough to never look like a UI gimmick. */
  transform: perspective(1400px) rotateX(4deg);
  transform-origin: 50% 58%;
}

.nurya-hero__portal-interior {
  transform-origin: 260px 390px;
  animation: nuryaInteriorBreathe 16s ease-in-out infinite both;
}

.nurya-hero__ring {
  transform-origin: 260px 390px;
  animation: nuryaRingBreathe 16s ease-in-out infinite both;
}

.nurya-hero__ring--secondary {
  animation-delay: 2.4s;
}

.nurya-hero__ring--primary-glow {
  filter: blur(6px);
  animation-name: nuryaGlowBreathe;
  animation-delay: 1.2s;
}

@keyframes nuryaRingBreathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.014); opacity: 0.9; }
}

@keyframes nuryaGlowBreathe {
  0%, 100% { transform: scale(1); opacity: 0.16; }
  50% { transform: scale(1.014); opacity: 0.1; }
}

@keyframes nuryaInteriorBreathe {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

.nurya-hero__facets {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: var(--nurya-hero-portal-intensity, 0.7);
  pointer-events: none;
}

.nurya-hero__facet {
  position: absolute;
  width: 5px;
  height: 5px;
  background: linear-gradient(135deg, #fff8ea, var(--nurya-color-gold-light));
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  box-shadow: 0 0 10px rgba(232, 217, 184, 0.32), 0 0 2px rgba(255, 255, 255, 0.65);
}

.nurya-hero__facet--1 { top: 20%; right: 24%; }
.nurya-hero__facet--2 { bottom: 30%; left: 18%; width: 3px; height: 3px; opacity: 0.7; }
.nurya-hero__facet--3 { top: 44%; right: 10%; width: 4px; height: 4px; opacity: 0.8; }

.nurya-hero__floor {
  position: absolute;
  left: 50%;
  bottom: 9%;
  width: 56%;
  max-width: 30rem;
  height: 11%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(198, 161, 91, 0.2) 0%, transparent 74%);
  filter: blur(1rem);
  z-index: 0;
  opacity: var(--nurya-hero-portal-intensity, 0.7);
}

.nurya-hero__perfume {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  height: auto;
  max-width: 84%;
  max-height: 42vh;
  filter: drop-shadow(0 2.6rem 3.4rem rgba(0, 0, 0, 0.52));
}

@keyframes nurya-hero-visual-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nurya-hero__tagline,
  .nurya-hero__visual,
  .nurya-hero__portal-interior {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  /* Freeze the rings at their authored resting opacity — not opacity:1,
     which would make the deliberately-discreet secondary ring and the
     faint glow layer suddenly too bright. */
  .nurya-hero__ring {
    animation: none !important;
    transform: none !important;
  }

  .nurya-hero__ring--primary-glow {
    opacity: 0.16 !important;
  }

  .nurya-hero__perfume {
    transform: none !important;
  }
}

@media screen and (min-width: 550px) {
  .nurya-hero__actions {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    max-width: none;
    width: auto;
  }
}

@media screen and (min-width: 750px) {
  .nurya-hero__perfume {
    max-height: 52vh;
  }

  .nurya-hero__visual {
    min-height: 44vh;
  }
}

@media screen and (min-width: 990px) {
  .nurya-hero__grid {
    grid-template-columns: 45fr 55fr;
    column-gap: var(--nurya-space-2xl);
    row-gap: var(--nurya-space-sm);
    text-align: left;
    grid-template-areas:
      'brand     visual'
      'heading   visual'
      'secondary visual'
      'actions   visual'
      'tagline   visual';
  }

  .nurya-hero__heading,
  .nurya-hero__secondary,
  .nurya-hero__actions {
    margin-inline: 0;
    max-width: none;
  }

  .nurya-hero__heading {
    max-width: 90%;
  }

  .nurya-hero__actions {
    align-items: center;
    justify-content: flex-start;
  }

  .nurya-hero__visual {
    min-height: auto;
    height: 100%;
  }

  .nurya-hero__perfume {
    max-height: min(78vh, 780px);
    max-width: 92%;
  }
}
