/* ---------- Fonts (local) ---------- */
@font-face {
  font-family: "Cinzel";
  src: url("../fonts/cinzel-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --gold: #D4AF37;
  --gold-soft: #C5A059;
  --offwhite: #EAE3D2;
  --dark: #0d0907;
  --page-pad: clamp(16px, 6vw, 96px);
  --list-width: clamp(320px, 36vw, 480px);
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden; /* the page itself never scrolls - only the list does */
  background: var(--dark);
  color: var(--offwhite);
  font-family: "Montserrat", system-ui, sans-serif;
}

/* ---------- Background (fixed, shows the left side first) ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--dark) url("../images/background-1920.jpg") left center / cover no-repeat;
}

/* ---------- Title ---------- */
.site-header {
  flex: none;
  padding: clamp(16px, 3.5vh, 36px) var(--page-pad) clamp(14px, 2.5vh, 28px);
  text-align: center;
  background: linear-gradient(to bottom, rgba(13, 9, 7, 0.75), rgba(13, 9, 7, 0));
}

h1 {
  margin: 0;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 4.2vw, 3.2rem);
  letter-spacing: 4px;
  text-indent: 4px; /* balances the trailing letter-spacing so the title looks centered */
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.9;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65);
}

/* ---------- List (the only scrolling element) ---------- */
.list-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  justify-content: flex-end; /* desktop: list sits in the right half */
  padding: 0 var(--page-pad);
}

.panel {
  width: var(--list-width);
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ---------- Summary row ---------- */
.stats {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 0 6px 16px 0;
  padding: 14px 20px;
  background: rgba(15, 10, 6, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(197, 160, 89, 0.35);
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.stats:empty {
  display: none;
}

.stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stats dt {
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--offwhite);
  opacity: 0.7;
}

.stats dd {
  margin: 0;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: 1px;
  color: var(--gold);
}

.list {
  width: 100%;
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 8px 6px 32px 0;
  list-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-soft) transparent;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.list::-webkit-scrollbar {
  width: 6px;
}

.list::-webkit-scrollbar-thumb {
  background: var(--gold-soft);
  border-radius: 3px;
}

/* ---------- Cards ---------- */
.card {
  flex: none;
  padding: 18px 20px;
  background: rgba(15, 10, 6, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(197, 160, 89, 0.35);
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);

  /* arrive from the bottom */
  opacity: 0;
  transform: translateY(60px);
  transition:
    opacity 0.7s ease,
    transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--delay, 0ms);
}

.card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.card__date {
  margin: 0 0 6px;
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--offwhite);
  opacity: 0.7;
}

.card__name {
  margin: 0 0 14px;
  font-family: "Cinzel", Georgia, serif;
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1.3;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.9;
}

.card__meta {
  display: flex;
  gap: 32px;
  margin: 0;
}

.card__meta div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card__meta dt {
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--offwhite);
  opacity: 0.7;
}

.card__meta dd {
  margin: 0;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 1px;
  color: var(--offwhite);
}

.message {
  padding: 16px 20px;
  background: rgba(15, 10, 6, 0.7);
  border: 1px solid rgba(197, 160, 89, 0.35);
  border-radius: 6px;
  font-size: 0.85rem;
  letter-spacing: 1px;
  color: var(--offwhite);
}

/* ---------- Small screens: list covers the full width (and the decanter) ---------- */
@media (max-width: 699px) {
  :root {
    --page-pad: 16px;
  }

  .site-header {
    padding-top: 20px;
    padding-bottom: 20px; /* a little space between the title and the list */
  }

  h1 {
    font-size: clamp(1.5rem, 8vw, 2.2rem);
    letter-spacing: 3px;
    text-indent: 3px;
  }

  .list-wrap {
    justify-content: stretch;
  }

  .panel {
    width: 100%;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .card {
    transform: none;
    transition: opacity 0.3s ease;
    transition-delay: 0ms;
  }
}
