/* ============================================================
   WKND/INDEX — dark departures-board aesthetic
   Space Grotesk (variable) + IBM Plex Mono (static 400)
   ============================================================ */

@font-face {
  font-family: 'Space Grotesk';
  src: url('assets/space-grotesk.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('assets/ibm-plex-mono.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0a0b0f;
  --panel: #0f1116;
  --panel-2: #12151c;
  --line: #272b35;
  --text: #e9ebf2;
  --dim: #9aa2b1;
  --accent: #ffd23f; /* brand yellow (also the Art category hue) */
  --c: var(--accent); /* per-item category colour, set inline */

  --font-display: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --pad: 32px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}
body.detail-open { overflow: hidden; }

/* ---------- shared bits ---------- */

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; }

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

.btn {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  padding: 12px 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: border-color 120ms linear, color 120ms linear, background-color 120ms linear;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-solid { background: var(--accent); border-color: var(--accent); color: #000; }
.btn-solid:hover { background: #ffe184; border-color: #ffe184; color: #000; }

.ic { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.chip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c);
  border: 1px solid var(--c);
  padding: 4px 8px;
  white-space: nowrap;
}

.saved-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  background: var(--accent);
  color: #000;
  padding: 2px 6px;
  white-space: nowrap;
}

/* ---------- top bar ---------- */

.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px var(--pad);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.12em;
  color: var(--text);
  text-decoration: none;
}
.brand span { color: var(--accent); }
.topbar-meta {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--dim);
}

/* ---------- hero ---------- */

.hero {
  padding: 48px var(--pad) 40px;
  border-bottom: 1px solid var(--line);
  max-width: 1080px;
}
.kicker {
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 16px;
}
.hero h1 {
  font-size: clamp(56px, 9vw, 118px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero h1 .hollow {
  color: var(--text); /* fallback if text-stroke is unsupported */
}
@supports (-webkit-text-stroke: 1.5px #fff) {
  .hero h1 .hollow {
    color: transparent;
    -webkit-text-stroke: 1.5px var(--text);
  }
}
.hero h1 .solid { color: var(--accent); }
.hero-sub {
  font-size: 13px;
  line-height: 1.7;
  color: var(--dim);
  max-width: 52ch;
}

/* ---------- ticker ---------- */

.ticker {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}
.ticker-track {
  display: inline-block;
  padding: 10px 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--dim);
  animation: ticker 60s linear infinite;
}
.ticker-track em { font-style: normal; color: var(--accent); }
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- controls ---------- */

.controls {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 20px;
  padding: 16px var(--pad);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
}
.field input,
.field select {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 11px 14px;
  cursor: pointer;
}
.field input { width: 300px; cursor: text; }
.field input::placeholder { color: #7d8492; }
.field input:focus-visible,
.field select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}
.field-search { position: relative; }

.toggle[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}
.toggle[aria-pressed="true"]:hover { color: #000; }
.toggle .ic { fill: none; }

.count {
  margin-left: auto;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--dim);
  padding-bottom: 12px;
}

/* ---------- board rows ---------- */

.board {
  list-style: none;
  border-bottom: 1px solid var(--line);
}
.row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) auto 120px 116px;
  align-items: center;
  gap: 20px;
  padding: 20px var(--pad);
  border-top: 1px solid var(--line);
  border-left: 4px solid var(--c);
  background: transparent;
  transition: background-color 120ms linear;
}
.row:hover { background: #0d0f15; }

.row-when { display: flex; flex-direction: column; gap: 4px; }
.row-time {
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--text);
}
.row-day {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--dim);
}

.row-main { min-width: 0; }
.row-title {
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text);
}
.row-sub {
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--dim);
}

.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.row-price { font-size: 15px; }
.row-price .free { color: var(--dim); }
.row-open { justify-self: end; }

/* ---------- empty state ---------- */

.empty {
  padding: 72px var(--pad);
  display: grid;
  gap: 12px;
  justify-items: start;
}
.empty-code { font-size: 12px; letter-spacing: 0.22em; color: var(--accent); }
.empty-title { font-size: 28px; letter-spacing: -0.01em; }
.empty-sub { color: var(--dim); font-size: 14px; margin-bottom: 8px; }

/* ---------- footer ---------- */

.foot {
  padding: 28px var(--pad) 48px;
  display: grid;
  gap: 4px;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--dim);
}

/* ---------- detail panel ---------- */

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 8, 0.66);
  z-index: 40;
}

.detail {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(600px, 100vw);
  background: var(--panel);
  border-left: 1px solid var(--line);
  z-index: 50;
  overflow-y: auto;
  box-shadow: -24px 0 60px rgba(0, 0, 0, 0.5);
}

.detail-top {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  z-index: 2;
}
.detail-topbar-left { display: flex; align-items: center; gap: 12px; }
.detail-code {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--c);
}

.detail-close {
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  padding: 10px 14px;
  cursor: pointer;
  transition: border-color 120ms linear, color 120ms linear;
}
.detail-close:hover { border-color: var(--accent); color: var(--accent); }

.detail-body { padding: 28px 24px 48px; border-top: 4px solid var(--c); }
.detail-when {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 10px;
}
.detail-when strong { color: var(--c); font-weight: 400; }
.detail-title {
  font-size: clamp(30px, 5vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin-bottom: 22px;
}

.detail-photo {
  margin: 0 0 26px;
  position: relative;
  border: 1px solid var(--line);
}
.detail-photo img {
  display: block;
  width: 100%;
  height: 210px;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06) brightness(0.92);
}
.detail-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--c);
  mix-blend-mode: multiply;
  opacity: 0.55;
  pointer-events: none;
}
.detail-photo figcaption {
  border-top: 1px solid var(--line);
  padding: 8px 12px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  position: relative;
  z-index: 1;
  background: var(--panel);
}

.detail-desc { font-family: var(--font-display); font-size: 16px; line-height: 1.65; }
.detail-desc p + p { margin-top: 16px; }

.spec {
  margin: 30px 0;
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 140px 1fr;
}
.spec dt {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: var(--panel-2);
}
.spec dd {
  font-family: var(--font-display);
  font-size: 15px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.spec dt:nth-last-of-type(1), .spec dd:last-of-type { border-bottom: 0; }
.spec .access { line-height: 1.55; color: var(--text); }

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.save-btn[aria-pressed="true"] {
  background: var(--c);
  border-color: var(--c);
  color: #000;
}
.save-btn[aria-pressed="true"]:hover { filter: brightness(1.12); color: #000; }
.save-note {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--dim);
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  :root { --pad: 20px; }

  .hero { padding-top: 36px; padding-bottom: 28px; }
  .hero h1 { font-size: clamp(44px, 12vw, 72px); }
  .hero-sub { font-size: 12px; }

  .field input { width: 100%; }
  .controls { align-items: stretch; }
  .field { flex: 1 1 100%; }
  .count { margin-left: 0; padding-bottom: 0; align-self: center; }

  .row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "when  chip"
      "main  main"
      "side  side"
      "open  open";
    gap: 10px 12px;
    padding: 16px var(--pad);
  }
  .row-when { grid-area: when; flex-direction: row; align-items: baseline; gap: 10px; }
  .row-main { grid-area: main; }
  .row .chip { grid-area: chip; justify-self: end; }
  .row-side { grid-area: side; flex-direction: row; align-items: center; justify-content: space-between; }
  .row-price { font-size: 14px; }
  .row-open { grid-area: open; justify-self: stretch; justify-content: center; }

  .detail-top { padding: 12px 20px; }
  .detail-body { padding: 22px 20px 40px; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker-track { animation: none; padding-left: var(--pad); }
  *, *::before, *::after {
    transition: none !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
