@layer base {
/* Public programme (specs/events.md): experience cards, teaser slider,
   programme pages, and the experience detail hero. Extends the design-1
   system — Newsreader display serif, country palette variables, d1 fades. */

/* ── Experience card ─────────────────────────────────────────────── */

.d1-exp-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--elev-1);
}
/* Hover: .lift (shared.css). */

/* Artwork: fixed 3:2 crop so mixed sources never distort the layout. The
   gradient beneath survives a failed image request as an intentional tile. */
.d1-exp-card-art {
  position: relative;
  aspect-ratio: 3 / 2;
  background:
    radial-gradient(circle at 18% 115%, var(--country-main, #3F925B) 0%, transparent 62%),
    linear-gradient(155deg, var(--country-dark, #192F2B) 0%, var(--country-main, #3F925B) 130%);
  overflow: hidden;
}
.d1-exp-card-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Ghost initial for the CSS-only fallback — decorative, aria-hidden. */
.d1-exp-card-initial {
  position: absolute;
  right: 10px;
  bottom: -0.32em;
  font-family: "Newsreader", serif;
  font-size: 7rem;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  opacity: 0.14;
  user-select: none;
}
/* Scrim: keeps the overlaid title readable over any photograph. */
.d1-exp-card-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(12, 24, 21, 0.78) 100%);
}
.d1-exp-card-art-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 12px;
  z-index: 1;
}
.d1-exp-card-camp {
  display: block;
  font-family: "Red Hat Text", sans-serif;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 2px;
}
.d1-exp-card-name {
  font-family: "Newsreader", serif;
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.15;
  color: #fff;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.d1-exp-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 16px;
  flex: 1;
}
.d1-exp-card-desc {
  font-size: var(--text-md);
  line-height: 1.5;
  color: rgba(25, 47, 43, 0.75);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.d1-exp-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
.d1-exp-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: "Red Hat Text", sans-serif;
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  background: color-mix(in oklab, var(--country-main, #3F925B) 14%, white);
  color: var(--country-dark, #192F2B);
}

/* ── Programme filter controls (the programme's pinned bar, #616) ── */

/* Shared control shell: pill inputs on white with the country accent on focus. */
.d1-filter-select,
.d1-filter-search,
.d1-select-trigger {
  height: 44px;
  font-family: var(--font-body);
  font-size: var(--text-md);
  color: var(--dark-green-900);
  background-color: #fff;
  border: 1px solid color-mix(in oklab, var(--dark-green-900) 16%, transparent);
  border-radius: var(--radius-full);
  padding: 0 18px;
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out);
}
.d1-filter-select:focus,
.d1-filter-search:focus,
.d1-select-trigger:focus-visible {
  outline: none;
  border-color: var(--country-main, #3F925B);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--country-main, #3F925B) 20%, transparent);
}

/* Native select, restyled: custom chevron, no OS widget, truncation-safe. */
.d1-filter-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  max-width: 220px;
  padding-right: 42px;
  text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23192F2B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.d1-filter-select:hover {
  border-color: color-mix(in oklab, var(--country-main, #3F925B) 55%, var(--dark-green-900) 16%);
  background-color: color-mix(in oklab, var(--country-main, #3F925B) 6%, #fff);
}

/* Search field: leading magnifier icon, grows to fill the row. */
.d1-filter-search {
  flex: 1;
  min-width: 200px;
  padding-left: 46px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23234139' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 18px center;
}
.d1-filter-search::placeholder {
  color: color-mix(in oklab, var(--dark-green-900) 42%, transparent);
}
.d1-filter-search:hover {
  border-color: color-mix(in oklab, var(--country-main, #3F925B) 55%, var(--dark-green-900) 16%);
}

/* ── Custom select (JS-enhanced dropdown) ────────────────────────── */
/* Progressive enhancement: JS wraps each native <select>, hides it (kept for
   form submission + no-JS), and renders this styled trigger + popup. Without
   JS none of the .d1-select-* nodes exist and the native <select> shows. */

.d1-select {
  position: relative;
  display: inline-flex;
}
/* Native <select> visually hidden once enhanced, but still submits its value. */
.d1-select.is-enhanced > .d1-filter-select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  border: 0;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  pointer-events: none;
}

.d1-select-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 150px;
  max-width: 240px;
  cursor: pointer;
  text-align: left;
}
.d1-select-trigger:hover {
  border-color: color-mix(in oklab, var(--country-main, #3F925B) 55%, var(--dark-green-900) 16%);
  background-color: color-mix(in oklab, var(--country-main, #3F925B) 6%, #fff);
}
.d1-select-trigger-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.d1-select-chevron {
  flex: none;
  width: 12px;
  height: 12px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23192F2B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  transition: transform var(--dur-base) var(--ease-out);
}
.d1-select.is-open .d1-select-chevron { transform: rotate(180deg); }

.d1-select-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  min-width: 100%;
  max-width: min(320px, calc(100vw - 48px));
  max-height: 320px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid color-mix(in oklab, var(--dark-green-900) 12%, transparent);
  border-radius: var(--radius-lg);
  box-shadow: var(--elev-3);
  scrollbar-width: thin;
}
.d1-select.is-open .d1-select-menu {
  display: block;
  animation: d1-select-in 0.14s ease;
}
@keyframes d1-select-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.d1-select-option {
  position: relative;
  display: flex;
  align-items: center;
  padding: 9px 14px 9px 34px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.3;
  color: var(--dark-green-900);
  cursor: pointer;
}
/* Hover + keyboard-active share one highlight. */
.d1-select-option:hover,
.d1-select-option.is-active {
  background: color-mix(in oklab, var(--country-main, #3F925B) 12%, #fff);
}
.d1-select-option[aria-selected="true"] { font-weight: 600; }
.d1-select-option[aria-selected="true"]::before {
  content: "";
  position: absolute;
  left: 11px;
  width: 14px;
  height: 14px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%233F925B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

/* No-JS fallback submit (selects auto-submit when JS is on). */
.d1-filter-submit {
  height: 44px;
  padding: 0 22px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-md);
  color: #fff;
  background: var(--country-dark, #192F2B);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
}
.d1-filter-submit:hover { background: var(--country-main, #3F925B); }

@media (max-width: 640px) {
  /* Options get a taller touch target. */
  .d1-select-menu { max-height: min(60vh, 380px); }
  .d1-select-option { padding: 13px 14px 13px 38px; }
}

/* ── Teaser slider (public Gathering page) ───────────────────────── */

.d1-programme-teaser-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.d1-programme-heading {
  font-family: "Newsreader", serif;
  font-size: var(--text-2xl);
  font-weight: 600;
  margin: 0;
}
/* No-JS baseline: a plain horizontal scroll strip with snap points. */
.d1-exp-slider {
  position: relative;
}
.d1-exp-slider-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(78vw, 300px);
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
  scrollbar-width: thin;
}
.d1-exp-slider-track > * {
  scroll-snap-align: start;
}
/* Prev/next controls exist in markup but are progressive enhancement:
   hidden until JS marks the slider enhanced. */
.d1-exp-slider-btn {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: var(--country-dark, #192F2B);
  box-shadow: var(--elev-2);
  cursor: pointer;
  font-size: var(--text-lg);
  line-height: 1;
}
.d1-exp-slider.is-enhanced .d1-exp-slider-btn { display: grid; place-items: center; }
.d1-exp-slider-btn:hover { background: var(--country-main, #3F925B); color: #fff; }
.d1-exp-slider-btn--prev { left: -12px; }
.d1-exp-slider-btn--next { right: -12px; }

/* ── Experience detail hero ──────────────────────────────────────── */

.d1-exp-hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 300px;
  display: flex;
  align-items: flex-end;
  background:
    radial-gradient(circle at 18% 115%, var(--country-main, #3F925B) 0%, transparent 62%),
    linear-gradient(155deg, var(--country-dark, #192F2B) 0%, var(--country-main, #3F925B) 130%);
}
.d1-exp-hero img.d1-exp-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.d1-exp-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 24, 21, 0.05) 30%, rgba(12, 24, 21, 0.82) 100%);
}
.d1-exp-hero-content {
  position: relative;
  z-index: 1;
  padding: 42px 36px 32px;
}
/* The chips under the experience hero's title (was an inline style). */
.d1-exp-card-chips--hero { margin-top: var(--space-3); }
.d1-exp-hero-camp {
  font-family: "Red Hat Text", sans-serif;
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}
.d1-exp-hero-camp a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.4); }
.d1-exp-hero-title {
  font-family: "Newsreader", serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 600;
  line-height: 1.08;
  color: #fff;
  margin: 6px 0 0;
}

@media (max-width: 640px) {
  .d1-exp-hero-content { padding: 28px 20px 22px; }
  .d1-exp-slider-btn { display: none !important; }
}
}
