/* ============================================================
   Rewired — authored product mockups
   Drawn in the site's own world. Not screenshots, not generated
   images. These are the product's Alice-Blue light surface
   (PROJECT.md §5: "Light surface... cards, input fills"), inset
   into the dark page.

   Binding content rules — these exist so nothing here can be
   mistaken for a real customer or a real claim:
     · no company names   (fake companies read as a client list)
     · no currency, no amounts, no counts, no percentages
     · person names only, fictional and regional
     · every mock carries a visible caption saying it is an
       illustration with sample data
     · Franco-Arabic in Latin glyphs only — Audex has no Arabic
       and the companion face is an open question (PROJECT.md §5)
     · channels are text pills in Brand Blue, never a third-party
       logo and never green: Brand Blue is the only accent
   ============================================================ */

.panel{
  background:var(--rw-alice);
  color:var(--lk);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:0 40px 90px -34px rgba(0,0,0,.8),0 0 0 1px rgba(3,17,48,.5);
  user-select:none;
}
.panel *{cursor:default}
figure{margin:0}
figcaption{
  font-size:.8125rem;color:var(--ink-3);line-height:1.6;
  margin-top:var(--space-3);max-width:52ch;
}

/* ---------- Panel chrome ---------- */
.panel-bar{
  display:flex;align-items:center;gap:.625rem;
  padding:.8125rem 1rem;border-bottom:1px solid var(--lhair);
}
.panel-bar .node{width:.5rem;height:.5rem;border:2px solid var(--blue);flex:none}
.panel-bar .ttl{font-size:.9375rem;color:var(--lk);letter-spacing:-.01em}
.panel-bar .right{margin-left:auto;display:flex;align-items:center;gap:.625rem;min-width:0}
.search-stub{
  font-size:.8125rem;color:var(--lk-2);
  border:1px solid var(--lhair);border-radius:6px;
  padding:.3125rem .625rem;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis;
}
.chip-new{
  font-size:.75rem;color:#fff;background:var(--blue);
  border-radius:6px;padding:.3125rem .625rem;white-space:nowrap;
}

/* ---------- Work board ---------- */
.board{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;background:var(--lhair)}
.board-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.col{background:var(--rw-alice);padding:.875rem .75rem 1.25rem;min-width:0}
.col-h{
  font-size:.6875rem;letter-spacing:.09em;text-transform:uppercase;
  color:var(--lk-2);margin-bottom:.75rem;
}
.card{
  background:#fff;border:1px solid var(--lhair);
  border-radius:9px;padding:.6875rem .75rem;margin-bottom:.5rem;
  box-shadow:0 1px 2px rgba(3,17,48,.05);
}
.card:last-child{margin-bottom:0}
.card .who{font-size:.9375rem;color:var(--lk);line-height:1.3;letter-spacing:-.012em;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.card .quote{
  font-style:italic;font-size:.8125rem;color:var(--lk-2);
  margin-top:.25rem;line-height:1.4;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.card .meta{display:flex;align-items:center;gap:.375rem;flex-wrap:wrap;margin-top:.5rem}
.chan{
  font-size:.6875rem;letter-spacing:.02em;
  color:var(--blue);background:var(--blue-ghost);
  border-radius:5px;padding:.1875rem .4375rem;white-space:nowrap;
}
.when{font-size:.6875rem;color:var(--lk-3);white-space:nowrap}
/* the record the intake figure follows through the system */
.card.is-new{border-color:rgba(24,93,241,.5);box-shadow:0 0 0 3px var(--blue-ghost)}
/* mid-drag, implied motion, zero JS */
.card.is-moving{transform:rotate(-1.6deg);box-shadow:0 10px 22px -8px rgba(3,17,48,.32)}

/* ---------- Intake figure ---------- */
.intake{
  display:grid;grid-template-columns:minmax(0,1fr) minmax(5rem,9rem) minmax(0,1fr);
  gap:var(--space-3);align-items:center;
}
.intake-form{padding:1rem;display:flex;flex-direction:column;gap:.625rem}
.intake-form .fl{font-size:.6875rem;letter-spacing:.06em;text-transform:uppercase;color:var(--lk-2)}
.intake-form .fv{
  font-size:.875rem;color:var(--lk);background:#fff;
  border:1px solid var(--lhair);border-radius:6px;padding:.5rem .625rem;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.intake-form .send{
  align-self:flex-start;margin-top:.25rem;
  font-size:.8125rem;color:#fff;background:var(--blue);
  border-radius:6px;padding:.4375rem .875rem;
}
.intake-wire{position:relative;height:4.5rem}
.intake-wire svg{width:100%;height:100%;overflow:visible}
.intake-col{padding:.875rem .75rem}

/* ---------- Responsive ---------- */
@media (max-width:900px){
  /* The panel is an illustration, not a control. Rather than squeeze four
     columns into a phone — which truncates every name and destroys the one
     thing the mock exists to show — hold the columns at a readable width and
     crop, fading the cut so it reads as a window into a wider app. The page
     body itself still never scrolls sideways. */
  .board{grid-template-columns:repeat(4,14.5rem)}
  .board-3{grid-template-columns:repeat(3,13rem)}
  .panel{overflow:hidden}
  .panel .board,.panel .board-3{
    -webkit-mask-image:linear-gradient(90deg,#000 76%,transparent 100%);
    mask-image:linear-gradient(90deg,#000 76%,transparent 100%);
  }
  .board-scroll{
    overflow:hidden;
    -webkit-mask-image:linear-gradient(90deg,#000 74%,transparent 100%);
    mask-image:linear-gradient(90deg,#000 74%,transparent 100%);
  }
  .intake{grid-template-columns:1fr;gap:var(--space-2)}
  .intake-wire{height:2.5rem}
}

/* ---------- Morphing panel (home + services) ---------- */
.cmd{
  display:flex;align-items:center;gap:.125rem;
  margin:.75rem 1rem 0;padding:.625rem .875rem;
  background:#fff;border:1px solid var(--lhair);border-radius:8px;
  font-size:.875rem;color:var(--lk);min-height:2.5rem;
}
.cmd .caret{
  display:inline-block;width:.55em;height:1.1em;background:var(--blue);
  animation:caret 1s steps(1) infinite;flex:none;
}
@keyframes caret{50%{opacity:0}}
/* Absolute children contribute no height, so min-height governs the box.
   A fixed ratio left ~180px of dead white under the shortest state. */
.morph{position:relative;padding:1rem;min-height:19.5rem}
.mstate{position:absolute;inset:1rem;transition:opacity var(--dur) var(--ease),transform var(--dur) var(--ease)}
.mstate[hidden]{display:none}
.mstate.out{opacity:0;transform:translateY(12px)}

/* state B — automation run */
.runlist{display:flex;flex-direction:column;gap:.875rem;justify-content:center;height:100%}
.run{display:flex;align-items:center;gap:.625rem;font-size:.9375rem;color:var(--lk)}
.run em{font-style:italic;color:var(--lk-2)}
.run svg{width:1rem;height:1rem;flex:none;fill:none;stroke:var(--blue);
  stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.run svg path{stroke-dasharray:24;stroke-dashoffset:0}
.mstate .run svg path{stroke-dashoffset:24}
.mstate[data-state="b"]:not([hidden]) .run svg path{animation:tick .45s var(--ease-out) forwards}
.mstate[data-state="b"]:not([hidden]) .run:nth-child(2) svg path{animation-delay:.35s}
.mstate[data-state="b"]:not([hidden]) .run.last svg path{animation-delay:.8s}
@keyframes tick{to{stroke-dashoffset:0}}

/* state C — client portal wireframe */
.wireframe{height:100%;display:flex;flex-direction:column;gap:.75rem;justify-content:center}
.wf-top{display:flex;align-items:center;gap:.5rem;padding-bottom:.625rem;border-bottom:1px solid var(--lhair)}
.wf-node{width:9px;height:9px;background:var(--blue);flex:none}
.wf-top i{display:block;width:2.5rem;height:6px;background:var(--lhair);border-radius:3px}
.wf-hero{display:flex;flex-direction:column;gap:.5rem;align-items:flex-start}
.wf-long{width:78%;height:12px;background:rgba(3,17,48,.18);border-radius:3px}
.wf-short{width:46%;height:8px;background:var(--lhair);border-radius:3px}
.wf-btn{width:6.5rem;height:1.75rem;background:var(--blue);border-radius:6px;margin-top:.25rem}

/* services: tabbed variant */
.mtabs{display:flex;gap:.375rem;padding:.75rem 1rem 0;flex-wrap:wrap}
.mtab{
  font-size:.75rem;letter-spacing:.05em;padding:.3125rem .625rem;border-radius:6px;
  border:1px solid var(--lhair);color:var(--lk-2);background:none;
}
.mtab[aria-selected="true"]{border-color:var(--blue);color:var(--blue);background:var(--blue-ghost)}
.queue{display:flex;flex-direction:column;gap:.5rem;justify-content:center;height:100%}
.qrow{display:flex;align-items:center;gap:.625rem;padding:.5rem .625rem;background:#fff;
  border:1px solid var(--lhair);border-radius:8px;font-size:.875rem;color:var(--lk)}
.qrow .st{margin-left:auto;font-size:.6875rem;color:var(--lk-2)}
.qrow.ok .st{color:var(--blue)}
.qrow svg{width:.875rem;height:.875rem;fill:none;stroke:var(--blue);stroke-width:2.5;
  stroke-linecap:round;stroke-linejoin:round;flex:none}
.bars{display:flex;flex-direction:column;gap:.875rem;justify-content:center;height:100%}
.barrow{display:grid;grid-template-columns:5rem 1fr auto;gap:.625rem;align-items:center;font-size:.8125rem;color:var(--lk-2)}
.barrow .bt{height:.5rem;border-radius:2px;background:rgba(24,93,241,.14);overflow:hidden}
.barrow .bt i{display:block;height:100%;background:var(--blue);border-radius:2px}
.barrow em{font-style:italic;color:var(--blue)}
.chart{display:flex;align-items:flex-end;gap:.5rem;height:58%;padding-top:.5rem}
.chart span{flex:1;background:var(--blue);border-radius:2px 2px 0 0;opacity:.75;
  transform-origin:bottom;animation:grow .5s var(--ease-out) backwards}
.chart span:nth-child(2){animation-delay:.06s}
.chart span:nth-child(3){animation-delay:.12s}
.chart span:nth-child(4){animation-delay:.18s}
.chart span:nth-child(5){animation-delay:.24s}
@keyframes grow{from{transform:scaleY(0)}}
.statrows{border-top:1px solid var(--lhair);margin-top:.75rem}
.statrows p{display:flex;justify-content:space-between;font-size:.8125rem;color:var(--lk-2);
  padding-block:.4375rem;border-bottom:1px solid var(--lhair)}

@media (prefers-reduced-motion:reduce){
  .cmd .caret{animation:none}
  .mstate{transition:none}
  .run svg path{stroke-dashoffset:0 !important;animation:none !important}
  .chart span{animation:none}
}
