/* ==========================================================================
   Tri-Lakes Colorado — design system
   Structural language borrowed from yesford38.com (kicker, big serif hed,
   stat cards, source lines); its own palette so it reads as its own brand.
   No webfonts, on purpose: zero blocking requests, good Core Web Vitals.
   ========================================================================== */

:root {
  --ink:       #17241e;
  --pine:      #234a3c;
  --pine-dk:   #16332a;
  --sage:      #6e8c7e;
  --sage-lt:   #a8c0b2;
  --sand:      #b4682e;
  --sand-lt:   #e0a878;
  --paper:     #fbfaf6;
  --paper-2:   #f3f0e8;
  --rule:      #ded9cc;
  --muted:     #6b7369;
  --white:     #ffffff;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1120px;
  --wrap-narrow: 720px;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(23, 36, 30, .06), 0 4px 14px rgba(23, 36, 30, .05);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* --- Type ---------------------------------------------------------------- */

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--pine); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--sand); }

small, .small { font-size: .84rem; }

.lede { font-size: 1.18rem; line-height: 1.6; color: #33443b; }

.kicker {
  font-family: var(--sans);
  font-size: .74rem; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--sand); margin: 0 0 .9rem;
  display: flex; align-items: center; gap: .7rem;
}
.kicker::before { content: ""; width: 28px; height: 2px; background: var(--sand); flex: none; }
.kicker--center { justify-content: center; }

.eyebrow { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

.sources {
  font-size: .82rem; color: var(--muted); line-height: 1.5;
  border-top: 1px solid var(--rule); padding-top: .9rem; margin-top: 1.6rem;
}

/* --- Layout -------------------------------------------------------------- */

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.wrap--narrow { max-width: var(--wrap-narrow); }

.section { padding: 3.5rem 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section--tint { background: var(--paper-2); }
.section--dark { background: var(--pine-dk); color: var(--paper); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark a { color: var(--sage-lt); }
.section--dark .kicker { color: var(--sand-lt); }
.section--dark .kicker::before { background: var(--sand-lt); }

.grid { display: grid; gap: 1.25rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--pine); color: #fff;
  padding: .7rem 1.1rem; z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--sand); outline-offset: 2px; }

/* --- Header / nav -------------------------------------------------------- */

.site-header { background: var(--pine-dk); color: var(--paper); }
.site-header a { color: var(--paper); text-decoration: none; }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding: .9rem 1.25rem; max-width: var(--wrap); margin: 0 auto; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: .7rem; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: var(--sage); color: var(--pine-dk);
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 1rem;
}
.brand-name { font-family: var(--serif); font-size: 1.22rem; font-weight: 600; line-height: 1.1; }
.brand-sub { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--sage-lt); }

.site-nav { display: flex; align-items: center; gap: 1.35rem; flex-wrap: wrap; font-size: .93rem; }
.site-nav a { padding: .25rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--sand); }

/* --- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-block; padding: .72rem 1.35rem; border-radius: var(--radius);
  font-weight: 600; font-size: .95rem; text-decoration: none; border: 1.5px solid var(--pine);
  background: var(--pine); color: #fff; cursor: pointer; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--pine-dk); border-color: var(--pine-dk); color: #fff; }
.btn--ghost { background: transparent; color: var(--pine); }
.btn--ghost:hover { background: var(--pine); color: #fff; }
.section--dark .btn--ghost { color: var(--paper); border-color: var(--sage-lt); }
.section--dark .btn--ghost:hover { background: var(--sage-lt); color: var(--pine-dk); }
.btn-row { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* --- Cards --------------------------------------------------------------- */

.card {
  background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1.25rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: .5rem;
}
.card h3, .card .card-title { margin: 0; font-size: 1.12rem; font-family: var(--serif); font-weight: 600; line-height: 1.15; }
.card h3 a, .card .card-title a { text-decoration: none; }
.card h3 a:hover, .card .card-title a:hover { text-decoration: underline; }
.card__meta { font-size: .85rem; color: var(--muted); }

.stat {
  background: var(--white); border: 1px solid var(--rule); border-left: 3px solid var(--sand);
  border-radius: var(--radius); padding: 1.15rem;
}
.stat__num { font-family: var(--serif); font-size: 2.1rem; line-height: 1; color: var(--pine); }
.stat__label { font-weight: 600; font-size: .93rem; margin: .45rem 0 .3rem; }
.stat__note { font-size: .84rem; color: var(--muted); }

/* --- Category tiles ------------------------------------------------------ */

.cat-tile {
  display: flex; flex-direction: column; gap: .3rem;
  background: var(--white); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1rem 1.1rem; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s;
}
.cat-tile:hover { border-color: var(--pine); transform: translateY(-2px); color: var(--ink); }
.cat-tile__name { font-family: var(--serif); font-size: 1.08rem; font-weight: 600; }
.cat-tile__count { font-size: .82rem; color: var(--muted); }

/* --- Listings ------------------------------------------------------------ */

.listing { position: relative; }
.listing--featured { border-left: 3px solid var(--sand); background: #fffdf9; }
.listing__cats { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--sage); font-weight: 600; }
.listing__addr { font-size: .9rem; color: var(--muted); }
.listing__links { display: flex; gap: .9rem; flex-wrap: wrap; font-size: .88rem; margin-top: .25rem; }

.badge {
  display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: .2rem .5rem; border-radius: 2px;
}
.badge--featured { background: var(--sand); color: #fff; }
.badge--gov { background: var(--pine); color: #fff; }
.badge--community { background: var(--sage); color: var(--pine-dk); }
.badge--paid { background: var(--paper-2); color: var(--muted); border: 1px solid var(--rule); }

.verified {
  font-size: .8rem; color: var(--muted);
  display: inline-flex; align-items: center; gap: .35rem;
}
.verified::before { content: "✓"; color: var(--sage); font-weight: 700; }

/* --- Detail pages -------------------------------------------------------- */

.detail-head { border-bottom: 1px solid var(--rule); padding-bottom: 1.5rem; margin-bottom: 1.75rem; }
.breadcrumbs { font-size: .85rem; color: var(--muted); margin-bottom: .9rem; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs span { margin: 0 .4rem; }

.fact-table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 1.25rem 0; }
.fact-table th, .fact-table td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.fact-table th { width: 34%; font-weight: 600; color: var(--muted); font-size: .88rem; }
.fact-table tr:last-child th, .fact-table tr:last-child td { border-bottom: 0; }

.info-box {
  background: var(--paper-2); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1.15rem 1.3rem; margin: 1.5rem 0;
}
.info-box h2, .info-box h3 { margin-top: 0; font-size: 1.05rem; }

/* --- Search + filters ---------------------------------------------------- */

.searchbar { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1.5rem 0; }
.searchbar input[type="search"], .field {
  flex: 1 1 260px; padding: .7rem .9rem; font-size: 1rem; font-family: inherit;
  border: 1.5px solid var(--rule); border-radius: var(--radius); background: var(--white); color: var(--ink);
}
.searchbar input:focus, .field:focus { border-color: var(--pine); outline: none; }
.filter-note { font-size: .88rem; color: var(--muted); margin: .5rem 0 1.5rem; }
[hidden] { display: none !important; }

/* --- Events -------------------------------------------------------------- */

.event { display: grid; grid-template-columns: 76px 1fr; gap: 1rem; align-items: start;
  padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.event__date {
  text-align: center; background: var(--paper-2); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: .5rem .25rem;
}
.event__mon { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--sand); font-weight: 700; }
.event__day { font-family: var(--serif); font-size: 1.6rem; line-height: 1.1; }
.event__title { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; margin: 0 0 .2rem; }
.event__meta { font-size: .86rem; color: var(--muted); }

/* --- Sponsor slots ------------------------------------------------------- */

.sponsor {
  border: 1px dashed var(--rule); border-radius: var(--radius); background: var(--white);
  padding: 1.15rem 1.3rem; margin: 2rem 0;
  display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.sponsor--sold { border-style: solid; }
.sponsor__label { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.sponsor__body { flex: 1 1 320px; }
.sponsor__body p { margin: .25rem 0 0; font-size: .93rem; color: var(--muted); }
.sponsor__body strong { font-family: var(--serif); font-size: 1.08rem; }

/* --- Footer -------------------------------------------------------------- */

.site-footer { background: var(--pine-dk); color: var(--sage-lt); padding: 3rem 0 2rem; margin-top: 4rem; font-size: .92rem; }
.site-footer a { color: var(--paper); }
.site-footer h2, .site-footer h3 { color: var(--white); font-size: 1.05rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: .4rem; }
.footer-legal {
  border-top: 1px solid rgba(255,255,255,.15); margin-top: 2.25rem; padding-top: 1.5rem;
  font-size: .84rem; line-height: 1.6; color: var(--sage-lt);
}
.footer-legal strong { color: var(--white); }

/* --- Utilities ----------------------------------------------------------- */

.stack > * + * { margin-top: 1rem; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media print {
  .site-header, .site-footer, .sponsor, .searchbar { display: none; }
  body { background: #fff; font-size: 12pt; }
}
