/* Sensory Friendly Finder — base styles
   Design intent: the site about calm places should itself feel calm.
   No autoplay, no flashing, no motion by default, high contrast text,
   generous spacing, muted palette. Mobile-first. */

:root {
  --bg: #fafafd;
  --bg-card: #ffffff;
  --text: #272b3a;
  --text-muted: #5b6175;
  --border: #e0e2ec;
  --brand: #4b44a8;
  --brand-dark: #332c7d;
  --accent: #a83d74;
  --water: #b3261e;
  --water-bg: #fdecea;
  --contained: #2c7a46;
  --contained-bg: #e8f3ea;
  --semi: #9a6b1f;
  --semi-bg: #fbf1de;
  --open: #b3261e;
  --open-bg: #fdecea;
  --quiet: #2c5f8a;
  --quiet-bg: #e7f0f8;
  --rbt: #6a3f8f;
  --rbt-bg: #f0e9f6;
  --chip-bg: #eef0f7;
  --chip-text: #3d4258;
  --focus: #1f5fae;
  --radius: 10px;
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16171f;
    --bg-card: #1f2130;
    --text: #eceef6;
    --text-muted: #a7abbf;
    --border: #343849;
    --brand: #a09aec;
    --brand-dark: #beb9f5;
    --accent: #e08cb8;
    --water: #ff8078;
    --water-bg: #3a1f1d;
    --contained: #82caA0;
    --contained-bg: #1e3125;
    --semi: #e0b567;
    --semi-bg: #3a2f18;
    --open: #ff8078;
    --open-bg: #3a1f1d;
    --quiet: #8fc0ea;
    --quiet-bg: #1c2c3a;
    --rbt: #c6a6e6;
    --rbt-bg: #2b2038;
    --chip-bg: #2b2e40;
    --chip-text: #d9dcea;
    --focus: #8fc0ea;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

a { color: var(--brand-dark); text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

img { max-width: 100%; }

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

/* Header / nav */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.brand .brand-mark { flex-shrink: 0; }
.site-nav { display: flex; gap: 1.1rem; flex-wrap: wrap; font-size: 0.95rem; }
.site-nav a { color: var(--text); text-decoration: none; }
.site-nav a:hover { color: var(--brand-dark); }

/* Hero */
.hero {
  padding: 2.2rem 0 1.6rem;
  border-bottom: 1px solid var(--border);
}
.hero h1 { font-size: 1.7rem; margin: 0 0 0.6rem; line-height: 1.25; }
.hero p { color: var(--text-muted); max-width: 62ch; margin: 0 0 0.5rem; }
.hero .pilot-note {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.85rem;
  padding: 0.3rem 0.65rem;
  background: var(--chip-bg);
  color: var(--chip-text);
  border-radius: 999px;
}

/* Filters */
.filters {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.filters .filter-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.filter-btn {
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
}
.filter-btn[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.filters noscript p { font-size: 0.85rem; color: var(--text-muted); margin: 0.3rem 0 0; }

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1.4rem 0 2.5rem;
}
@media (min-width: 620px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .card-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.venue-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow .15s ease, transform .15s ease;
}
.venue-card:hover, .venue-card:focus-visible {
  box-shadow: 0 4px 18px rgba(0,0,0,0.08);
}
.venue-card h2 {
  font-size: 1.05rem;
  margin: 0 0 0.2rem;
  color: var(--text);
}
.venue-card .category {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 0.6rem;
}
.badges { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.6rem; }
.badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.22rem 0.5rem;
  border-radius: 6px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge-contained { background: var(--contained-bg); color: var(--contained); }
.badge-semi-contained { background: var(--semi-bg); color: var(--semi); }
.badge-open-layout { background: var(--open-bg); color: var(--open); }
.badge-water { background: var(--water-bg); color: var(--water); border-color: var(--water); }
.badge-quiet { background: var(--quiet-bg); color: var(--quiet); }
.badge-rbt { background: var(--rbt-bg); color: var(--rbt); }

.chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.6rem; }
.chip {
  font-size: 0.7rem;
  background: var(--chip-bg);
  color: var(--chip-text);
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
}

.quietest-window {
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px dashed var(--border);
  padding-top: 0.5rem;
  margin-top: 0.2rem;
}
.quietest-window strong { color: var(--text); }

.safety-flag {
  background: var(--water-bg);
  color: var(--water);
  border: 1px solid var(--water);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

/* Venue detail page */
.venue-hero { padding: 1.6rem 0 1rem; }
.venue-hero h1 { margin: 0 0 0.3rem; font-size: 1.5rem; }
.venue-hero .category { color: var(--text-muted); margin: 0 0 0.8rem; }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
  padding-bottom: 2.5rem;
}
@media (min-width: 800px) {
  .detail-grid { grid-template-columns: 2fr 1fr; }
}

section.block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  margin-bottom: 1.1rem;
}
section.block h2 {
  font-size: 1rem;
  margin: 0 0 0.6rem;
  color: var(--brand-dark);
}
section.block ul { margin: 0.3rem 0; padding-left: 1.2rem; }
section.block li { margin-bottom: 0.35rem; }

.critical-safety {
  border: 2px solid var(--water);
  background: var(--water-bg);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  margin-bottom: 1.3rem;
}
.critical-safety h2 { color: var(--water); margin-top: 0; }
.critical-safety p { margin: 0.5rem 0; }

.unverified {
  font-style: italic;
  color: var(--text-muted);
}
.unverified::before { content: "\26A0\FE0F  "; font-style: normal; }

.sources-list { font-size: 0.85rem; }
.sources-list a { word-break: break-word; }

.logistics-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.logistics-table th { text-align: left; color: var(--text-muted); font-weight: 600; padding: 0.35rem 0.5rem 0.35rem 0; width: 34%; vertical-align: top; }
.logistics-table td { padding: 0.35rem 0; vertical-align: top; }

.back-link { display: inline-block; margin: 1rem 0 0; font-size: 0.9rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.6rem 0 2.4rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.site-footer a { color: var(--text-muted); }
.site-footer .foot-links { margin-top: 0.5rem; display: flex; gap: 1rem; flex-wrap: wrap; }

/* Static content pages (about/privacy) */
.content-page { padding: 1.6rem 0 3rem; max-width: 72ch; }
.content-page h1 { font-size: 1.6rem; }
.content-page h2 { font-size: 1.15rem; margin-top: 1.6rem; }
.content-page p { margin: 0.8rem 0; }

/* Reduce motion for anyone with vestibular/sensory sensitivity, always */
* { scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
