/* DCP Intake -- editing-bench palette, IBM Plex type, film-strip progress */

:root {
  --ink: #161a17;
  --ink-soft: #4c534d;
  --bench: #e3e5e0;
  --card: #f7f8f6;
  --rule: #c3c7bf;
  --lamp: #e9a21b;
  --sealed: #16665e;
  --fault: #a8321e;

  --strip: #24291f;

  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --cond: 'IBM Plex Sans Condensed', 'IBM Plex Sans', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bench);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 940px;
  margin: 0 auto;
  padding: 40px 24px 96px;
}

/* --- masthead ------------------------------------------------------------ */

.masthead {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 18px;
  margin-bottom: 32px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 10px;
}

h1 {
  font-family: var(--cond);
  font-weight: 700;
  font-size: clamp(2.2rem, 7vw, 3.6rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

.maker {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-soft);
  margin: 8px 0 0;
}

.intro {
  max-width: 62ch;
  margin: 0 0 28px;
}

.intro strong { font-weight: 600; }

/* --- dropzone ------------------------------------------------------------ */

.drop {
  border: 2px dashed var(--rule);
  background: var(--card);
  padding: 40px 28px;
  text-align: center;
  transition: border-color .15s, background .15s;
}

.drop--over {
  border-color: var(--lamp);
  background: #fdf6e6;
}

.drop__lead {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 1.5rem;
  margin: 0 0 6px;
}

.drop__sub {
  color: var(--ink-soft);
  font-size: 14px;
  margin: 0 0 22px;
}

.btnrow {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

button {
  font-family: var(--cond);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  padding: 11px 20px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--card);
  cursor: pointer;
  transition: opacity .15s, background .15s, color .15s;
}

button.ghost {
  background: transparent;
  color: var(--ink);
}

button:hover:not(:disabled) { opacity: 0.82; }

button:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

button:focus-visible {
  outline: 3px solid var(--lamp);
  outline-offset: 2px;
}

/* --- film strip (the signature) ------------------------------------------ */

.strip-wrap {
  margin: 34px 0 24px;
}

.strip-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.strip {
  display: flex;
  gap: 4px;
  background: var(--strip);
  padding: 16px 10px;
  overflow-x: auto;
  border-radius: 2px;
  position: relative;
}

/* sprocket perforations top and bottom */
.strip::before, .strip::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 8px;
  background-image: radial-gradient(var(--bench) 0 2.5px, transparent 3px);
  background-size: 14px 8px;
  background-repeat: repeat-x;
  opacity: 0.85;
}
.strip::before { top: 4px; }
.strip::after { bottom: 4px; }

.frame {
  position: relative;
  flex: 0 0 34px;
  height: 46px;
  background: #34392e;
  border: 1px solid #454b3e;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.frame__fill {
  width: 100%;
  height: 0%;
  background: var(--lamp);
  transition: height .25s linear;
}

.frame--done .frame__fill { background: var(--sealed); }
.frame--failed .frame__fill { background: var(--fault); height: 100% !important; }

.frame--active {
  border-color: var(--lamp);
  box-shadow: 0 0 0 1px var(--lamp);
}

.frame__n {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(255,255,255,0.55);
  pointer-events: none;
}

/* --- sticky progress bar ------------------------------------------------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bench);
  border-bottom: 2px solid var(--ink);
  padding: 14px 0 10px;
  margin-bottom: 22px;
}

.bar__inner {
  display: flex;
  align-items: center;
  gap: 18px;
}

.bar__meter { flex: 1 1 auto; min-width: 0; }

.bar #action { flex: 0 0 auto; white-space: nowrap; }

/* --- overall bar --------------------------------------------------------- */

.overall__track {
  height: 10px;
  background: var(--card);
  border: 1px solid var(--rule);
}

.overall__fill {
  height: 100%;
  width: 0%;
  background: var(--sealed);
  transition: width .3s ease-out;
}

.overall__meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 6px;
}

.status {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  min-height: 1.5em;
  margin: 8px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- file list ----------------------------------------------------------- */

.list {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  border-top: 1px solid var(--rule);
  max-height: 340px;
  overflow-y: auto;
}

.row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: baseline;
  padding: 8px 4px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12.5px;
}

.row__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row__size { color: var(--ink-soft); }

.row__state {
  min-width: 62px;
  text-align: right;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 11px;
}

.row--done .row__state { color: var(--sealed); font-weight: 600; }
.row--active .row__state { color: #9c6c05; font-weight: 600; }
.row--failed .row__state { color: var(--fault); font-weight: 600; }
.row--waiting .row__state { color: var(--ink-soft); }

/* --- notes + actions ----------------------------------------------------- */

label.field {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

textarea {
  width: 100%;
  min-height: 78px;
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: 14px;
  border: 1px solid var(--rule);
  background: var(--card);
  color: var(--ink);
  resize: vertical;
}

textarea:focus-visible {
  outline: 2px solid var(--lamp);
  outline-offset: 1px;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* --- alerts -------------------------------------------------------------- */

.alert {
  display: none;
  padding: 12px 14px;
  font-size: 14px;
  border-left: 4px solid var(--ink);
  background: var(--card);
  margin: 18px 0;
}

.alert--show { display: block; }
.alert--bad { border-color: var(--fault); color: var(--fault); }
.alert--good { border-color: var(--sealed); color: var(--sealed); }

/* --- done ---------------------------------------------------------------- */

.done {
  border: 2px solid var(--sealed);
  padding: 32px 28px;
  background: var(--card);
}

.done h2 {
  font-family: var(--cond);
  font-size: 2rem;
  margin: 0 0 10px;
}

/* --- checklist ----------------------------------------------------------- */

.checklist {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  color: var(--ink-soft);
}

.checklist h3 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 12px;
}

.checklist ul { margin: 0; padding-left: 20px; }
.checklist li { margin-bottom: 7px; }

/* --- responsive ---------------------------------------------------------- */

@media (max-width: 560px) {
  .wrap { padding: 28px 16px 72px; }
  .row { grid-template-columns: 1fr auto; }
  .row__size { display: none; }
  .actions button { flex: 1 1 100%; }
  .bar__inner { flex-direction: column; align-items: stretch; gap: 10px; }
  .bar #action { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
