/* Motion Graphics workspace styles. Echoes the landing palette in /styles.css. */

:root {
  --bg: #0a0a0b;
  --bg-alt: #101012;
  --panel: #15151a;
  --panel-alt: #1a1a20;
  --line: #26262d;
  --line-soft: #1d1d22;
  --ink: #e8e8ea;
  --ink-dim: #9a9aa3;
  --ink-faint: #6a6a73;
  --accent: #fdc809;
  --blue: #0a84ff;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { width: 100%; min-height: 100vh; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: var(--bg); }

/* ── chrome ── */

.workspace { display: flex; flex-direction: column; min-height: 100vh; }

.workspace-head {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 24px;
  border-bottom: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 50;
}

.wordmark {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 15px; font-weight: 500; letter-spacing: -0.01em;
}
.wordmark .mark { display: block; width: 20px; height: 20px; flex: none; }
.wordmark .tld { color: var(--ink-faint); }

.workspace-nav { display: flex; align-items: center; gap: 22px; }
.workspace-nav a { font-size: 14px; color: var(--ink-dim); transition: color .15s ease; }
.workspace-nav a:hover { color: var(--ink); }

.workspace-main {
  flex: 1;
  max-width: 880px; width: 100%; margin: 0 auto;
  padding: 32px 24px 96px;
}

.workspace-body { display: flex; flex-direction: column; gap: 36px; }

/* ── boot placeholder ── */

.placeholder {
  border: 1px dashed var(--line);
  border-radius: 6px;
  padding: 64px 32px;
  text-align: center;
}
.placeholder h1 { font-size: 28px; letter-spacing: -0.02em; margin-bottom: 12px; }
.placeholder p { color: var(--ink-dim); }

/* ── form ── */

.job-form {
  display: flex; flex-direction: column; gap: 24px;
  background: var(--bg-alt);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 24px;
}

.field { display: flex; flex-direction: column; gap: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Artwork + motion description sit side-by-side on desktop, stack on mobile.
   align-items: stretch ensures both columns are the same height; flex:1 on
   the artwork drop and on the textarea makes both inputs fill that height. */
.artwork-motion-row {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}
.artwork-motion-row > .field { flex: 1; }
.artwork-motion-row .artwork-drop,
.artwork-motion-row .field-motion textarea {
  flex: 1;
  min-height: 220px;
}
.field-label {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink); font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.field-optional {
  font-size: 10px; letter-spacing: 0.1em; color: var(--ink-faint);
  text-transform: uppercase; font-weight: 400;
  border: 1px solid var(--line); padding: 2px 6px; border-radius: 3px;
}
.field-hint { color: var(--ink-dim); font-size: 13px; line-height: 1.5; }

/* text inputs */

textarea, input[type="text"] {
  width: 100%;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 10px 12px;
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.5;
  resize: vertical;
  transition: border-color .12s ease;
}
textarea { font-family: var(--mono); font-size: 13.5px; min-height: 110px; }
textarea::placeholder, input[type="text"]::placeholder { color: var(--ink-faint); }
textarea:focus, input[type="text"]:focus {
  outline: none; border-color: var(--accent);
}

/* artwork upload */

.artwork-drop {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  border: 1px dashed var(--line);
  border-radius: 5px;
  cursor: pointer;
  padding: 14px 16px;
  overflow: hidden;
  transition: border-color .12s ease, background .12s ease;
}
.artwork-drop:hover { border-color: var(--ink-faint); }
.artwork-drop.has-file {
  border-style: solid;
  border-color: var(--line-soft);
  background: var(--panel);
  padding: 0;
}
.artwork-drop input[type="file"] {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
  z-index: 1;
}
.artwork-hint { color: var(--ink-dim); font-size: 14px; }

.artwork-preview {
  display: block;
  width: 100%; height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.artwork-clear {
  position: absolute; top: 8px; right: 8px;
  z-index: 2;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  color: var(--ink-dim);
  border: 1px solid var(--line);
  backdrop-filter: blur(4px);
  font-family: var(--mono); font-size: 11px;
  padding: 4px 10px; border-radius: 4px;
  cursor: pointer;
  transition: color .12s ease, border-color .12s ease, background .12s ease;
}
.artwork-clear:hover { color: var(--ink); border-color: var(--ink-faint); background: var(--bg); }

/* segmented buttons */

.segmented {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
  width: fit-content;
}
.seg {
  background: transparent;
  color: var(--ink-dim);
  border: none;
  border-right: 1px solid var(--line);
  padding: 8px 14px;
  font-family: var(--mono); font-size: 13px;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.seg:last-child { border-right: none; }
.seg:hover { color: var(--ink); }
.seg-on { background: var(--panel); color: var(--ink); }

/* submit row */

.submit-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 4px;
}
.submit-hint { color: var(--ink-faint); font-size: 13px; font-family: var(--mono); }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.02em;
  padding: 10px 18px;
  border-radius: 5px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--bg);
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, color .12s ease;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); background: #fff; }
.btn:disabled { cursor: not-allowed; background: var(--panel); color: var(--ink-faint); border-color: var(--line); transform: none; }

.btn-primary {
  background: var(--accent); color: var(--bg); border-color: var(--accent);
  font-weight: 600;
}
.btn-primary:hover:not(:disabled) { background: var(--accent); filter: brightness(1.08); }

/* ── job stack ── */

.job-stack { display: flex; flex-direction: column; gap: 16px; }

.job-stack-empty {
  border: 1px dashed var(--line-soft);
  border-radius: 6px;
  padding: 28px 24px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 14px;
}

/* ── responsive ── */

@media (max-width: 640px) {
  .workspace-main { padding: 24px 18px 64px; }
  .artwork-motion-row { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .submit-row { flex-direction: column; align-items: stretch; gap: 12px; }
  .submit-row .btn { width: 100%; justify-content: center; }
}
