/* Barr&Co delivery. Tokens from the Production Playbook and barrancostudios.com; dark for footage. */
@font-face { font-family: "Raleway"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/raleway-latin-wght-normal.woff2) format("woff2"); }
@font-face { font-family: "Raleway"; font-style: italic; font-weight: 100 900; font-display: swap; src: url(/fonts/raleway-latin-wght-italic.woff2) format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 200 900; font-display: swap; src: url(/fonts/source-sans-3-latin-wght-normal.woff2) format("woff2"); }
:root {
  --y: #f2b919;
  --y-ink: #8a6c00;
  --black: #0b0a0b;
  --char: #323032;
  --char2: #232123;
  --panel: #171617;
  --line: #2e2c2e;
  --on-dark: #e6e3de;
  --on-dark-mute: #a9a5a0;
  --display: "Raleway", Arial, sans-serif;
  --body: "Source Sans 3", "Myriad Pro", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--black); color: var(--on-dark); font: 400 16px/1.5 var(--body); min-height: 100vh; }
h1, h2, h3, p, dl, dd, ul { margin: 0; padding: 0; }
ul { list-style: none; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--y); outline-offset: 2px; }
h1, h2 { font-family: var(--display); text-wrap: balance; }
code { font: 13px/1.4 ui-monospace, Menlo, monospace; background: var(--char2); padding: 2px 6px; border-radius: 3px; word-break: break-all; }
.wrap { max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--on-dark-mute); }
.eyebrow { font: 700 12px var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--y); }
.fine { font-size: 13px; color: var(--on-dark-mute); }

/* Header */
.top { position: sticky; top: 0; z-index: 30; display: flex; justify-content: space-between; align-items: center; height: 64px; background: rgba(11, 10, 11, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding-right: var(--gutter); }
.brand { display: block; height: 64px; padding: 14px 22px 14px var(--gutter); color: #fff; --logo-accent: var(--y); }
.logo { display: block; height: 36px; width: auto; }
.top-r { display: flex; gap: 20px; align-items: center; }
.top-r form { margin: 0; }
.lnk { background: none; border: 0; padding: 4px 0; cursor: pointer; font: 700 12px var(--display); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; border-bottom: 2px solid transparent; }
.lnk:hover { border-bottom-color: var(--y); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 2px; border: 1px solid transparent; cursor: pointer; font: 700 13px var(--display); letter-spacing: .05em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.btn.y { background: var(--y); color: var(--black); }
.btn.y:hover { background: #ffd04a; }
.btn.ghost { background: transparent; border-color: #4a474a; }
.btn.ghost:hover { border-color: var(--y); color: #fff; }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: 11px; }

/* Centered pages: login, messages */
body.center { display: flex; flex-direction: column; }
.login, .msg { margin: auto; width: min(460px, 100% - 2 * var(--gutter)); padding: 56px 0; }
.login h1, .msg h1 { font-size: clamp(30px, 6vw, 42px); font-weight: 800; line-height: 1.08; margin: 10px 0 8px; }
.login .sub, .msg p { color: var(--on-dark-mute); }
.login form { margin: 28px 0 18px; }
.login label { display: block; font: 700 12px var(--display); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.login .row { display: flex; gap: 8px; }
.login input { flex: 1; min-width: 0; height: 46px; padding: 0 14px; background: var(--panel); border: 1px solid #4a474a; border-radius: 2px; }
.login input:focus { border-color: var(--y); outline: none; }
.err { color: #ff8a7a; margin-top: 10px; }
.ok { background: rgba(242, 185, 25, .12); border-left: 3px solid var(--y); padding: 10px 14px; margin: 24px 0 0; }

/* Gallery hero */
.hero { padding-top: clamp(32px, 6vw, 64px); padding-bottom: 28px; }
.hero h1 { font-size: clamp(34px, 6vw, 64px); font-weight: 800; line-height: 1.02; margin: 10px 0 6px; letter-spacing: -.01em; }
.hero .sub { color: var(--on-dark-mute); font-size: 18px; }
.stats { display: flex; flex-wrap: wrap; gap: 10px 36px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.stats div { display: flex; flex-direction: column; }
.stats b { font: 800 24px var(--display); color: #fff; }
.stats span { font-size: 13px; color: var(--on-dark-mute); text-transform: uppercase; letter-spacing: .06em; }
.note { margin-top: 18px; max-width: 70ch; color: var(--on-dark); }
.allacts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 24px; }
.allacts .fine { flex-basis: 100%; max-width: 75ch; }

/* Toolbar */
.bar { position: sticky; top: 64px; z-index: 20; display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; padding-top: 12px; padding-bottom: 12px; background: rgba(11, 10, 11, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.seg { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.seg span { font: 700 11px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-mute); margin-right: 8px; }
.seg button { background: none; border: 1px solid transparent; border-radius: 2px; padding: 6px 12px; cursor: pointer; font: 600 14px var(--body); color: var(--on-dark-mute); }
.seg button:hover { color: #fff; }
.seg button[aria-pressed="true"] { color: var(--black); background: var(--y); }
#q { margin-left: auto; width: min(320px, 100%); height: 38px; padding: 0 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 2px; }
#q:focus { border-color: var(--y); outline: none; }

/* Groups and cards */
#groups { padding-bottom: 120px; }
.group { padding-top: 34px; }
.ghead { display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; align-items: flex-end; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.ghead h2 { font-size: 24px; font-weight: 800; color: #fff; }
.ghead p { color: var(--on-dark-mute); font-size: 14px; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px 14px; }
.card { position: relative; min-width: 0; }
.thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 2px; overflow: hidden; background: var(--char2); cursor: zoom-in; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.thumb:hover img { transform: scale(1.03); }
.card.sel .thumb { outline: 3px solid var(--y); outline-offset: -3px; }
.nothumb { display: grid; place-items: center; height: 100%; font: 800 14px var(--display); text-transform: uppercase; color: var(--on-dark-mute); }
.dur { position: absolute; right: 6px; bottom: 6px; background: rgba(11, 10, 11, .8); padding: 1px 6px; border-radius: 2px; font: 600 12px/1.6 var(--body); font-variant-numeric: tabular-nums; }
.card .chk { position: absolute; top: 6px; left: 6px; display: grid; place-items: center; width: 30px; height: 30px; background: rgba(11, 10, 11, .65); border-radius: 2px; cursor: pointer; opacity: 0; transition: opacity .15s; }
.card:hover .chk, .card.sel .chk, .has-sel .card .chk, .card .chk:focus-within { opacity: 1; }
@media (hover: none) { .card .chk { opacity: 1; } }
.chk input { width: 17px; height: 17px; accent-color: var(--y); cursor: pointer; margin: 0; }
.cap { padding-top: 8px; min-width: 0; }
.cap b { display: block; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.cap span { display: block; font-size: 13px; color: var(--on-dark-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.5em; }
.others { margin-top: 18px; }
.others summary { cursor: pointer; color: var(--on-dark-mute); font-size: 14px; }
.others ul { margin-top: 8px; border-top: 1px solid var(--line); }
.file { display: grid; grid-template-columns: 30px 1fr auto auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.file .chk { display: grid; place-items: center; }
.fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fsize { color: var(--on-dark-mute); font-variant-numeric: tabular-nums; }
.file.sel { background: rgba(242, 185, 25, .08); }

/* Selection bar */
.selbar { position: fixed; z-index: 40; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(760px, 100% - 24px); display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; align-items: center; padding: 12px 14px 12px 20px; background: var(--char); border: 1px solid #4a474a; border-radius: 3px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.selbar[hidden] { display: none; }
.selbar b { color: var(--y); }

/* Viewer */
.viewer { width: min(1400px, 100vw - 24px); max-width: none; height: min(860px, 100vh - 24px); max-height: none; padding: 0; border: 1px solid var(--line); border-radius: 3px; background: var(--black); color: var(--on-dark); }
.viewer[open] { display: grid; grid-template-columns: minmax(0, 1fr) 340px; }
.viewer::backdrop { background: rgba(0, 0, 0, .85); }
.v-media { display: grid; place-items: center; background: #000; min-height: 0; }
.v-media video, .v-media img { width: 100%; height: 100%; object-fit: contain; }
.v-side { display: flex; flex-direction: column; gap: 16px; padding: 18px 20px; overflow: auto; border-left: 1px solid var(--line); }
.v-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.x { background: none; border: 0; font-size: 30px; line-height: 1; cursor: pointer; color: var(--on-dark-mute); padding: 0 4px; }
.x:hover { color: #fff; }
.v-side h2 { font-size: 20px; font-weight: 800; color: #fff; word-break: break-all; }
.v-side dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.v-side dt { color: var(--on-dark-mute); }
.v-side dd { word-break: break-word; }
.v-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.v-nav { margin-top: auto; display: flex; justify-content: space-between; gap: 8px; }
@media (max-width: 860px) {
  .viewer[open] { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: calc(100vh - 24px); }
  .v-media { max-height: 50vh; }
  .v-side { border-left: 0; border-top: 1px solid var(--line); }
}

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 28px; padding-bottom: 28px; border-top: 1px solid var(--line); font-size: 13px; color: var(--on-dark-mute); }

/* Admin */
.admin main { padding-top: 36px; padding-bottom: 80px; }
.admin h1 { font-size: clamp(28px, 5vw, 44px); font-weight: 800; margin: 6px 0; }
.admin h2 { font-size: 20px; font-weight: 800; margin: 36px 0 14px; color: #fff; }
.admin main > p { margin-top: 8px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 18px; }
.tbl th { text-align: left; font: 700 11px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-mute); padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl td small { display: block; color: var(--on-dark-mute); }
.tbl a { text-decoration: none; }
.tbl a:hover b { color: var(--y); }
.form { display: grid; gap: 14px; max-width: 620px; }
.form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.form label small { font-weight: 400; color: var(--on-dark-mute); }
.form input:not([type=checkbox]), .form textarea { height: 42px; padding: 0 12px; background: var(--panel); border: 1px solid #4a474a; border-radius: 2px; }
.form textarea { height: auto; padding: 10px 12px; resize: vertical; }
.form input:focus, .form textarea:focus { border-color: var(--y); outline: none; }
.form .chk { display: flex; gap: 10px; align-items: center; font-weight: 400; }
.form .btn { justify-self: start; }
@media (max-width: 700px) {
  .tbl thead { display: none; }
  .tbl tr { display: grid; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .tbl td { border: 0; padding: 2px 0; }
  #q { margin-left: 0; width: 100%; }
  .bar { position: static; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; }
  .ghead .acts { width: 100%; }
}
