/* Większe ilustracje ułatwiają zauważenie ruchu także na telefonie. */
.step-top { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.process-icon { width:108px; height:108px; flex:0 0 auto; display:grid; place-items:center; border:1px solid #e2d4c3; border-radius:50%; background:#f8f2e9; color:#80513f; }
.process-icon svg { display:block; width:88px; height:88px; overflow:visible; }
@media (max-width:650px) { .process-icon { width:88px; height:88px; } .process-icon svg { width:72px; height:72px; } }
@media (max-width:380px) { .process-icon { width:72px; height:72px; } .process-icon svg { width:60px; height:60px; } }

/* Ozdobna animacja rozmowy po odkryciu etapu. */
@media (prefers-reduced-motion: no-preference) {
  #produkcja.process-motion-enabled .step.is-process-active .nesto-phone-mouth {
    transform-box: fill-box;
    transform-origin: center;
    animation: nesto-phone-talking 2.2s ease-in-out 1;
  }
  #produkcja.process-motion-enabled .step.is-process-active .nesto-phone-voice {
    animation: nesto-phone-speaking 2.2s ease-in-out 1;
  }
}
@keyframes nesto-phone-talking {
  0%, 100% { transform: scaleY(.35); }
  15%, 45%, 75% { transform: scaleY(1); }
  30%, 60%, 90% { transform: scaleY(.35); }
}
@keyframes nesto-phone-speaking {
  0%, 100% { opacity: .45; }
  25%, 65% { opacity: 1; }
  45%, 85% { opacity: .35; }
}

/* Na rysunku dłoń prowadzi ołówek wzdłuż krawędzi pokrowca. */
@media (prefers-reduced-motion: no-preference) {
  #produkcja.process-motion-enabled .step.is-process-active .nesto-design-hand {
    animation: nesto-design-pencil 2.2s ease-in-out 1;
  }
  #produkcja.process-motion-enabled .step.is-process-active .nesto-design-line {
    stroke-dasharray: 100;
    animation: nesto-design-draw 2.2s ease-in-out 1;
  }
}
@keyframes nesto-design-pencil {
  0%, 8% { transform: translateY(0); }
  70%, 86% { transform: translateY(38px); }
  100% { transform: translateY(0); }
}
@keyframes nesto-design-draw {
  0%, 8% { stroke-dashoffset: 100; }
  70%, 86% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 100; }
}

/* Rysunki czynności poruszają się po odkryciu karty. */
@media (prefers-reduced-motion: no-preference) {
  #produkcja.process-motion-enabled .step.is-process-active .nesto-print-stamp {
    animation: nesto-print-press 2.2s ease-in-out 1;
  }
  #produkcja.process-motion-enabled .step.is-process-active .nesto-print-mark {
    animation: nesto-print-ink 2.2s ease-in-out 1;
  }
  #produkcja.process-motion-enabled .step.is-process-active .nesto-sew-needle {
    animation: nesto-sew-needle 0.55s ease-in-out 4;
  }
  #produkcja.process-motion-enabled .step.is-process-active .nesto-sew-fabric {
    animation: nesto-sew-fabric 2.2s ease-in-out 1;
  }
}
@keyframes nesto-print-press { 0%, 100% { transform: translateY(0); } 40%, 62% { transform: translateY(8px); } }
@keyframes nesto-print-ink { 0%, 26% { opacity: 0; } 55%, 100% { opacity: 1; } }
@keyframes nesto-sew-needle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@keyframes nesto-sew-fabric { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-4px); } }

/* Delikatne wyróżnienie aktualnego etapu. */
@media (prefers-reduced-motion: no-preference) {
  .process-icon { transition: background-color 400ms ease, border-color 400ms ease, box-shadow 400ms ease; }
  #produkcja.process-motion-enabled .step.is-process-active .process-icon { background:#f3e6d8; border-color:#ab826b; box-shadow:0 0 0 3px rgba(171,130,107,.12); }
}

/* Dekoracyjna nakładka imituje ściegi; oryginalny tekst pozostaje dostępny. */
#produkcja .step h3 { position:relative; width:fit-content; max-width:100%; font-kerning:none; font-variant-ligatures:none; }
.embroidery-overlay { display:none; }
@media (prefers-reduced-motion: no-preference) {
  #produkcja.process-motion-enabled .step.is-process-active h3.embroidery-ready { color:transparent; }
  #produkcja.process-motion-enabled .step.is-process-active .embroidery-overlay {
    display:block; position:absolute; inset:0; color:#713c41; pointer-events:none; user-select:none;
  }
  .embroidery-word { display:inline-block; white-space:nowrap; }
  .embroidery-letter { display:inline-block; color:#713c41; text-shadow:.35px .35px 0 #b98775; animation:nesto-stitch 360ms steps(3,end) both; animation-delay:var(--stitch-delay, 0ms); }
  @supports ((background-clip:text) or (-webkit-background-clip:text)) {
    .embroidery-letter { background:repeating-linear-gradient(135deg,#713c41 0 2px,#a96f5e 2px 3px); background-clip:text; -webkit-background-clip:text; -webkit-text-fill-color:transparent; }
  }
  #produkcja.process-motion-enabled .step.is-process-active h3:not(.embroidery-multiline) .embroidery-overlay::after {
    content:''; position:absolute; left:0; top:-.42em; width:12px; height:23px; opacity:0;
    background:center/contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 24'%3E%3Cpath d='M6 2v19M4 3a2 2 0 1 1 4 0v2H4z' fill='none' stroke='%2380513f' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
    animation:nesto-stitch-needle 1.95s linear both;
  }
  @keyframes nesto-stitch { 0% { opacity:0; transform:translateY(-2px); } 40% { opacity:1; transform:translateY(1px); } 70% { opacity:.45; transform:translateY(-1px); } 100% { opacity:1; transform:translateY(0); } }
  @keyframes nesto-stitch-needle { 0% { left:0; opacity:0; transform:translateY(-2px); } 5% { opacity:1; } 20%,60% { transform:translateY(2px); } 40%,80% { transform:translateY(-2px); } 95% { opacity:1; } 100% { left:calc(100% - 12px); opacity:0; transform:translateY(0); } }
}
