/* BlackCloud drive-thru menu — fixed 1080x1920 portrait glass. Numbers: docs/specs/board-layout.md */
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url(/fonts/BarlowSemiCondensed-Bold.ttf) format("truetype");
  font-weight: 700;
  font-display: swap;
}
:root {
  --bg: #050505;
  --ink: #ffffff;
  --muted: #d8d2c4;
  --dim: #9a917f;
  --gold: #f0c43a;
  --panel: #15120d;
  --line: #2c281f;
  --display: Impact, "Arial Narrow Bold", "Helvetica Inserat", "Arial Black", sans-serif;
  --display-weight: 400;
  --display-stretch: 100%;
  --ui: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Design option (temporary): caption font. Applies to every display-face use: tile names, crumbs, state text. */
:root[data-font="barlow"] { --display: "Barlow Semi Condensed", "Arial Narrow", sans-serif; --display-weight: 700; }
:root[data-font="bahnschrift"] { --display: Bahnschrift, "Barlow Semi Condensed", "Arial Narrow", sans-serif; --display-weight: 700; --display-stretch: 87.5%; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 1080px;
  height: 1920px;
  overflow: hidden;
  background: #000;
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

#stage {
  position: relative;
  width: 1080px;
  height: 1920px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ui);
}

/* ---------- header: 120px ---------- */
.chrome {
  flex: 0 0 120px;
  display: grid;
  grid-template-columns: 280px 1fr 64px;
  gap: 16px;
  align-items: center;
  padding: 8px 20px 4px;
}
.logo { border: 0; background: transparent; padding: 0; cursor: pointer; }
.logo img { display: block; width: 280px; height: 104px; object-fit: contain; object-position: left center; }
.chrome-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.crumb {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--display);
  font-weight: var(--display-weight);
  font-stretch: var(--display-stretch);
  font-size: 28px;
  letter-spacing: 0.03em;
}
.crumb button, .crumb .here {
  font: inherit;
  color: var(--gold);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  max-width: 340px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.crumb .here { color: var(--ink); }
.crumb .sep { color: #6b6458; }
.crumb .back {
  flex: 0 0 auto;
  height: 44px;
  min-width: 64px;
  padding: 0 16px;
  margin-right: 6px;
  border: 2px solid var(--gold);
  border-radius: 12px;
  background: transparent;
  color: var(--gold);
  font: 700 26px var(--ui);
  line-height: 1;
  cursor: pointer;
}
.crumb .back:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.search input {
  width: 100%;
  height: 56px;
  background: #14110c;
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: 999px;
  padding: 0 24px;
  font: 26px var(--ui);
  outline: none;
}
.search input:focus { border-color: var(--gold); }
.search input::placeholder { color: #6b6458; }

.burger {
  width: 64px;
  height: 64px;
  border: 0;
  background: transparent;
  padding: 16px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.burger span { display: block; height: 4px; border-radius: 2px; background: #6a6358; }
.burger:focus-visible, .logo:focus-visible { outline: 3px solid var(--gold); border-radius: 8px; }

/* ---------- filter rows: 64px each (56 + 8) ---------- */
.filters { flex: 0 0 auto; padding: 0 16px; }
.filters[hidden] { display: none; }
.frow { display: flex; align-items: center; gap: 8px; height: 56px; margin-bottom: 8px; overflow: hidden; white-space: nowrap; }
.fgroup { display: flex; align-items: center; gap: 8px; }
.flabel { font: 700 18px var(--ui); color: var(--dim); letter-spacing: 0.08em; padding: 0 8px; }
.fbtn {
  height: 56px;
  min-width: 96px;
  padding: 0 20px;
  border: 2px solid #3a342a;
  border-radius: 12px;
  background: #1a1712;
  color: var(--ink);
  font: 700 22px var(--ui);
  cursor: pointer;
  white-space: nowrap;
}
.fbtn.is-on { background: var(--gold); color: #000; border-color: var(--gold); }
.fbtn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.fclear { margin-left: auto; background: transparent; color: var(--gold); border-color: var(--gold); }

/* ---------- board ---------- */
.board {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  padding: 8px 16px 16px;
}
.tiles { width: 100%; height: 100%; display: grid; gap: 12px; }

.tile {
  position: relative;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #1a1712;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.tile .photo, .tile .nophoto, .tile .mosaic { position: absolute; inset: 0; width: 100%; height: 100%; }
.tile .photo { object-fit: cover; display: block; }
.tile .nophoto { background: radial-gradient(circle at 30% 30%, #2a241c, #14110c); }
/* Mosaic: the photos overlap by ~12% of the tile and fade across the overlap, so the seams crossfade
   and the tile reads as one picture instead of a grid. Masks are the only thing doing the blending. */
.mosaic { overflow: hidden; }
.mosaic img { position: absolute; object-fit: cover; display: block; width: 56%; height: 100%; }
.mosaic.n2 img:nth-child(1) { left: 0; top: 0; -webkit-mask-image: linear-gradient(to right, #000 78%, transparent 100%); mask-image: linear-gradient(to right, #000 78%, transparent 100%); }
.mosaic.n2 img:nth-child(2) { right: 0; top: 0; -webkit-mask-image: linear-gradient(to left, #000 78%, transparent 100%); mask-image: linear-gradient(to left, #000 78%, transparent 100%); }
.mosaic.n4 img { width: 56%; height: 56%; -webkit-mask-composite: source-in; mask-composite: intersect; }
.mosaic.n4 img:nth-child(1) { left: 0; top: 0; -webkit-mask-image: linear-gradient(to right, #000 78%, transparent 100%), linear-gradient(to bottom, #000 78%, transparent 100%); mask-image: linear-gradient(to right, #000 78%, transparent 100%), linear-gradient(to bottom, #000 78%, transparent 100%); }
.mosaic.n4 img:nth-child(2) { right: 0; top: 0; -webkit-mask-image: linear-gradient(to left, #000 78%, transparent 100%), linear-gradient(to bottom, #000 78%, transparent 100%); mask-image: linear-gradient(to left, #000 78%, transparent 100%), linear-gradient(to bottom, #000 78%, transparent 100%); }
.mosaic.n4 img:nth-child(3) { left: 0; bottom: 0; -webkit-mask-image: linear-gradient(to right, #000 78%, transparent 100%), linear-gradient(to top, #000 78%, transparent 100%); mask-image: linear-gradient(to right, #000 78%, transparent 100%), linear-gradient(to top, #000 78%, transparent 100%); }
.mosaic.n4 img:nth-child(4) { right: 0; bottom: 0; -webkit-mask-image: linear-gradient(to left, #000 78%, transparent 100%), linear-gradient(to top, #000 78%, transparent 100%); mask-image: linear-gradient(to left, #000 78%, transparent 100%), linear-gradient(to top, #000 78%, transparent 100%); }

/* scrim: transparent at 55% of the tile, 92% black at the bottom */
.tile::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0; top: 55%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.6) 45%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}
.tile .caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  padding: 10px 12px;
  pointer-events: none;
}
.tile .name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--display);
  font-weight: var(--display-weight);
  font-stretch: var(--display-stretch);
  font-size: var(--name, 26px);
  line-height: 1.02;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-shadow: 0 2px 8px #000, 0 0 2px #000;
  overflow-wrap: normal;
  word-break: normal;
}
.tile .meta {
  display: block;
  margin-top: 4px;
  font: 600 var(--meta, 16px) var(--ui);
  color: var(--muted);
  text-shadow: 0 1px 4px #000;
}
.tile.is-oos { filter: grayscale(1) brightness(0.5); }
.tile.is-oos .name { text-decoration: line-through; }
.tile:disabled { cursor: default; }
.tile:focus-visible { outline: 4px solid var(--gold); outline-offset: -4px; }
.tile-range .meta::after { content: " items"; }

/* ---------- one-photo flavor view ---------- */
.board.is-one-photo .hero {
  position: absolute;
  left: 16px; right: 16px; top: 8px; bottom: 16px;
  width: calc(100% - 32px);
  height: calc(100% - 24px);
  object-fit: cover;
  border-radius: 12px;
}
.board.is-one-photo .hero-scrim {
  position: absolute;
  left: 16px; right: 16px; top: 8px; bottom: 16px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 12px;
}
.board.is-one-photo .cells { position: relative; }
.cells .tile { background: rgba(0, 0, 0, 0.35); border: 2px solid rgba(255, 255, 255, 0.14); }
.cells .tile::after { display: none; }
.cells .tile .caption { top: 0; display: flex; flex-direction: column; justify-content: center; padding: 8px 14px; }
.cells .tile .name { -webkit-line-clamp: 3; }
/* A flavor with its own photo looks like any photo tile, even in the one-photo view. */
.cells .tile.has-own-photo { background: #1a1712; border: 0; }
.cells .tile.has-own-photo::after { display: block; }
.cells .tile.has-own-photo .caption { top: auto; display: block; padding: 10px 12px; }
.cells .tile.has-own-photo .name { -webkit-line-clamp: 2; }

/* ---------- states ---------- */
.state {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  text-align: center;
  padding: 40px;
}
.state img { width: 420px; max-width: 80%; }
.state p { margin: 0; font: 48px var(--display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); letter-spacing: 0.03em; color: var(--ink); }
.state .detail { font: 24px var(--ui); color: var(--muted); max-width: 800px; }

/* ---------- staff menu ---------- */
.staff-menu {
  position: absolute;
  top: 110px;
  right: 16px;
  z-index: 20;
  min-width: 460px;
  padding: 18px 22px;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  font-size: 22px;
}
.staff-menu[hidden] { display: none; }
.staff-menu .row { display: block; margin: 0 0 14px; }
.staff-menu fieldset { border: 0; padding: 0; margin: 0 0 14px; }
.staff-menu legend { font: 700 16px var(--ui); color: var(--dim); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; }
.staff-menu label { display: inline-flex; align-items: center; gap: 10px; margin-right: 18px; min-height: 44px; cursor: pointer; }
.staff-menu input { width: 28px; height: 28px; accent-color: var(--gold); }
.staff-menu .action {
  width: 100%;
  height: 56px;
  padding: 0 24px;
  border: 2px solid var(--gold);
  border-radius: 12px;
  background: transparent;
  color: var(--gold);
  font: 700 22px var(--ui);
  cursor: pointer;
}
.status { margin-top: 10px; font-size: 18px; color: var(--dim); }
.design { margin-top: 16px; padding-top: 12px; border-top: 1px dashed #3a342a; }
.design[hidden] { display: none; }
.design h2 { margin: 0 0 10px; font: 700 16px var(--ui); color: #c97b2a; letter-spacing: 0.08em; text-transform: uppercase; }
.design h2 small { font-weight: 400; color: var(--dim); text-transform: none; letter-spacing: 0; margin-left: 8px; }
.design h2 { display: flex; align-items: center; }
.design h2 .dismiss { margin-left: auto; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--dim); font: 400 28px/1 var(--ui); cursor: pointer; }
.design h2 .dismiss:hover, .design h2 .dismiss:focus-visible { color: var(--ink); background: #2a241c; outline: none; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* "Why not just show a picture of the flavor?" */
.why { display: block; margin: 2px 0 0; padding: 0; border: 0; background: none; color: var(--gold); font: inherit; font-size: 0.85em; text-decoration: underline; cursor: pointer; min-height: 44px; text-align: left; }
.why:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.why-dialog { max-width: 560px; padding: 24px 28px; border: 2px solid var(--gold); border-radius: 14px; background: #15120d; color: #f3efe6; font: 20px/1.5 var(--ui); }
.why-dialog::backdrop { background: rgba(0, 0, 0, 0.7); }
.why-dialog h2 { margin: 0 0 12px; font-size: 22px; color: var(--gold); }
.why-dialog p { margin: 0 0 18px; }
.why-dialog button { height: 48px; padding: 0 22px; border: 2px solid var(--gold); border-radius: 10px; background: var(--gold); color: #000; font: 700 18px var(--ui); cursor: pointer; }

/* Caption font options render in their own face. */
.font-sample { font-size: 1.2em; line-height: 1; color: #fff; text-shadow: 0 2px 8px #000, 0 0 2px #000; }
.font-sample[data-font="impact"] { font-family: Impact, "Arial Narrow Bold", "Arial Black", sans-serif; letter-spacing: 0.02em; }
.font-sample[data-font="barlow"] { font-family: "Barlow Semi Condensed", "Arial Narrow", sans-serif; font-weight: 700; }
.font-sample[data-font="bahnschrift"] { font-family: Bahnschrift, "Barlow Semi Condensed", "Arial Narrow", sans-serif; font-weight: 700; font-stretch: 87.5%; }
