/* NiagaraTraffic.ca - shared responsive stylesheet (2026-09) */
:root {
  --brown: #504634;
  --brown-dark: #3b3326;
  --tan: #d9d1bc;
  --bg: #f4f0e6;
  --card: #ffffff;
  --text: #2b2620;
  --muted: #6b6152;
  --accent: #800000;
  --link: #7a1f00;
  --border: #d9d1bc;
  --shadow: 0 1px 3px rgba(0, 0, 0, .12);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1a16;
    --card: #2a261f;
    --text: #ece6d8;
    --muted: #b4aa98;
    --accent: #e0a39a;
    --link: #f0b08a;
    --border: #3f382d;
    --shadow: 0 1px 3px rgba(0, 0, 0, .5);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
a { color: var(--link); }
img { max-width: 100%; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 10; background: #fff; color: #000; padding: 6px 10px; }

/* Header + navigation */
.site-header { background: var(--brown); color: #fff; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-top: 10px; padding-bottom: 10px; }
.brand { color: #fff; text-decoration: none; font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 1.6rem; line-height: 1.1; }
.brand span { display: block; font: 400 .8rem/1.3 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--tan); letter-spacing: .02em; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.site-nav a { display: block; padding: 7px 12px; border-radius: 999px; color: #fff; text-decoration: none; font-size: .92rem; background: rgba(255, 255, 255, .1); }
.site-nav a:hover, .site-nav a:focus-visible { background: rgba(255, 255, 255, .25); }
.site-nav a[aria-current="page"] { background: var(--tan); color: var(--brown-dark); font-weight: 600; }

.wrap { max-width: 1240px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }

/* Page intro */
main { padding-top: 18px; padding-bottom: 28px; }
.breadcrumb { font-size: .85rem; color: var(--muted); margin: 0 0 6px; }
.breadcrumb a { color: var(--muted); }
h1 { font-family: Georgia, "Times New Roman", serif; color: var(--accent); font-size: clamp(1.6rem, 4.5vw, 2.4rem); line-height: 1.15; margin: 0 0 10px; }
.lead { font-size: 1.05rem; max-width: 70ch; margin: 0 0 8px; }
.note { font-size: .9rem; color: var(--muted); margin: 0 0 16px; }
.note b { color: var(--text); }

/* Camera grid */
.cams { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; margin: 0; padding: 0; }
.cams > h2 { grid-column: 1 / -1; margin: 14px 0 -4px; font-size: 1.2rem; color: var(--accent); border-bottom: 2px solid var(--border); padding-bottom: 4px; }
.cam { margin: 0; background: var(--card); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.cam a { display: block; background: #111; line-height: 0; }
.cam img { display: block; width: 100%; height: auto; }
.cam figcaption { padding: 9px 12px 11px; font-size: .95rem; }
.cam figcaption strong { display: block; }
.cam figcaption span { color: var(--muted); font-size: .85rem; }
.cams .ad { grid-column: 1 / -1; }

/* Ads */
.ad { margin: 16px 0; min-height: 90px; text-align: center; }

/* Home page */
.hero { display: grid; gap: 18px; align-items: center; grid-template-columns: 1fr; margin-bottom: 18px; }
.hero img { border-radius: 10px; box-shadow: var(--shadow); width: 100%; height: auto; }
@media (min-width: 820px) { .hero { grid-template-columns: 1.1fr 1fr; } }
.routes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; margin: 0 0 20px; padding: 0; list-style: none; }
.routes a { display: flex; flex-direction: column; height: 100%; background: var(--card); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: var(--text); }
.routes a:hover h2, .routes a:focus-visible h2 { text-decoration: underline; }
.routes img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #111; }
.routes h2 { font-size: 1.1rem; margin: 10px 12px 2px; color: var(--accent); }
.routes p { margin: 0 12px 12px; font-size: .9rem; color: var(--muted); }

/* Text sections */
.about { max-width: 75ch; margin-top: 24px; }
.about h2 { font-size: 1.2rem; color: var(--accent); margin: 18px 0 6px; }
.about p, .about li { margin: 0 0 10px; }

/* Footer */
.site-footer { background: var(--brown-dark); color: #e9e2d0; font-size: .88rem; padding: 20px 0 26px; }
.site-footer a { color: #fff; }
.site-footer h2 { font-size: .95rem; margin: 0 0 6px; color: var(--tan); }
.site-footer ul { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.site-footer p { margin: 0 0 6px; }

/* Top ad shows on wider screens; on phones the same unit sits after the first two cameras */
.ad-phone { display: none; }
.routes .ad-phone { grid-column: 1 / -1; }
.routes .ad-phone .ad { margin: 0; }
@media (max-width: 699px) {
  .ad-top { display: none; }
  .ad-phone { display: block; }
}
