/* ==========================================================================
   01 · PADELYAR — the case file
   Real captures of the real product. The only loud moment is the beam that clears the
   amber friction on arrival; everything else is quiet instrumentation around the screens.
   ========================================================================== */
#work { --ball: #D7FF40; --sage: #6F8D80; }

.pc-body {
  display: grid; gap: 14px; padding: clamp(14px, 2vw, 22px);
  background:
    radial-gradient(900px 320px at 14% -4%, rgba(215, 255, 64, .06), transparent 62%),
    linear-gradient(180deg, rgba(2, 10, 9, .55), rgba(2, 7, 13, .7));
  border-bottom: 1px solid var(--line);
}

/* ---- station rail: six verbs, one gliding packet of light ---- */
.pc-rail { position: relative; display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 14px; scrollbar-width: none; scroll-snap-type: x proximity; }
.pc-rail::-webkit-scrollbar { display: none; }
.pc-rail::after { content: ''; position: absolute; left: 0; right: 0; bottom: 5px; height: 1px; background: rgba(150, 200, 190, .18); }
.pc-flow {
  position: absolute; left: 0; bottom: 4px; height: 3px; width: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--ball) 38%, var(--ball) 62%, transparent);
  box-shadow: 0 0 14px var(--ball);
  transition: transform .7s var(--ease), width .7s var(--ease);
}
.pc-tab {
  flex: 1 0 auto; scroll-snap-align: center; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 10px 18px 10px 14px; white-space: nowrap; cursor: pointer;
  font-size: .72rem; font-weight: 700; letter-spacing: .07em; color: #8fb5bb;
  background: rgba(2, 10, 14, .6); border: 1px solid rgba(143, 181, 187, .24);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: color .25s, background .25s, border-color .25s, box-shadow .25s;
}
.pc-tab i { font-style: normal; font-size: .6rem; letter-spacing: .04em; opacity: .55; }
.pc-tab:hover { color: #d6ecee; border-color: rgba(143, 181, 187, .5); }
.pc-tab[aria-selected="true"] {
  color: var(--ball); border-color: color-mix(in srgb, var(--ball) 55%, transparent);
  background: color-mix(in srgb, var(--ball) 9%, rgba(2, 10, 14, .88));
  box-shadow: 0 0 24px color-mix(in srgb, var(--ball) 14%, transparent);
}
.pc-tab:focus-visible { outline: 2px solid var(--ball); outline-offset: -4px; }

/* ---- stage + dock ---- */
.pc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 232px; gap: 18px; align-items: stretch; }
.pc-stage {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; isolation: isolate; touch-action: pan-y;
  background: #010904; border: 1px solid rgba(215, 255, 64, .2); border-radius: 3px;
  /* no clip-path here: a mask over a zooming, scaled child makes browsers drop the whole stage.
     The chamfer is drawn as corner brackets instead, like the card's own edges. */
}
.pc-stage::before, .pc-stage::after { content: ''; position: absolute; z-index: 6; width: 16px; height: 16px; pointer-events: none; }
.pc-stage::before { top: 0; right: 0; border-top: 2px solid var(--ball); border-right: 2px solid var(--ball); }
.pc-stage::after { bottom: 0; left: 0; border-bottom: 2px solid var(--ball); border-left: 2px solid var(--ball); }
.pc-cam { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
/* each screen lives in its own overflow:hidden layer; a layer's width is the reveal during a sweep */
.pc-layer { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; overflow: hidden; opacity: 0; visibility: hidden; }
.pc-layer.is-on, .pc-layer.is-in { opacity: 1; visibility: visible; }
.pc-layer.is-in { z-index: 2; }
.pc-shot { display: block; width: var(--bw, 100%); max-width: none; height: 100%; }
.pc-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
.pc-pins { position: absolute; inset: 0; z-index: 4; overflow: hidden; pointer-events: none; transition: opacity .35s; }
.pc-pins.is-hold { opacity: 0; }
.pc-pins.is-hold .pc-pin { pointer-events: none; }
.pc-pins[hidden], .pc-cap-fa[hidden], .pc-cap-en[hidden] { display: none; }

.pc-pin { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; background: none; border: 0; cursor: pointer; pointer-events: auto; will-change: transform; }
.pc-pin::before {
  content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  background: rgba(1, 9, 4, .78); border: 1.5px solid var(--ball);
  animation: pcPing 2.4s var(--ease-out) infinite; animation-delay: calc(var(--i, 0) * .35s);
  transition: width .3s var(--ease), height .3s var(--ease), background .25s, box-shadow .25s;
}
.pc-pin i { position: relative; font: 700 .58rem/1 var(--font-m); color: var(--ball); transition: color .2s; }
.pc-pin:hover::before { width: 24px; height: 24px; background: color-mix(in srgb, var(--ball) 22%, rgba(1, 9, 4, .85)); }
.pc-pin.is-on::before { width: 26px; height: 26px; background: var(--ball); box-shadow: 0 0 22px rgba(215, 255, 64, .65); animation: none; }
.pc-pin.is-on i { color: #04120a; }
.pc-pins.has-active .pc-pin:not(.is-on) { opacity: .5; }
.pc-pin:focus-visible { outline: none; }
.pc-pin:focus-visible::before { outline: 2px solid #fff; outline-offset: 3px; }
@keyframes pcPing { 0% { box-shadow: 0 0 0 0 rgba(215, 255, 64, .5); } 70%, 100% { box-shadow: 0 0 0 14px rgba(215, 255, 64, 0); } }

.pc-corner {
  position: absolute; z-index: 5; left: 12px; top: 10px; display: flex; gap: 10px; align-items: center; padding: 5px 10px;
  font-size: .6rem; letter-spacing: .09em; color: #cfe7d6; pointer-events: none;
  background: rgba(1, 9, 4, .78); border: 1px solid rgba(215, 255, 64, .25); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.pc-corner b { color: var(--ball); font-weight: 600; }
.pc-tourbar { position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; height: 3px; opacity: 0; pointer-events: none; transition: opacity .3s; }
.pc.is-touring .pc-tourbar { opacity: 1; }
.pc-tourbar i { display: block; height: 100%; transform: scaleX(0); transform-origin: 0 50%; background: linear-gradient(90deg, transparent, var(--ball)); box-shadow: 0 0 10px var(--ball); }
.pc-tourbar.is-run i { animation: pcTour var(--tour-ms, 4800ms) linear forwards; }
@keyframes pcTour { to { transform: scaleX(1); } }

/* ---- the phone: the same product, in a player's hand ---- */
.pc-dock { display: grid; align-content: start; justify-items: center; gap: 10px; }
.pc-phone {
  position: relative; width: 186px; aspect-ratio: 390 / 844; padding: 7px; border-radius: 30px;
  background: linear-gradient(155deg, #1b2c2a 0%, #08110f 60%); border: 1px solid rgba(215, 255, 64, .3);
  box-shadow: 0 24px 46px rgba(0, 0, 0, .55), 0 0 44px rgba(215, 255, 64, .06), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.pc-phone::before { content: ''; position: absolute; z-index: 3; top: 11px; left: 50%; width: 44px; height: 5px; border-radius: 3px; background: #02090a; transform: translateX(-50%); }
.pc-phone-screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 23px; background: #020a09; }
.pc-phone-shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transition: opacity .55s; }
.pc-phone-shot.is-on { opacity: 1; }
.pc-phone-idle { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .55s; background: radial-gradient(circle at 50% 42%, rgba(215, 255, 64, .07), transparent 60%), #020a09; }
.pc-phone.is-idle .pc-phone-idle { opacity: 1; }
.pc-phone-idle b { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--sage); color: #04120a; font: 700 1.9rem/1 'Vazirmatn', Tahoma, sans-serif; }
.pc-phone-lbl, .pc-dock-note { margin: 0; text-align: center; font-size: .58rem; letter-spacing: .09em; line-height: 1.55; color: #8fb5bb; }
.pc-dock-note { color: #6f9296; }

/* ---- caption track: the Persian original, its English, and why it matters ---- */
.pc-caption {
  display: grid; grid-template-columns: 188px minmax(0, 1.3fr) minmax(0, 1fr); gap: 8px 26px; align-items: start; min-height: 128px; padding: 16px 18px;
  background: linear-gradient(180deg, rgba(2, 12, 12, .7), rgba(2, 8, 12, .6)); border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.pc-cap-head { display: grid; gap: 8px; align-content: start; }
.pc-cap-meta { font-size: .6rem; letter-spacing: .1em; color: var(--ball); }
.pc-cap-title { margin: 0; font: 600 1.08rem/1.25 var(--font-d); color: #f3f8f6; }
.pc-cap-body { display: grid; gap: 8px; align-content: start; }
.pc-cap-fa { margin: 0; padding-right: 12px; border-right: 2px solid var(--ball); font: 500 1.08rem/1.75 'Vazirmatn', Tahoma, sans-serif; color: #eef8c8; text-align: right; }
.pc-cap-en { margin: 0; font-size: .95rem; line-height: 1.55; color: #dbe7ea; }
.pc-cap-why { margin: 0; padding-left: 16px; border-left: 1px solid rgba(143, 181, 187, .25); font-size: .84rem; line-height: 1.6; color: #9fb4b8; }

/* ---- transport ---- */
.pc-transport { display: flex; flex-wrap: wrap; gap: 10px 16px; justify-content: space-between; align-items: center; }
.pc-keys, .pc-steps { display: flex; flex-wrap: wrap; gap: 10px; }
.pc-keys .verb-key { --vk: var(--ball); }
.pc-keys .verb-key:disabled { opacity: .4; pointer-events: none; }
.pc-step {
  min-height: 44px; min-width: 44px; padding: 0 16px; cursor: pointer; font-size: .7rem; letter-spacing: .08em; color: #a9c7cc;
  background: rgba(2, 10, 14, .6); border: 1px solid rgba(143, 181, 187, .28);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  transition: color .2s, border-color .2s;
}
.pc-step:hover { color: var(--ball); border-color: color-mix(in srgb, var(--ball) 55%, transparent); }
.pc-step:focus-visible { outline: 2px solid var(--ball); outline-offset: -4px; }

/* ---- narrow: the phone slides beneath the stage, the caption stacks ---- */
@media (max-width: 980px) {
  .pc-grid { grid-template-columns: 1fr; }
  .pc-dock { grid-template-columns: auto minmax(0, 1fr); justify-items: start; align-items: center; gap: 6px 20px; }
  .pc-dock .pc-phone { grid-row: 1 / span 2; width: 128px; padding: 5px; border-radius: 22px; }
  .pc-dock .pc-phone-screen { border-radius: 17px; }
  .pc-dock .pc-phone::before { top: 8px; width: 30px; height: 4px; }
  .pc-phone-lbl, .pc-dock-note { text-align: left; align-self: end; }
  .pc-dock-note { align-self: start; }
  .pc-caption { grid-template-columns: 1fr; min-height: 0; }
  .pc-cap-why { padding: 10px 0 0; border-left: 0; border-top: 1px solid rgba(143, 181, 187, .22); }
}
@media (max-width: 640px) {
  .pc-stage { aspect-ratio: 16 / 10; }
  .pc-tab { padding: 10px 14px 10px 12px; }
  .pc-corner { left: 8px; top: 8px; font-size: .55rem; }
  .pc-transport { gap: 8px; }
  .pc-keys .verb-key--sm { padding: 10px 12px 10px 10px; font-size: .68rem; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .pc-pin::before { animation: none; }
  .pc-flow, .pc-phone-shot, .pc-phone-idle, .pc-tab, .pc-pin::before, .pc-tourbar { transition: none; }
  .pc-tourbar.is-run i { animation: none; }
}
