/* ForthLogic work page only. Shared: ../site.css, inner.css.
 * Product previews (.mock) are CSS loops. Their base styles are the finished frame, so reduced motion and
 * no-JS show a complete screen; the loops run only under html.motion and pause off screen (pages/work.js). */

/* ---------- hero + product index ---------- */
.wk-hero-grid { align-items: end; }
.wk-hero .h1 { max-width: 12ch; }
.wk-index { border: 1px solid var(--rule-2); background: var(--surface); box-shadow: var(--shadow); }
.wk-index-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--rule); }
.wk-index ol { counter-reset: none; }
.wk-index li { position: relative; border-bottom: 1px solid var(--rule); }
.wk-index li:last-child { border-bottom: 0; }
.wk-index a { position: relative; z-index: 1; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 18px; gap: 12px; align-items: center; min-height: 56px; padding: 0 18px; text-decoration: none; color: var(--ink); transition: color 260ms ease; }
.wk-index b { font-size: clamp(17px, 1.5vw, 20px); font-weight: 600; letter-spacing: -.03em; }
.wk-index .d { font: 500 11.5px/1 var(--mono); color: var(--ink-3); transition: color 260ms ease; }
.wk-index .i { font-size: 16px; transition: transform 200ms var(--ease-out); }
/* the cycle highlight inverts the row instead of dimming the others (keeps contrast) */
.motion .wk-index .cycle.is-running > *:not(.is-on) { opacity: 1; }
.wk-index li::before { content: ""; position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform 520ms var(--ease-out); }
.wk-index li.is-on::before { transform: scaleX(1); }
.wk-index li.is-on a, .wk-index li.is-on .num { color: var(--paper); }
.wk-index li.is-on .d { color: var(--amber-dark-ink); }
.wk-index .cycle-bar { z-index: 2; }
@media (hover: hover) and (pointer: fine) { .wk-index a:hover .i { transform: translateX(3px); } }

/* ---------- 01 product list ---------- */
.wk-head { margin-top: 18px; }
.wk-list { display: grid; gap: 14px; margin-top: clamp(32px, 4vw, 52px); }
.wk { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 0; background: var(--surface); border: 1px solid var(--rule); min-height: 480px; scroll-margin-top: calc(var(--header-h) + 20px); transition: border-color 260ms ease, box-shadow 260ms var(--ease-out); }
.wk.is-flip { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.wk.is-flip .wk-copy { order: 2; border-left: 1px solid var(--rule); border-right: 0; }
.wk.is-flip .wk-stage { order: 1; }
@media (hover: hover) and (pointer: fine) { .wk:hover { border-color: var(--rule-2); box-shadow: var(--shadow); } }
.wk:target { border-color: var(--amber-line); box-shadow: 0 0 0 3px var(--amber-soft); }
.wk-copy { display: flex; flex-direction: column; gap: 14px; padding: clamp(24px, 3vw, 44px); border-right: 1px solid var(--rule); }
.wk-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.wk-top .num { color: var(--amber-ink); }
.wk-tags { display: inline-flex; align-items: center; gap: 14px; }
.wk-new { font: 600 10px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; padding: 5px 7px; background: var(--amber); color: var(--ink); }
.wk-name { margin-top: 18px; font-size: clamp(36px, 4.2vw, 60px); font-weight: 600; letter-spacing: -.05em; line-height: .98; color: var(--ink); text-wrap: balance; }
.wk-line { font-size: clamp(18px, 1.5vw, 21px); font-weight: 500; letter-spacing: -.02em; line-height: 1.3; color: var(--ink); max-width: 36ch; }
.wk-body { color: var(--ink-2); max-width: 46ch; text-wrap: pretty; }
.wk-bring { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--rule); display: grid; gap: 6px; font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.3; color: var(--ink-2); }
.wk-bring .label { font-style: normal; }
.wk .dom { font: 500 13px/1 var(--mono); color: var(--ink); letter-spacing: .02em; display: inline-flex; align-items: center; gap: 10px; }
.wk .dom::before { content: ""; width: 18px; height: 1.5px; background: var(--amber); }

/* stage */
.wk-stage { position: relative; isolation: isolate; display: grid; place-items: center; padding: clamp(48px, 5vw, 64px) clamp(18px, 3vw, 48px); background: var(--paper-2); overflow: hidden; }
.wk-stage::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(14, 15, 18, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(14, 15, 18, .05) 1px, transparent 1px); background-size: 32px 32px; mask-image: radial-gradient(90% 90% at 50% 50%, #000 30%, transparent 85%); }
.wk-stage > .ill { position: absolute; left: 18px; top: 16px; }

/* ---------- mocks (shared frame) ---------- */
.mock { --loop: 8s; position: relative; width: 100%; max-width: 500px; background: #fff; border: 1px solid var(--rule-2); box-shadow: 0 1px 0 rgba(14, 15, 18, .04), 0 30px 60px -34px rgba(14, 15, 18, .45); color: var(--ink); font-size: 14px; }
.mock.is-paused, .mock.is-paused * { animation-play-state: paused !important; }
.mk-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.mk-bar b { flex: 1; font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.mk-pill { font: 500 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--amber-ink); padding: 5px 7px; border: 1px solid var(--amber-soft); background: var(--amber-wash); white-space: nowrap; }
.mk-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); animation: livePulse 2.2s ease-out infinite; }

/* Chatley: live call */
.mk-wave { display: flex; align-items: center; justify-content: center; gap: 4px; height: 92px; padding: 0 18px; border-bottom: 1px solid var(--rule); }
.mk-wave i { width: 4px; height: 60px; border-radius: 2px; background: var(--ink); transform: scaleY(calc(var(--a) * .7)); }
.mk-wave i:nth-child(4n+2) { background: var(--amber); }
.motion .mk-wave i { animation: wave 1.1s var(--ease-in-out) infinite; animation-delay: calc(var(--k) * -70ms); --amp: var(--a); }
.mk-chat { display: grid; gap: 8px; padding: 16px; }
.mk-chat p { display: grid; gap: 3px; max-width: 86%; padding: 9px 12px; border: 1px solid var(--rule); font-size: 13.5px; line-height: 1.35; }
.mk-chat span { font: 500 9.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.mk-chat .b1 { justify-self: end; }
.mk-chat .b2 { background: var(--paper); }
.mk-chat .b2 span { color: var(--amber-ink); }
.mk-chat .b3 { max-width: 100%; border-style: dashed; color: var(--ink-2); }
.motion .mk-chat .b1 { animation: mkIn var(--loop) var(--ease-out) infinite; }
.motion .mk-chat .b2 { animation: mkIn2 var(--loop) var(--ease-out) infinite; }
.motion .mk-chat .b3 { animation: mkIn3 var(--loop) var(--ease-out) infinite; }
@keyframes mkIn { 0%, 4% { opacity: 0; transform: translateY(8px); } 10%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes mkIn2 { 0%, 26% { opacity: 0; transform: translateY(8px); } 32%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes mkIn3 { 0%, 52% { opacity: 0; transform: translateY(8px); } 58%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* TaleReach: prospects moving through Found, Drafted, Sent */
.mk-rows { display: grid; }
.mk-rows li { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; border-bottom: 1px solid var(--rule); }
.mk-rows li:last-child { border-bottom: 0; }
.mk-rows b { font-weight: 500; font-size: 14px; letter-spacing: -.01em; }
.mk-st { position: relative; display: grid; width: 92px; height: 24px; }
.mk-st i { grid-area: 1 / 1; display: grid; place-items: center; font: 500 10px/1 var(--mono); font-style: normal; letter-spacing: .12em; text-transform: uppercase; border: 1px solid var(--rule-2); color: var(--ink-2); opacity: 0; }
.mk-st i:nth-child(3) { opacity: 1; background: var(--ink); border-color: var(--ink); color: var(--paper); }
.motion .mk-rows li { animation: mkRow var(--loop) var(--ease-out) infinite; animation-delay: calc(var(--r) * 120ms); }
.motion .mk-st i:nth-child(1) { animation: stA var(--loop) linear infinite; animation-delay: calc(var(--r) * 450ms); }
.motion .mk-st i:nth-child(2) { animation: stB var(--loop) linear infinite; animation-delay: calc(var(--r) * 450ms); }
.motion .mk-st i:nth-child(3) { animation: stC var(--loop) linear infinite; animation-delay: calc(var(--r) * 450ms); }
@keyframes mkRow { 0% { opacity: 0; transform: translateX(-10px); } 6%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes stA { 0%, 20% { opacity: 1; } 22%, 100% { opacity: 0; } }
@keyframes stB { 0%, 20% { opacity: 0; } 22%, 42% { opacity: 1; background: var(--amber-wash); border-color: var(--amber-soft); color: var(--amber-ink); } 44%, 100% { opacity: 0; } }
@keyframes stC { 0%, 42% { opacity: 0; } 44%, 94% { opacity: 1; } 100% { opacity: 0; } }

/* RiskBorne: clause highlight and evidence checks */
.mk-audit { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.mk-page { display: grid; gap: 9px; align-content: start; padding: 18px; border-right: 1px solid var(--rule); }
.mk-ttl { font: 500 10px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.mk-page i { position: relative; display: block; height: 6px; width: var(--w); background: var(--rule-2); }
.mk-page i.hl::after { content: ""; position: absolute; inset: -4px -3px; background: var(--amber-soft); border-bottom: 2px solid var(--amber-line); transform-origin: left; }
.motion .mk-page i.hl::after { animation: hlWipe var(--loop) var(--ease-out) infinite; }
.motion .mk-page i.h2::after { animation-delay: 1.2s; }
@keyframes hlWipe { 0%, 8% { transform: scaleX(0); } 22%, 90% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }
.mk-checks { display: grid; align-content: center; gap: 10px; padding: 18px; }
.mk-checks li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 500; }
.mk-checks .ck { position: relative; width: 20px; height: 20px; flex: none; border: 1.5px solid var(--ink); background: var(--ink); }
.mk-checks .ck::after { content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px; border: solid var(--amber); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.mk-checks .gap .ck { background: var(--amber); border-color: var(--amber); }
.mk-checks .gap .ck::after { left: 7.5px; top: 3px; width: 0; height: 7px; border-width: 0 2px 0 0; border-color: var(--ink); transform: none; box-shadow: 0 9px 0 -0.5px var(--ink); }
.mk-checks .gap { color: var(--amber-ink); }
.motion .mk-checks li { animation: mkIn2 var(--loop) var(--ease-out) infinite; }
.motion .mk-checks .c1 { animation-name: ckA; } .motion .mk-checks .c2 { animation-name: ckB; } .motion .mk-checks .c3 { animation-name: ckC; }
@keyframes ckA { 0%, 18% { opacity: 0; transform: translateX(8px); } 24%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes ckB { 0%, 32% { opacity: 0; transform: translateX(8px); } 38%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes ckC { 0%, 46% { opacity: 0; transform: translateX(8px); } 52%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* Pressbotics: lines type, then the pipeline advances */
.mk-editor { display: grid; gap: 10px; padding: 20px 18px; border-bottom: 1px solid var(--rule); }
.mk-editor i { display: block; height: 6px; width: var(--w); background: var(--rule-2); transform-origin: left; }
.mk-editor i.t { height: 12px; background: var(--ink); margin-bottom: 6px; }
.motion .mk-editor i { animation: typeLn var(--loop) steps(16, end) infinite; animation-delay: var(--dl, 0s); }
@keyframes typeLn { 0% { transform: scaleX(0); } 20%, 92% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }
.mk-pipe { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding: 14px 16px; }
.mk-pipe li { position: relative; display: flex; align-items: center; justify-content: center; min-height: 34px; font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; border: 1px solid var(--rule-2); color: var(--ink-2); }
.mk-pipe li + li { margin-left: 18px; }
.mk-pipe li + li::before { content: ""; position: absolute; right: 100%; top: 50%; width: 18px; height: 1px; background: var(--rule-2); }
.mk-pipe .p3 { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.motion .mk-pipe .p1 { animation: pA var(--loop) linear infinite; }
.motion .mk-pipe .p2 { animation: pB var(--loop) linear infinite; }
.motion .mk-pipe .p3 { animation: pC var(--loop) linear infinite; }
@keyframes pA { 0%, 34% { background: var(--ink); color: var(--paper); border-color: var(--ink); } 36%, 100% { background: #fff; color: var(--ink-2); border-color: var(--rule-2); } }
@keyframes pB { 0%, 36% { background: #fff; } 38%, 58% { background: var(--ink); color: var(--paper); border-color: var(--ink); } 60%, 100% { background: #fff; color: var(--ink-2); border-color: var(--rule-2); } }
@keyframes pC { 0%, 60% { background: #fff; color: var(--ink-2); border-color: var(--rule-2); } 62%, 94% { background: var(--amber); color: var(--ink); border-color: var(--amber); } 100% { background: #fff; color: var(--ink-2); border-color: var(--rule-2); } }

/* Füdii: phone with rings and meals */
.mk-phone { width: 250px; max-width: 250px; padding: 12px; border-radius: 32px; background: var(--ink); border-color: var(--ink); }
.mk-screen { border-radius: 22px; background: #fff; padding: 22px 16px 18px; min-height: 380px; display: grid; align-content: start; gap: 16px; }
.mk-day { font-size: 22px; font-weight: 600; letter-spacing: -.04em; }
.mk-rings { display: flex; justify-content: space-between; }
.mk-rings span { display: grid; justify-items: center; gap: 6px; }
.mk-rings svg { width: 56px; height: 56px; transform: rotate(-90deg); }
.mk-rings .bg { fill: none; stroke: var(--rule); stroke-width: 5; }
.mk-rings .fg { fill: none; stroke: var(--amber); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: var(--to); }
.mk-rings .fg.b { stroke: var(--ink); }
.motion .mk-rings .fg { animation: ringFill var(--loop) var(--ease-out) infinite; }
.motion .mk-rings span:nth-child(2) .fg { animation-delay: .3s; } .motion .mk-rings span:nth-child(3) .fg { animation-delay: .6s; }
.mk-rings em { font: 500 9.5px/1 var(--mono); font-style: normal; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.mk-meals { display: grid; gap: 8px; }
.mk-meals li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 11px 12px; border: 1px solid var(--rule); background: var(--paper); border-radius: 12px; }
.mk-meals b { font-size: 13px; font-weight: 500; }
.mk-meals span { font: 500 9.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.mk-meals .m3 { border-style: dashed; background: #fff; }
.mk-meals .m3 b { color: var(--ink-3); }
.motion .mk-meals .m1 { animation: ckA var(--loop) var(--ease-out) infinite; }
.motion .mk-meals .m2 { animation: ckB var(--loop) var(--ease-out) infinite; }

/* AI Front Office: ring, slot booked, follow-up text */
.mk-ring { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--ink); }
.mk-ring .i { font-size: 15px; }
.motion .mk-ring { animation: callShake var(--loop) ease-in-out infinite; }
.mk-cal { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; padding: 16px; border-bottom: 1px solid var(--rule); }
.mk-cal .h { font: 500 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding-bottom: 4px; }
.mk-cal i { position: relative; height: 38px; border: 1px dashed var(--rule-2); }
.mk-cal i.busy { border-style: solid; border-color: var(--rule); background: repeating-linear-gradient(-45deg, var(--paper-2) 0 5px, transparent 5px 9px); }
.mk-cal i.slot { border: 1px solid var(--amber); background: var(--amber); }
.mk-cal i.slot span { position: absolute; inset: 0; display: grid; place-items: center; font: 600 9.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.motion .mk-cal i.slot { animation: slotIn var(--loop) var(--ease-out) infinite; }
@keyframes slotIn { 0%, 30% { background: transparent; border-color: var(--rule-2); border-style: dashed; color: transparent; } 32% { background: var(--amber); border-color: var(--amber); border-style: solid; box-shadow: 0 0 0 0 rgba(255, 185, 0, .6); } 44% { box-shadow: 0 0 0 10px rgba(255, 185, 0, 0); } 44%, 94% { background: var(--amber); border-color: var(--amber); border-style: solid; } 100% { background: transparent; } }
.motion .mk-cal i.slot span { animation: slotTxt var(--loop) linear infinite; }
@keyframes slotTxt { 0%, 31% { opacity: 0; } 33%, 94% { opacity: 1; } 100% { opacity: 0; } }
.mk-text { display: grid; gap: 4px; margin: 14px 16px 16px; padding: 10px 12px; max-width: 80%; border: 1px solid var(--rule); background: var(--paper); font-size: 13.5px; line-height: 1.35; }
.mk-text span { font: 500 9.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--amber-ink); }
.motion .mk-text { animation: ckC var(--loop) var(--ease-out) infinite; }
.motion .mk-desk .mk-pill { animation: slotTxt var(--loop) linear infinite; animation-delay: -2.2s; }

/* ---------- 02 owner band ---------- */
.wk-own { min-height: 600px; }

@media (prefers-reduced-motion: reduce) { .mock *, .mock { animation: none !important; } }
@media (max-width: 1100px) {
  .wk, .wk.is-flip { grid-template-columns: minmax(0, 1fr); }
  .wk-copy, .wk.is-flip .wk-copy { order: 1; border: 0; border-bottom: 1px solid var(--rule); }
  .wk-stage, .wk.is-flip .wk-stage { order: 2; }
  .wk { min-height: 0; }
}
@media (max-width: 960px) { .wk-own { min-height: 0; } }
@media (max-width: 640px) {
  .mk-audit { grid-template-columns: minmax(0, 1fr); }
  .mk-page { border-right: 0; border-bottom: 1px solid var(--rule); }
  .mk-rows b { font-size: 13px; }
  .mk-st { width: 80px; }
  .wk-index a { grid-template-columns: 28px minmax(0, 1fr) 18px; }
  .wk-index .d { display: none; }
}
