/* Bioregion site template: layout and components.
   Colours come from assets/css/theme.css, generated from site.config.json.
   The paper-and-ink approach and the type scale follow salishsee.life. */

/* Noto covers the SENĆOŦEN and Lekwungen letters in the land acknowledgement
   (Ƚ, Ⱦ, Ḵ, Ḱ and the combining macron below in W̱), which Inter and Fraunces
   do not. Subset to Latin, Latin Extended and combining marks; SIL OFL 1.1. */
@font-face {
  font-family: "Noto Sans";
  src: url("../fonts/NotoSans-subset.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Noto Serif";
  src: url("../fonts/NotoSerif-subset.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --font-display: "Noto Serif", Georgia, serif;
  --font-body: "Noto Sans", system-ui, -apple-system, sans-serif;

  --fs-fine: 0.8125rem;
  --fs-body: 1.0625rem;
  --fs-lede: 1.25rem;
  --fs-h3: 1.125rem;
  --fs-h2: clamp(1.5rem, 1vw + 1.2rem, 2rem);
  --fs-h1: clamp(2rem, 2.4vw + 1.3rem, 3.1rem);
  --fs-hero: clamp(2.6rem, 5vw + 1rem, 5rem);

  --wrap: 1180px;
  --measure: 68ch;
  --gutter: max(16px, env(safe-area-inset-left));
  --r: 8px;
  --header-h: 60px;
  --shadow: 0 1px 2px rgba(40, 34, 22, .07), 0 8px 24px rgba(40, 34, 22, .10);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 var(--fs-body)/1.6 var(--font-body);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hi); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent-hi); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); margin-top: 1.6em; }
h3 { font-size: var(--fs-h3); }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--surface); padding: 8px 12px; }
.skip:focus { left: 8px; top: 8px; }
.fine { font-size: var(--fs-fine); color: var(--ink3); }
.kicker { font-size: var(--fs-fine); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink3); margin-bottom: 0.4em; }
.lede { font-size: var(--fs-lede); color: var(--ink2); max-width: var(--measure); }

.preview-banner {
  background: var(--warm); color: #fff; text-align: center;
  font-size: var(--fs-fine); padding: 6px var(--gutter);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .preview-banner { color: #1a0d0c; } }

/* ── header ─────────────────────────────────────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.site-header__inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand__name { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 8px 10px; border-radius: var(--r);
  color: var(--ink2); text-decoration: none; font-size: 0.95rem;
}
.site-nav a:hover { background: var(--sunk); color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav-toggle { display: none; }

@media (max-width: 899px) {
  .js .nav-toggle {
    display: block; font: inherit; font-size: 0.95rem; padding: 8px 14px; min-height: 44px;
    background: var(--sunk); color: var(--ink); border: 1px solid var(--rule); border-radius: var(--r); cursor: pointer;
  }
  .js .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--rule); box-shadow: var(--shadow); }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul { flex-direction: column; padding: 8px var(--gutter) 16px; }
  .js .site-nav a { padding: 12px 8px; font-size: 1.05rem; }
  .site-header__inner { flex-wrap: wrap; }
  html:not(.js) .site-nav { width: 100%; padding-bottom: 8px; }
}

/* ── hero ───────────────────────────────────────────────────────────── */

.hero { position: relative; min-height: min(86svh, 820px); display: flex; align-items: flex-end; overflow: hidden; background: var(--sunk); }
.hero__photo { position: absolute; inset: 0; margin: 0; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(8, 18, 24, .82) 0%, rgba(8, 18, 24, .55) 32%, rgba(8, 18, 24, 0) 65%);
}
.hero__text { position: relative; width: 100%; padding-bottom: clamp(48px, 8vh, 96px); color: #fff; }
.hero__kicker { font-size: var(--fs-fine); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.6em; opacity: .92; }
.hero__title { font-size: var(--fs-hero); margin: 0 0 0.2em; color: #fff; text-shadow: 0 1px 24px rgba(0, 0, 0, .35); }
.hero__tagline { font-family: var(--font-display); font-style: italic; font-size: clamp(1.15rem, 1vw + 0.9rem, 1.6rem); max-width: 40ch; margin-bottom: 1.4em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.hero__credit {
  position: absolute; right: 0; bottom: 0; margin: 0; max-width: min(100%, 640px);
  padding: 6px var(--gutter); font-size: 0.72rem; color: rgba(255, 255, 255, .85); text-align: right;
}
.hero__credit a { color: inherit; }
@media (max-width: 599px) { .hero__text { padding-bottom: 84px; } }

.button {
  display: inline-block; padding: 12px 20px; min-height: 44px; border-radius: var(--r);
  background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; line-height: 1.3;
}
.button:hover { background: var(--accent-hi); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .button { color: #08202e; } }
.hero .hero__actions .button { background: #fff; color: #0b2a3a; }
.hero .hero__actions .button:hover { background: #e9f4fa; color: #0b2a3a; }
.hero .hero__actions .button--quiet { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .85); }
.hero .hero__actions .button--quiet:hover { background: rgba(255, 255, 255, .14); color: #fff; }

/* ── land acknowledgement ───────────────────────────────────────────── */

.land-ack-band { padding-top: 40px; padding-bottom: 8px; }
.land-ack {
  font-family: var(--font-display); font-size: clamp(1.05rem, 0.6vw + 0.95rem, 1.3rem);
  line-height: 1.55; color: var(--ink2); max-width: 62ch; margin: 0;
  border-left: 3px solid var(--green); padding-left: 18px;
}
.land-ack--footer { font-size: 0.95rem; border-left-width: 2px; padding-left: 12px; }

/* ── home sections ──────────────────────────────────────────────────── */

.intro { display: grid; gap: 32px; padding-top: 40px; padding-bottom: 56px; align-items: center; }
@media (min-width: 900px) { .intro { grid-template-columns: 1fr 1fr; gap: 56px; } }
.intro__text { font-size: 1.125rem; }

.map-feature { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 56px 0 24px; }
.map-feature__grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .map-feature__grid { grid-template-columns: 5fr 7fr; gap: 48px; } }
.map-feature h2 { margin-top: 0; }
.map-feature__preview { display: block; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--rule); }
.map-feature__preview img { width: 100%; transition: transform .4s ease; }
.map-feature__preview:hover img { transform: scale(1.015); }
.map-feature__credit { margin-top: 16px; }

.two-col { display: grid; gap: 40px; padding-top: 24px; padding-bottom: 32px; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; gap: 64px; } }

/* ── photos ─────────────────────────────────────────────────────────── */

.photo { margin: 0; }
.photo img { border-radius: var(--r); width: 100%; }
.photo figcaption { font-size: 0.75rem; color: var(--ink3); margin-top: 6px; line-height: 1.4; }
.photo figcaption a { color: inherit; }
.intro__photo img { aspect-ratio: 4 / 3; object-fit: cover; }
.photo--inline { margin: 1.6em 0; }
.photo--inline img { aspect-ratio: 3 / 2; object-fit: cover; }
.photo--wide { margin: 2em calc(-1 * min(80px, 6vw)); }
.hero__photo img { border-radius: 0; }

/* ── events ─────────────────────────────────────────────────────────── */

.events { list-style: none; margin: 0 0 16px; padding: 0; }
.event { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--rule); }
.event:last-child { border-bottom: 1px solid var(--rule); }
.event__badge {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 56px; height: 60px; border-radius: var(--r); background: var(--sunk); color: var(--ink);
  line-height: 1.1;
}
.event__badge span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--warm); font-weight: 600; }
.event__badge b { font-family: var(--font-display); font-size: 1.5rem; }
.event__title { margin: 0 0 4px; font-size: 1.1rem; }
.event__title a { text-decoration: none; }
.event__title a:hover { text-decoration: underline; }
.event__meta { margin: 0 0 4px; color: var(--ink2); font-size: 0.95rem; }
.event__desc { margin: 0 0 4px; font-size: 0.95rem; }
.event__host { margin: 0; font-size: var(--fs-fine); color: var(--ink3); }
.events-empty { color: var(--ink3); }

/* ── news ───────────────────────────────────────────────────────────── */

.news-list { list-style: none; margin: 0 0 16px; padding: 0; }
.news-card { padding: 16px 0; border-top: 1px solid var(--rule); }
.news-card:last-child { border-bottom: 1px solid var(--rule); }
.news-card time { font-size: var(--fs-fine); color: var(--ink3); }
.news-card h3 { margin: 4px 0 6px; font-size: 1.15rem; }
.news-card h3 a { text-decoration: none; color: var(--ink); }
.news-card h3 a:hover { color: var(--accent); text-decoration: underline; }
.news-card p { margin: 0; color: var(--ink2); font-size: 0.97rem; }
.news-list--full { max-width: var(--measure); }
.post { padding-top: 40px; padding-bottom: 56px; }
.post__date { color: var(--ink3); font-size: var(--fs-fine); margin-bottom: 4px; }

/* ── pages ──────────────────────────────────────────────────────────── */

.page-head { padding-top: 48px; padding-bottom: 8px; }
.page-head:has(+ .prose) { max-width: calc(var(--measure) + 2 * var(--gutter)); }
.page-head h1 { max-width: 24ch; }
.prose { max-width: calc(var(--measure) + 2 * var(--gutter)); padding-bottom: 48px; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--rule); color: var(--ink2); }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
.prose h2 + p, .prose h3 + p { margin-top: 0; }

/* Link lists on the resources page: a bold link, then what it is. */
.prose ul.links, .prose h2 + ul { list-style: none; padding: 0; }
.prose h2 + ul > li { padding: 10px 0; border-top: 1px solid var(--rule); margin: 0; }
.prose h2 + ul > li:last-child { border-bottom: 1px solid var(--rule); }

/* ── map page ───────────────────────────────────────────────────────── */

.map-frame { margin: 16px auto 0; max-width: 1600px; padding: 0 var(--gutter); }
.map-frame iframe {
  display: block; width: 100%; height: min(78svh, 900px); min-height: 460px;
  border: 1px solid var(--rule); border-radius: var(--r); background: var(--sunk);
}
.map-notes { padding-top: 16px; }

/* ── signup, art ────────────────────────────────────────────────────── */

.signup {
  margin: 32px 0 56px; padding: 32px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--rule);
}
.signup h2 { margin-top: 0; }
.signup__form { display: flex; flex-wrap: wrap; gap: 8px; max-width: 520px; }
.signup__form input {
  flex: 1 1 240px; min-height: 48px; padding: 10px 14px; font: inherit;
  background: var(--ground); color: var(--ink); border: 2px solid var(--rule); border-radius: var(--r);
}
.signup__form input:focus { border-color: var(--accent); outline: none; }
.signup__form button {
  min-height: 48px; padding: 10px 22px; font: inherit; font-weight: 600; cursor: pointer;
  background: var(--accent); color: #fff; border: 0; border-radius: var(--r);
}
.signup__form button:hover { background: var(--accent-hi); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .signup__form button { color: #08202e; } }

.art { margin: 24px 0; }
.art--placeholder {
  border: 2px dashed var(--rule); border-radius: 12px; padding: 40px 24px; text-align: center;
  background: repeating-linear-gradient(135deg, transparent 0 14px, var(--sunk) 14px 15px);
}
.art__label { font-family: var(--font-display); font-size: 1.25rem; margin-bottom: 4px; }
.art__note { color: var(--ink3); margin: 0 auto; max-width: 52ch; font-size: 0.95rem; }

/* ── credits ────────────────────────────────────────────────────────── */

.credit-list { list-style: none; padding: 0; }
.credit-list li { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--rule); font-size: 0.95rem; }
.credit-list img { border-radius: 6px; }
@media (max-width: 520px) { .credit-list li { grid-template-columns: 1fr; } }

/* ── footer ─────────────────────────────────────────────────────────── */

.site-footer { background: var(--surface); border-top: 1px solid var(--rule); padding: 40px 0 32px; font-size: 0.95rem; color: var(--ink2); }
.site-footer__grid { display: grid; gap: 28px; }
@media (min-width: 900px) { .site-footer__grid { grid-template-columns: 1fr 1.3fr 1fr; } }
.site-footer__name { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--ink); margin-bottom: 4px; }
.site-footer__links { list-style: none; padding: 0; margin: 0 0 12px; }
.site-footer__links li { margin-bottom: 6px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
