/* Understory Insights — matches understoryadvisory.ca tokens */
:root {
  --teal: #3a8fa3;
  --teal-dark: #2a6e80;
  --teal-deeper: #1f5263;
  --teal-light: #8ec8d8;
  --teal-pale: #e8f4f7;
  --warm-white: #ffffff;
  --text-dark: #1a3a42;
  --text-mid: #3a6070;
  --line: #d3e6ec;
  --danger: #a3402f;
  --measure: 720px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Nunito Sans', sans-serif;
  background: var(--warm-white);
  color: var(--text-dark);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--teal-dark); }
a:hover { color: var(--teal-deeper); }
:focus-visible { outline: 3px solid var(--teal-light); outline-offset: 2px; }

/* Nav (same as main site) */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(31, 82, 99, 0.97);
  backdrop-filter: blur(8px);
  padding: 0.6rem 2.5rem;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.site-nav .logo img { height: 56px; width: auto; }
.site-nav .links { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.site-nav .links a {
  color: var(--teal-light); text-decoration: none; margin-left: 2rem;
  font-family: 'Nunito', sans-serif; font-size: 0.9rem; font-weight: 600; letter-spacing: 0.04em;
}
.site-nav .links a:hover, .site-nav .links a[aria-current="page"] { color: #fff; }

/* Shared type */
.section-label {
  font-family: 'Nunito', sans-serif; font-size: 0.73rem; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--teal); font-weight: 700; margin-bottom: 0.7rem;
}
.divider { width: 48px; height: 2px; background: var(--teal); margin: 1.4rem 0; }
.btn {
  display: inline-block; padding: 0.8rem 2.2rem; border: 2px solid var(--teal);
  background: var(--teal); color: #fff; font-family: 'Nunito', sans-serif; font-size: 0.85rem;
  font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; transition: background .2s, border-color .2s, color .2s;
}
.btn:hover { background: var(--teal-deeper); border-color: var(--teal-deeper); color: #fff; }
.btn-ghost { background: transparent; color: var(--teal-dark); }
.btn-ghost:hover { background: var(--teal-pale); color: var(--teal-deeper); border-color: var(--teal-dark); }
.btn-light { background: transparent; border-color: var(--teal-light); color: #fff; }
.btn-light:hover { background: var(--teal-light); color: var(--teal-deeper); border-color: var(--teal-light); }

/* Page hero band */
.band {
  position: relative; overflow: hidden; color: #fff;
  padding: 5rem 2rem 4rem;
  background: var(--teal-deeper);
}
.band::before {
  content: ""; position: absolute; inset: 0;
  background: url("photo6.jpg") center/cover no-repeat;
  opacity: .22;
}
.band::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(155deg, rgba(31,82,99,.92) 0%, rgba(42,110,128,.85) 60%, rgba(58,143,163,.78) 100%);
}
.band-inner { position: relative; z-index: 1; max-width: var(--measure); margin: 0 auto; }
.band .section-label { color: var(--teal-light); }
.band h1 {
  font-family: 'Nunito', sans-serif; font-weight: 700; line-height: 1.12;
  font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 1rem; text-wrap: balance;
}
.band .dek { font-size: 1.15rem; color: #d6eef4; max-width: 640px; line-height: 1.75; }
.band .meta {
  margin-top: 1.8rem; font-family: 'Nunito', sans-serif; font-size: .85rem; letter-spacing: .04em;
  color: var(--teal-light); display: flex; flex-wrap: wrap; gap: .4rem 1.2rem;
}
.band .meta span + span::before { content: "·"; margin-right: 1.2rem; opacity: .7; }

/* Article */
.article { max-width: var(--measure); margin: 0 auto; padding: 3.5rem 2rem 2rem; }
.article .intro p { font-size: 1.08rem; color: var(--text-mid); line-height: 1.9; margin-bottom: 1.2rem; }
.article .source {
  font-size: .9rem; color: var(--text-mid); border-top: 1px solid var(--line);
  padding-top: 1rem; margin-top: .5rem;
}
.findings-head {
  display: flex; align-items: baseline; gap: 1rem; margin: 3rem 0 1.5rem;
  font-family: 'Nunito', sans-serif; color: var(--teal-deeper);
}
.findings-head h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); font-weight: 700; }
.findings { list-style: none; counter-reset: f; }
.finding {
  counter-increment: f; display: grid; grid-template-columns: 3.2rem 1fr; gap: 0 1.2rem;
  padding: 1.8rem 0; border-top: 1px solid var(--line);
}
.finding::before {
  content: counter(f, decimal-leading-zero);
  font-family: 'Nunito', sans-serif; font-weight: 700; font-size: 1.6rem; line-height: 1.2;
  color: var(--teal);
}
.finding p { font-size: 1.02rem; line-height: 1.85; color: var(--text-dark); }
.finding figure {
  grid-column: 1 / -1; margin-top: 1.3rem;
  border: 1px solid var(--line); background: #fff; padding: .75rem;
}
.finding figure img { width: 100%; cursor: zoom-in; }
.finding figcaption {
  font-size: .85rem; color: var(--text-mid); padding: .7rem .2rem 0; line-height: 1.5;
}
.finding figcaption b { color: var(--teal-deeper); font-family: 'Nunito', sans-serif; }

.callout {
  background: var(--teal-pale); border-left: 4px solid var(--teal);
  padding: 1.6rem 1.8rem; margin: 2.5rem 0 1rem;
}
.callout h3 {
  font-family: 'Nunito', sans-serif; color: var(--teal-deeper); font-size: 1.15rem; margin-bottom: .5rem;
}
.callout p { color: var(--text-mid); line-height: 1.85; }

.cta {
  background: var(--teal-deeper); color: #fff; padding: 2.4rem 2.2rem; margin: 2.5rem 0 1rem;
  display: grid; gap: 1.2rem;
}
.cta h3 { font-family: 'Nunito', sans-serif; font-size: 1.45rem; font-weight: 700; }
.cta p { color: #d6eef4; line-height: 1.8; }
.cta .actions { display: flex; flex-wrap: wrap; gap: .8rem; }

.origin-note { font-size: .88rem; color: var(--text-mid); margin: 1.5rem 0 0; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(17, 38, 45, .92); z-index: 200;
  display: none; align-items: center; justify-content: center; padding: 2rem; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-height: 90vh; width: auto; background: #fff; padding: .5rem; }

/* Listing */
.wrap { max-width: 1200px; margin: 0 auto; padding: 3rem 2rem 4rem; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.chip {
  font-family: 'Nunito', sans-serif; font-size: .8rem; font-weight: 700; letter-spacing: .06em;
  padding: .45rem 1rem; border: 1.5px solid var(--line); background: #fff; color: var(--text-mid);
  cursor: pointer;
}
.chip[aria-pressed="true"], .chip:hover { border-color: var(--teal); color: var(--teal-deeper); background: var(--teal-pale); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }
.card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  border: 1px solid var(--line); background: #fff; transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -18px rgba(31,82,99,.45); color: inherit; }
.card .thumb { aspect-ratio: 16/9; background: var(--teal-pale); overflow: hidden; border-bottom: 1px solid var(--line); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.card .body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.card .kicker { font-family: 'Nunito', sans-serif; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--teal); font-weight: 700; }
.card h3 { font-family: 'Nunito', sans-serif; font-size: 1.25rem; line-height: 1.3; color: var(--teal-deeper); }
.card p { font-size: .95rem; color: var(--text-mid); line-height: 1.7; }
.card .more { margin-top: auto; padding-top: .6rem; font-family: 'Nunito', sans-serif; font-weight: 700; font-size: .82rem; letter-spacing: .08em; color: var(--teal-dark); }
.empty { padding: 3rem; text-align: center; color: var(--text-mid); border: 1px dashed var(--line); }

.related { background: var(--teal-pale); padding: 3.5rem 2rem 4rem; margin-top: 3rem; }
.related .inner { max-width: 1200px; margin: 0 auto; }
.related h2 { font-family: 'Nunito', sans-serif; color: var(--teal-deeper); font-size: 1.6rem; margin-bottom: 1.5rem; }

/* Skeleton */
.skel { background: linear-gradient(90deg, #eef6f8 25%, #e2eff3 50%, #eef6f8 75%); background-size: 200% 100%; animation: sh 1.4s infinite; }
@keyframes sh { to { background-position: -200% 0; } }

/* Footer */
.site-footer { background: var(--teal-deeper); padding: 2rem; text-align: center; }
.site-footer img { height: 44px; width: auto; margin: 0 auto .7rem; filter: brightness(0) invert(1); opacity: .7; }
.site-footer p { color: var(--teal-light); font-size: .85rem; }

@media (max-width: 700px) {
  .site-nav { padding: .5rem 1.2rem; flex-direction: column; }
  .site-nav .links a { margin: 0 .7rem; }
  .band { padding: 3.5rem 1.4rem 3rem; }
  .article { padding: 2.5rem 1.4rem 1rem; }
  .finding { grid-template-columns: 2.4rem 1fr; }
  .finding::before { font-size: 1.25rem; }
  .wrap { padding: 2rem 1.2rem 3rem; }
  .cards { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
