/* canby.us shared tokens, base styles, site chrome, bento tiles, kinetic type */
:root {
  --bg: #f7f4ec;            /* valley wheat paper */
  --surface: #ffffff;
  --surface-2: #efeadc;
  --ink: #1d2a22;           /* deep fir */
  --ink-2: #4b5a50;
  --line: #d9d2c0;
  --accent: #d9a21b;        /* harvest gold — selection ring, focus */
  --brand: #2f5d3a;         /* field green */
  --cluster: #1f3b2d;
  --focus: #b8860b;
  --radius-s: 10px; --radius-m: 16px; --radius-l: 24px;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: ui-serif, Georgia, "Times New Roman", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121814; --surface: #1a221c; --surface-2: #223026; --ink: #ecefe6; --ink-2: #b4bfb4;
    --line: #2f3d33; --accent: #f0bf46; --brand: #8dc49a; --cluster: #2f5d3a; --focus: #f0bf46;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); line-height: 1.45; }
a { color: var(--brand); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: var(--space-4); top: -48px; background: var(--ink); color: var(--bg); padding: var(--space-2) var(--space-3); border-radius: var(--radius-s); z-index: 10; }
.skip-link:focus { top: var(--space-4); }

/* site chrome */
.wrap { max-width: 1400px; margin: 0 auto; padding: 0 var(--space-4); }
.site-header { max-width: 1400px; margin: 0 auto; padding: var(--space-4); display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-4); }
.wordmark { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.wordmark span { color: var(--brand); }
.tagline { color: var(--ink-2); font-size: .875rem; }
.site-nav { margin-left: auto; display: flex; gap: var(--space-4); }
.site-nav a { color: var(--ink); font-weight: 600; text-decoration: none; padding: 6px 2px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.site-footer { border-top: 1px solid var(--line); margin-top: var(--space-6); }
.site-footer .wrap { padding-block: var(--space-5) var(--space-6); display: grid; gap: var(--space-3); font-size: .9rem; color: var(--ink-2); }
.site-footer p { margin: 0; max-width: 75ch; }
.disclaimer { color: var(--ink); }
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }

/* bento */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--space-4); grid-auto-flow: dense; }
.tile { grid-column: span var(--span, 4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.tile h2, .tile h3 { margin: 0; font-family: var(--font-display); line-height: 1.15; }
.tile h2 { font-size: 1.5rem; }
.tile p { margin: 0; color: var(--ink-2); }
.tile-tint { background: var(--surface-2); }
.tile-brand { background: var(--brand); border-color: var(--brand); color: var(--bg); }
.tile-brand p, .tile-brand a { color: inherit; }
a.tile { color: var(--ink); text-decoration: none; transition: transform .2s, border-color .2s, box-shadow .2s; }
a.tile:hover { transform: translateY(-3px); border-color: var(--cat, var(--brand)); box-shadow: 0 8px 24px rgb(0 0 0 / .08); }
a.tile.tile-brand { color: var(--bg); }
.tile-more { margin-top: auto; padding-top: var(--space-2); font-weight: 600; color: var(--brand); }
.tile-brand .tile-more { color: inherit; }
.eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin: 0; }
.stat { font-family: var(--font-display); font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.tile-brand .stat, .tile-brand .eyebrow { color: inherit; }
.cat-disc { width: 44px; height: 44px; border-radius: 50%; background: var(--cat); color: #fff; display: grid; place-items: center; flex: none; }
.tile-cat h3 { font-family: var(--font); font-size: 1rem; }
.tile-cat small { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.btn { display: inline-block; font: inherit; font-weight: 600; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--brand); background: var(--brand); color: var(--bg); text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(1.1); }
.btn-ghost { background: transparent; color: var(--brand); }

/* search field (home + directory) */
.search { display: flex; align-items: center; gap: var(--space-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 var(--space-4); }
.search input { flex: 1; border: 0; background: transparent; color: inherit; font: inherit; font-size: 1rem; padding: 12px 0; min-width: 0; }
.search input:focus { outline: none; }
.search:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }

/* home hero + kinetic type */
.hero { --span: 12; padding: clamp(24px, 5vw, 64px); gap: var(--space-4); }
.hero h1 { font-family: var(--font-display); font-size: clamp(2.75rem, 10vw, 7.5rem); line-height: .95; letter-spacing: -0.03em; margin: 0; }
.hero h1 .w { display: inline-block; animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * 90ms); }
.hero h1 em { font-style: italic; color: var(--brand); transition: letter-spacing .35s; }
.hero h1:hover em { letter-spacing: .02em; }
.hero .lede { font-size: clamp(1rem, 1.6vw, 1.25rem); max-width: 55ch; }
.hero-search { display: flex; gap: var(--space-2); max-width: 640px; flex-wrap: wrap; }
.hero-search .search { flex: 1; min-width: 220px; background: var(--bg); }
@keyframes rise { from { opacity: 0; transform: translateY(.5em); } }
.marquee { overflow: hidden; margin: var(--space-4) 0; border-block: 1px solid var(--line); padding: var(--space-3) 0; }
.marquee-track { display: flex; gap: var(--space-6); width: max-content; animation: marquee 40s linear infinite; font-family: var(--font-display); font-size: clamp(1.25rem, 3vw, 2rem); font-style: italic; color: var(--ink-2); white-space: nowrap; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span::after { content: "✳"; font-style: normal; color: var(--accent); margin-left: var(--space-6); }
@keyframes marquee { to { transform: translateX(-50%); } }
.section-title { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.25rem); margin: var(--space-6) 0 var(--space-4); }

/* business profile */
.profile-head h1 { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.75rem); line-height: 1.02; letter-spacing: -0.02em; margin: 0; overflow-wrap: anywhere; }
.profile-head .lede { font-size: 1.125rem; }
.cat-badge { display: inline-flex; align-items: center; gap: 6px; width: max-content; max-width: 100%; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--surface-2); color: var(--ink); font-size: .875rem; font-weight: 600; text-decoration: none; }
.cat-badge .cat-disc { width: 28px; height: 28px; }
.tile-map { padding: 0; overflow: hidden; min-height: 320px; position: relative; }
.tile-map #map { position: absolute; inset: 0; }
.tile-map .map-empty { margin: auto; padding: var(--space-5); text-align: center; max-width: 36ch; }
.facts { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: var(--space-2) var(--space-4); }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; }
.facts .none { color: var(--ink-2); font-style: italic; }
.nearby { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-3); }
.nearby a { display: flex; gap: var(--space-3); align-items: center; padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-m); color: var(--ink); text-decoration: none; height: 100%; }
.nearby a:hover { border-color: var(--cat); }
.nearby strong { display: block; line-height: 1.25; }
.nearby small { color: var(--ink-2); }

/* prose pages */
.prose { max-width: 70ch; }
.prose h1 { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.05; margin: var(--space-5) 0 var(--space-3); }
.prose h2 { font-family: var(--font-display); margin: var(--space-6) 0 var(--space-2); scroll-margin-top: var(--space-4); }
.notice { background: var(--surface-2); border-left: 4px solid var(--accent); border-radius: var(--radius-s); padding: var(--space-3) var(--space-4); }

@media (max-width: 1000px) { .bento { grid-template-columns: repeat(6, 1fr); } .tile { grid-column: span min(var(--span, 4), 6); } .tile[style*="--span:2"], .tile[style*="--span:3"], .tile[style*="--span:4"] { grid-column: span 3; } }
@media (max-width: 560px) { .bento { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); } .tile, .tile[style] { grid-column: span 2; } .tile.tile-cat[style], .tile.tile-stat[style] { grid-column: span 1; padding: var(--space-4); } .tagline { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } .marquee-track { flex-wrap: wrap; width: auto; justify-content: center; } .marquee-track [aria-hidden] { display: none; } }
