/* WMM Video Studio — "director's booth" identity per design-brief.json
   cream #FDFBF7 / surface #F0EADF / terracotta #BC5F4B / gold #D9AA4D / ink #2C2723 / muted #A39B90
   Motif: dashed film cut-lines. Signature: sprocketed film-strip status indicator. */

@font-face { font-family: 'Libre Baskerville'; font-weight: 400;
  src: url(/static/fonts/libre-baskerville-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Libre Baskerville'; font-weight: 700;
  src: url(/static/fonts/libre-baskerville-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Fira Sans'; font-weight: 400;
  src: url(/static/fonts/fira-sans-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Fira Sans'; font-weight: 600;
  src: url(/static/fonts/fira-sans-latin-600-normal.woff2) format('woff2'); }

:root {
  --bg: #FDFBF7; --surface: #F0EADF; --primary: #BC5F4B; --accent: #D9AA4D;
  --ink: #2C2723; --muted: #A39B90; --cut: rgba(163,155,144,.45);
  --ok: #6d9e6b; --err: #b3452f;
}
* { box-sizing: border-box; margin: 0; }
body { background: var(--bg); color: var(--ink);
  font: 15px/1.55 'Fira Sans', 'Helvetica Neue', Arial, sans-serif; }
h1,h2,h3 { font-family: 'Libre Baskerville', Georgia, serif; font-weight: 700; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }

/* header — the desk edge */
header { background: var(--surface); box-shadow: 0 2px 8px rgba(0,0,0,.05);
  padding: .8rem 1.6rem; display: flex; align-items: center; gap: 1.6rem;
  position: sticky; top: 0; z-index: 5; }
header .brand { font-family: 'Libre Baskerville', serif; font-weight: 700;
  font-size: 1.15rem; color: var(--ink); display: flex; align-items: center; gap: .55rem; }
header .brand svg { width: 22px; height: 22px; }
header nav { display: flex; gap: 1.1rem; font-size: .92rem; }
header nav a { color: var(--ink); padding-bottom: 2px; }
header nav a.active, header nav a:hover { color: var(--primary);
  border-bottom: 2px solid var(--accent); }
header .spendbox { margin-left: auto; text-align: right; font-size: .78rem;
  color: var(--muted); min-width: 170px; }

/* spend meter — exposure needle */
.meter { height: 8px; border-radius: 4px; background: var(--bg);
  border: 1px solid var(--cut); position: relative; overflow: hidden; margin-top: 3px; }
.meter > i { position: absolute; inset: 0 auto 0 0; background:
  linear-gradient(90deg, var(--accent), var(--primary)); border-radius: 4px; }

main { max-width: 1180px; margin: 1.6rem auto 4rem; padding: 0 1.2rem; }

/* cards — storyboard frames with cut-line borders */
.card { background: var(--bg); border: 1px dashed var(--cut); border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08); padding: 1.1rem 1.3rem; margin-bottom: 1.2rem; }
.card h2 { font-size: 1.05rem; margin-bottom: .7rem; }
.grid { display: grid; gap: 1.2rem; }
.grid.cols3 { grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); }
.grid.cols4 { grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); }

/* SIGNATURE — sprocketed film-strip pipeline indicator */
.filmstrip { display: flex; background: var(--ink); border-radius: 6px; padding: 10px 8px;
  gap: 4px; overflow-x: auto;
  background-image:
    radial-gradient(circle at 8px 5px, var(--bg) 2.2px, transparent 2.6px),
    radial-gradient(circle at 8px calc(100% - 5px), var(--bg) 2.2px, transparent 2.6px);
  background-size: 16px 100%; background-repeat: repeat-x; }
.filmstrip .frame { flex: 1; min-width: 74px; text-align: center; font-size: .68rem;
  letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
  background: #3a342e; border-radius: 3px; padding: .45rem .3rem; margin: 8px 0; }
.filmstrip .frame.donefr { color: var(--surface); background: #4d443c; }
.filmstrip .frame.current { color: var(--ink); background: var(--accent); font-weight: 600; }
.filmstrip .frame.bad { color: #fff; background: var(--err); font-weight: 600; }

/* buttons */
.btn { display: inline-block; border: 0; border-radius: 6px; cursor: pointer;
  font: 600 .88rem 'Fira Sans', sans-serif; padding: .5rem 1rem;
  background: var(--primary); color: var(--bg); }
.btn:hover { background: #a34f3d; }
.btn.secondary { background: transparent; color: var(--primary);
  border: 1px solid var(--primary); }
.btn.secondary:hover { background: rgba(188,95,75,.08); }
.btn.small { padding: .28rem .6rem; font-size: .78rem; }
.btn.gold { background: var(--accent); color: var(--ink); }

/* forms */
input, select, textarea { font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--muted); border-radius: 6px; padding: .45rem .6rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217,170,77,.25); }
label { font-size: .8rem; color: var(--muted); display: block; margin-bottom: .2rem; }
.formrow { margin-bottom: .9rem; }

/* tables */
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th { text-align: left; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); padding: .4rem .5rem; border-bottom: 1px dashed var(--cut); }
td { padding: .5rem; border-bottom: 1px dashed var(--cut); vertical-align: middle; }

/* status pills — slate chips */
.pill { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .03em;
  border-radius: 4px; padding: .15rem .5rem; background: var(--surface); color: var(--ink); }
.pill.review, .pill.done { background: var(--ok); color: #fff; }
.pill.generating, .pill.assembling, .pill.scripting, .pill.storyboarding { background: var(--accent); }
.pill.awaiting_approval { background: var(--primary); color: #fff; }
.pill.failed, .pill.frozen_billing, .pill.error { background: var(--err); color: #fff; }

/* storyboard frames */
.board img { width: 100%; border-radius: 4px; display: block;
  border: 1px solid var(--cut); }
.board .shotcard { background: var(--surface); border-radius: 6px; padding: .6rem;
  border: 1px dashed var(--cut); }
.board .shotcard .meta { display: flex; align-items: center; gap: .5rem;
  margin-top: .5rem; font-size: .78rem; flex-wrap: wrap; }
.board video { width: 100%; border-radius: 4px; margin-top: .5rem; background: #000; }

.flash { background: var(--surface); border-left: 4px solid var(--accent);
  padding: .6rem 1rem; border-radius: 4px; margin-bottom: 1rem; }
.freeze-banner { background: var(--err); color: #fff; padding: .6rem 1.2rem;
  border-radius: 6px; margin-bottom: 1.2rem; display: flex; align-items: center;
  justify-content: space-between; gap: 1rem; }
.muted { color: var(--muted); font-size: .85rem; }
.usd { font-variant-numeric: tabular-nums; }

/* type picker cards in wizard */
.typecards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr));
  gap: .9rem; }
.typecards label { display: block; cursor: pointer; }
.typecards input { position: absolute; opacity: 0; }
.typecards .tc { border: 1px dashed var(--cut); border-radius: 6px; padding: .9rem;
  text-align: center; background: var(--bg); font-size: .92rem; color: var(--ink); }
.typecards input:checked + .tc { border: 2px solid var(--primary); background: var(--surface);
  font-weight: 600; }

@media (max-width: 720px) {
  header { flex-wrap: wrap; gap: .6rem; }
  header .spendbox { margin-left: 0; text-align: left; }
  main { margin-top: 1rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
