/* HE. Cut page · hero: a Premiere Pro workspace (premiere/pw.js). 132 raw clips → the finished film, with a before / after
   comparison of every shot. Colours follow Premiere's dark UI: blue timecode + playhead, violet video, green audio. */

.pw-hero { padding: 120px 0 90px; }
.pw-head { text-align: center; display: flex; flex-direction: column; align-items: center; margin-bottom: 40px; }
.pw-head .kicker { justify-content: center; }
.pw-head h1 { font-size: clamp(42px, 5.8vw, 96px); margin-bottom: 18px; }
.pw-head .lead { max-width: 40em; color: rgba(242, 237, 228, .8); }

.pw { --p0: #0d0d0d; --p1: #1d1d1d; --p2: #232323; --p3: #2c2c2c; --pl: #3a3a3a; --pt: #d6d6d6; --pm: #8d8d8d; --blue: #2d8ceb; --vio: #7c6fd3; --vio2: #9a8fe6; --grn: #3f9a6b; --cap: #c9a42f; --adj: #a774c4;
  position: relative; background: var(--p0); border: 1px solid #000; border-radius: 10px; overflow: hidden; direction: ltr; font-family: -apple-system, "Segoe UI", system-ui, sans-serif; color: var(--pt);
  box-shadow: 0 60px 140px -50px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 255, 255, .05), 0 0 160px -50px rgba(233, 180, 76, .22); user-select: none; -webkit-user-select: none; }
.pw-menu { display: flex; align-items: center; gap: 16px; height: 34px; padding: 0 12px; background: #161616; border-bottom: 1px solid #000; font-size: 12px; color: #bdbdbd; white-space: nowrap; overflow: hidden; }
.pw-app { width: 20px; height: 20px; border-radius: 4px; background: #1d1a3a; color: #a59bff; font: 700 10px/20px sans-serif; text-align: center; border: 1px solid #9999ff; }
.pw-ws { margin-inline-start: 18px; } .pw-ws b { color: #fff; font-weight: 600; border-bottom: 2px solid var(--blue); padding-bottom: 6px; }
.pw-title { margin-inline-start: auto; color: var(--pm); font-size: 11px; direction: rtl; }

.pw-grid { display: grid; grid-template-columns: 290px minmax(0, 1fr) 330px; grid-template-rows: minmax(0, auto) 250px; grid-template-areas: "proj prog he" "tl tl he"; gap: 3px; padding: 3px; background: var(--p0); }
.pw-p { background: var(--p1); border-radius: 4px; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.pw-p > header { display: flex; align-items: center; gap: 16px; height: 30px; padding: 0 12px; font-size: 11.5px; color: var(--pm); border-bottom: 1px solid #141414; flex: none; white-space: nowrap; overflow: hidden; }
.pw-p > header b { color: #f0f0f0; font-weight: 600; position: relative; direction: rtl; unicode-bidi: plaintext; }
.pw-p > header b::after { content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 2px; background: var(--blue); }
.pw-p > header .pw-tc { margin-inline-start: auto; }
.pw-tc { color: var(--blue); font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.pw-proj { grid-area: proj; } .pw-prog { grid-area: prog; } .pw-he { grid-area: he; } .pw-tl { grid-area: tl; }

/* project bin */
.pw-proj-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 11px; color: var(--pm); border-bottom: 1px solid #151515; }
.pw-search { flex: 1; height: 22px; border-radius: 3px; background: #141414; padding: 0 8px; line-height: 22px; color: #666; }
.pw-bin { flex: 1; overflow: hidden; padding: 8px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 6px; align-content: start; max-height: 470px; position: relative; }
.pw-bin::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 50px; background: linear-gradient(transparent, var(--p1)); pointer-events: none; }
.pw-it { font-size: 9.5px; color: #a8a8a8; transition: opacity .4s, transform .4s; }
.pw-it i { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 3px; background: #111 center / cover no-repeat; border: 1.5px solid transparent; transition: border-color .2s, filter .4s; filter: saturate(.6) contrast(.82) brightness(.9); }
.pw-it i::after { content: attr(data-d); position: absolute; right: 3px; bottom: 2px; font: 600 8px/1 ui-monospace, Menlo, monospace; color: #fff; background: rgba(0, 0, 0, .65); padding: 2px 3px; border-radius: 2px; }
.pw-it span { display: block; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pw-it.pick i { border-color: var(--blue); filter: none; }
.pw-it.used { opacity: .45; }
.pw-it.used i::before { content: "✓"; position: absolute; left: 3px; top: 2px; font: 700 10px/1 sans-serif; color: #fff; background: var(--blue); border-radius: 2px; padding: 1px 3px; z-index: 1; }

/* program monitor */
.pw-mon { flex: 1; display: flex; align-items: center; justify-content: center; background: #0b0b0b; padding: 14px; min-height: 0; }
.pw-screen { position: relative; width: 100%; aspect-ratio: 2560 / 1080; background: #000; overflow: hidden; --cut: 50%; }
.pw-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pw-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--cut)) 0 0); }
.pw[data-mode="before"] .pw-before { clip-path: none; }
.pw[data-mode="after"] .pw-before { clip-path: inset(0 100% 0 0); }
.pw-handle { position: absolute; top: 0; bottom: 0; left: var(--cut); width: 2px; margin-left: -1px; background: var(--gold); box-shadow: 0 0 16px rgba(233, 180, 76, .7); cursor: ew-resize; touch-action: none; z-index: 3; }
.pw-handle i { position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: var(--gold); box-shadow: 0 4px 18px rgba(0, 0, 0, .6); }
.pw-handle i::before, .pw-handle i::after { content: ""; position: absolute; top: 50%; width: 0; height: 0; border: 5px solid transparent; margin-top: -5px; }
.pw-handle i::before { left: 6px; border-right-color: var(--gold-ink); } .pw-handle i::after { right: 6px; border-left-color: var(--gold-ink); }
.pw[data-mode="before"] .pw-handle, .pw[data-mode="after"] .pw-handle { opacity: 0; pointer-events: none; }
.pw-tag { position: absolute; top: 10px; z-index: 3; font-size: 10px; padding: 4px 8px; background: rgba(0, 0, 0, .65); color: #ddd; letter-spacing: .1em; transition: opacity .3s; }
.pw-tag.l { left: 10px; } .pw-tag.r { right: 10px; color: var(--gold); }
.pw[data-mode="after"] .pw-tag.l, .pw[data-mode="before"] .pw-tag.r { opacity: 0; }
.pw-empty { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: #050505; color: #6d6d6d; font-size: 13px; transition: opacity .6s; direction: rtl; }
.pw-empty b { font-size: 11px; letter-spacing: .2em; color: #4d4d4d; }
.pw.edited .pw-empty { opacity: 0; pointer-events: none; }
.pw:not(.edited) .pw-handle, .pw:not(.edited) .pw-tag { opacity: 0; }
.pw-ctl { display: flex; align-items: center; gap: 12px; padding: 6px 12px 8px; border-top: 1px solid #151515; flex-wrap: wrap; }
.pw-dur { color: var(--pm); font-size: 11px; margin-inline-start: auto; }
.pw-modes { display: flex; border: 1px solid var(--pl); border-radius: 4px; overflow: hidden; direction: rtl; }
.pw-modes button { height: 26px; padding: 0 12px; background: transparent; border: 0; color: var(--pm); font: 600 12px var(--body); cursor: pointer; }
.pw-modes button + button { border-right: 1px solid var(--pl); }
.pw-modes button.on { background: var(--gold); color: var(--gold-ink); }
.pw-trans { display: flex; align-items: center; gap: 6px; }
.pw-trans button { height: 26px; min-width: 30px; display: grid; place-items: center; background: transparent; border: 1px solid var(--pl); color: #ddd; border-radius: 4px; cursor: pointer; padding: 0 8px; }
.pw-trans svg { width: 14px; height: 14px; fill: currentColor; }
.pw-trans .i-pause, .pw-trans .i-on { display: none; }
.pw.playing #pwPlay .i-play { display: none; } .pw.playing #pwPlay .i-pause { display: block; }
.pw.sound #pwMute .i-off { display: none; } .pw.sound #pwMute .i-on { display: block; }
.pw-replay { font: 600 11.5px var(--body) !important; color: var(--gold) !important; border-color: rgba(233, 180, 76, .45) !important; }

/* HE. Cut panel */
.pw-panel { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 12px; overflow: auto; background: #121211; direction: rtl; font-family: var(--body); }
.pw-ph { display: flex; align-items: center; justify-content: space-between; }
.pw-ph img { height: 24px; width: auto; }
.pw-ph span { font-size: 9.5px; color: var(--gold); letter-spacing: .12em; }
.pw-kind { display: flex; flex-wrap: wrap; gap: 5px; }
.pw-kind span { font-size: 11px; padding: 4px 9px; border: 1px solid #333; border-radius: 3px; color: #8d8a83; }
.pw-kind span.on { border-color: rgba(233, 180, 76, .6); color: var(--gold); background: rgba(233, 180, 76, .08); }
.pw-steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.pw-steps li { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #262624; border-radius: 4px; background: #171716; font-size: 12.5px; color: #9b978e; transition: border-color .3s, background .3s, color .3s; overflow: hidden; }
.pw-steps li i { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #3a3935; display: grid; place-items: center; font: 700 10px/1 sans-serif; font-style: normal; color: transparent; transition: background .25s, border-color .25s, color .25s; }
.pw-steps li b { font-weight: 600; color: inherit; flex: 1; }
.pw-steps li small { font: 600 10px ui-monospace, Menlo, monospace; color: var(--gold); opacity: 0; transition: opacity .3s; direction: ltr; }
.pw-steps li.run { border-color: rgba(233, 180, 76, .5); color: #f2ede4; }
.pw-steps li.run::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--gold); transform-origin: right; animation: pwRun .6s linear; }
@keyframes pwRun { from { transform: scaleX(0); } }
.pw-steps li.run i { border-color: var(--gold); border-top-color: transparent; animation: pwSpin .6s linear infinite; }
@keyframes pwSpin { to { transform: rotate(360deg); } }
.pw-steps li.done { color: #e9e5dc; background: linear-gradient(90deg, transparent, rgba(233, 180, 76, .06)); }
.pw-steps li.done i { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.pw-steps li.done small { opacity: 1; }
.pw-go { position: relative; overflow: hidden; height: 44px; border-radius: 4px; border: 0; background: var(--gold); color: var(--gold-ink); font: 700 15px var(--display); cursor: pointer; transition: transform .1s, box-shadow .3s; }
.pw-go span { position: relative; z-index: 1; }
.pw-go i { position: absolute; inset: 0 auto 0 0; width: 0; background: rgba(255, 255, 255, .35); transition: width .3s; }
.pw-go.press { transform: scale(.97); }
.pw-go.idle { animation: pwGlow 1.8s infinite; }
@keyframes pwGlow { 50% { box-shadow: 0 0 0 6px rgba(233, 180, 76, .2), 0 0 30px rgba(233, 180, 76, .4); } }
.pw-res { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; opacity: 0; transform: translateY(8px); transition: opacity .5s, transform .5s; }
.pw.edited .pw-res { opacity: 1; transform: none; }
.pw-res div { border: 1px solid #2a2926; border-radius: 4px; padding: 8px 10px; }
.pw-res div.w { grid-column: 1 / -1; border-color: rgba(233, 180, 76, .45); background: rgba(233, 180, 76, .06); }
.pw-res b { display: block; font-family: var(--latin); font-weight: 400; font-size: 30px; line-height: 1; color: var(--gold); direction: ltr; text-align: start; }
.pw-res div.w b { font-size: 34px; }
.pw-res b s { color: #66625a; font-size: .6em; text-decoration-thickness: 1px; margin-inline-end: 6px; }
.pw-res span { font-size: 11px; color: #8d8a83; }

/* timeline */
.pw-tl-body { flex: 1; display: grid; grid-template-columns: 112px minmax(0, 1fr); min-height: 0; }
.pw-heads { background: #1a1a1a; border-right: 1px solid #111; padding-top: 24px; }
.pw-hd { display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; border-bottom: 1px solid #141414; font: 600 10px ui-monospace, Menlo, monospace; color: #9a9a9a; }
.pw-hd.v1, .pw-hd.a1 { height: 34px; }
.pw-hd em { font-style: normal; width: 22px; height: 16px; border-radius: 2px; display: grid; place-items: center; background: #2b2b2b; color: #bbb; }
.pw-hd.tgt em { background: var(--blue); color: #fff; }
.pw-hd u { text-decoration: none; color: #5d5d5d; font-size: 10px; }
.pw-lanes { position: relative; overflow: hidden; background: #191919; }
.pw-ruler { position: relative; height: 24px; border-bottom: 1px solid #111; background: #1d1d1d; font-size: 9px; color: #7d7d7d; }
.pw-ruler span { position: absolute; top: 0; bottom: 0; border-left: 1px solid #333; padding: 4px 0 0 4px; }
.pw-ln { position: relative; height: 26px; border-bottom: 1px solid #141414; }
.pw-ln.v1, .pw-ln.a1 { height: 34px; }
.pw-c { position: absolute; top: 2px; bottom: 2px; border-radius: 2px; overflow: hidden; font-size: 9px; color: #fff; white-space: nowrap; animation: pwIn .35s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes pwIn { from { transform: scaleY(0); opacity: 0; } }
.pw-c.v { background: var(--vio) center / auto 100% repeat-x; border: 1px solid var(--vio2); }
.pw-c.v::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(124, 111, 211, .95) 0 9px, rgba(124, 111, 211, .25) 9px); }
.pw-c.v span { position: relative; padding: 0 3px; font-size: 8.5px; line-height: 9px; display: block; }
.pw-c.v.slow::after { content: "50%"; position: absolute; right: 2px; bottom: 2px; font: 700 8px ui-monospace, monospace; background: #e2b34b; color: #1a1306; padding: 0 2px; border-radius: 2px; }
.pw-c.a { background: rgba(63, 154, 107, .35); border: 1px solid #4fb382; }
.pw-c.a canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pw-c.cap { background: var(--cap); border: 1px solid #e3c25a; color: #1d1600; padding: 0 4px; line-height: 20px; font-weight: 600; }
.pw-c.adj { background: var(--adj); border: 1px solid #c9a0e0; padding: 0 4px; line-height: 20px; }
.pw-c.gfx { background: #c9824a; border: 1px solid #e9a877; padding: 0 4px; line-height: 20px; color: #1d1000; }
.pw-c.mus { background: rgba(63, 154, 107, .55); border: 1px solid #4fb382; padding: 0 4px; line-height: 20px; }
.pw-c.sfx { background: #2f7f60; border: 1px solid #4fb382; }
.pw-ph { position: absolute; top: 0; bottom: 0; left: 0; width: 0; z-index: 5; pointer-events: none; }
.pw-ph::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1px; width: 1px; background: var(--blue); }
.pw-ph::after { content: ""; position: absolute; top: 2px; left: -6px; width: 12px; height: 16px; background: var(--blue); clip-path: polygon(0 0, 100% 0, 100% 65%, 50% 100%, 0 65%); }

/* the fake cursor of the demo */
.pw-cursor { position: absolute; z-index: 20; width: 22px; height: 22px; left: 0; top: 0; pointer-events: none; opacity: 0; transition: transform .9s cubic-bezier(.6, 0, .2, 1), opacity .3s; }
.pw-cursor svg { width: 100%; height: 100%; fill: #fff; stroke: #000; stroke-width: 1.2; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6)); }
.pw-cursor.on { opacity: 1; }
.pw-cursor.click::after { content: ""; position: absolute; left: -10px; top: -10px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--gold); animation: pwClick .5s ease-out forwards; }
@keyframes pwClick { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }

/* responsive */
@media (max-width: 1200px) {
  .pw-grid { grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: auto auto 230px; grid-template-areas: "prog he" "proj he" "tl tl"; }
  .pw-bin { grid-template-columns: repeat(8, 1fr); max-height: 150px; }
}
@media (max-width: 860px) {
  .pw-hero { padding: 100px 0 64px; }
  .pw-head { margin-bottom: 26px; }
  .pw-menu span:not(.pw-app):not(.pw-title) { display: none; }
  .pw-grid { grid-template-columns: 1fr; grid-template-rows: auto; grid-template-areas: "prog" "he" "tl" "proj"; }
  .pw-mon { padding: 6px; }
  .pw-ctl { gap: 8px; }
  .pw-dur { display: none; }
  .pw-bin { grid-template-columns: repeat(6, 1fr); max-height: 120px; }
  .pw-steps { display: grid; grid-template-columns: 1fr 1fr; }
  .pw-steps li { font-size: 11px; padding: 6px 8px; }
  .pw-steps li small { display: none; }
  .pw-tl-body { grid-template-columns: 44px minmax(0, 1fr); }
  .pw-hd u, .pw-hd em + em { display: none; }
  .pw-hd { padding: 0 4px; height: 18px; } .pw-hd.v1, .pw-hd.a1 { height: 26px; }
  .pw-ln { height: 18px; } .pw-ln.v1, .pw-ln.a1 { height: 26px; }
  .pw-c, .pw-c span { font-size: 0 !important; }
  .pw-cursor { display: none; }
}
