/* ============================================================
   HERO — Grand Gelato Jars (scroll-driven flavor wheel)
   Όλα scoped κάτω από .hero-jars ώστε να μη "διαρρέει"
   τίποτα στο υπόλοιπο site. Κληρονομεί τις CSS μεταβλητές
   (--chocolate-plum, --pink-orchid κ.λπ.) από το style.css.
   ============================================================ */

.hero-jars {
  position: relative;
  height: 300vh;  
  padding: 0;          
}

.hero-jars .cinematic-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height, 80px);
}

.hero-jars .flavor-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
  radial-gradient(circle at 72% 45%, color-mix(in srgb, var(--flavor-color, #E6ADCE) 45%, transparent) 0%, transparent 45%),
  linear-gradient(160deg, var(--mint-cream) 0%, #E3F0EB 100%);
  transition: background 1.4s ease;
}

.hero-jars .particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-jars .particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  animation: hjFloatParticle 12s linear infinite;
}

@keyframes hjFloatParticle {
  0%   { transform: translateY(110vh) translateX(0) scale(0);    opacity: 0; }
  10%  { transform: translateY(95vh) scale(1);                   opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-10vh) translateX(30px) scale(0.5); opacity: 0; }
}

.hero-jars .cinematic-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  align-items: center;
  gap: 3rem;
  max-width: var(--max-width, 1280px);
  margin: 0 auto;
  width: 100%;
  padding: 0 2rem;
}

/* Reordered hero items (overline + title out of .jars-text) */
.hero-jars .cinematic-inner > .overline      { grid-column: 1; grid-row: 1; align-self: end; }
.hero-jars .cinematic-inner > .jars-title    { grid-column: 1; grid-row: 2; }
.hero-jars .cinematic-inner > .showcase-stage{ grid-column: 2; grid-row: 1 / 4; align-self: center; }
.hero-jars .cinematic-inner > .jars-text     { grid-column: 1; grid-row: 3; align-self: start; }

.hero-jars .cinematic-inner > .overline {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pink-orchid);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.hero-jars .cinematic-inner > .overline::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--pink-orchid);
}

.hero-jars .cinematic-inner > .jars-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.05;
  margin: 1rem 0 1.5rem;
}
.hero-jars .cinematic-inner > .jars-title .accent { color: var(--pink-orchid); }

.hero-jars .flavor-display { margin: 1rem 0 1.5rem; min-height: 64px; }
.hero-jars .flavor-display .label {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--rosy-granite);
  margin-bottom: 0.5rem;
  display: block;
}
.hero-jars .flavor-display .name {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--chocolate-plum);
}
.hero-jars .flavor-display .name .char {
  display: inline-block;
  animation: hjCharIn 0.4s ease backwards;
}

.hero-jars .jars-text p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--rosy-granite);
  margin-bottom: 2rem;
  max-width: 460px;
}

.hero-jars .jars-text .badge {
  display: inline-block;
  background: rgba(230, 173, 206, 0.2);
  color: var(--chocolate-plum);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  border: 1px dashed var(--pink-orchid);
}

.hero-jars .cta-btn {
  display: inline-block;
  background: var(--chocolate-plum);
  color: var(--mint-cream);
  padding: 1rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s;
}
.hero-jars .cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(92, 71, 72, 0.25);
}

/* --- Scroll-down hint --- */
.hero-jars .scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.hero-jars .scroll-hint-label {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--rosy-granite);
}
.hero-jars .scroll-hint-chevron {
  position: relative;
  width: 1.6px;
  height: 18px;
  background: var(--pink-orchid);
  animation: hjScrollBounce 1.8s ease-in-out infinite;
}
.hero-jars .scroll-hint-chevron::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 7px;
  height: 7px;
  border-right: 1.6px solid var(--pink-orchid);
  border-bottom: 1.6px solid var(--pink-orchid);
  transform: translateX(-50%) rotate(45deg);
}
@keyframes hjScrollBounce {
  0%, 100% { transform: translateY(0);   opacity: 0.5; }
  50%      { transform: translateY(5px); opacity: 1; }
}

@keyframes hjCharIn {
  from { opacity: 0; transform: translateY(20px) scale(0.8); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Showcase / jar wheel --- */
.hero-jars .showcase-stage {
  position: relative;
  height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%);
}

.hero-jars .jar-belt { position: absolute; inset: 0; }

.hero-jars .jar-item {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 300px;
  height: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 1.1s cubic-bezier(0.65, 0, 0.35, 1),
              opacity 1.1s cubic-bezier(0.65, 0, 0.35, 1);
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 22px 34px rgba(92, 71, 72, 0.25));
}

.hero-jars .jar-item .placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, var(--ph-color, #d4a8b8) 0%, var(--ph-color-dark, #b09080) 100%);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 1rem;
  color: var(--chocolate-plum);
}
.hero-jars .jar-item .placeholder-name {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.3rem;
  text-align: center;
}
.hero-jars .jar-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.hero-jars .flavor-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.6rem;
  align-items: center;
  z-index: 50;
}
.hero-jars .flavor-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(92, 71, 72, 0.2);
  transition: all 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}
.hero-jars .flavor-dot.active {
  width: 32px;
  border-radius: 4px;
  background: var(--chocolate-plum);
}

.hero-jars .flavor-counter {
  position: absolute;
  bottom: -1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rosy-granite);
  white-space: nowrap;
  font-weight: 500;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .hero-jars { height: 550vh; }
  /* Center content below the navbar (base stage already has padding-top: nav-height) */
  .hero-jars .cinematic-stage {
    align-items: center;
    padding-bottom: 0.5rem;
  }
  /* Flat background on mobile (removes the colored gradient "box") */
  .hero-jars .flavor-bg { background: var(--mint-cream) !important; }
  .hero-jars .cinematic-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    grid-template-columns: none;
    gap: 0.4rem;
    padding: 0 1.5rem;
  }
  .hero-jars .cinematic-inner > .overline,
  .hero-jars .cinematic-inner > .jars-title,
  .hero-jars .cinematic-inner > .showcase-stage,
  .hero-jars .cinematic-inner > .jars-text { grid-column: auto; grid-row: auto; align-self: auto; }
  .hero-jars .cinematic-inner > .jars-title { margin: 0.1rem 0; }
  /* FIXED height (definite) so the absolute jars (top:50%) render correctly */
  .hero-jars .showcase-stage { flex: 0 0 42vh; height: 42vh; min-height: 300px; }
  .hero-jars .jar-item { width: 160px; height: 185px; top: 50%; }
  .hero-jars .flavor-display { margin: 0.1rem 0; min-height: 0; }
  .hero-jars .jars-text p { margin: 0.25rem 0 0.6rem; font-size: 0.9rem; }
  .hero-jars .flavor-counter { display: none; }
  .hero-jars .flavor-dots { bottom: 0.3rem; }
  /* Scroll hint -> top-right empty area, beside the title */
  .hero-jars .scroll-hint {
    top: calc(var(--nav-height, 56px) + 5.5rem);
    right: 1.75rem;
    bottom: auto;
    left: auto;
    transform: none;
  }
  /* Centre the CTA button (name + text stay left-aligned) */
  .hero-jars .jars-text .cta-btn {
    display: block;
    width: -moz-fit-content;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
  }
}

/* --- Entrance animations (μετά τον preloader) --- */
.hero-jars .cinematic-inner > .overline,
.hero-jars .cinematic-inner > .jars-title,
.hero-jars .jars-text > *,
.hero-jars .showcase-stage {
  opacity: 0;
}

body.hero-ready .hero-jars .cinematic-inner > .overline,
body.hero-ready .hero-jars .cinematic-inner > .jars-title,
body.hero-ready .hero-jars .jars-text > * {
  animation: hjTextIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
body.hero-ready .hero-jars .cinematic-inner > .overline   { animation-delay: 0.10s; }
body.hero-ready .hero-jars .cinematic-inner > .jars-title { animation-delay: 0.20s; }
body.hero-ready .hero-jars .jars-text > *:nth-child(1) { animation-delay: 0.35s; }
body.hero-ready .hero-jars .jars-text > *:nth-child(2) { animation-delay: 0.45s; }
body.hero-ready .hero-jars .jars-text > *:nth-child(3) { animation-delay: 0.55s; }

body.hero-ready .hero-jars .showcase-stage {
  animation: hjShowcaseIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.35s;
}

@keyframes hjTextIn {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes hjShowcaseIn {
  from { opacity: 0; transform: translateY(34px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Accessibility: όποιος έχει reduced motion, να τα βλέπει κανονικά */
@media (prefers-reduced-motion: reduce) {
  .hero-jars .cinematic-inner > .overline,
  .hero-jars .cinematic-inner > .jars-title,
  .hero-jars .jars-text > *,
  .hero-jars .showcase-stage {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }
}