.shop-intro {
  padding: clamp(26px, 4vw, 54px) 0;
}
.shop-intro-inner {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: end;
  gap: 18px 38px;
}
.shop-intro h1 {
  max-width: 24ch;
  margin-bottom: 16px;
  font-size: clamp(2.05rem, 4.2vw, 3.75rem);
  text-wrap: balance;
}
.shop-intro .hs {
  margin: 0;
  width: 100%;
}
.shop-intro .hs .btn {
  min-height: 44px;
  padding-inline: 18px;
}

body:has(.is-scroll-story) {
  overflow-x: clip;
}

.cake-story {
  --cake-ink: #351e22;
  --cake-muted: #704f55;
  --cake-accent: #8e253f;
  --cake-line: #e3bbb9;
  --cake-sticky-top: 70px;
  padding: 0;
  background: #fae9e6;
  color: var(--cake-ink);
}
.cake-story-stage {
  display: grid;
  align-items: center;
  padding-block: clamp(26px, 5vw, 58px);
}
.cake-story-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  grid-template-areas: "heading art" "steps art";
  align-items: center;
  gap: 20px clamp(28px, 6vw, 86px);
}
.cake-story-heading {
  grid-area: heading;
  align-self: end;
}
.cake-story-heading h2 {
  color: var(--cake-ink);
  font: 400 clamp(2.7rem, 5.15vw, 4.75rem)/.99 Georgia, 'Times New Roman', serif;
  letter-spacing: -.055em;
  text-wrap: balance;
}
.cake-story:lang(ne) h2 {
  font: 800 clamp(2.25rem, 4.4vw, 4rem)/1.2 var(--head);
  letter-spacing: normal;
}
.cake-story-hint {
  display: none;
  margin: 12px 0 0;
  color: var(--cake-muted);
}
.is-scroll-story .cake-story-hint {
  display: block;
}
.cake-story-steps {
  grid-area: steps;
  align-self: start;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cake-story-steps li {
  border-block-end: 1px solid var(--cake-line);
  padding: 9px 12px;
}
.cake-story-steps li[aria-current="step"] {
  background: #fff5ef;
  box-shadow: inset 3px 0 var(--cake-accent);
}
.cake-story-steps li b {
  color: var(--cake-accent);
}
.cake-story-steps li p {
  margin: 1px 0 0;
  color: var(--cake-muted);
  font-size: .91rem;
  line-height: 1.35;
}

.cake-story-art {
  grid-area: art;
  display: grid;
  justify-items: center;
  min-width: 0;
}
.cake-story-scene {
  position: relative;
  isolation: isolate;
  width: min(100%, 495px, 62svh);
  aspect-ratio: 1;
  background: radial-gradient(ellipse closest-side, #fff5eb 0, #f2d2cd 86%, transparent 100%);
}
.cake-story-scene::before {
  content: "";
  position: absolute;
  inset: 6%;
  z-index: -1;
  border: 1px solid #edc9c5;
  border-radius: 50%;
}
.cake-story-stack {
  position: absolute;
  inset: 0;
  transform: translateY(var(--cake-rise, -11%));
}
.cake-story-layer {
  position: absolute;
  left: 50%;
  bottom: var(--cake-base);
  display: block;
  width: 68%;
  height: var(--cake-layer-height);
  transform: translate3d(-50%, calc(-1 * var(--cake-lift, 0px)), 0);
}
.cake-story-plate {
  --cake-base: 6%;
  --cake-layer-height: 11%;
  width: 86%;
  filter: drop-shadow(0 12px 11px #641f2733);
}
.cake-story-base { --cake-base: 12%; --cake-layer-height: 17%; }
.cake-story-cream { --cake-base: 24%; --cake-layer-height: 10%; }
.cake-story-top { --cake-base: 30%; --cake-layer-height: 17%; }
.cake-story-ganache { --cake-base: 41%; --cake-layer-height: 13%; }
.cake-story-toppings {
  --cake-base: 49%;
  --cake-layer-height: 15%;
  width: 49%;
}
/* the scroll room must be real content: a sticky element cannot travel through its parent's padding */
.is-scroll-story .cake-story-track::after {
  content: "";
  display: block;
  height: clamp(550px, 88svh, 820px);
}
.is-scroll-story .cake-story-stage {
  position: sticky;
  top: var(--cake-sticky-top);
  min-height: calc(100svh - var(--cake-sticky-top));
}

@media (max-width: 760px) {
  .shop-intro-inner {
    grid-template-columns: minmax(0, 1fr);
  }
  .shop-intro .cta {
    gap: 8px;
  }
  .shop-intro .cta .btn {
    padding-inline: 15px;
  }
  .cake-story-stage {
    padding-block: 20px;
  }
  .is-scroll-story .cake-story-stage {
    min-height: calc(100svh - var(--cake-sticky-top) - 66px);
  }
  .cake-story-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "heading" "art" "steps";
    gap: 8px;
  }
  .cake-story-heading h2 {
    font-size: clamp(2.1rem, 8vw, 3.5rem);
  }
  .cake-story-hint {
    margin-top: 6px;
    font-size: .91rem;
  }
  .cake-story-scene {
    width: min(100%, 360px, 39svh);
  }
  .cake-story-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 10px;
  }
  .is-scroll-story .cake-story-steps {
    position: relative;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
    padding-bottom: 3.7em;
  }
  .is-scroll-story .cake-story-steps li {
    padding: 5px 1px;
    text-align: center;
    font-size: clamp(.69rem, 3.4vw, .94rem);
    overflow-wrap: anywhere;
  }
  .is-scroll-story .cake-story-steps li[aria-current="step"] {
    box-shadow: inset 0 -2px var(--cake-accent);
  }
  .is-scroll-story .cake-story-steps li p {
    position: absolute;
    top: 2.8em;
    left: 4px;
    right: 4px;
    margin: 0;
    text-align: start;
  }
  .is-scroll-story .cake-story-steps li:not([aria-current="step"]) p {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* while the layer pictures are still arriving: no half-drawn cake, only a soft pulse where it will appear */
.cake-story-stack { transition: opacity .35s ease; }
.cake-story.is-loading .cake-story-stack { opacity: 0; }
.cake-story.is-loading .cake-story-scene::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border: 4px solid rgba(142, 37, 63, .18);
  border-top-color: #8e253f;
  border-radius: 50%;
  animation: cake-story-spin .9s linear infinite;
}
@keyframes cake-story-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cake-story.is-loading .cake-story-scene::after { animation: none; } .cake-story-stack { transition: none; } }
