/* ---------- scroll story (home page) ---------- */
.story {
  position: relative;
  z-index: 1;
  background: #10261d;
}
.story-sticky {
  position: sticky;
  top: var(--story-top, 0px);
  height: calc(100vh - var(--story-top, 0px));
  height: calc(100svh - var(--story-top, 0px));
  overflow: hidden;
}
.story-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.story-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--scrim, 0);
  background: linear-gradient(90deg, rgba(246, 243, 236, 0.92) 0%, rgba(246, 243, 236, 0.7) 34%, rgba(246, 243, 236, 0) 58%);
}

.story-beat {
  position: absolute;
  z-index: 2;
  max-width: 520px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px);
  transition: opacity 0.45s ease, transform 0.6s cubic-bezier(.2, .7, .2, 1), visibility 0s linear 0.6s;
}
.story-beat.is-on {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.45s ease, transform 0.6s cubic-bezier(.2, .7, .2, 1), visibility 0s;
}
.story-beat--side { left: clamp(24px, 7vw, 120px); top: 50%; margin-top: -120px; }
.story-beat--bottom { left: clamp(24px, 6vw, 96px); right: clamp(24px, 6vw, 96px); bottom: clamp(40px, 6vh, 64px); max-width: none; display: flex; flex-wrap: wrap; align-items: flex-end; column-gap: 40px; }
.story-beat--bottom .story-eyebrow { flex-basis: 100%; }
.story-beat--bottom .story-title { font-size: clamp(30px, 3vw, 44px); margin-bottom: 0; }
.story-beat--bottom .story-text { margin: 0 0 4px; max-width: 420px; }
.story-beat--bottom .story-hint { margin-left: auto; margin-bottom: 6px; }
.story-beat--center { left: 50%; top: 50%; width: min(760px, calc(100% - 40px)); max-width: none; text-align: center; transform: translate(-50%, calc(-50% + 24px)); }
.story-beat--center.is-on { transform: translate(-50%, -50%); }

.story-eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.story-title {
  margin: 0 0 14px;
  font-family: var(--font-heading);
  font-size: clamp(34px, 4.6vw, 64px);
  line-height: 1.06;
  font-weight: 700;
}
.story-text {
  margin: 0 0 22px;
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.55;
  max-width: 440px;
}
.story-beat--center .story-text { margin-left: auto; margin-right: auto; }

.story-beat--light { color: #1E4D3B; }
.story-beat--light .story-eyebrow { color: #a8675b; }
.story-beat--light .story-text { color: #3b4a42; }
.story-beat--dark { color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35); }
.story-beat--dark .story-eyebrow { color: #E7CFC3; }
.story-beat--dark .story-text { color: rgba(255, 255, 255, 0.9); }

.story-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: 999px;
  background: #1E4D3B;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(30, 77, 59, 0.25);
  transition: background 0.2s, transform 0.2s;
}
.story-link:hover { background: #163B2D; transform: translateY(-2px); text-decoration: none; }

.story-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 0;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}
.story-hint span {
  width: 18px;
  height: 28px;
  border: 2px solid currentColor;
  border-radius: 10px;
  position: relative;
}
.story-hint span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 5px;
  width: 3px;
  height: 6px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: currentColor;
  animation: storyWheel 1.6s ease-in-out infinite;
}
@keyframes storyWheel {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(9px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

.story-stats {
  display: flex;
  justify-content: center;
  gap: clamp(20px, 5vw, 56px);
  margin: 10px 0 28px;
}
.story-stats div { display: flex; flex-direction: column; align-items: center; }
.story-stats strong {
  font-family: var(--font-heading);
  font-size: clamp(36px, 4.4vw, 58px);
  line-height: 1;
  color: #F3D9A6;
  font-variant-numeric: tabular-nums;
}
.story-stats span { margin-top: 6px; font-size: 14px; color: rgba(255, 255, 255, 0.85); }
.story-beat .story-btn { position: static; transform: none; display: inline-block; font-size: 17px; padding: 15px 38px; }

.story-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.18);
  z-index: 3;
}
.story-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #D4AF37, #E7CFC3);
}

/* keep the floating product thumbnails out of the way during the story */
body.in-story .side-float { opacity: 0; visibility: hidden; transition: opacity 0.3s; }
body .side-float { transition: opacity 0.3s; }

@media (max-width: 760px) {
  .story-scrim {
    background: linear-gradient(0deg, rgba(246, 243, 236, 0.97) 0%, rgba(246, 243, 236, 0.9) 34%, rgba(246, 243, 236, 0) 54%);
  }
  .story-beat--bottom { display: block; }
  .story-beat--bottom .story-title { margin-bottom: 10px; }
  .story-beat--bottom .story-text { margin-bottom: 12px; }
  .story-beat--side,
  .story-beat--bottom {
    left: 20px;
    right: 20px;
    top: auto;
    bottom: 34px;
    margin-top: 0;
    max-width: none;
  }
  .story-title { font-size: clamp(28px, 8vw, 38px); }
  .story-text { font-size: 15px; margin-bottom: 16px; }
  .story-eyebrow { font-size: 12px; margin-bottom: 8px; }
  .story-stats span { font-size: 12px; }
  .story-link { padding: 11px 18px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .story-beat, .story-beat.is-on { transition: none; }
  .story-hint span::after { animation: none; }
}
