/* Festivals (Phase 3, step 6): the colour themes, the home page's banner and a festival's page.
   Colours and words only, no picture, until Decision 15. Themes are named by colour, never by a
   culture. Dark ink on bright colours in both light and dark mode, so the words stay easy to read. */

.festival--marigold { --fest-a: #FFE08A; --fest-b: #FFA94D; }
.festival--jade { --fest-a: #C9F5D3; --fest-b: #5CD08E; }
.festival--rose { --fest-a: #FFD6E5; --fest-b: #FF8FB5; }
.festival--ocean { --fest-a: #D2EFFF; --fest-b: #62C4F5; }
.festival--plum { --fest-a: #EBDDFF; --fest-b: #B990F5; }

.festival-head {
  position: relative;
  overflow: hidden;
  padding: var(--space-5) var(--space-4);
  color: var(--ink-900);
  background:
    radial-gradient(circle at 88% 18%, rgb(255 255 255 / .55) 0 2.2rem, transparent 2.3rem),
    radial-gradient(circle at 96% 70%, rgb(255 255 255 / .35) 0 1.2rem, transparent 1.3rem),
    linear-gradient(135deg, var(--fest-a), var(--fest-b));
  border: 2px solid var(--ink-900);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 0 var(--ink-900);
}

.festival-head__title { margin: 0 0 var(--space-2); overflow-wrap: anywhere; }
.festival-head__words { margin: 0 0 var(--space-2); max-width: 34rem; font-size: var(--fs-lg); font-weight: 400; overflow-wrap: anywhere; }
.festival-head__words:empty { display: none; }
.festival-head__dates { margin: 0; font-weight: 800; }
.festival-head__dates:empty { display: none; }

/* A festival's page */
.festival-top { display: grid; gap: var(--space-4); padding-block: var(--space-4) var(--space-5); }
.festival-top .area-head__back { margin-bottom: 0; justify-self: start; }
.festival-state { display: grid; justify-items: start; gap: var(--space-3); padding-bottom: var(--space-8); }
.festival-state[hidden], #dishes[hidden] { display: none; }
.festival-state p { margin: 0; font-weight: 400; }
.festival__note { margin: 0 0 var(--space-4); color: var(--text-muted); font-size: var(--fs-sm); font-weight: 400; }
.festival__note[hidden] { display: none; }

.festival__dishes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.festival__dishes .dish-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.festival__dishes .tag-row { margin-top: var(--space-2); }

/* The home page's banners, while a festival is on. The whole banner is one big tap area. */
.home__festivals { display: grid; gap: var(--space-4); margin-bottom: var(--space-5); }
.home__festivals[hidden] { display: none; }
.festival-banner { display: grid; justify-items: start; gap: 0; }
.festival-banner:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.festival-banner__title { margin: 0 0 var(--space-2); font-size: var(--fs-xl); overflow-wrap: anywhere; }
.festival-banner__link { color: inherit; text-decoration: none; }
.festival-banner__link:focus-visible { outline: none; }
.festival-banner__link::after { content: ""; position: absolute; inset: 0; }
.festival-banner__go { margin-top: var(--space-3); pointer-events: none; }

/* Festival dishes (sellers): a card for each festival, with a tick box for each dish. */
.festival-list { display: grid; gap: var(--space-5); margin: var(--space-4) 0 0; padding: 0; list-style: none; }
.page__body .festival-list { padding: 0; } /* beats ".page__body ul" */
.festival-list__empty { font-weight: 400; }
.festival-list__empty[hidden] { display: none; }
.festival-list__back { margin: var(--space-5) 0 0; }
.festival-card { display: grid; gap: var(--space-3); }
.festival-card__head { padding: var(--space-4); }
.page__body .festival-card__title { margin: 0 0 var(--space-1); font-size: var(--fs-xl); overflow-wrap: anywhere; } /* beats ".page__body h2" */
.festival-card__count { margin: 0; font-weight: 800; }
.festival-card__dishes { display: grid; gap: var(--space-2); min-width: 0; margin: 0; padding: 0; border: 0; }
.festival-card__dishes legend { margin-bottom: var(--space-2); padding: 0; font-weight: 800; }
.festival-card__link { justify-self: start; font-weight: 800; }
.festival-card .form-status:empty { display: none; }

.festival-dish {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--tap);
  padding: var(--space-2) var(--space-3);
  background: var(--surface-sunk);
  border-radius: var(--radius);
}

.festival-dish input { flex: none; width: 1.5rem; height: 1.5rem; accent-color: var(--primary); }
.festival-dish__label { display: flex; flex: 1; align-items: center; gap: var(--space-3); min-width: 0; cursor: pointer; }
.festival-dish input:disabled + .festival-dish__label { cursor: default; opacity: .75; }
.festival-dish__photo { flex: none; width: 64px; height: 48px; object-fit: cover; background: var(--surface); border-radius: var(--radius-sm); }
.festival-dish__words { display: grid; min-width: 0; }
.festival-dish__name { font-weight: 800; overflow-wrap: anywhere; }
.festival-dish__note { color: var(--text-muted); font-size: var(--fs-sm); font-weight: 400; }

/* The home page's collections (docs/06, suggestion 5; 23 Oct 2026): one tappable colour card
   each, in the festival colours. Dark ink on bright colours in light and dark mode. */
.home__collections { margin-bottom: var(--space-5); }
.collection-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 9.5rem), 1fr));
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.collection-link {
  display: flex;
  align-items: flex-end;
  min-height: 4.5rem;
  height: 100%;
  padding: var(--space-3);
  color: var(--ink-900);
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  overflow-wrap: anywhere;
  background:
    radial-gradient(circle at 90% 20%, rgb(255 255 255 / .55) 0 1.1rem, transparent 1.2rem),
    linear-gradient(135deg, var(--fest-a), var(--fest-b));
  border: 2px solid var(--ink-900);
  border-radius: var(--radius);
  box-shadow: 0 3px 0 var(--ink-900);
}
.collection-link:hover { text-decoration: underline; }
.collection-link:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink-900); }
.collection-link:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
