/* ui.css — rocola's one design system, shared by every page.
   Identity: paper, ink and one red; each venue adds its own colour for its name. Geist stands in for Söhne until a
   licence is bought; IBM Plex Mono carries data, times and numbering. Small tracked mono labels are the brand's
   way of naming a block (AHORA, SIGUE). Pages are paper; the player is ink. Shape: controls are pills, surfaces
   12 px, artwork 6 px. Motion: 180 ms on state changes, none under reduced motion. */

@font-face { font-family: 'Geist'; src: url('/fonts/Geist-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('/fonts/Geist-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('/fonts/Geist-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/IBMPlexMono-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/fonts/IBMPlexMono-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #F2EFE7; --ink: #111111; --red: #F23825;
  --bg: var(--paper); --surface: #FAF8F3; --surface-2: #E7E3D8; --line: rgba(17, 17, 17, .12); --line-strong: rgba(17, 17, 17, .28);
  --fg: var(--ink); --fg-2: #5C5A54; --fg-3: #8E8A80;
  --accent: var(--red); --accent-fg: #FFFFFF; --accent-soft: rgba(242, 56, 37, .12);
  --venue: var(--ink);
  --danger: #B8281A; --danger-soft: rgba(184, 40, 26, .10); --ok: #2E8B57;
  --shadow: 0 1px 0 rgba(17, 17, 17, .06), 0 10px 30px rgba(17, 17, 17, .07);
  --r-surface: 12px; --r-media: 6px; --r-pill: 999px; --r-field: 10px;
  --font: 'Geist', 'Söhne', -apple-system, system-ui, 'Helvetica Neue', sans-serif; --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1); --t: 180ms;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: var(--ink); --surface: #1A1A1A; --surface-2: #262626; --line: rgba(242, 239, 231, .14); --line-strong: rgba(242, 239, 231, .3);
  --fg: var(--paper); --fg-2: #B8B4AA; --fg-3: #7C7970;
  --accent-soft: rgba(242, 56, 37, .18);
  --danger: #F26B5E; --danger-soft: rgba(242, 107, 94, .14); --ok: #5FBF82;
  --shadow: 0 1px 0 rgba(0, 0, 0, .4), 0 14px 40px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.wrap { max-width: 640px; margin: 0 auto; padding: 0 18px; }
h1, h2, h3 { margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h2 { font-size: 15px; font-weight: 600; margin: 26px 0 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
h2 small { font-weight: 400; color: var(--fg-3); font-size: 13px; font-family: var(--mono); }
p { margin: 0; }
.muted { color: var(--fg-2); } .dim { color: var(--fg-3); }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.mono { font-size: .92em; }
a { color: inherit; }

/* the brand's block label: small, tracked, mono. A red dot means "now", a hollow one "next" */
.eyebrow { font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); display: flex; align-items: center; gap: 8px; margin: 26px 0 12px; }
.eyebrow.is-now::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.eyebrow.is-next::before { content: ''; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--fg); }
.eyebrow small { margin-left: auto; letter-spacing: .08em; color: var(--fg-3); }
.tab > .eyebrow:first-child, main > .eyebrow:first-child, .tab > div:first-child > .eyebrow:first-child { margin-top: 14px; }   /* the first block on a tab sits close under the header */

/* surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-surface); padding: 14px; }
.art { background: var(--surface-2) center / cover no-repeat; border-radius: var(--r-media); flex: none; }

/* the top bar: the venue in its own colour, tracked; the wordmark on the player */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.top .wrap { display: flex; justify-content: space-between; align-items: center; min-height: 50px; gap: 12px; }
.top .venue { font: 500 12px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--venue); display: inline-flex; align-items: center; min-width: 0; }
.top .tools { display: flex; align-items: center; gap: 6px; }
.wordmark { display: block; height: 18px; width: auto; }
.logo { display: block; height: 20px; width: auto; max-width: 48vw; object-fit: contain; filter: invert(1); }   /* venue logos are white on transparent; paper pages invert them */
:root[data-theme="dark"] .logo { filter: none; }
.gate .logo { height: 36px; max-width: 80vw; }
.live { display: inline-flex; align-items: center; gap: 7px; font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-2); }
.live::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--fg-3); flex: none; }
.live.on::before { background: var(--red); } .live.off::before { background: var(--fg-3); } .live.warn::before { background: var(--red); opacity: .5; }

/* rows: position in mono, title, artist, one line of state; spacing plus a hairline */
.row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.row + .row { border-top: 1px solid var(--line); }
.row .what { flex: 1; min-width: 0; }
.row .t { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .s { color: var(--fg-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .k { color: var(--fg-3); font-size: 12px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .k.accent { color: var(--red); }
.row .d { color: var(--fg-3); font: 400 12px/1 var(--mono); letter-spacing: .04em; flex: none; }
.row .n { width: 22px; color: var(--fg-3); font: 500 12px/1 var(--mono); flex: none; }
.row.dim .t { color: var(--fg-2); }
.row .ctl { display: flex; gap: 6px; flex: none; }
.empty { color: var(--fg-3); font-size: 14px; padding: 10px 0; }
.note { background: var(--accent-soft); color: var(--red); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 4px 0 10px; }

/* controls: pills; ink fill for the primary, ink outline otherwise; every one has hover, pressed and focus */
button, .btn { font: inherit; font-weight: 500; border: 1px solid var(--line-strong); background: transparent; color: var(--fg); padding: 9px 16px; border-radius: var(--r-pill); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 7px; line-height: 1.2; text-decoration: none; transition: background var(--t) var(--ease), border-color var(--t) var(--ease), transform var(--t) var(--ease), color var(--t) var(--ease), opacity var(--t) var(--ease); }
button:hover, .btn:hover { background: var(--surface-2); }
button:active { transform: scale(.97); }
button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
button:disabled { opacity: .45; cursor: default; transform: none; }
button.primary, .btn.primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
button.primary:hover { opacity: .88; background: var(--fg); }
button.primary.confirm { background: var(--red); border-color: var(--red); color: #fff; }
button.quiet { border-color: transparent; color: var(--fg-2); }
button.quiet:hover { background: var(--surface-2); color: var(--fg); }
button.danger { color: var(--danger); border-color: var(--danger-soft); }
button.danger:hover { background: var(--danger-soft); }
button.on { background: var(--fg); border-color: var(--fg); color: var(--bg); }
button.icon { padding: 8px; width: 36px; height: 36px; }
button.icon.text { width: auto; padding: 8px 12px 8px 10px; }
button.big { font-size: 17px; padding: 14px 34px; }
button.pick.off { opacity: .45; }
button.mono, .btn.mono { font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; padding: 11px 16px; }
svg.ico { flex: none; display: block; }
svg.ico.flip { transform: scaleX(-1); }

/* fields */
input[type=search], input[type=text], input[type=number], input[type=password], input[type=color], select { font: inherit; width: 100%; padding: 11px 14px; border-radius: var(--r-field); border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg); outline: none; transition: border-color var(--t) var(--ease); -webkit-appearance: none; appearance: none; }
input::placeholder { color: var(--fg-3); }
input:focus, select:focus { border-color: var(--fg); }
label { display: block; }

/* the now-playing block: artwork, title, artist, who asked, a red progress line with mono times */
.now { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: center; }
.now .art { width: 84px; height: 84px; }
.now .t { font-weight: 600; font-size: 18px; line-height: 1.15; letter-spacing: -0.015em; }
.now .a { color: var(--fg-2); font-size: 14px; margin-top: 3px; }
.now .by { color: var(--fg-3); font-size: 13px; margin-top: 5px; }
.now .bar { grid-column: 1 / -1; height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; margin-top: 2px; }
.now .bar i { display: block; height: 100%; width: 0; background: var(--red); transition: width 1s linear; }
.now .times { grid-column: 1 / -1; display: flex; justify-content: space-between; font: 400 11px/1 var(--mono); letter-spacing: .06em; color: var(--fg-3); margin-top: -6px; }
.now .times .at { color: var(--red); }
.now.idle .t { color: var(--fg-2); font-weight: 500; }
.now.idle .art { background-image: none; }

/* loading: a skeleton in the shape of the thing */
.skeleton .t, .skeleton .a, .skeleton .by { color: transparent; background: var(--surface-2); border-radius: 6px; }
.skeleton .t { width: 60%; } .skeleton .a { width: 40%; } .skeleton .by { width: 30%; }
@media (prefers-reduced-motion: no-preference) { .skeleton .t, .skeleton .a, .skeleton .by { animation: pulse 1.4s var(--ease) infinite; } @keyframes pulse { 50% { opacity: .55; } } }

/* the bottom navigation: icon over a tracked mono label; the current one in ink, the rest muted */
nav.tabs { position: fixed; bottom: 0; left: 0; right: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
nav.tabs .wrap { display: flex; padding: 0 6px; }
nav.tabs button { flex: 1; flex-direction: column; gap: 5px; padding: 10px 4px 11px; background: none; border: 0; border-radius: 0; color: var(--fg-3); font: 500 10px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
nav.tabs button:hover { background: none; color: var(--fg-2); } nav.tabs button:active { transform: none; }
nav.tabs button.on { color: var(--fg); }
.tab { display: none; } .tab.on { display: block; }
body.tabbed { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }

/* toast: transient, above every overlay */
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 8px); background: var(--fg); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-size: 14px; max-width: min(calc(100vw - 36px), 520px); box-shadow: var(--shadow); opacity: 0; transition: opacity var(--t) var(--ease), transform var(--t) var(--ease); pointer-events: none; z-index: 40; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--red); color: #fff; }

/* the album sheet and the gate */
.sheet { position: fixed; inset: 0; z-index: 25; background: rgba(17, 17, 17, .45); display: flex; align-items: flex-end; opacity: 0; pointer-events: none; transition: opacity var(--t) var(--ease); }
.sheet.show { opacity: 1; pointer-events: auto; }
.sheet .panel { background: var(--bg); width: 100%; max-width: 640px; margin: 0 auto; max-height: 85vh; max-height: 85dvh; overflow: auto; border-radius: 18px 18px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); transform: translateY(24px); transition: transform var(--t) var(--ease); }
.sheet.show .panel { transform: none; }
.gate { position: fixed; inset: 0; z-index: 30; background: var(--bg); display: grid; align-content: center; justify-items: center; gap: 18px; padding: 24px; text-align: center; }
.gate .wordmark { height: 34px; margin-bottom: 8px; }
.gate p { color: var(--fg-2); max-width: 34ch; text-wrap: pretty; }

.hidden { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
