/* =============================================================================
   TRADECRAFT FAIR & LIVESTOCK WEBSITE SYSTEM — DESIGN SYSTEM STYLESHEET
   =============================================================================
   This file defines how every site built on this template LOOKS. It is
   shared across all customer sites and should rarely need editing.

   Colors are NOT hardcoded here — they come from CSS variables (--color-*)
   that base.njk generates from src/_data/config.json at build time. To
   re-theme a site, edit config.json, not this file.

   Sections in this file:
     1. Reset & base element styles
     2. Design tokens (spacing, type scale, radius, shadow)
     3. Typography
     4. Layout helpers (container, section spacing)
     5. Buttons
     6. Header & navigation
     7. Announcement banner
     8. Hero
     9. Cards (event, species, sponsor) & tags
     10. Homepage-specific sections (dates strip, tiles, CTA banner, announcements)
     11. Footer
     12. Generic page/content styles (for internal pages)
     13. Accessibility helpers
     14. Responsive breakpoints
   ============================================================================= */


/* ---------- 1. RESET & BASE ELEMENT STYLES ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6.5rem; /* keeps in-page #anchors from hiding under the sticky header */
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--color-primary); text-decoration-thickness: 1px; }
a:hover { color: var(--color-primary-dark); }

ul, ol { padding-left: 1.25em; }

/* Every interactive element gets a clearly visible focus state. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 2px;
}


/* ---------- 2. DESIGN TOKENS ---------- */

:root {
  /* Spacing scale (roughly a 1.5x ramp) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;

  --shadow-card: 0 2px 6px rgba(43, 38, 36, 0.08), 0 1px 2px rgba(43, 38, 36, 0.06);
  --shadow-card-hover: 0 8px 20px rgba(43, 38, 36, 0.14);

  --max-width: 1180px;
  --header-height: 5.5rem;
}


/* ---------- 3. TYPOGRAPHY ---------- */

h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 var(--space-4);
  color: var(--color-text);
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.15rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 var(--space-4); }

.section__heading {
  margin-bottom: var(--space-5);
  position: relative;
  padding-bottom: var(--space-3);
}
.section__heading::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 56px; height: 4px;
  background: var(--color-secondary);
  border-radius: 2px;
}
.section__intro {
  max-width: 60ch;
  color: #55504c;
  margin-top: calc(-1 * var(--space-3));
}


/* ---------- 4. LAYOUT HELPERS ---------- */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.section { padding: var(--space-8) 0; }
.section--tight { padding: var(--space-6) 0; }
.section--alt { background: #F1E9D8; }

.section__header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}
.section__header-row .section__heading { margin-bottom: 0; }

.link-arrow {
  font-weight: 600;
  white-space: nowrap;
}
.link-arrow::after { content: " →"; }


/* ---------- 5. BUTTONS ---------- */
/* Exactly two button styles by design: solid (primary) and outlined
   (secondary). Do not introduce a third button style — it dilutes the
   visual system across sites. */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border-radius: var(--radius-md);
  padding: 0.75rem 1.5rem;
  min-height: 48px; /* comfortable tap target */
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease, color 0.12s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.btn--primary:hover { background: var(--color-primary-dark); border-color: var(--color-primary-dark); color: #fff; }

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn--outline:hover { background: var(--color-primary); color: #fff; }

/* Used on dark/photo backgrounds, e.g. the hero */
.btn--outline-light {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-color: rgba(255,255,255,0.75);
  backdrop-filter: blur(2px);
}
.btn--outline-light:hover { background: #fff; color: var(--color-primary-dark); }

.btn--large { padding: 0.9rem 1.85rem; font-size: 1.05rem; }


/* ---------- 6. HEADER & NAVIGATION ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--color-surface);
  border-bottom: 1px solid rgba(43,38,36,0.08);
}

.site-header__bar {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.site-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-decoration: none;
  color: var(--color-text);
}
.site-logo__line1 {
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-primary);
}
.site-logo__line2 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--color-text);
}
.site-logo__image {
  height: 44px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
  transition: height 0.2s ease;
}

/* Mobile hamburger button (hidden on desktop) */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  height: 2px;
  width: 26px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.primary-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.primary-nav__item { position: relative; }

.primary-nav__link {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--color-text);
  padding: var(--space-3) var(--space-3);
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.primary-nav__link:hover,
.primary-nav__item.is-open .primary-nav__link { color: var(--color-primary); background: rgba(122,46,39,0.06); }

.chevron { transition: transform 0.15s ease; }
.primary-nav__item.is-open .chevron { transform: rotate(180deg); }

.dropdown {
  list-style: none;
  margin: 0;
  padding: var(--space-2);
  min-width: 230px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card-hover);
  border: 1px solid rgba(43,38,36,0.08);
}

.primary-nav__cta { margin-left: var(--space-3); }


/* ---------- 7. ANNOUNCEMENT BANNER ---------- */

.announcement-banner {
  background: var(--color-secondary);
  color: var(--color-text);
}
.announcement-banner__inner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-5);
  font-size: 0.9rem;
  flex-wrap: wrap;
}
.announcement-banner__tag {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  background: rgba(43,38,36,0.12);
  padding: 2px 8px;
  border-radius: 999px;
}
.announcement-banner__link { font-weight: 700; margin-left: auto; white-space: nowrap; }


/* ---------- 8. HERO ---------- */

.hero {
  position: relative;
  color: #fff;
  padding: var(--space-8) 0;
  background:
    radial-gradient(circle at 12% 20%, rgba(217,164,65,0.35) 0, transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(217,164,65,0.25) 0, transparent 35%),
    linear-gradient(180deg, var(--color-primary-dark) 0%, var(--color-primary) 55%, #8a3a30 100%);
  overflow: hidden;
}
/* subtle "string lights over the midway" texture using repeating dots */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.35) 1px, transparent 1.5px);
  background-size: 34px 34px;
  opacity: 0.18;
  pointer-events: none;
}
.hero__inner { position: relative; text-align: center; max-width: 780px; }
.hero__eyebrow {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: #F4D9A0;
  margin-bottom: var(--space-3);
}
.hero__title { color: #fff; margin-bottom: var(--space-3); }
.hero__tagline { font-size: 1.15rem; color: rgba(255,255,255,0.9); margin-bottom: var(--space-6); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; }


/* ---------- 9. CARDS & TAGS ---------- */

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: var(--space-2);
  color: #fff;
  background: var(--color-accent);
}
.tag--fair { background: var(--color-primary); }
.tag--livestock { background: var(--color-accent); }
.tag--entertainment { background: var(--color-secondary); color: var(--color-text); }
.tag--carnival { background: #B5622A; }
.tag--auction { background: var(--color-primary-dark); }
.tag--creative-arts { background: #7C5C9C; }

/* Schedule category filter (only rendered when the schedule has enough
   different categories on it to be worth filtering — see fair-info.njk) */
.schedule-filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}
.schedule-filter__btn {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 8px 18px;
  min-height: 44px;
  border-radius: 999px;
  border: 1.5px solid rgba(43,38,36,0.15);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.schedule-filter__btn:hover { border-color: var(--color-primary); }
.schedule-filter__btn.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.event-card.is-filtered-out { display: none; }

/* Event card */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-5);
}
.event-card {
  display: flex;
  gap: var(--space-4);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: var(--space-5);
  border: 1px solid rgba(43,38,36,0.06);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.event-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.event-card__date {
  flex: 0 0 auto;
  width: 58px;
  text-align: center;
  background: var(--color-background);
  border-radius: var(--radius-sm);
  padding: var(--space-2) 0;
  height: fit-content;
}
.event-card__month { display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; color: var(--color-primary); }
.event-card__day { display: block; font-family: Georgia, serif; font-size: 1.4rem; font-weight: 700; }
.event-card__title { margin: 0 0 var(--space-1); font-size: 1.1rem; }
.event-card__meta { font-size: 0.85rem; color: #6b645f; margin-bottom: var(--space-2); }
.event-card__description { margin: 0; font-size: 0.92rem; color: #4a453f; }

/* Species card */
.species-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-5);
}
.species-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(43,38,36,0.06);
  padding: var(--space-5);
  text-align: center;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.species-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.species-card__title { margin-bottom: var(--space-2); }
.species-card__description { font-size: 0.9rem; color: #4a453f; }
.species-card__deadline { font-size: 0.8rem; font-weight: 600; color: var(--color-primary); margin: var(--space-3) 0 0; }

/* Sponsor grid & card */
.sponsor-tier-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7a736c;
  margin: var(--space-6) 0 var(--space-3);
}
.sponsor-tier-label:first-of-type { margin-top: 0; }
.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-4);
}
.sponsor-grid--premier { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.sponsor-grid--compact { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

.sponsor-card {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--color-surface);
  border: 1px solid rgba(43,38,36,0.08);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-4);
  min-height: 90px;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 700;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.sponsor-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); color: var(--color-primary); }
.sponsor-card--premier { min-height: 120px; font-size: 1.1rem; border-top: 4px solid var(--color-secondary); }
.sponsor-card--friend { min-height: 70px; font-size: 0.85rem; }

/* Board member card — intentionally reuses the species-card shell/shadow
   so the visual "card language" stays consistent site-wide. */
.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-5);
}
.board-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(43,38,36,0.06);
  padding: var(--space-5);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.board-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.board-card__name { margin-bottom: var(--space-1); }
.board-card__role { font-size: 0.85rem; font-weight: 700; color: var(--color-primary); margin-bottom: var(--space-3); }
.board-card__bio { font-size: 0.9rem; color: #4a453f; margin: 0; }


/* ---------- 10. HOMEPAGE-SPECIFIC SECTIONS ---------- */

/* Important dates strip */
.important-dates__row {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  padding-bottom: var(--space-2);
  -webkit-overflow-scrolling: touch;
}
.date-chip {
  flex: 0 0 auto;
  min-width: 180px;
  background: var(--color-surface);
  border: 1px solid rgba(43,38,36,0.08);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  box-shadow: var(--shadow-card);
}
.date-chip__date { display: block; font-weight: 700; color: var(--color-primary); font-size: 0.85rem; }
.date-chip__label { display: block; font-size: 0.88rem; margin-top: 2px; }

/* Experience the Fair tiles */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-4);
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-6) var(--space-3);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(43,38,36,0.06);
  font-weight: 700;
  text-align: center;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.tile:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); color: var(--color-primary); }
.tile__icon { font-size: 2.5rem; }

/* Experience the Fair tiles — see section 16 below for the photo redesign
   that overrides most of these rules; the block above is left in place as
   the fallback in case the photo files are removed. */

/* CTA banner (Auction) */
.cta-banner {
  background: var(--color-primary);
  color: #fff;
}
.cta-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  flex-wrap: wrap;
}
.cta-banner__heading { color: #fff; margin-bottom: var(--space-2); }
.cta-banner__text { color: rgba(255,255,255,0.88); margin: 0; max-width: 46ch; }
.cta-banner__actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }

/* Announcements */
.announcement-list { display: grid; gap: var(--space-4); max-width: 760px; }
.announcement-item {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid rgba(43,38,36,0.08);
  padding: var(--space-5);
}
.announcement-item__date { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-accent); margin-bottom: var(--space-1); }
.announcement-item__title { margin: 0 0 var(--space-2); font-size: 1.1rem; }
.announcement-item__body { margin: 0; color: #4a453f; }


/* ---------- 11. FOOTER ---------- */

.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding-top: var(--space-7);
}
.site-footer a { color: var(--color-footer-text); }
.site-footer a:hover { color: var(--color-secondary); }

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: var(--space-6);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.site-footer__badge {
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: var(--space-3);
  color: var(--color-secondary);
}
.site-footer h3 {
  font-family: inherit;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(244,239,230,0.65);
  margin-bottom: var(--space-3);
}
.site-footer__links ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-2); }
.site-footer address { font-style: normal; margin-bottom: var(--space-3); }
.site-footer__social { display: flex; gap: var(--space-3); margin-top: var(--space-4); }
.site-footer__social a { display: inline-flex; }

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-4) 0 var(--space-6);
  font-size: 0.82rem;
  color: rgba(244,239,230,0.6);
}


/* ---------- 12. GENERIC PAGE / CONTENT STYLES ---------- */
/* Used by internal pages (fair-info, livestock, tickets, sponsors,
   contact) so a plain page of headings/paragraphs still looks intentional. */

.page-header {
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-7) 0 var(--space-6);
  text-align: center;
}
.page-header h1 { color: #fff; margin-bottom: var(--space-2); }
.page-header p { color: rgba(255,255,255,0.85); margin: 0; }

.content-section { padding: var(--space-7) 0; border-bottom: 1px solid rgba(43,38,36,0.08); }
.content-section:last-of-type { border-bottom: none; }
.content-section h2 { scroll-margin-top: 6.5rem; }

.callout {
  background: #F1E9D8;
  border-left: 4px solid var(--color-secondary);
  border-radius: var(--radius-sm);
  padding: var(--space-4) var(--space-5);
  margin: var(--space-4) 0;
}

.doc-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--color-surface);
  border: 1px solid rgba(43,38,36,0.1);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
  margin-bottom: var(--space-3);
  max-width: 480px;
}
.doc-link:hover { border-color: var(--color-primary); }
.doc-link__tag {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--color-accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-4) 0;
}
th, td {
  text-align: left;
  padding: var(--space-3);
  border-bottom: 1px solid rgba(43,38,36,0.1);
}
th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: #6b645f; }

.table-scroll { overflow-x: auto; }


/* ---------- 13. ACCESSIBILITY HELPERS ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-3) var(--space-4);
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
  left: 0;
}


/* ---------- 14. RESPONSIVE BREAKPOINTS ---------- */

/* Below this width: hamburger menu, stacked layout */
@media (max-width: 899px) {
  .nav-toggle { display: flex; }

  .primary-nav {
    position: fixed;
    inset: var(--header-height) 0 0 0;
    background: var(--color-surface);
    padding: var(--space-5);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.25s ease;
  }
  .primary-nav.is-open { transform: translateX(0); }

  .primary-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .primary-nav__item { border-bottom: 1px solid rgba(43,38,36,0.08); }
  .primary-nav__link { width: 100%; justify-content: space-between; padding: var(--space-4) var(--space-2); font-size: 1.05rem; }

  .dropdown {
    box-shadow: none;
    border: none;
    padding-left: var(--space-4);
    display: none;
  }
  .primary-nav__item.is-open .dropdown { display: block; }

  .primary-nav__cta { margin: var(--space-5) 0 0; width: 100%; }

  .cta-banner__inner { flex-direction: column; align-items: flex-start; }
  .site-footer__grid { grid-template-columns: 1fr; }
}

/* Desktop: dropdowns are absolutely-positioned popovers, hidden by default */
@media (min-width: 900px) {
  .primary-nav { display: flex; align-items: center; gap: var(--space-3); }

  .dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    display: none;
    flex-direction: column;
    z-index: 50;
  }
  .primary-nav__item.is-open .dropdown,
  .primary-nav__item:focus-within .dropdown { display: flex; }

  .dropdown li a {
    display: block;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--color-text);
    font-size: 0.92rem;
  }
  .dropdown li a:hover { background: var(--color-background); color: var(--color-primary); }
}

@media (max-width: 599px) {
  .hero { padding: var(--space-7) 0; }
  .cta-banner__actions .btn { width: 100%; }
  .cta-banner__actions { flex-direction: column; align-items: stretch; }
}


/* ---------- 15. HERO PHOTO ---------- */
/* Layers a real photo under the maroon gradient wash already set on .hero
   above, so any reasonably-lit photo still reads as on-brand instead of
   clashing. To change the photo: replace the file at
   src/assets/images/hero-fair.jpg with a new one of the same name (or
   change the filename below to match a differently-named file). If the
   file is missing, the browser just skips this layer and the plain
   gradient from section 8 shows instead — nothing breaks. */
.hero {
  background-image:
    linear-gradient(180deg, rgba(94,33,25,0.55) 0%, rgba(122,46,39,0.62) 55%, rgba(138,58,48,0.72) 100%),
    radial-gradient(circle at 12% 20%, rgba(217,164,65,0.30) 0, transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(217,164,65,0.22) 0, transparent 35%),
    url('/assets/images/hero-fair.jpg');
  background-size: cover;
  background-position: center;
}


/* ---------- 16. EXPERIENCE TILES — PHOTO REDESIGN ---------- */
/* Turns the plain icon tiles in "Experience the Fair" into photo cards:
   a real photo fills the card, a dark gradient sits over it so the white
   label stays readable, and the icon becomes a small round badge in the
   top corner instead of the whole middle of the card.

   To change a tile's photo: replace the matching file in
   src/assets/images/ with a new image of the SAME FILE NAME (or edit the
   filename in the five .tile--xxx rules below to match a new file).
   If a photo file is missing, the browser just shows the solid brand-color
   fallback set on .tile below — nothing breaks. */
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: var(--space-1);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  background-color: var(--color-primary);
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-md);
  padding: var(--space-4);
  box-shadow: var(--shadow-card);
  border: none;
  font-weight: 700;
  text-align: left;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(43,38,36,0) 38%, rgba(26,20,18,0.82) 100%);
}
.tile:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
  color: #fff;
}
.tile__label {
  position: relative;
  z-index: 1;
  font-size: 1rem;
  text-shadow: 0 1px 3px rgba(0,0,0,0.45);
}

.tile--livestock    { background-image: url('/assets/images/tile-livestock.jpg'); }
.tile--carnival      { background-image: url('/assets/images/tile-carnival.jpg'); }
.tile--entertainment { background-image: url('/assets/images/tile-entertainment.jpg'); }
.tile--creative-arts { background-image: url('/assets/images/tile-creative-arts.jpg'); }
.tile--vendors       { background-image: url('/assets/images/tile-vendors.jpg'); }


/* ---------- 17. SCROLL REVEALS ---------- */
/* Section headings gently fade/slide into place as the visitor scrolls to
   them. main.js adds the "is-visible" class via IntersectionObserver.
   Motion is skipped entirely for visitors with reduced-motion turned on,
   and main.js falls back to showing everything immediately if the
   visitor's browser doesn't support IntersectionObserver — so this never
   leaves content stuck invisible. */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* ---------- 18. HEADER CONDENSE ON SCROLL ---------- */
/* Once the visitor scrolls down a bit, main.js adds "is-scrolled" to the
   header and it shrinks slightly — handy on small phone screens where the
   full-height header eats into the content area. If JS doesn't run, the
   header simply stays at its normal size; nothing breaks. */
.site-header,
.site-header__bar {
  transition: min-height 0.2s ease;
}
.site-header.is-scrolled .site-header__bar {
  min-height: calc(var(--header-height) - 1rem);
}
.site-header.is-scrolled .site-logo__line1 { font-size: 1.05rem; }
.site-header.is-scrolled .site-logo__line2 { font-size: 0.62rem; }
.site-header.is-scrolled .site-logo__image { height: 36px; }
