/* eightball design tokens.
 *
 * One place for colour, type, spacing and motion so the films gallery, the
 * studio and the storyboard stop looking like three different products. Dark
 * by default because the thing on screen is nearly always a film frame, and a
 * bright chrome around a dark frame makes the frame look worse.
 */

:root {
  color-scheme: dark;

  --bg:          #08090c;
  --bg-raised:   #101218;
  --bg-sunken:   #050609;
  --surface:     #15181f;
  --surface-2:   #1c2029;
  --line:        #252a35;
  --line-strong: #363d4c;

  --text:        #eef1f6;
  --text-dim:    #9aa3b5;
  --text-faint:  #646d80;

  --accent:      #5b8cff;
  --accent-soft: #2a3d66;
  --good:        #3ddc97;
  --warn:        #ffb454;
  --bad:         #ff6b6b;

  --r-sm: 6px;
  --r:    12px;
  --r-lg: 18px;
  --r-pill: 999px;

  --shadow:    0 1px 2px rgb(0 0 0 / .4), 0 8px 24px -12px rgb(0 0 0 / .6);
  --shadow-lg: 0 2px 4px rgb(0 0 0 / .4), 0 24px 60px -20px rgb(0 0 0 / .75);

  --ease: cubic-bezier(.22, 1, .36, 1);
  --fast: 120ms var(--ease);
  --slow: 320ms var(--ease);

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --page: 1440px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg:          #f7f8fa;
  --bg-raised:   #ffffff;
  --bg-sunken:   #eceef2;
  --surface:     #ffffff;
  --surface-2:   #f2f4f7;
  --line:        #e2e6ed;
  --line-strong: #cbd2de;
  --text:        #11141a;
  --text-dim:    #5b6474;
  --text-faint:  #8b94a5;
  --shadow:    0 1px 2px rgb(16 24 40 / .06), 0 8px 24px -12px rgb(16 24 40 / .18);
  --shadow-lg: 0 2px 4px rgb(16 24 40 / .06), 0 24px 60px -20px rgb(16 24 40 / .24);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

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

/* -- chrome ------------------------------------------------------------- */

.eb-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
  height: 60px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.eb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 620;
  letter-spacing: -.01em;
  margin-right: 4px;
}

.eb-ball {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #4a4f5c, #0a0b0e 70%);
  color: #fff;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .12);
  flex: none;
}

.eb-tabs { display: flex; gap: 4px; }

.eb-tab {
  padding: 7px 13px;
  border-radius: var(--r-pill);
  color: var(--text-dim);
  font-weight: 520;
  font-size: 14px;
  transition: background var(--fast), color var(--fast);
}
.eb-tab:hover { background: var(--surface-2); color: var(--text); }
.eb-tab[aria-current="page"] { background: var(--surface-2); color: var(--text); }

.eb-spacer { flex: 1; }

.eb-status {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 13px;
  color: var(--text-dim);
  background: var(--surface);
}
.eb-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-faint); flex: none; }
.eb-dot.is-good { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 22%, transparent); }
.eb-dot.is-busy { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 22%, transparent); }
.eb-dot.is-bad  { background: var(--bad);  box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 22%, transparent); }

.eb-icon-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text-dim);
  cursor: pointer;
  transition: background var(--fast), color var(--fast), border-color var(--fast);
}
.eb-icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--line-strong); }

/* -- layout ------------------------------------------------------------- */

.eb-page { max-width: var(--page); margin: 0 auto; padding: 28px 24px 72px; }

.eb-h1 {
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.1;
  letter-spacing: -.025em;
  font-weight: 660;
  margin: 0 0 6px;
}
.eb-sub { color: var(--text-dim); margin: 0 0 26px; font-size: 15px; }

.eb-section-head {
  display: flex; align-items: baseline; gap: 12px;
  margin: 40px 0 16px;
}
.eb-section-head h2 {
  font-size: 15px; font-weight: 600; margin: 0;
  letter-spacing: .04em; text-transform: uppercase; color: var(--text-dim);
}
.eb-rule { flex: 1; height: 1px; background: var(--line); }

.eb-empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  padding: 56px 24px;
  text-align: center;
  color: var(--text-dim);
}
