/* ==========================================================================
   Hero: glass slider, ken-burns drift, gold ring, sparkles
   ========================================================================== */

.hero {
  position: relative;
  min-height: 640px;
  height: min(820px, 88svh);
  max-height: 880px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background: var(--green-darkest);
}

.hero-slides,
.hero-shade { position: absolute; inset: 0; }

.hero-slides { z-index: 0; }

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1100ms var(--ease-glass);
}

.hero-slide.is-active { opacity: 1; }

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
}

/* Slow ken-burns on the visible slide only. */
.hero-slide.is-active img {
  animation: ken-burns 11s var(--ease-glass) both;
}

@keyframes ken-burns {
  from { transform: scale(1.02); }
  to   { transform: scale(1.1); }
}

/* Directional shade: dark side follows the reading direction. */
.hero-shade {
  z-index: 1;
  background:
    radial-gradient(ellipse at 80% 8%, rgba(215, 194, 148, .16), transparent 42%),
    linear-gradient(
      270deg,
      rgba(8, 29, 24, .9) 0%,
      rgba(10, 31, 26, .72) 36%,
      rgba(10, 31, 26, .22) 74%,
      rgba(10, 31, 26, .08) 100%
    );
  pointer-events: none;
}

/* Cursor-follow gold bloom. JS sets --gx / --gy. */
.hero::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: radial-gradient(
    520px circle at var(--gx, 70%) var(--gy, 25%),
    rgba(246, 236, 210, .14),
    transparent 62%
  );
  content: "";
  opacity: 0;
  transition: opacity var(--dur-slow) ease;
  pointer-events: none;
}

.hero:hover::after { opacity: 1; }

/* --- Sparkles: pure CSS gold dust -------------------------------------- */

.hero-sparkles {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
}

.hero-sparkles i {
  position: absolute;
  width: 4px;
  height: 4px;
  background: radial-gradient(circle, var(--gold-bright), rgba(215, 194, 148, 0) 70%);
  border-radius: 50%;
  opacity: 0;
  animation: sparkle 6s ease-in-out infinite;
}

.hero-sparkles i::before {
  position: absolute;
  inset: -3px;
  background: linear-gradient(var(--gold-bright), transparent),
              linear-gradient(90deg, var(--gold-bright), transparent);
  background-size: 1px 100%, 100% 1px;
  background-position: center, center;
  background-repeat: no-repeat;
  content: "";
  opacity: .8;
}

.hero-sparkles i:nth-child(1) { top: 22%; inset-inline-start: 12%; animation-delay: 0s; }
.hero-sparkles i:nth-child(2) { top: 64%; inset-inline-start: 26%; animation-delay: .9s; }
.hero-sparkles i:nth-child(3) { top: 34%; inset-inline-start: 46%; animation-delay: 1.8s; }
.hero-sparkles i:nth-child(4) { top: 76%; inset-inline-start: 58%; animation-delay: 2.6s; }
.hero-sparkles i:nth-child(5) { top: 18%; inset-inline-start: 72%; animation-delay: 3.4s; }
.hero-sparkles i:nth-child(6) { top: 52%; inset-inline-start: 84%; animation-delay: 4.2s; }
.hero-sparkles i:nth-child(7) { top: 86%; inset-inline-start: 38%; animation-delay: 5s; }

@keyframes sparkle {
  0%, 100%  { opacity: 0; transform: scale(.4) rotate(0deg); }
  8%        { opacity: 1; transform: scale(1.5) rotate(25deg); }
  22%       { opacity: 0; transform: scale(.5) rotate(60deg); }
}

/* --- Hero content ------------------------------------------------------- */

.hero-content {
  position: relative;
  z-index: 3;
  padding-block: var(--space-2xl) var(--space-3xl);
}

.hero h1 {
  max-width: 15ch;
  margin: 0;
  font-size: var(--fs-display);
  font-weight: 700;
  line-height: 1.22;
  text-shadow: 0 2px 30px rgba(6, 20, 16, .4);
}

.hero-description {
  max-width: 52ch;
  margin: var(--space-md) 0 0;
  color: rgba(255, 255, 255, .86);
  font-size: var(--fs-lead);
  line-height: 2;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-lg);
}

/* --- Hero footer row ---------------------------------------------------- */

.hero-bottom {
  position: absolute;
  z-index: 3;
  inset-inline: 0;
  bottom: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.hero-location {
  color: rgba(255, 255, 255, .8);
  font-size: var(--fs-micro);
}

.hero-location i {
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-inline: 7px;
  vertical-align: middle;
  background: var(--gold-light);
  transform: rotate(45deg);
}

.hero-controls {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 7px 10px;
  border-color: var(--glass-border-dark);
  background: var(--glass-bg-dark);
  border-radius: var(--radius-pill);
  box-shadow: var(--glass-sheen-dark), var(--glass-shadow-dark);
}

.hero-nav {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 50%;
  cursor: pointer;
  transition: color var(--dur-fast) ease, background var(--dur-fast) ease, border-color var(--dur-fast) ease, transform var(--dur-mid) var(--ease-spring);
}

.hero-nav:hover {
  color: var(--green-darkest);
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: scale(1.08);
}

.hero-count {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding-inline: 4px;
  color: rgba(255, 255, 255, .72);
  font-size: var(--fs-micro);
  direction: ltr;
}

.hero-count b {
  color: #fff;
  font-weight: 600;
}

.hero-count i {
  width: 18px;
  height: 1px;
  background: rgba(255, 255, 255, .5);
}

/* Gold ring that fills over the autoplay interval. */
.hero-ring {
  position: absolute;
  inset-inline-start: -7px;
  top: 50%;
  width: 30px;
  height: 30px;
  transform: translateY(-50%) rotate(-90deg);
  pointer-events: none;
}

.hero-ring circle {
  fill: none;
  stroke-width: 2;
}

.hero-ring-track { stroke: rgba(255, 255, 255, .18); }

.hero-ring-value {
  stroke: var(--gold-light);
  stroke-linecap: round;
  stroke-dasharray: 100.5;
  stroke-dashoffset: calc(100.5 - (100.5 * var(--ring, 0)));
  transition: stroke-dashoffset 220ms linear;
}

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 780px) {
  .hero {
    min-height: 600px;
    height: calc(100svh - var(--header-height) - 40px);
    max-height: 760px;
    justify-content: flex-end;
  }

  .hero-slide img { object-position: 54% center; }

  .hero-shade {
    background:
      radial-gradient(ellipse at 78% 10%, rgba(215, 194, 148, .14), transparent 46%),
      linear-gradient(0deg, rgba(8, 29, 24, .92) 0%, rgba(10, 31, 26, .66) 48%, rgba(10, 31, 26, .08) 100%);
  }

  .hero-content { padding-block: 0 calc(var(--space-3xl) + 10px); }
  .hero h1 { max-width: 18ch; }
  .hero-description { margin-top: var(--space-sm); }
  .hero-actions { margin-top: var(--space-md); }
  .hero-bottom { bottom: var(--space-sm); }
  .hero-controls { padding: 5px 8px; gap: var(--space-2xs); }
  .hero-nav { width: 32px; height: 32px; }
}

@media (max-width: 390px) {
  .hero-actions .button { width: 100%; }
  .hero-location { font-size: .56rem; }
}
