/* ==========================================================================
   Ishwar Jewellers — SECTION 05 · Earrings  (Phase-02, keyframe 05)
   --------------------------------------------------------------------------
   A deliberately different interaction language: no pinning, no explosion.
   The section fades in softly; five glass display panels hang from wires and
   sway gently (each with its own period/phase); hovering a panel lifts it and
   pauses the rail; the panels themselves ARE the collection rail, autoplaying
   RIGHT→LEFT, and the Featured Piece column crossfades to the active panel's
   name, description and specifications. Dragging the group rotates the whole
   hanging arrangement a few degrees and springs back.
   ========================================================================== */

.gje {
  --gje-gold: #a9853c;
  --gje-brown: #6b4d1e;
  --gje-ink: #4a3a22;
  --gje-body: #7a6a52;
  --gje-ivory: #f6f0e4;
  position: relative;
  background: var(--gje-ivory);
  font-family: "Jost", "Segoe UI", system-ui, sans-serif;
  overflow: hidden;
}

.gje__stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
}

.gje::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 64px;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(to bottom, #f5efe2, rgba(245, 239, 226, 0));
}

/* ------------------------------------------------- fixed-aspect scene layer */
.gje__scene {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: max(100vw, 177.78svh);
  aspect-ratio: 1536 / 864;
  container-type: size;
}

.gje__scene > picture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ------------------------------------------------------- hanging panels */
.gje__hangwrap {
  position: absolute;
  inset: 0;
  transform-origin: 50% -4%;
  will-change: transform;
}

.gje__hangwrap.is-springing { transition: transform 0.9s cubic-bezier(0.2, 1.2, 0.3, 1); }

.gje__rail { position: absolute; inset: 0; }

.gje__panel {
  position: absolute;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  color: var(--gje-ink);
}

.gje__hang {
  position: relative;
  display: block;
  transform-origin: 50% 0;
  animation: gje-sway var(--swayd, 7.5s) ease-in-out var(--swayo, 0s) infinite alternate;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

@keyframes gje-sway {
  from { rotate: calc(var(--swayr, 1.2deg) * -1); }
  to   { rotate: var(--swayr, 1.2deg); }
}

.gje__hang img {
  width: 100%;
  height: auto;
  display: block;
  -webkit-user-drag: none;
  transition: filter 0.5s ease;
}

/* hover: refined lift + glow, label brightens (autoplay pauses via the rail) */
.gje__panel:hover .gje__hang,
.gje__panel:focus-visible .gje__hang { transform: translateY(-8px); }

.gje__panel:hover .gje__hang img { filter: brightness(1.045); }

/* active panel: the featured one */
.gje__panel.is-active .gje__hang img {
  filter: brightness(1.055) drop-shadow(0 20px 34px rgba(160, 118, 48, 0.26));
}

.gje__panel.is-active .gje__panel-label { color: var(--gje-brown); }

/* labels sit below the glass case (not overlaid on it - on smaller panels
   the glass artwork leaves too little of its own transparent margin for an
   in-image label to read cleanly, so it's set just under the case instead) */
.gje__panel-label {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  text-align: center;
  font-size: clamp(8px, 0.72cqw, 12px);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6d5a3c;
  transition: color 0.4s ease;
  pointer-events: none;
}

.gje__panel--side .gje__panel-label { line-height: 1.5; }

.gje__panel--hero .gje__panel-label {
  top: calc(100% + 12px);
  font-size: clamp(9px, 0.8cqw, 13.5px);
  letter-spacing: 0.22em;
}

.gje__panel--hero .gje__panel-label::after {
  content: "";
  display: block;
  width: 44px;
  height: 1px;
  margin: 7px auto 0;
  background: linear-gradient(to right, rgba(169, 133, 60, 0), rgba(169, 133, 60, 0.8), rgba(169, 133, 60, 0));
}

/* ------------------------------------------------- scene furniture (HTML) */
.gje__podium-text {
  position: absolute;
  left: 50%;
  top: 72.6%;
  transform: translateX(-50%);
  text-align: center;
  color: #7c6845;
  font-size: clamp(9px, 0.82cqw, 13.5px);
  font-weight: 500;
  letter-spacing: 0.26em;
  line-height: 1.75;
  text-transform: uppercase;
  pointer-events: none;
}

.gje__podium-text::after {
  content: "\2014\2009\25c8\2009\2014";
  display: block;
  font-size: 0.8em;
  letter-spacing: 0.1em;
  color: rgba(169, 133, 60, 0.75);
  margin-top: 2px;
}

.gje__quote {
  position: absolute;
  left: 50%;
  top: 89.5%;
  transform: translateX(-50%);
  margin: 0;
  text-align: center;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: clamp(12px, 1.25cqw, 20px);
  color: #f3e6c8;
  text-shadow: 0 1px 10px rgba(40, 16, 8, 0.55);
  pointer-events: none;
  white-space: nowrap;
}

.gje__quote::after {
  content: "\2014\2009\2756\2009\2014";
  display: block;
  font-style: normal;
  font-size: 0.62em;
  letter-spacing: 0.2em;
  color: rgba(233, 205, 150, 0.8);
  margin-top: 6px;
}

.gje__brand {
  position: absolute;
  right: 2.6%;
  top: 90.5%;
  margin: 0;
  text-align: right;
  font-size: clamp(8.5px, 0.78cqw, 12.5px);
  font-weight: 500;
  letter-spacing: 0.3em;
  line-height: 1.9;
  text-transform: uppercase;
  color: #f0e3c4;
  text-shadow: 0 1px 8px rgba(40, 16, 8, 0.5);
  pointer-events: none;
}

/* 360 badge + drag hint */
.gje__badge {
  position: absolute;
  left: 84.9%;
  top: 70.5%;
  width: 5.9cqw;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #e8c87c, #b3893a 68%, #936d26);
  box-shadow: 0 10px 24px rgba(140, 100, 40, 0.35), inset 0 1px 6px rgba(255, 240, 200, 0.8);
  color: #fffaf0;
  font-size: clamp(10px, 1.05cqw, 17px);
  font-weight: 500;
  letter-spacing: 0.06em;
  pointer-events: none;
}

.gje__badge::before {
  content: "";
  position: absolute;
  inset: 9%;
  border: 1px dashed rgba(255, 250, 235, 0.65);
  border-radius: 50%;
}

.gje__drag {
  position: absolute;
  left: 91.3%;
  top: 72.8%;
  margin: 0;
  color: #8a6f3a;
  font-size: clamp(8px, 0.72cqw, 12px);
  font-weight: 500;
  letter-spacing: 0.24em;
  line-height: 2;
  text-transform: uppercase;
  pointer-events: none;
}

.gje__drag span { display: block; letter-spacing: 0.5em; color: rgba(138, 111, 58, 0.8); }

/* --------------------------------------------------------- left editorial */
.gje__copy {
  position: absolute;
  left: clamp(20px, 7vw, 112px);
  top: 6.5svh;
  width: clamp(220px, 16.5vw, 280px);
  z-index: 3;
}

.gje__eyebrow {
  margin: 0 0 1vw;
  color: var(--gje-gold);
  font-size: clamp(10px, 0.82vw, 13.5px);
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  white-space: nowrap;
}

.gje__title {
  margin: 0 0 1vw;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(30px, 3.1vw, 52px);
  line-height: 1.08;
  color: #6d5124;
}

.gje__orn {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 1.1vw;
}

.gje__orn i { width: clamp(46px, 5vw, 80px); height: 1px; background: rgba(169, 133, 60, 0.7); }

.gje__orn::after {
  content: "";
  width: 5px;
  height: 5px;
  border: 1px solid var(--gje-gold);
  transform: rotate(45deg);
}

.gje__desc {
  margin: 0 0 1.6vw;
  font-size: clamp(12.5px, 0.98vw, 16.5px);
  line-height: 1.6;
  color: var(--gje-body);
}

.gje__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.8vw;
  padding: clamp(10px, 0.9vw, 15px) clamp(18px, 1.7vw, 28px);
  border: 1px solid rgba(169, 133, 60, 0.75);
  color: var(--gje-brown);
  background: rgba(255, 252, 244, 0.4);
  text-decoration: none;
  font-size: clamp(10px, 0.8vw, 13px);
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.35s ease, color 0.35s ease;
}

.gje__cta span { font-size: 1.3em; transition: transform 0.35s ease; }
.gje__cta:hover, .gje__cta:focus-visible { background: var(--gje-gold); color: #fffcf4; }
.gje__cta:hover span { transform: translateX(5px); }

/* left section index ------------------------------------------------------ */
.gje__index {
  position: absolute;
  left: clamp(14px, 2.2vw, 36px);
  top: 56svh;
  z-index: 3;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(8px, 1.6svh, 16px);
}

.gje__index a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: #a6926c;
  font-size: clamp(9px, 0.78vw, 12.5px);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.gje__index a b { font-weight: 500; font-size: 0.85em; color: #bda87c; transition: color 0.3s ease; }
.gje__index a:hover, .gje__index a:hover b { color: var(--gje-brown); }

.gje__index .is-here a, .gje__index .is-here a b { color: #5d452a; }

.gje__index .is-here a::after {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--gje-gold);
  align-self: center;
}

/* cue --------------------------------------------------------------------- */
.gje__cue {
  position: absolute;
  left: clamp(16px, 2.4vw, 40px);
  bottom: 7svh;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  color: #8a6f3a;
}

.gje__cue i {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(169, 133, 60, 0.7);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 13px;
  animation: gje-nudge 2.3s ease-in-out infinite;
}

@keyframes gje-nudge {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(5px); }
}

.gje__cue span {
  font-size: clamp(9px, 0.76vw, 12px);
  font-weight: 500;
  letter-spacing: 0.26em;
  line-height: 1.8;
  text-transform: uppercase;
}

/* ------------------------------------------------- featured piece (right) */
.gje__featured {
  position: absolute;
  right: clamp(18px, 2.4vw, 40px);
  top: 6.5svh;
  width: clamp(230px, 17vw, 280px);
  z-index: 3;
}

.gje__featured-eyebrow {
  margin: 0 0 0.9vw;
  color: var(--gje-gold);
  font-size: clamp(10px, 0.82vw, 13.5px);
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.gje__featured-name {
  margin: 0 0 0.9vw;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(24px, 2.2vw, 38px);
  line-height: 1.1;
  color: #6d5124;
}

.gje__featured-orn { width: 54px; height: 1px; background: rgba(169, 133, 60, 0.7); margin: 0 0 1vw; position: relative; }

.gje__featured-orn::after {
  content: "";
  position: absolute;
  right: -8px;
  top: -2.5px;
  width: 5px;
  height: 5px;
  border: 1px solid var(--gje-gold);
  transform: rotate(45deg);
}

.gje__featured-desc {
  margin: 0 0 1.4vw;
  font-size: clamp(11.5px, 0.92vw, 15px);
  line-height: 1.55;
  color: var(--gje-body);
}

.gje__specs { display: grid; gap: clamp(9px, 1.3svh, 15px); margin: 0; padding: 0; list-style: none; }

.gje__specs li { display: flex; align-items: flex-start; gap: clamp(10px, 0.85vw, 15px); }

.gje__tile {
  flex: 0 0 clamp(36px, 3vw, 50px);
  height: clamp(36px, 3vw, 50px);
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(to bottom, #fbf6ea, #f3ebd8);
  border: 1px solid rgba(190, 154, 78, 0.45);
  box-shadow: 0 6px 14px rgba(150, 110, 50, 0.1);
}

.gje__tile svg {
  width: 55%;
  height: 55%;
  stroke: #a8823f;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gje__specs h4 {
  margin: 0 0 2px;
  font-size: clamp(12px, 0.95vw, 15.5px);
  font-weight: 500;
  color: var(--gje-ink);
}

.gje__specs p {
  margin: 0;
  font-size: clamp(10.5px, 0.84vw, 13.5px);
  line-height: 1.4;
  color: #8a7758;
}

/* clean crossfade when the active earring changes */
.gje__featured [data-f] { transition: opacity 0.22s ease, transform 0.22s ease; }

.gje__featured.is-swapping [data-f] { opacity: 0; transform: translateY(5px) scale(0.99); }

.gje__view-m { position: absolute; inset: 0; }

/* --------------------------------------------------------- soft reveal */
.js .gje [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.85s ease, transform 1s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--d, 0s);
}

.js .gje [data-reveal="drop"] { transform: translateY(-22px); }
.js .gje.is-in [data-reveal] { opacity: 1; transform: none; }

/* --------------------------------------------------------------- compact */
@media (max-width: 1023px) {
  .gje__stage { height: auto; min-height: 0; }

  .gje__copy {
    position: relative;
    inset: auto;
    width: auto;
    padding: 46px clamp(20px, 6vw, 56px) 22px;
  }

  .gje__eyebrow { font-size: 11px; margin-bottom: 10px; }
  .gje__title { font-size: clamp(30px, 7.8vw, 44px); margin-bottom: 10px; }
  .gje__desc { font-size: clamp(14px, 3.8vw, 16px); margin-bottom: 18px; }
  .gje__cta { padding: 12px 22px; font-size: 11px; gap: 8px; }

  .gje__view-m {
    position: relative;
    height: clamp(320px, 52svh, 500px);
    overflow: hidden;
  }

  .gje__scene {
    width: max(100%, calc(clamp(320px, 52svh, 500px) * 1.7778));
    top: 50%;
  }

  .gje__quote, .gje__brand, .gje__badge, .gje__drag { display: none; }
  .gje__index, .gje__cue { display: none; }

  .gje__featured {
    position: relative;
    inset: auto;
    width: auto;
    padding: 28px clamp(20px, 6vw, 56px) 42px;
  }

  .gje__featured-name { font-size: 26px; }
  .gje__featured-desc { font-size: 14px; margin-bottom: 16px; }
  .gje__specs { gap: 12px; }
  .gje__tile { flex-basis: 44px; height: 44px; }
}

/* ------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  .gje__hang { animation: none; transition: none; }
  .gje__panel:hover .gje__hang { transform: none; }
  .gje__cue i { animation: none; }
  .gje__hangwrap, .gje__hangwrap.is-springing { transition: none; }
  .js .gje [data-reveal] { transform: none !important; transition: opacity 0.6s ease; }
}
