/* renfaire.ca base: tokens, page shell, header and footer, content components. Tools (calendar, prices) are in tools.css. */
:root {
  --color-primary: #1E3A2E;
  --color-bg: #F3E9D2;
  --color-accent: #C2A14A;
  --color-secondary: #4A3522;
  --color-featured-bg: #173126;
  --color-cream: #F7F0DF;
  --shadow-soft: 0 8px 24px rgba(30, 58, 46, 0.16);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

[id] {
  scroll-margin-top: 92px;
}

body {
  margin: 0;
  font-family: "Lora", Georgia, serif;
  line-height: 1.65;
  color: var(--color-secondary);
  background: var(--color-bg);
}

h1,
h2,
.brand {
  font-family: "Cinzel", "Times New Roman", serif;
  line-height: 1.2;
  color: var(--color-primary);
}

h3 {
  font-family: "Cinzel", "Times New Roman", serif;
  line-height: 1.25;
  color: var(--color-primary);
}

a {
  color: var(--color-primary);
}

a:hover,
a:focus-visible {
  color: var(--color-secondary);
}

.container {
  width: min(1080px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(74, 53, 34, 0.22);
  backdrop-filter: blur(5px);
  background: rgba(243, 233, 210, 0.95);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  text-decoration: none;
  font-size: 1.35rem;
}

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}

/* the two tools are outlined pills; the current page is filled */
.nav-list a {
  display: inline-block;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.35rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  background: rgba(194, 161, 74, 0.16);
  border-color: rgba(194, 161, 74, 0.6);
}

.nav-list a.nav-tool {
  font-weight: 600;
  border-color: rgba(30, 58, 46, 0.35);
}

.nav-list a[aria-current="page"] {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-cream);
}

.hero {
  padding: 2.5rem 0 1.5rem;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3rem);
}

.lead {
  font-size: 1.125rem;
}

.section {
  padding: 0.75rem 0 1.25rem;
}

.content-hero {
  padding-bottom: 1rem;
}

.prose-card {
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(74, 53, 34, 0.2);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  padding: 1.8rem;
}

.prose-card h2 {
  margin-top: 1.8rem;
}

.prose-card h2:first-of-type {
  margin-top: 0;
}

.prose-card h3 {
  margin-top: 1.2rem;
  margin-bottom: 0.25rem;
}

.prose-card p {
  margin-top: 0.45rem;
}

.section-featured {
  padding-top: 0;
  padding-bottom: 2.5rem;
}

.directory-featured {
  padding-top: 0;
  padding-bottom: 1.2rem;
}

.directory-links {
  margin: 0.4rem 0 0;
  padding-left: 1.25rem;
}

.directory-links li {
  margin: 0.55rem 0;
}

.directory-links a {
  font-weight: 600;
}

.featured-card {
  position: relative;
  overflow: hidden;
  background: var(--color-featured-bg);
  color: var(--color-cream);
  border: 2px solid var(--color-accent);
  border-radius: 14px;
  padding: 2rem;
  box-shadow: var(--shadow-soft);
}

.featured-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image:
    radial-gradient(circle at 20% 20%, #ffffff 0 2px, transparent 3px),
    radial-gradient(circle at 70% 60%, #ffffff 0 1.5px, transparent 2.5px),
    linear-gradient(120deg, rgba(255, 255, 255, 0.6), transparent 65%);
  background-size: 22px 22px, 18px 18px, cover;
}

.featured-label {
  margin: 0 0 0.35rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-accent);
}

.featured-card h2 {
  margin-top: 0;
  color: var(--color-cream);
}

.button {
  display: inline-block;
  margin-top: 1rem;
  text-decoration: none;
  font-weight: 600;
  background: var(--color-accent);
  color: #2d1f12;
  padding: 0.7rem 1.1rem;
  border-radius: 8px;
}

.button:hover,
.button:focus-visible {
  background: #d2b25c;
  color: #24180f;
}

.button-small {
  padding: 0.55rem 0.95rem;
  font-size: 0.92rem;
}

.site-footer {
  border-top: 1px solid rgba(74, 53, 34, 0.22);
  padding: 1.4rem 0 2.2rem;
  background: rgba(30, 58, 46, 0.06);
}

.footer-inner p {
  margin: 0.35rem 0;
}

.footer-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-secondary {
  margin-top: 0.45rem;
  color: rgba(74, 53, 34, 0.95);
}

.footer-cta {
  margin: 0;
}

.footer-cta a {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid rgba(194, 161, 74, 0.75);
  border-radius: 999px;
  padding: 0.32rem 0.72rem;
  background: rgba(194, 161, 74, 0.12);
}

.footer-cta a:hover,
.footer-cta a:focus-visible {
  background: rgba(194, 161, 74, 0.22);
}

@media (max-width: 760px) {
  .header-inner {
    flex-direction: column;
    justify-content: center;
    padding: 0.8rem 0;
  }

  .nav-list {
    flex-wrap: wrap;
    justify-content: center;
  }

  .footer-top-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.15rem;
  }
}

/* Featured faire as one compact row */
.featured-row {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: 1.1rem 1.4rem;
}

.featured-date {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  gap: 0.3rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(194, 161, 74, 0.6);
  border-radius: 10px;
  line-height: 1.1;
}

.fd-mon {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  color: var(--color-accent);
}

.fd-day {
  font-family: "Cinzel", "Times New Roman", serif;
  font-weight: 700;
  font-size: 1.45rem;
  white-space: nowrap;
}

.fd-yr {
  font-size: 0.75rem;
  opacity: 0.75;
}

.featured-text {
  flex: 1;
  min-width: 0;
}

.featured-row .featured-label {
  margin: 0 0 0.1rem;
  font-size: 0.8rem;
}

.featured-row h2 {
  margin: 0 0 0.2rem;
  font-size: 1.3rem;
}

.featured-row .featured-text p:last-child {
  margin: 0;
  font-size: 0.95rem;
}

.featured-row .button {
  margin-top: 0;
  flex-shrink: 0;
}

@media (max-width: 760px) {
  .featured-row {
    flex-wrap: wrap;
  }

  .featured-row .button {
    width: 100%;
    text-align: center;
  }
}

/* Link rows: region pills, page contents pills, and the footer's explore rows */
.crumbs {
  margin: 0 0 0.6rem;
  font-size: 0.88rem;
  opacity: 0.8;
}

.region-links,
.footer-explore,
.toc {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.9rem;
}

.region-links {
  margin: 0 0 1rem;
}

.footer-explore {
  margin: 0.6rem 0 0.2rem;
}

.toc {
  margin-top: 1rem;
}

.region-links span,
.footer-explore span {
  opacity: 0.7;
  margin-right: 0.2rem;
}

.region-links a,
.toc a {
  text-decoration: none;
  border: 1px solid rgba(74, 53, 34, 0.25);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  background: rgba(255, 255, 255, 0.5);
}

.region-links a:hover,
.region-links a:focus-visible,
.toc a:hover,
.toc a:focus-visible {
  border-color: var(--color-accent);
}

/* Summary cards */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.6rem;
  margin: 0 0 1.2rem;
}

.stat {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(74, 53, 34, 0.18);
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
}

.stat .k {
  font-size: 0.8rem;
  opacity: 0.75;
}

.stat .v {
  font-family: "Cinzel", "Times New Roman", serif;
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}

.stat .s {
  font-size: 0.75rem;
  opacity: 0.65;
}

/* Data tables */
.table-scroll {
  overflow-x: auto;
  margin-top: 0.8rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid rgba(74, 53, 34, 0.15);
  vertical-align: top;
}

.data-table th {
  font-family: "Cinzel", "Times New Roman", serif;
  color: var(--color-primary);
  font-size: 0.85rem;
  white-space: nowrap;
}

.data-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.data-table .nw {
  white-space: nowrap;
}

.data-table tr[hidden] {
  display: none;
}

.data-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--color-primary);
}

/* Guide pages: feature grid, two-column tips, lists, glossary */
.find-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.75rem;
  margin-top: 0.8rem;
}

.find-card {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(74, 53, 34, 0.15);
  border-left: 4px solid var(--color-accent);
  border-radius: 10px;
  padding: 0.8rem 1rem;
}

.prose-card .find-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.find-card p {
  margin: 0;
  font-size: 0.92rem;
}

.split-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2rem;
}

.checklist,
.plain-list {
  margin: 0.4rem 0 0;
  padding-left: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding-left: 1.6rem;
  margin: 0.3rem 0;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.35rem;
  width: 0.8rem;
  height: 0.8rem;
  border: 2px solid var(--color-accent);
  border-radius: 3px;
}

.plain-list li {
  margin: 0.45rem 0;
}

.glossary {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.35rem 1rem;
  margin: 0.6rem 0 0;
}

.glossary dt {
  font-family: "Cinzel", "Times New Roman", serif;
  font-weight: 700;
  color: var(--color-primary);
}

.glossary dd {
  margin: 0;
}

@media (max-width: 760px) {
  .split-list {
    grid-template-columns: 1fr;
  }

  .glossary {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .glossary dd {
    margin-bottom: 0.5rem;
  }
}

/* Guide charts: one-series horizontal bars with the count at the end (cost and yearly pages) */
.bars {
  display: grid;
  gap: 0.35rem;
  margin: 0.8rem 0 0.3rem;
  max-width: 640px;
}

.bar-row {
  display: grid;
  grid-template-columns: 7.5rem 1fr 2rem;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.92rem;
}

.bar-k {
  color: var(--color-secondary);
}

.bar-track {
  height: 0.9rem;
}

.bar-fill {
  display: block;
  height: 100%;
  min-width: 2px;
  background: var(--color-primary);
  border-radius: 0 4px 4px 0;
}

.bar-row:hover .bar-fill {
  background: var(--color-accent);
}

.bar-v {
  font-variant-numeric: tabular-nums;
}

.chart-note {
  font-size: 0.85rem;
  opacity: 0.75;
  margin: 0 0 1rem;
}
