/* =============================================================================
   CAVALLINO V2 · VINOTHEK
   The 18+ entry, the editorial introduction and the two-axis catalogue.
   Loaded after pages.css. Origins on the left, types across the top, results
   in the main area; below 1024px: types, then origins, then results.
   ========================================================================== */

/* =============================================================================
   ARRIVAL — title, photograph and words in the first screen
   ========================================================================== */

.vt-arrival { padding-block: clamp(var(--s6), 4vw, var(--s8)); }
.vt-arrival__title { font-size: var(--fs-h1); text-wrap: balance; }
.vt-arrival__media { margin: 0; aspect-ratio: 4 / 3; }
.vt-arrival__media > img { object-position: 50% 42%; }
.vt-arrival__heading { font-size: clamp(2.2rem, 4.2vw, 4rem); line-height: 1; }
.vt-arrival__lead { margin-top: var(--s5); max-width: 40ch; }
.vt-arrival__pickup { margin-top: var(--s3); max-width: 44ch; color: var(--on-ground-muted); }

/* =============================================================================
   18+ ENTRY
   ========================================================================== */

.gate { padding-block: clamp(var(--s6), 4vw, var(--s8)); }
.gate[hidden] { display: none; }

.gate__panel {
  max-width: 44rem;
  padding: clamp(var(--s6), 4vw, var(--s8));
  border: var(--bd-hair) solid rgba(214, 188, 140, 0.4);
  border-radius: var(--r-ctl);
}
.gate__notice { margin: 0; font-size: var(--fs-small); color: var(--brass-bright); }

.gate__title {
  margin: var(--s4) 0 0;
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 400;
  line-height: var(--lh-title);
  text-wrap: balance;
}
.gate__text { margin: var(--s4) 0 0; color: var(--on-ground-muted); }
.gate__actions { display: flex; flex-wrap: wrap; gap: var(--s4); margin-top: var(--s6); }
.gate__actions .action { min-width: 120px; }
.gate__no { border-color: rgba(247, 242, 231, 0.42); color: var(--ivory); }
.gate__no:hover { border-color: var(--brass-bright); }

/* The question needs scripting to answer; without it only the notice shows. */
.gate__ask { display: none; }
.has-js .gate__ask { display: block; }
.has-js .gate__ask[hidden], .gate__refusal[hidden] { display: none; }
.gate__refusal .action { margin-top: var(--s6); }
.gate__refusal:focus { outline: none; }
.gate__refusal:focus-visible { outline: var(--bd-state) solid var(--brass-bright); outline-offset: 6px; }

/* Unavailable until Yes when scripting runs; always readable without it. */
.has-js .vt-content:not(.is-open) { display: none; }

/* =============================================================================
   CATALOGUE
   ========================================================================== */

.cellar { padding-block: var(--chapter-pad); }

.cellar__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "title" "types" "origins" "results";
  gap: var(--s6);
}
.cellar__title { grid-area: title; }
.cellar__title:focus { outline: none; }
.cellar__types { grid-area: types; min-width: 0; }
.cellar__origins { grid-area: origins; min-width: 0; }
.cellar__results { grid-area: results; min-width: 0; }

/* The controls need scripting; without it the editorial result stands alone. */
.cellar__types, .cellar__origins, .cellar__status { display: none; }
.has-js .cellar__types, .has-js .cellar__origins { display: block; }
.has-js .cellar__status { display: block; }

.cellar__axis-label { margin: 0 0 var(--s3); }
.cellar__chips { display: flex; flex-wrap: wrap; gap: var(--s2); }

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--s4);
  border: var(--bd-hair) solid var(--rule);
  border-radius: var(--r-ctl);
  background: var(--ground);
  color: var(--on-ground);
  font-size: var(--fs-small);
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.chip:hover { border-color: var(--on-ground); }
.chip[aria-pressed="true"] {
  background: var(--brand-ground);
  border-color: var(--brand-ground);
  color: var(--ivory);
}
/* Unavailable: visibly greyed, still focusable, never activated. */
.chip[aria-disabled="true"] {
  background: transparent;
  border-style: dashed;
  color: rgba(25, 21, 18, 0.38);
  cursor: not-allowed;
}
.chip[aria-disabled="true"]:hover { border-color: var(--rule); }

.cellar__status {
  margin: 0 0 var(--s5);
  padding-bottom: var(--s3);
  border-bottom: var(--bd-hair) solid var(--rule);
  font-size: var(--fs-small);
  font-weight: 500;
}

/* Empty state: the bottle drawing beside an editorial invitation. */
.cellar__empty {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: var(--s5);
  align-items: start;
  padding: clamp(var(--s5), 3vw, var(--s7));
  background: var(--ground-sunken);
  border-radius: var(--r-ctl);
}
.cellar__empty[hidden] { display: none; }
.bottle-mark { display: block; width: 100%; height: auto; color: var(--brass-deep); }
.cellar__empty-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 500;
  line-height: 1.1;
}
.cellar__empty-say p { margin: var(--s3) 0 0; max-width: 52ch; }
.cellar__empty-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s6);
}
.cellar__phone {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 500;
  color: var(--on-ground);
}
.cellar__contact {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 500;
  color: var(--accent-text);
}

/* Result tiles, from real records only. */
.cellar__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: var(--s6) var(--s5);
  margin: 0;
  padding: 0;
  list-style: none;
}
.cellar__grid[hidden] { display: none; }
.bottle { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.bottle__media {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--ground-sunken);
  border-radius: var(--r-ctl);
}
.bottle__media img { width: 100%; height: 100%; object-fit: cover; }
.bottle__media .bottle-mark { width: 26%; }
.bottle__meta { margin: var(--s2) 0 0; font-size: var(--fs-label); color: var(--on-ground-muted); }
.bottle__name { margin: 0; font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 500; line-height: 1.2; }
.bottle__details, .bottle__text { margin: 0; font-size: var(--fs-small); color: var(--on-ground-muted); }
.bottle__prices {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: start;
  gap: var(--s1) var(--s4);
  margin: var(--s2) 0 0;
  font-size: var(--fs-small);
}
.bottle__prices dd { margin: 0; font-weight: 600; }

@media (min-width: 760px) {
  .cellar__empty { grid-template-columns: 72px minmax(0, 1fr); gap: var(--s6); }
}

@media (min-width: 1024px) {
  /* One line for the title; the photograph is as tall as the rest of the
     screen allows, so nothing is cut off below the fold. */
  .vt-arrival__title { grid-column: 1 / -1; white-space: nowrap; font-size: min(var(--fs-h1), 4.2vw); }
  .vt-arrival__media {
    grid-column: 1 / 8;
    aspect-ratio: auto;
    height: clamp(340px, calc(100svh - var(--masthead-h) - 12rem), 640px);
  }
  .vt-arrival__say { grid-column: 9 / 13; align-self: center; }

  .cellar__layout {
    grid-template-columns: minmax(200px, 3fr) minmax(0, 9fr);
    grid-template-areas: "title title" "origins types" "origins results";
    column-gap: clamp(24px, 3vw, 56px);
    row-gap: var(--s6);
  }
  .cellar__origins { align-self: start; }
  .cellar__chips--column { flex-direction: column; align-items: stretch; }
  .cellar__chips--column .chip { justify-content: flex-start; }
}
