/* HOF-TRANSFER-001 — the client's production page.
 *
 * Loaded AFTER app.css and never instead of it: app.css owns the base tokens
 * and the form/queue primitives, this file owns the editorial layer. app.css is
 * not edited — other pages depend on it unchanged.
 *
 * Everything here is class-driven. The page's CSP is `style-src 'self'`, so
 * there is no inline style attribute and no <style> block anywhere in this
 * surface; anything dynamic is set through element.style in client.js.
 */

/* ---------------------------------------------------------------------------
   Tokens layered on top of app.css rather than replacing it.
   --------------------------------------------------------------------------- */
:root {
  --c-serif: ui-serif, Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --c-ink-soft: color-mix(in srgb, var(--ink) 72%, transparent);
  --c-hairline: color-mix(in srgb, var(--line) 70%, transparent);
  --c-tint: color-mix(in srgb, var(--accent) 12%, transparent);
  --c-raise: 0 1px 0 color-mix(in srgb, #ffffff 5%, transparent);
  --c-lift: 0 18px 40px -28px rgba(0, 0, 0, .85);
  --c-gutter: 16px;
  --c-measure: 62ch;
  --c-rhythm: 56px;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --c-lift: 0 18px 40px -30px rgba(40, 34, 22, .35);
    --c-raise: 0 1px 0 color-mix(in srgb, #ffffff 90%, transparent);
  }
}

/* An explicit background on body, not only on :root — a short page must not
   show the user-agent white below the fold on a dark screen. */
body.c-body {
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;           /* belt and braces against a wide child */
}

/* ---------------------------------------------------------------------------
   Type.
   --------------------------------------------------------------------------- */
.c-display {
  font-family: var(--c-serif);
  font-weight: 300;
  font-size: clamp(34px, 7vw, 66px);
  line-height: 1.04;
  letter-spacing: -.02em;
  margin: 0 0 10px;
  text-wrap: balance;
}
.c-h2 {
  font-family: var(--c-serif);
  font-weight: 400;
  font-size: clamp(22px, 3.4vw, 30px);
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 2px 0 0;
}
.c-kicker {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 8px;
}
.c-kicker-accent { color: var(--accent); }
.c-lede {
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.6;
  max-width: var(--c-measure);
  margin: 0 0 26px;
}
.c-hint { color: var(--ink-3); font-size: 12.5px; margin: 7px 0 0; }
.c-opt { text-transform: none; letter-spacing: 0; color: var(--ink-3); font-size: 11.5px; }
.c-empty { color: var(--ink-3); font-size: 14px; padding: 22px 0; margin: 0; }
.linky {
  background: none; border: 0; padding: 0; font: inherit; font-size: 12.5px;
  color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

/* ---------------------------------------------------------------------------
   Shell.
   --------------------------------------------------------------------------- */
.c-shell-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: var(--c-gutter);
  padding-right: var(--c-gutter);
}
.c-main { padding-top: 8px; padding-bottom: 96px; }
.c-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--c-raise);
  margin-bottom: 14px;
}

/* ---------------------------------------------------------------------------
   Error toast. shared.js writes into #err by id, so it must keep that id and
   only gains position here.
   --------------------------------------------------------------------------- */
.c-toast {
  position: fixed;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  max-width: calc(100vw - 32px);
  width: max-content;
  background: color-mix(in srgb, var(--bad) 16%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--bad) 45%, transparent);
  color: var(--ink);
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 14px;
  box-shadow: var(--c-lift);
}

/* ---------------------------------------------------------------------------
   Sign in.
   --------------------------------------------------------------------------- */
.c-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px var(--c-gutter) 72px;
  /* A single soft pool of light, so the page reads as a room rather than a form. */
  background:
    radial-gradient(1100px 620px at 50% -12%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%),
    var(--bg);
}
.c-gate-inner { width: 100%; max-width: 480px; }
.c-gate .c-display { font-size: clamp(32px, 6vw, 46px); }
.c-gate-card { margin-bottom: 0; }
.c-gate-msg {
  margin: 0 0 16px;
  padding: 11px 14px;
  border-radius: 9px;
  background: var(--c-tint);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.5;
}
.c-gate-echo { margin: 0 0 16px; color: var(--ink-3); font-size: 13px; }
.c-echo { color: var(--ink); overflow-wrap: anywhere; }
.c-gate-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 4px; }

/* ---------------------------------------------------------------------------
   Production picker.
   --------------------------------------------------------------------------- */
.c-shell { display: block; }
#view-picker.c-shell { padding: 64px 0 96px; }
.c-picklist { display: grid; gap: 12px; margin-bottom: 22px; }
.c-pick {
  display: block; width: 100%; text-align: left;
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 22px; cursor: pointer; font: inherit; font-weight: 400;
  transition: border-color .18s ease, transform .18s ease;
}
.c-pick:hover { border-color: var(--accent); transform: translateY(-1px); filter: none; }
.c-pick-name { display: block; font-family: var(--c-serif); font-size: 22px; line-height: 1.2; }
.c-pick-meta { display: block; color: var(--ink-3); font-size: 13px; margin-top: 5px; }

/* ---------------------------------------------------------------------------
   Hero.
   --------------------------------------------------------------------------- */
.c-hero {
  padding: 40px 0 34px;
  margin-bottom: var(--c-rhythm);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 460px at 12% -30%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 68%),
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 55%, transparent), transparent);
}
.c-hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.c-hero-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  /* The studio kicker that used to sit opposite these is gone — the page is the
     client's and House of Film Studio is credited in the footer only. With one
     child left, space-between would pull the buttons to the LEFT, so they are
     pushed right explicitly rather than by a sibling that no longer exists. */
  margin-left: auto;
}
.c-hero-name { margin-top: 6px; }
.c-hero-title {
  font-family: var(--c-serif);
  font-size: clamp(17px, 2.4vw, 23px);
  font-style: italic;
  color: var(--c-ink-soft);
  margin: 0 0 14px;
  max-width: var(--c-measure);
}
.c-hero-note {
  color: var(--ink-2); font-size: 15px; line-height: 1.62;
  max-width: var(--c-measure); margin: 0 0 22px;
  border-left: 2px solid var(--accent); padding-left: 16px;
  white-space: pre-wrap;              /* the studio's note keeps its line breaks */
  overflow-wrap: anywhere;
}
.c-facts { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 22px 0 0; }
.c-fact dt {
  font-family: var(--mono); font-size: 10px; letter-spacing: .28em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 5px;
}
.c-fact dd { margin: 0; font-size: 14px; color: var(--ink); }

/* ---------------------------------------------------------------------------
   Sections.
   --------------------------------------------------------------------------- */
.c-section { margin-bottom: var(--c-rhythm); scroll-margin-top: 20px; }
.c-section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px; flex-wrap: wrap;
  padding-bottom: 14px; margin-bottom: 22px;
  border-bottom: 1px solid var(--c-hairline);
}
.c-section-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.c-note-line { color: var(--ink-2); font-size: 13.5px; margin: 0 0 16px; }

/* ---------------------------------------------------------------------------
   Player.
   --------------------------------------------------------------------------- */
.c-stage {
  margin-bottom: var(--c-rhythm);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--c-lift);
}
.c-stage-frame {
  display: flex; align-items: center; justify-content: center;
  background: #000; min-height: 200px;
}
.c-stage-frame video, .c-stage-frame img {
  display: block; width: 100%; height: auto;
  max-height: 72vh; object-fit: contain; background: #000;
}
.c-stage-frame audio { width: 100%; margin: 26px 22px; }
.c-stage-frame .c-loading { color: var(--ink-3); font-size: 13.5px; padding: 60px 20px; }
.c-stage-bar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px; flex-wrap: wrap;
  padding: 14px 18px;
  background: var(--panel);
  border-top: 1px solid var(--line);
}
.c-stage-meta { min-width: 0; }
.c-stage-meta .c-kicker { margin-bottom: 4px; }
.c-stage-name {
  margin: 0; font-size: 15px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch;
}
.c-stage-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.c-time {
  font-family: var(--mono); font-size: 13px; color: var(--accent);
  border: 1px solid var(--c-hairline); border-radius: 6px; padding: 4px 9px;
  font-variant-numeric: tabular-nums;
}
.c-stage-warn {
  margin: 0; padding: 12px 18px;
  background: color-mix(in srgb, var(--warn) 12%, var(--panel));
  border-top: 1px solid color-mix(in srgb, var(--warn) 40%, transparent);
  color: var(--ink); font-size: 13px;
}

/* ---------------------------------------------------------------------------
   Deliverables grid.
   --------------------------------------------------------------------------- */
.c-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.c-tile {
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--c-raise);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.c-tile:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); transform: translateY(-2px); box-shadow: var(--c-lift); }
.c-tile-art {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(150deg, var(--panel-2), color-mix(in srgb, var(--accent) 7%, var(--panel)));
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  cursor: default;
}
.c-tile-art.playable { cursor: pointer; }
.c-tile-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.c-glyph {
  font-family: var(--mono); font-size: 11px; letter-spacing: .26em;
  text-transform: uppercase; color: var(--ink-3);
}
.c-tile-art.playable .c-play {
  width: 54px; height: 54px; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent);
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s ease, transform .2s ease;
}
.c-tile-art.playable:hover .c-play { background: var(--accent); transform: scale(1.06); }
.c-play-tri {
  width: 0; height: 0; margin-left: 4px;
  border-left: 14px solid var(--accent);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  transition: border-left-color .2s ease;
}
.c-tile-art.playable:hover .c-play-tri { border-left-color: #17130b; }
.c-tile-body { padding: 16px 18px 6px; flex: 1; min-width: 0; }
.c-tile-name {
  margin: 0; font-size: 15px; line-height: 1.35;
  overflow-wrap: anywhere;            /* a 200-character filename must not widen the grid */
}
.c-tile-meta { margin: 6px 0 0; color: var(--ink-3); font-size: 12.5px; }
.c-tile-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 18px 18px; }

/* ---------------------------------------------------------------------------
   Change requests.
   --------------------------------------------------------------------------- */
.c-notebox { margin-bottom: 26px; }
.c-notebox textarea { resize: vertical; min-height: 96px; line-height: 1.55; }
.c-notebox-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.c-pin {
  display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap;
  margin: 0 0 14px; padding: 10px 14px;
  background: var(--c-tint);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  border-radius: 9px; font-size: 13.5px;
}
.c-pin-text { color: var(--ink); overflow-wrap: anywhere; }

.c-notes { display: grid; gap: 12px; }
.c-note {
  background: var(--panel); border: 1px solid var(--line);
  border-left: 2px solid var(--ink-3);
  border-radius: 12px; padding: 16px 18px;
}
.c-note.open { border-left-color: var(--accent); }
.c-note.resolved { border-left-color: var(--ok); }
.c-note-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.c-note-by { font-size: 13.5px; color: var(--ink); }
.c-note-when { font-size: 12px; color: var(--ink-3); }
.c-note-at {
  font-family: var(--mono); font-size: 11.5px; font-variant-numeric: tabular-nums;
  color: var(--accent); background: transparent;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 5px; padding: 2px 7px; cursor: pointer; font-weight: 500;
}
.c-note-at:hover { background: var(--c-tint); filter: none; }
.c-note-at.flat { cursor: default; }
.c-note-body { margin: 0; font-size: 14.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.c-note-reply {
  margin: 12px 0 0; padding: 12px 14px;
  background: var(--panel-2); border-radius: 9px;
  font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere;
}
.c-note-reply .c-kicker { margin-bottom: 5px; }

/* ---------------------------------------------------------------------------
   Upload.
   --------------------------------------------------------------------------- */
.c-drop { padding: 52px 20px; border-radius: 12px; }
.c-limits { margin: 14px 0 0; }
#queue .item .name, #received .item .name { overflow-wrap: anywhere; white-space: normal; }

/* ---------------------------------------------------------------------------
   Footer. The page belongs to the client; the studio is credited beneath it.
   --------------------------------------------------------------------------- */
.c-foot { border-top: 1px solid var(--line); padding: 30px 0 46px; background: var(--panel); }
.c-foot-line { margin: 0 0 6px; font-size: 13.5px; color: var(--ink-2); }
.c-foot-line a { color: var(--accent); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.c-foot-line a:hover { color: var(--ink); }
.c-foot-fine { margin: 0; font-size: 12px; color: var(--ink-3); max-width: var(--c-measure); }

/* ---------------------------------------------------------------------------
   Phone.
   --------------------------------------------------------------------------- */
@media (max-width: 720px) {
  :root { --c-rhythm: 40px; }
  .c-hero { padding: 26px 0 26px; }
  .c-hero-top { flex-direction: column; align-items: flex-start; gap: 10px; }
  .c-facts { gap: 14px 26px; }
  .c-grid { grid-template-columns: 1fr; }
  .c-card { padding: 18px; }
  .c-stage-bar { align-items: flex-start; }
  .c-stage-name { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  .c-section-head { align-items: flex-start; }
  .c-notebox-foot { flex-direction: column; align-items: stretch; }
  .c-notebox-foot button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .c-tile, .c-pick, .c-tile-art.playable .c-play, .c-play-tri { transition: none; }
  .c-tile:hover, .c-pick:hover { transform: none; }
  .c-tile-art.playable:hover .c-play { transform: none; }
}

/* First paint, before /me has answered. */
.c-boot { text-align: center; }
.c-boot-line { color: var(--ink-3); font-size: 14px; margin: 0; }

/* ===========================================================================
   The front door.
   Reuses the production page's tokens and display face so a client who arrives
   here and then signs in does not cross a visual seam.
   =========================================================================== */
.c-land {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(48px, 10vh, 104px) var(--c-gutter) 56px;
}
.c-land-head { max-width: var(--c-measure); }
/* The studio label above the headline. Matches the wide-tracked mono treatment
   used for every other micro-label in this system — without it the line renders
   as ordinary body copy and the masthead loses its hierarchy entirely. */
.c-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
.c-land-title { margin: 10px 0 0; }
.c-land-lede {
  font-family: var(--c-serif);
  font-size: clamp(17px, 2.3vw, 21px);
  line-height: 1.5;
  color: var(--c-ink-soft);
  margin: 18px 0 0;
  max-width: 46ch;
}

.c-doors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
  margin-top: var(--c-rhythm);
}
.c-door {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--c-raise);
  text-decoration: none;
  color: inherit;
}
/* Only the clickable door moves. A card that lifts but does nothing reads as
   broken, so the static one is deliberately inert. */
a.c-door {
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
a.c-door:hover,
a.c-door:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: var(--c-lift);
}
a.c-door:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.c-door-primary { background: linear-gradient(180deg, var(--c-tint), transparent 58%), var(--panel); }
.c-door-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent);
}
.c-door-title { font-family: var(--c-serif); font-size: 25px; line-height: 1.15; }
.c-door-body { font-size: 14.5px; line-height: 1.6; color: var(--c-ink-soft); }
.c-door-note { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.c-door-go { font-size: 14px; color: var(--accent); margin-top: 6px; font-weight: 600; }

.c-land-assure {
  margin: var(--c-rhythm) 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--c-hairline);
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-3);
  max-width: 62ch;
}
.c-land-foot {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-items: baseline;
  justify-content: space-between;
}
.c-land-studio {
  font-family: var(--c-serif);
  font-size: 16px;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px solid var(--c-hairline);
  padding-bottom: 2px;
}
.c-land-studio:hover { color: var(--ink); border-bottom-color: var(--accent); }
.c-land-admin { font-size: 12.5px; color: var(--ink-3); text-decoration: none; }
.c-land-admin:hover { color: var(--ink-2); }

@media (max-width: 620px) {
  .c-land { padding-top: 40px; }
  .c-door { padding: 22px 20px 20px; }
}
