/* ─────────────────────────────────────────────────────────────
   O Krojárke — skladané scény (6 × výška okna).
   Stavia na styles.css. Postup scény --p a krytie --c nastavuje about.js.
   Tmavé a svetlé scény sa striedajú, každá má jeden hlavný pohyb.
   ───────────────────────────────────────────────────────────── */
:root { --ink: #1e1a17; --paper: var(--bg); --cream: #f3efe6; }

/* ─── skladanie ─── */
.stack { position: relative; }
.sc-wrap { height: var(--len, 130svh); position: relative; }
.sc {
  position: sticky; top: 0; height: 100svh; overflow: hidden; isolation: isolate;
  transform: scale(calc(1 - var(--c, 0) * .06)) translateY(calc(var(--c, 0) * -18px));
  transform-origin: 50% 40%;
  border-radius: calc(var(--c, 0) * 18px);
  will-change: transform;
}
/* stmavnutie prekrytej scény – overlay namiesto filtra, aby to nebrzdilo */
.sc::after { content: ""; position: absolute; inset: 0; z-index: 9; background: #000; opacity: calc(var(--c, 0) * .45); pointer-events: none; }
.sc.dark { background: var(--ink); color: var(--cream); }
.sc.light { background: var(--paper); color: var(--text); }
.sc .eyebrow { margin-bottom: 18px; }
.sc.dark .eyebrow { color: #e0545c; }
.sc .no { font-family: var(--sans); font-size: 9.5px; letter-spacing: .3em; text-transform: uppercase; display: grid; gap: 6px; margin: 0 0 26px; line-height: 1.6; }
.sc.dark .no { color: rgba(243,239,230,.6); }
.sc.light .no { color: var(--muted); }
.sc .no b { font-weight: 500; color: inherit; }
.sc.dark .no b { color: #e0545c; }
.sc.light .no b { color: var(--accent); }
.sc h1, .sc h2 { font-family: var(--serif); font-weight: 400; line-height: 1.04; letter-spacing: -.005em; margin: 0 0 22px; font-size: clamp(34px, 4.3vw, 64px); }
.sc .lead { font-size: 15.5px; line-height: 1.7; max-width: 34ch; margin: 0 0 36px; }
.sc.dark .lead { color: rgba(243,239,230,.8); }
.sc.light .lead { color: #3b352e; }
.sc .copy { position: relative; z-index: 3; }
/* text scény nabieha, keď je scéna aktívna */
.sc .copy > * { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease-out), transform 1.1s var(--ease-out); }
.sc.is-on .copy > * { opacity: 1; transform: none; }
.sc.is-on .copy > :nth-child(2) { transition-delay: .08s; }
.sc.is-on .copy > :nth-child(3) { transition-delay: .16s; }
.sc.is-on .copy > :nth-child(4) { transition-delay: .24s; }
.sc.is-on .copy > :nth-child(5) { transition-delay: .32s; }
[data-depth] { transform: translate3d(0, var(--py, 0px), 0); will-change: transform; }

/* okrúhly odkaz (rovnaký ako cta-round, len svetlý na tmavej) */
.sc.dark .cta-round { color: var(--cream); }
.sc.dark .cta-round .dot { background: var(--cream); color: var(--ink); }
.sc.dark .cta-round .cta-line { background: var(--cream); }
.sc.dark .link-arrow svg { color: #e0545c; }

/* bodková navigácia scén */
.sc-nav { position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 40; display: grid; gap: 14px; }
.sc-nav button { width: 28px; height: 28px; display: grid; place-items: center; }
.sc-nav button::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .35; transition: transform .4s var(--ease-out), opacity .3s; }
.sc-nav button.is-on::before { opacity: 1; transform: scale(1.6); }
body[data-scene="1"] .sc-nav, body[data-scene="3"] .sc-nav, body[data-scene="5"] .sc-nav { color: var(--cream); }
body[data-scene="2"] .sc-nav, body[data-scene="4"] .sc-nav, body[data-scene="6"] .sc-nav { color: var(--text); }
.progress-thread { display: none; }

/* ─── 01 Remeslo (tmavá): fotka pri stroji, text vľavo, hotspoty ─── */
.s1 .bg { position: absolute; inset: -6% 0 -6% 0; }
.s1 .bg img { width: 100%; height: 100%; object-fit: cover; object-position: 58% 42%; transform: scale(calc(1.04 + var(--p, 0) * .06)); transform-origin: 60% 50%; }
.s1 .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(30,26,23,.78) 0%, rgba(30,26,23,.5) 30%, rgba(30,26,23,.08) 55%, rgba(30,26,23,0) 100%), linear-gradient(to bottom, rgba(30,26,23,.45), transparent 22%); }
.s1 .copy { position: absolute; left: clamp(60px, 9vw, 130px); top: 19vh; bottom: 9vh; max-width: 420px; display: flex; flex-direction: column; }
.s1 .copy .cta-round { margin-top: auto; }
.s1 .copy h1 { margin-bottom: 24px; }
.s1 .hs { position: absolute; z-index: 4; left: var(--hx); top: var(--hy); width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: #fff; color: var(--accent); display: grid; place-items: center; box-shadow: 0 2px 10px rgba(0,0,0,.35); opacity: 0; transform: scale(.4); transition: opacity .5s, transform .6s var(--ease-out), background .3s, color .3s; }
.s1 .hs::before, .s1 .hs::after { content: ""; position: absolute; width: 12px; height: 1.5px; background: currentColor; }
.s1 .hs::after { transform: rotate(90deg); transition: transform .3s; }
.s1 .hs .ring { position: absolute; inset: -6px; border-radius: 50%; border: 1px solid #fff; animation: pulse 2.4s var(--ease-out) infinite; }
.s1 .hs span { position: absolute; left: 40px; top: 50%; transform: translateY(-50%) translateX(-6px); width: 240px; background: rgba(30,26,23,.86); color: var(--cream); padding: 12px 14px; border-radius: 4px; font-size: 14px; line-height: 1.5; opacity: 0; pointer-events: none; transition: .35s var(--ease-out); backdrop-filter: blur(6px); }
.s1 .hs span b { display: block; font-family: var(--serif); font-weight: 400; font-size: 17px; margin-bottom: 2px; }
.s1 .hs.is-on, .s1 .hs:hover { background: var(--accent); color: #fff; }
.s1 .hs.is-on::after { transform: rotate(0); }
.s1 .hs.is-on span, .s1 .hs:hover span { opacity: 1; transform: translateY(-50%); }
.s1.is-on .hs { opacity: 1; transform: none; }
.s1.is-on .hs:nth-of-type(2) { transition-delay: .5s; } .s1.is-on .hs:nth-of-type(3) { transition-delay: .6s; } .s1.is-on .hs:nth-of-type(4) { transition-delay: .7s; }
.s1 .scroll-hint { display: none; position: absolute; right: var(--pad); bottom: 34px; z-index: 3; font-family: var(--sans); font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: rgba(243,239,230,.6); display: flex; align-items: center; gap: 12px; }
.s1 .scroll-hint i { width: 46px; height: 1px; background: rgba(243,239,230,.25); position: relative; overflow: hidden; }
.s1 .scroll-hint i::after { content: ""; position: absolute; inset: 0; background: #e0545c; animation: abRun 2.6s var(--ease) infinite; }
@keyframes abRun { 0% { transform: translateX(-100%); } 55%, 100% { transform: translateX(100%); } }

/* ─── 02 Materiál (svetlá): vejár fotiek + index ─── */
.s2 { display: grid; grid-template-columns: 90px minmax(0, 1.25fr) minmax(0, .85fr); gap: 4vw; align-items: center; padding: 0 clamp(60px, 9vw, 130px) 0 var(--pad); }
.s2 .idx { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; font-family: var(--sans); font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.s2 .idx li:first-child { color: var(--text); margin-bottom: 8px; }
.s2 .idx li.is-on { color: var(--accent); }
.s2 .fan { position: relative; aspect-ratio: 4 / 3; }
.s2 .fan figure { position: absolute; margin: 0; overflow: hidden; border-radius: 3px; box-shadow: 0 30px 60px rgba(24,22,20,.18); background: #e9e2d4; transform: translate3d(var(--dx, 0), calc(var(--dy, 0) + var(--py, 0px)), 0) rotate(var(--r, 0deg)); transition: transform 1.2s var(--ease-out); }
.s2 .fan img { width: 100%; height: 100%; object-fit: cover; display: block; }
.s2 .fan .f1 { inset: 0 0 8% 0; --r: -3deg; }
.s2 .fan .f2 { left: 46%; top: -8%; width: 46%; aspect-ratio: 4 / 3; --r: 6deg; }
.s2 .fan .f3 { left: -6%; bottom: -4%; width: 40%; aspect-ratio: 3 / 4; --r: -8deg; }
.s2:not(.is-on) .fan figure { --r: 0deg; --dx: 0px; --dy: 40px; }
.s2 .fan figcaption { position: absolute; left: 12px; bottom: 10px; font-family: var(--sans); font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; color: #fbf8f1; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.s2 .orn { position: absolute; right: 8%; bottom: 14%; width: 40px; height: 40px; color: var(--accent); z-index: 3; }

/* ─── 03 Vzory (tmavá): porovnanie predloha / výšivka ─── */
.s3 .vz-compare { position: absolute; inset: 0; user-select: none; }
.s3 .vz-compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 55% 50%; }
.s3 .vz-then { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--cx, 50%)) 0 0); }
.s3 .vz-then img { filter: grayscale(1) sepia(.5) contrast(1.05) brightness(.9); }
.s3 .vz-compare input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; z-index: 3; }
.s3 .vz-handle { position: absolute; top: 0; bottom: 0; left: var(--cx, 50%); width: 1px; background: rgba(243,239,230,.9); z-index: 2; pointer-events: none; }
.s3 .vz-handle::after { content: "‹  ›"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 52px; height: 52px; border-radius: 50%; background: var(--cream); color: var(--accent); display: grid; place-items: center; font-family: var(--sans); font-size: 18px; }
.s3 .vz-lbl { position: absolute; bottom: 26px; z-index: 2; font-family: var(--sans); font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: var(--cream); pointer-events: none; }
.s3 .vz-lbl.l { left: var(--pad); } .s3 .vz-lbl.r { right: var(--pad); }
.s3 .shade { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(90deg, rgba(30,26,23,.85) 0%, rgba(30,26,23,.55) 30%, rgba(30,26,23,0) 58%); }
.s3 .copy { position: absolute; left: clamp(60px, 9vw, 130px); top: 50%; transform: translateY(-50%); max-width: 400px; z-index: 4; pointer-events: none; }
.s3 .copy > * { pointer-events: auto; }

/* ─── 04 Proces (svetlá): vrstvy + kroky ─── */
.s4 { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.25fr) 200px; gap: 3vw; align-items: center; padding: 0 var(--pad) 0 clamp(60px, 9vw, 130px); }
.s4 .layers { position: relative; aspect-ratio: 4 / 3; }
.s4 .layers { aspect-ratio: 1; max-height: 78svh; justify-self: center; width: min(100%, 78svh); }
/* pláty začínajú zložené na predlohe a dvíhajú sa jeden po druhom; koncový stav = pôvodná fotka,
   takže sa nikdy neodkryje miesto, ktoré bolo prekryté */
.s4 .layers {
  /* tri kroky: A zdvihne všetko nad predlohou, B čipku a výšivku, C už len výšivku.
     Medzera medzi susednými plátmi tak nikdy neprekročí tú z pôvodnej fotky. */
  --eA: clamp(0, (var(--p, 0) - .06) / .26, 1);
  --eB: clamp(0, (var(--p, 0) - .34) / .26, 1);
  --eC: clamp(0, (var(--p, 0) - .62) / .26, 1);
}
.s4 .layers .ly { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; will-change: transform; }
.s4 .layers .l2 { transform: translate3d(0, calc(12% * (1 - var(--eA))), 0); }
.s4 .layers .l3 { transform: translate3d(0, calc(12% * (1 - var(--eA)) + 12% * (1 - var(--eB))), 0); }
.s4 .layers .l4 { transform: translate3d(0, calc(12% * (1 - var(--eA)) + 12% * (1 - var(--eB)) + 11% * (1 - var(--eC))), 0); }
.s4 .layers::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: -4%; height: 12%; background: radial-gradient(50% 50% at 50% 50%, rgba(24,22,20,.25), transparent 70%); filter: blur(10px); z-index: -1; }
.pr-steps { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 1px solid var(--line); display: grid; gap: 22px; position: relative; }
.pr-steps::before { content: ""; position: absolute; left: -1px; top: 0; width: 1px; height: calc((var(--step, 0) + 1) / 5 * 100%); background: var(--accent); transition: height .6s var(--ease); }
.pr-steps li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: baseline; color: var(--muted); transition: color .4s, transform .5s var(--ease-out); position: relative; }
.pr-steps li::before { content: ""; position: absolute; left: -27px; top: .45em; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1.4px solid var(--line); transition: .4s; }
.pr-steps li.is-on { color: var(--text); transform: translateX(6px); }
.pr-steps li.is-on::before { background: var(--accent); border-color: var(--accent); }
.pr-steps .n { font-family: var(--serif); font-size: 18px; color: var(--accent); }
.pr-steps span:last-child { font-size: 16.5px; }

/* ─── 05 Môj príbeh (tmavá): časová os vodorovne, poháňaná zvislým scrollom ─── */
.s5 .bg { position: absolute; inset: 0; }
.s5 .bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; opacity: .32; transform: translate3d(calc(var(--p, 0) * -6%), 0, 0) scale(1.12); }
.s5 .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(30,26,23,.9), rgba(30,26,23,.3) 60%, rgba(30,26,23,.6)); }
.s5 .head { position: absolute; left: clamp(60px, 9vw, 130px); top: 17vh; z-index: 3; }
.s5 .head h2 { font-size: clamp(30px, 3.2vw, 48px); margin-bottom: 0; }
.tl-track { position: absolute; left: 0; bottom: clamp(40px, 9vh, 90px); display: flex; gap: clamp(22px, 3vw, 44px); padding: 0 clamp(60px, 9vw, 130px); will-change: transform; align-items: flex-end; }
.tl-track::before { content: ""; position: absolute; left: clamp(60px, 9vw, 130px); right: 0; top: 34px; height: 1px; background: rgba(243,239,230,.18); }
.tl-card { position: relative; flex: 0 0 auto; width: clamp(260px, 24vw, 360px); padding-top: 54px; transition: opacity .5s; opacity: .5; }
.tl-card.is-cur { opacity: 1; }
.tl-card::before { content: ""; position: absolute; left: 0; top: 30px; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); border: 1.4px solid #e0545c; }
.tl-card.is-cur::before { background: #e0545c; box-shadow: 0 0 0 6px rgba(224,84,92,.2); }
.tl-card time { display: block; font-family: var(--serif); font-size: 26px; color: #e0545c; line-height: 1; margin-bottom: 14px; }
.tl-card figure { margin: 0 0 14px; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 3px; background: #2a2420; }
.tl-card img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 1.2s var(--ease-out); }
.tl-card.is-cur img { transform: none; }
.tl-card figure.contain img { object-fit: contain; padding: 6%; background: #2a2420; }
.tl-card h3 { font-family: var(--serif); font-weight: 400; font-size: 24px; margin: 0 0 8px; line-height: 1.05; }
.tl-card p { margin: 0; font-size: 15px; line-height: 1.6; color: rgba(243,239,230,.72); }
.tl-card .tag { display: block; font-family: var(--sans); font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; color: rgba(243,239,230,.5); margin: 0 0 6px; }

/* ─── 06 Detaily (svetlá): lupa + kde už kroje ožili ─── */
.s6 { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 4vw; align-items: center; padding: 0 var(--pad) 0 clamp(60px, 9vw, 130px); }
.dt-fig { position: relative; margin: 0; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 4px; background: #e9e2d4; box-shadow: 0 30px 70px rgba(24,22,20,.16); cursor: default; --mx: 40%; --my: 50%; }
.dt-fig > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dt-lens { position: absolute; left: var(--mx); top: var(--my); width: clamp(160px, 16vw, 240px); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; overflow: hidden; box-shadow: 0 20px 50px rgba(24,22,20,.35), inset 0 0 0 1px rgba(255,255,255,.7); background: var(--img) var(--mx) var(--my) / 260% no-repeat; pointer-events: none; transition: width .3s; }
.dt-lens::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--accent), inset 0 0 40px rgba(255,255,255,.15); }
.dt-fig .cap { position: absolute; left: 14px; bottom: 12px; font-family: var(--sans); font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; color: #fbf8f1; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.where { list-style: none; margin: 30px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 10px; }
.where li { font-family: var(--sans); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; color: #3b352e; transition: border-color .3s, color .3s; }
.where li:hover { border-color: var(--accent); color: var(--accent); }
.where-lbl { font-family: var(--sans); font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--accent); margin: 0 0 4px; }

/* rezerva pod hlavičkou pri stredovo zarovnaných scénach */
.s2, .s4, .s6 { padding-top: 70px; }

/* ─── responzív ─── */
@media (max-width: 1100px) {
  .s2 { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
  .s2 .idx { display: none; }
  .s4 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pr-steps { display: none; }
}
@media (max-width: 860px) {
  .sc-wrap { --len: 120svh; }
  .sc h1, .sc h2 { font-size: clamp(34px, 9vw, 56px); }
  .s1 .copy { bottom: 60px; right: var(--pad); }
  .s1 .hs { display: none; }
  .s2, .s4, .s6 { grid-template-columns: 1fr; align-content: center; gap: 22px; padding-top: 90px; }
  .s2 .fan { aspect-ratio: 4 / 3.2; }
  .s3 .copy { top: auto; bottom: 70px; transform: none; max-width: none; right: var(--pad); }
  .s3 .shade { background: linear-gradient(to top, rgba(30,26,23,.9) 0%, rgba(30,26,23,.4) 45%, rgba(30,26,23,0) 75%); }
  .s4 .layers { width: min(100%, 46svh); }
  .s5 .head { top: 90px; }
  .tl-card { width: 76vw; }
  .sc-nav { display: none; }
  .dt-fig { cursor: default; aspect-ratio: 16 / 9; order: -1; }
  .s6 .lead { display: none; }
  .where { margin-top: 14px; padding-top: 14px; gap: 6px; }
  .where li { font-size: 10px; padding: 6px 11px; }
  .s6 .cta-round { margin-top: 16px !important; }
  .sc-wrap { --len: 115svh; }
}
@media (prefers-reduced-motion: reduce) {
  .sc { transform: none !important; filter: none !important; }
  .sc .copy > * { opacity: 1 !important; transform: none !important; }
  [data-depth] { transform: none !important; }
  .s4 .layers .ly { transform: none !important; }
  .s1 .scroll-hint i::after { animation: none; }
}

/* ─── hlavička nad scénami: bez lišty, kompaktné logo, farba podľa scény ─── */
body.page-about .site-header { height: 76px; background: linear-gradient(to bottom, rgba(0,0,0,.28), transparent); box-shadow: none; }
body.page-about .site-header.is-scrolled { height: 76px; padding-bottom: 0; background: linear-gradient(to bottom, rgba(0,0,0,.28), transparent); -webkit-mask-image: none; mask-image: none; backdrop-filter: none; }
body.page-about .site-header.is-scrolled::after { display: none; }
body.page-about .site-header:not(.is-scrolled) .logo { margin-top: 0; }
body.page-about .logo { grid-template-columns: auto auto; align-items: center; gap: 8px; }
body.page-about .logo-orn { width: 32px; height: 31px; margin: 0; color: inherit; }
body.page-about .logo-word { height: 27px; width: 95px; margin: 0; }
body.page-about .logo-tag { display: none; }
body.page-about .main-nav a + a::before { background: currentColor; opacity: .3; }
body.page-about .tools-sep { background: currentColor; opacity: .3; }
body.page-about[data-scene="1"] .site-header, body.page-about[data-scene="3"] .site-header, body.page-about[data-scene="5"] .site-header { color: var(--cream); }
body.page-about[data-scene="2"] .site-header, body.page-about[data-scene="4"] .site-header, body.page-about[data-scene="6"] .site-header { color: var(--text); background: none; }
body.page-about .site-header { transition: none; }
/* proces: jeden obrázok rozloženého kroja namiesto vrstiev */
.s4 .layers.is-single .ly { inset: 0; width: 100%; height: 100%; object-fit: contain; transform: translate3d(0, calc((.5 - var(--p, 0)) * 24px), 0) scale(1.08); filter: drop-shadow(0 30px 40px rgba(24,22,20,.18)); }
.s4 .layers.is-single::after { display: none; }
