:root {
  color-scheme: dark;
  --bg: #101112;
  --panel: #191b1d;
  --panel-strong: #23272a;
  --text: #fffaf0;
  --muted: #c7c5bc;
  --line: #474b4b;
  --accent: #f4c45a;
  --accent-strong: #ffdf83;
  --shadow: 0 24px 70px rgba(0, 0, 0, .48);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(244, 196, 90, .14), transparent 34rem),
    radial-gradient(circle at bottom right, rgba(33, 115, 112, .18), transparent 30rem),
    linear-gradient(135deg, #101112 0%, #191b1d 54%, #0d0f10 100%);
}

button {
  font: inherit;
}

.site-shell {
  width: min(1380px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 32px);
}

.home-view,
.slideshow-view {
  min-height: calc(100vh - clamp(32px, 6vw, 64px));
  display: grid;
}

.home-view {
  align-content: start;
  gap: clamp(22px, 4vw, 44px);
}

.slideshow-view {
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 18px;
}

.is-hidden {
  display: none;
}

.home-header {
  padding-top: clamp(12px, 3vw, 36px);
}

.home-header h1 {
  font-size: clamp(2.6rem, 7vw, 6.6rem);
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 2.6rem);
  line-height: 1.05;
}

.counter {
  min-width: 76px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(25, 27, 29, .78);
  text-align: center;
  white-space: nowrap;
}

.home-button,
.beer-button {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(25, 27, 29, .82);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.home-button {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 800;
}

.home-button:hover,
.beer-button:hover {
  border-color: rgba(244, 196, 90, .8);
  background: rgba(35, 39, 42, .96);
  transform: translateY(-1px);
}

.beer-menu {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 10px;
  align-content: start;
}

.beer-button {
  min-height: 54px;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 850;
  line-height: 1.15;
  text-align: left;
}

.stage {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(10, 11, 12, .58);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.slide-link {
  width: 100%;
  height: 100%;
  min-height: 420px;
  display: grid;
  place-items: center;
  padding: clamp(10px, 2vw, 24px);
}

.slide-link:focus-visible,
.thumb:focus-visible,
.beer-button:focus-visible,
.home-button:focus-visible,
.nav-button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.slide-link img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 220px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  background: #f4f0e6;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .42);
}

.nav-button {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 48px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  color: var(--text);
  background: rgba(18, 20, 21, .7);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.nav-button:hover {
  border-color: rgba(244, 196, 90, .72);
  background: rgba(35, 39, 42, .95);
  transform: translateY(-50%) scale(1.03);
}

.nav-button span {
  font-size: 3rem;
  line-height: 1;
}

.nav-button--prev {
  left: 16px;
}

.nav-button--next {
  right: 16px;
}

.thumbs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(82px, 118px);
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scrollbar-color: var(--accent) rgba(255, 255, 255, .12);
}

.thumb {
  height: 92px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: var(--panel);
  cursor: pointer;
  overflow: hidden;
  opacity: .68;
  transition: border-color .18s ease, opacity .18s ease, transform .18s ease;
}

.thumb:hover,
.thumb[aria-current="true"] {
  border-color: var(--accent);
  opacity: 1;
}

.thumb:hover {
  transform: translateY(-2px);
}

.thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

@media (max-width: 720px) {
  .site-shell {
    min-height: 100svh;
    padding: 14px;
  }

  .slideshow-view {
    gap: 12px;
  }

  .topbar {
    align-items: start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .beer-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .beer-button {
    min-height: 50px;
    padding: 9px 10px;
    font-size: .92rem;
  }

  .counter {
    font-size: .88rem;
  }

  .slide-link {
    min-height: 58svh;
    padding: 8px;
  }

  .slide-link img {
    max-height: 62svh;
  }

  .nav-button {
    width: 40px;
    height: 58px;
  }

  .nav-button--prev {
    left: 8px;
  }

  .nav-button--next {
    right: 8px;
  }

  .thumbs {
    grid-auto-columns: 76px;
  }

  .thumb {
    height: 72px;
  }
}
