/* Scroll is the playhead. The stage stays still while the workshop transforms. */
.chocolate-story { position: relative; color: #f4e8d7; background: #18110f; scroll-margin-top: 0; --story-progress: 0; }
.story-sticky { position: relative; min-height: 960px; overflow: hidden; isolation: isolate; }
.story-backdrop { position: absolute; z-index: -1; inset: 0; background: radial-gradient(ellipse at 70% 64%,#70534430,transparent 56%),linear-gradient(110deg,#151110,#1d1713 70%,#100e0d); }
.story-backdrop::after { content:''; position:absolute; inset:0; opacity:.045; background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23fff' filter='url(%23n)' opacity='.7' d='M0 0h180v180H0z'/%3E%3C/svg%3E"); }
.story-heading { position: absolute; top: 127px; left: var(--gutter); right: var(--gutter); z-index: 5; display: flex; justify-content: space-between; gap: 16px; color: #9c8170; font-size: 8px; letter-spacing: 2px; }
.story-heading a { color: #bda28c; font-size: 10px; letter-spacing: .3px; text-decoration: none; }
.story-heading a span { margin-left: 13px; }
.story-heading > .story-ai-note { color:#d6b89a; font:10px/1.5 var(--sans,Arial,sans-serif); letter-spacing:.1px; }
.story-copy { position: relative; z-index: 3; padding: 200px 0 140px var(--gutter); width: 42%; pointer-events: none; }
.story-step { margin-bottom: 70px; }
.story-step a { pointer-events: auto; }
.story-eyebrow { margin-bottom: 28px; color: #e2b885; font-size: 10px; letter-spacing: 3px; }
.story-step h1,.story-step h2 { font-family:var(--serif); font-size: clamp(46px,4.7vw,76px); line-height: 1.02; letter-spacing: -.045em; font-weight:400; }
.story-step h1 em,.story-step h2 em { color: #d3a273; }
.story-step > p:not(.story-eyebrow) { margin-top: 26px; color: #bba795; font-size: 14px; line-height: 1.9; max-width: 330px; }
.story-instruction { display: flex; align-items: center; gap: 16px; margin-top: 44px; font-size: 8px; font-weight: 500; color: #e2c8aa; letter-spacing: 1.2px; }
.story-instruction > span[aria-hidden] { font-size: 26px; font-weight: 400; }
.story-result-link { display: inline-flex; align-items: center; gap: 24px; min-height: 48px; margin-top: 34px; padding-bottom: 7px; border-bottom: 1px solid #bc936b; color: #edcba0; font-size: 12px; text-decoration: none; }
.story-result-link > span { font-size: 24px; }
.story-visual { position: absolute; z-index: 1; left: 33%; right: 0; top: 130px; bottom: 80px; }
#chocolate-canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity .65s ease; outline: none; }
#story-fallback { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:50px; }
#story-fallback img { max-height:60vh; max-width:80%; width:auto; transform:rotate(10deg); filter:drop-shadow(25px 20px 24px #0008); }
#story-fallback > span { font:italic 21px var(--serif); color:#caa581; margin-top:30px; }
.story-bottom { position:absolute; bottom:32px; left:var(--gutter); right:var(--gutter); z-index:5; display:flex; align-items:center; justify-content:space-between; gap:30px; }
.story-chapters { display:flex; gap:34px; }
.story-chapters button { padding:12px 0; border:0; background:none; color:#967f71; font-size:11px; position:relative; transition:color .25s; }
.story-chapters button > span { margin-right:9px; font-size:8px; color:#826b5d; }
.story-chapters button.is-active { color:#f0d0a8; }
.story-chapters button.is-active > span { color:#d3a273; }
.story-chapters button::after { position:absolute; content:''; left:0; right:0; height:1px; background:#d3a273; bottom:5px; transform:scaleX(0); transform-origin:left; transition:transform .3s; }
.story-chapters button.is-active::after,.story-chapters button:hover::after { transform:scaleX(1); }
.story-caption { font-size:7px; color:#a58b77; letter-spacing:1.8px; }
.story-percent { font:italic 19px var(--serif); color:#cfaa86; min-width:50px; text-align:right; }
.story-track { position:absolute; top:-12px; left:0; right:0; height:1px; background:#70564055; }
.story-track > span { display:block; height:100%; transform:scaleX(0); transform-origin:left; background:#d3a273; }
.story-enhanced { height:560svh; }
.story-enhanced .story-sticky { position:sticky; top:0; height:100svh; min-height:0; }
.story-enhanced .story-copy { position:absolute; left:var(--gutter); width:38%; top:49%; transform:translateY(-50%); display:grid; padding:0; }
.story-enhanced .story-step { grid-area:1 / 1; margin:0; opacity:0; visibility:hidden; transform:translateY(22px); transition:opacity .5s,transform .65s var(--ease),visibility .5s; }
.story-enhanced .story-step.is-active { opacity:1; visibility:visible; transform:none; }
.story-enhanced .story-visual { top:95px; bottom:50px; }
.story-enhanced #chocolate-canvas { opacity:var(--scene-opacity,1); transition:none; }
.story-enhanced:not(.story-static) .story-step[aria-hidden='true'] { pointer-events:none; }
.story-static { height:auto; }
.story-static .story-sticky { position:relative; height:auto; min-height:100svh; }
.story-static .story-copy { position:relative; top:auto; left:0; transform:none; display:block; width:47%; padding:190px 0 150px var(--gutter); }
.story-static .story-step { position:relative; opacity:1; visibility:visible; transform:none; margin-bottom:60px; }
.story-static .story-instruction { display:none; }
.story-static .story-visual { top:220px; bottom:auto; height:70vh; left:45%; }
.story-static .story-chapters,.story-fallback .story-chapters { display:none; }
.story-fallback .story-visual { top:220px; bottom:auto; height:60vh; }
.product-finale .hero-inner { min-height:780px; padding-top:120px; }
.product-finale .hero-copy h2 { font-size:clamp(48px,5.8vw,86px); line-height:1.02; letter-spacing:-.045em; }
.product-finale .hero-copy h2 em { color:var(--gold); font-size:.88em; }
.product-finale .hero-copy > .eyebrow { font-size:8px; }
@media (max-width:1100px) {
  .story-step h1,.story-step h2 { font-size:54px; }
  .story-step > p:not(.story-eyebrow) { font-size:12px; max-width:290px; }
  .story-caption { display:none; }
  .story-chapters { gap:24px; }
  .story-visual { left:31%; }
  .story-heading { top:110px; }
  .story-instruction { font-size:7px; letter-spacing:.7px; }
}
@media (max-width:680px) {
  .story-heading { top:99px; left:24px; right:24px; }
  .story-heading > span { font-size:6px; letter-spacing:1.3px; }
  .story-heading a { font-size:8px; }
  .story-heading a span { margin-left:5px; }
  .story-enhanced:not(.story-static) { height:500svh; }
  .story-enhanced .story-copy { top:155px; left:24px; right:24px; width:auto; transform:none; }
  .story-step h1,.story-step h2 { font-size:clamp(38px,9.8vw,59px); line-height:1.02; }
  .story-eyebrow { font-size:8px; margin-bottom:14px; letter-spacing:2px; }
  .story-step > p:not(.story-eyebrow) { font-size:11px; max-width:320px; margin-top:16px; line-height:1.75; }
  .story-instruction { margin-top:17px; font-size:6px; gap:10px; letter-spacing:.5px; }
  .story-instruction > span[aria-hidden] { font-size:19px; }
  .story-visual,.story-enhanced:not(.story-static) .story-visual { left:-8%; right:-8%; top:38%; bottom:8%; }
  .story-bottom { left:24px; right:24px; bottom:24px; gap:10px; }
  .story-chapters { width:100%; justify-content:space-between; gap:13px; }
  .story-chapters button { font-size:10px; }
  .story-chapters button > span { display:block; margin:0 0 5px; font-size:7px; text-align:left; }
  .story-percent { display:none; }
  .story-result-link { font-size:10px; margin-top:16px; min-height:38px; }
  .story-copy,.story-static .story-copy { width:100%; padding:145px 24px 560px; }
  .story-step,.story-static .story-step { margin-bottom:40px; }
  .story-static .story-visual,.story-fallback .story-visual { top:auto; bottom:90px; left:0; right:0; height:450px; }
  .story-static .story-copy { left:0; right:auto; top:auto; transform:none; }
  .story-static .story-bottom,.story-fallback .story-bottom { min-height:30px; }
  .story-static .story-caption,.story-fallback .story-caption { display:block; font-size:6px; }
  #story-fallback { padding:35px; }
  #story-fallback img { max-height:370px; }
  #story-fallback > span { font-size:17px; }
  .product-finale .hero-inner { min-height:0; padding-top:65px; }
  .product-finale .hero-copy h2 { font-size:49px; }
}
@media (max-height:720px) and (min-width:681px) {
  .story-heading { top:100px; }
  .story-enhanced .story-copy { top:48%; }
  .story-step h1,.story-step h2 { font-size:49px; }
  .story-eyebrow { margin-bottom:20px; }
  .story-instruction { margin-top:25px; }
  .story-step > p:not(.story-eyebrow) { margin-top:18px; }
}
@media (max-width:680px) and (max-height:750px) {
  .story-heading { top:92px; }
  .story-enhanced .story-copy { top:132px; }
  .story-step h1,.story-step h2 { font-size:36px; }
  .story-step > p:not(.story-eyebrow) { font-size:10px; margin-top:12px; }
  .story-instruction { display:none; }
  .story-visual,.story-enhanced:not(.story-static) .story-visual { top:39%; bottom:8%; }
}
@media (prefers-reduced-motion:reduce) { .story-enhanced .story-step { transition:none; } }

/* Photographic chapters: the image is the stage, with readable editorial copy. */
.story-cinematic.story-enhanced:not(.story-static) { height:580svh; }
.story-cinematic.story-enhanced:not(.story-static) .story-visual { inset:0; }
.story-cinematic.story-enhanced:not(.story-static) .story-visual::after {
  content:''; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(90deg,rgba(13,9,7,.94) 0%,rgba(13,9,7,.8) 24%,rgba(13,9,7,.43) 44%,rgba(13,9,7,.04) 72%),linear-gradient(0deg,rgba(13,9,7,.88),transparent 24%,transparent 78%,rgba(13,9,7,.3));
}
.story-cinematic.story-enhanced #chocolate-canvas { opacity:1; }
.story-cinematic.story-enhanced:not(.story-static) .story-copy { top:52%; width:38%; max-width:610px; text-shadow:0 3px 28px rgba(0,0,0,.3); }
.story-cinematic .story-heading { color:#ccb396; }
.story-cinematic .story-heading a { color:#e2cdb5; }
.story-cinematic .story-step > p:not(.story-eyebrow) { color:#e0cbbb; }
.story-cinematic .story-eyebrow { color:#e5ba85; }
.story-cinematic .story-chapters button { color:#c2aa96; }
.story-cinematic .story-chapters button.is-active { color:#fff2dc; }
.story-cinematic .story-caption { color:#bda48d; }
.story-cinematic.story-static .story-visual { border-radius:2px; overflow:hidden; }
@media (max-width:680px) {
  .story-cinematic.story-enhanced:not(.story-static) { height:620svh; }
  .story-cinematic.story-enhanced:not(.story-static) .story-copy { top:155px; width:auto; max-width:none; }
  .story-cinematic.story-enhanced:not(.story-static) .story-visual::after {
    background:linear-gradient(180deg,rgba(13,9,7,.64) 0%,rgba(13,9,7,.76) 23%,rgba(13,9,7,.63) 38%,rgba(13,9,7,.04) 65%,rgba(13,9,7,.8) 100%);
  }
  .story-cinematic .story-step > p:not(.story-eyebrow) { max-width:300px; }
  .story-cinematic .story-bottom { bottom:23px; }
  .story-cinematic .story-chapters button { color:#dbc3ab; }
  .story-cinematic .story-track { background:rgba(237,210,174,.26); }
  .story-cinematic .story-chapters button > span { color:#d4b894; }
}
@media (max-width:680px) and (max-height:750px) {
  .story-cinematic.story-enhanced:not(.story-static) .story-copy { top:132px; }
}

/* The same stage serves the film and its still-image alternative. */
.story-chapters button:disabled { opacity:.4; cursor:wait; }
.film-only .site-header.is-scrolled { backdrop-filter:none; }
