/* home – story (premium v2): ABOUT reveal after the chocolate pour + PROCESS trail drawing */

/* =========================================================
   ABOUT – content waits under the pour, then reveals once
   (.story-gate / .is-poured are set by the pour in main.js;
   without them – reduced motion, no JS – the normal .reveal applies)
   ========================================================= */
.page--home .about.story-gate:not(.is-poured) .reveal {
  opacity: 0; translate: 0 var(--rv, 28px); transition-duration: .25s; transition-delay: 0s;
}

/* heart badge settles in */
.page--home .about.story-gate .heart-badge {
  scale: .86; rotate: -5deg; opacity: 0;
  transition: scale 1.7s cubic-bezier(.22, 1.25, .36, 1) .05s, rotate 1.9s cubic-bezier(.22, 1.2, .36, 1) .05s, opacity .9s var(--ease-out) .05s;
}
.page--home .about.story-gate.is-poured .reveal.is-in .heart-badge { scale: 1; rotate: 0deg; opacity: 1; }
.page--home .about.story-gate .heart-badge__shape.unveil { clip-path: circle(0% at 50% 42%); transition: clip-path 1.5s cubic-bezier(.65, 0, .25, 1) .2s, filter 1s; }
.page--home .about.story-gate.is-poured .is-in .heart-badge__shape.unveil { clip-path: circle(100% at 50% 42%); }
.page--home .about.story-gate .heart-badge__shape img { scale: 1.12; transition: transform 1s var(--ease-out), scale 2.2s var(--ease-out) .2s; }
.page--home .about.story-gate.is-poured .is-in .heart-badge__shape img { scale: 1; }
.page--home .about.story-gate .heart-badge__bow { opacity: 0; scale: .3; translate: 0 -24px; transition: opacity .5s ease 1s, scale .9s var(--ease-bounce) 1s, translate .9s var(--ease-bounce) 1s; }
.page--home .about.story-gate.is-poured .is-in .heart-badge__bow { opacity: 1; scale: 1; translate: 0 0; }
.page--home .about.story-gate .heart-badge__tag { opacity: 0; scale: .8; transition: opacity .6s ease 1.15s, scale .9s var(--ease-bounce) 1.15s; }
.page--home .about.story-gate.is-poured .is-in .heart-badge__tag { opacity: 1; scale: 1; }

/* copy: kicker → name (script wipe, word by word) → paragraph → perks one by one */
.page--home .about.story-gate .about__hi { --d: .2s !important; }
.page--home .about.story-gate .about__name { --d: .3s !important; --rv: 0px; }
.page--home .about.story-gate .about__text > p:not(.about__hi) { --d: 1.05s !important; }
.page--home .about.story-gate .perks li:nth-child(1) { --d: 1.25s !important; }
.page--home .about.story-gate .perks li:nth-child(2) { --d: 1.4s !important; }
.page--home .about.story-gate .perks li:nth-child(3) { --d: 1.55s !important; }

.page--home .about.story-gate .about__name .sw {
  display: inline-block;
  clip-path: inset(-35% 100% -45% 0);
  translate: -10px 0;
  transition: clip-path 1.25s cubic-bezier(.65, 0, .3, 1) var(--sd, .35s), translate 1.5s var(--ease-out) var(--sd, .35s);
}
.page--home .about.story-gate.is-poured .about__name.is-in .sw { clip-path: inset(-35% -25% -45% -25%); translate: 0 0; }

.page--home .about.story-gate .perks li.reveal { translate: 30px 0; }
.page--home .about.story-gate.is-poured .perks li.reveal.is-in { translate: 0 0; }
.page--home .about.story-gate .perks svg { scale: 0; rotate: -40deg; transition: scale .8s var(--ease-bounce), rotate .9s var(--ease-out); transition-delay: calc(var(--d, 0s) + .3s); }
.page--home .about.story-gate.is-poured .perks li.is-in svg { scale: 1; rotate: 0deg; }

/* phones: the pour finishes while the copy is still below the fold, so keep delays short */
@media (max-width: 900px) {
  .page--home .about.story-gate .about__hi { --d: 0s !important; }
  .page--home .about.story-gate .about__name { --d: .05s !important; }
  .page--home .about.story-gate .about__name .sw { --sd: .1s; }
  .page--home .about.story-gate .about__name .sw + .sw { --sd: .35s; }
  .page--home .about.story-gate .about__text > p:not(.about__hi) { --d: .15s !important; }
  .page--home .about.story-gate .perks li:nth-child(n) { --d: .1s !important; }
  .page--home .about.story-gate .perks li.reveal { translate: 0 22px; }
}

/* =========================================================
   PROCESS – the trail draws itself, paws step along,
   each card arrives as the line reaches it
   ========================================================= */
.page--home .trail__ink { fill: none; stroke: var(--choco); stroke-width: 4; stroke-dasharray: 2 14; stroke-linecap: round; }
.page--home .trail--story #trailPath { opacity: .38; }
.page--home .trail__nose {
  position: absolute; left: 0; top: 0; z-index: 1; width: 22px; height: 22px; margin: -11px 0 0 -11px;
  pointer-events: none; opacity: 0; transition: opacity .5s ease; will-change: transform;
}
.page--home .trail__nose::before {
  content: ""; position: absolute; inset: -9px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(185,139,144,.45), rgba(185,139,144,0));
}
.page--home .trail__nose svg { position: relative; width: 100%; height: 100%; fill: var(--rose); filter: drop-shadow(0 3px 4px rgba(59,32,20,.3)); }
.page--home .trail__nose.is-on { opacity: 1; }

.page--home .trail--story .tp { transform: rotate(var(--a)) translateY(10px) scale(.3); opacity: 0; transition: transform .7s var(--ease-bounce), opacity .45s ease; }
.page--home .trail--story .tp.is-step { transform: rotate(var(--a)) scale(1); opacity: .85; }

.page--home .trail--story .step {
  transition: transform .6s var(--ease-bounce), opacity .9s var(--ease-out), translate 1.2s var(--ease-out), scale 1.2s var(--ease-out), box-shadow .6s var(--ease-out), outline-color .5s;
}
.page--home .trail--story .step.reveal:not(.is-reached) { opacity: 0; translate: 0 46px; scale: .95; }
.page--home .trail--story .step.reveal.is-reached { opacity: 1; translate: 0 0; scale: 1; }
.page--home .trail--story .step__n { scale: 0; rotate: -90deg; transition: transform .7s var(--ease-bounce), scale .8s var(--ease-bounce) .3s, rotate 1s var(--ease-out) .3s; }
.page--home .trail--story .step.is-reached .step__n { scale: 1; rotate: 0deg; }
.page--home .trail--story .step h3, .page--home .trail--story .step p { opacity: 0; translate: 0 10px; transition: opacity .8s var(--ease-out) .35s, translate 1s var(--ease-out) .35s; }
.page--home .trail--story .step p { transition-delay: .45s; }
.page--home .trail--story .step.is-reached h3, .page--home .trail--story .step.is-reached p { opacity: 1; translate: 0 0; }

/* refined hover */
.page--home .step__n::after {
  content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 1.5px solid var(--rose);
  opacity: 0; scale: .8; transition: opacity .4s ease, scale .6s var(--ease-out); pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .page--home .step:hover { transform: translateY(-8px); outline-color: var(--rose); box-shadow: 0 40px 70px -30px rgba(59,32,20,.5), 0 14px 24px -14px rgba(59,32,20,.3); }
  .page--home .step:hover .step__n { transform: scale(1.08) rotate(-8deg); }
  .page--home .step:hover .step__n::after { opacity: .9; scale: 1; }
}

/* phones: a stitched line draws down to the next card */
@media (max-width: 560px) {
  .page--home .trail--story .step:not(:last-child)::after { clip-path: inset(0 0 100% 0); transition: clip-path 1s cubic-bezier(.65, 0, .3, 1) .55s; }
  .page--home .trail--story .step.is-reached:not(:last-child)::after { clip-path: inset(0 0 0 0); }
}
@media (max-width: 1080px) { .page--home .trail__nose { display: none; } }

/* reduced motion: everything visible and still */
@media (prefers-reduced-motion: reduce) {
  .page--home .about .reveal, .page--home .about .heart-badge, .page--home .about .heart-badge__bow, .page--home .about .heart-badge__tag,
  .page--home .about .perks svg, .page--home .about__name .sw { opacity: 1 !important; translate: none !important; scale: none !important; rotate: none; clip-path: none !important; }
  .page--home .trail--story .step, .page--home .trail--story .step__n, .page--home .trail--story .step h3, .page--home .trail--story .step p, .page--home .trail--story .tp.is-step { opacity: 1; translate: none; scale: none; }
  .page--home .trail__nose { display: none; }
}

/* ---------- chocolate smear: spread across the bottom of "Warum", the pour continues below ---------- */
.page--home .why { position: relative; padding-bottom: calc(104px + clamp(70px, 9vw, 130px)); }
.page--home .why__smear {
  position: absolute; left: 0; bottom: -1px; width: 100%; height: clamp(110px, 12vw, 170px); z-index: 0; pointer-events: none;
  filter: drop-shadow(0 -4px 10px rgba(59,32,20,.12));
  clip-path: inset(0 100% 0 0); transition: clip-path 2s cubic-bezier(.65, 0, .25, 1);
}
.page--home .why__smear.is-in { clip-path: inset(0 0 0 0); }
.page--home .why > .container { position: relative; z-index: 1; }
@media (max-width: 760px) { .page--home .why { padding-bottom: calc(76px + 60px); } }
@media (prefers-reduced-motion: reduce) { .page--home .why__smear { clip-path: none; transition: none; } }
