@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Crimson Text";
  src: url("../fonts/crimson-text-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bg: #ecebe4;
  --surface: #f6f5f0;
  --ink: #1f2a28;
  --muted: #5f6a67;
  --sage: #6c7c78;
  --line: rgba(31, 42, 40, 0.16);
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --gutter: clamp(16px, 4vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2 { font-weight: 400; letter-spacing: -0.02em; line-height: 1.08; }
h2 { font-size: clamp(2rem, 4.2vw, 3.25rem); }
a { color: inherit; }
img, svg { display: block; width: 100%; height: 100%; object-fit: cover; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; }

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Button */
.button {
  display: inline-block;
  padding: 0.7em 1.4em;
  border-radius: 3px;
  background: var(--ink);
  color: #fff;
  font: 500 0.95rem var(--sans);
  text-decoration: none;
  transition: background-color 0.2s;
}
.button:hover { background: #33423f; }

/* Header: network name centred, network logo on the right, menu underneath */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px 24px;
  padding: 18px var(--gutter) 8px;
  border-bottom: 1px solid var(--line);
}
/* The network name, set in a Roman serif chosen to match the Nordlands logo lettering. */
.network {
  font-family: "Crimson Text", Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink);
}
.header-network {
  grid-column: 2;
  font-size: clamp(1.35rem, 2.6vw, 2.2rem);
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
}
.parent-logo { grid-column: 3; justify-self: end; }
.parent-logo img { width: auto; height: 64px; object-fit: contain; }
.site-nav { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 24px; }
.site-nav a { padding: 8px 0; text-decoration: none; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto; }
  .header-network { grid-column: 1; text-align: left; }
  .parent-logo { grid-column: 2; }
  .parent-logo img { height: 46px; }
  .site-nav { justify-content: flex-start; gap: 2px 20px; font-size: 0.95rem; }
}

/* Page heading */
main { min-height: 70vh; padding: 0 var(--gutter) clamp(64px, 9vw, 120px); }
.page-head { padding: clamp(40px, 7vw, 88px) 0 clamp(28px, 4vw, 48px); }
.page-head h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
.page-head p { margin-top: 14px; max-width: 36em; font-size: 1.15rem; color: var(--muted); }

/* Projects */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 40px 20px;
}
.card { display: block; text-decoration: none; }
.card-media {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 3px;
  background: #d7d5cc;
  margin-bottom: 14px;
}
.card-media > img, .card-media > svg { transition: transform 0.6s ease; }
.card:hover .card-media > img, .card:hover .card-media > svg { transform: scale(1.04); }
.status {
  display: inline-block;
  margin-left: 10px;
  padding: 0.25em 0.7em;
  border: 1px solid currentColor;
  border-radius: 999px;
  font: 500 0.78rem var(--sans);
  letter-spacing: 0.04em;
  vertical-align: middle;
  white-space: nowrap;
}
.card-member { display: block; margin-top: 4px; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 36px 28px; }
.member-logo { width: auto; height: 72px; max-width: 200px; object-fit: contain; object-position: left center; margin-bottom: 14px; }
.project-description > span { display: block; }
.project-description > span + span { margin-top: 0.8em; }
.project-description .project-member { display: flex; align-items: center; gap: 18px; font-family: var(--sans); font-size: 1.05rem; font-weight: 400; }
.project-member .member-logo { height: 64px; margin: 0; }
.member h3 { font-size: 1.35rem; line-height: 1.2; margin: 0 0 8px; }
.member p { margin-top: 6px; color: var(--muted); }
.member .member-people { color: var(--ink); }
.member-list-label { margin-top: 14px; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; }
.member-list-label + .member-projects { margin-top: 6px; }
#project-sections > .category-note { margin: 0 0 28px; }
.empty-note { padding: 40px 0; font-family: var(--serif); font-size: 1.4rem; font-weight: 300; }
.member-projects { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); }
.member-projects li { padding: 4px 0; }
.member-projects a { text-decoration: none; }
.member-projects a:hover { text-decoration: underline; text-underline-offset: 4px; }
.member-projects span { color: var(--muted); font-size: 0.92rem; }
.card-sub { display: block; margin-top: 4px; color: var(--muted); }
.category { padding-bottom: clamp(48px, 7vw, 96px); scroll-margin-top: 16px; }
.category-name {
  padding-bottom: 16px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
}
.category-note { margin: -12px 0 28px; max-width: 44em; color: var(--muted); font-size: 1.05rem; }
.category-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.category-nav a {
  padding: 0.5em 1.1em;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.95rem;
}
.category-nav a:hover { border-color: var(--ink); }
.card-name { display: block; font-size: 1.45rem; font-weight: 500; letter-spacing: -0.01em; line-height: 1.2; }

/* Single project */
.project-page { padding-left: 0; padding-right: 0; }
.project-hero {
  position: relative;
  display: block;
  width: 100%;
  height: min(78vh, 860px);
  min-height: 320px;
  padding: 0;
  border: 0;
  background: #7d807a;
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: zoom-in;
  overflow: hidden;
}
.project-hero-media { position: absolute; inset: 0; }
.project-hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(31, 42, 40, 0) 55%, rgba(31, 42, 40, 0.65) 100%);
}
.project-title {
  position: absolute;
  left: var(--gutter); right: var(--gutter); bottom: clamp(20px, 4vh, 44px);
  display: block;
}
.project-hero h1 { font-size: clamp(2.25rem, 6.5vw, 4.75rem); }
.project-sub { margin-top: 6px; font-size: clamp(1.05rem, 2vw, 1.5rem); }
.project-description {
  max-width: 38em;
  padding: clamp(40px, 7vw, 96px) var(--gutter) 0;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  font-weight: 300;
  line-height: 1.3;
  white-space: pre-line;
}
.gallery {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: clamp(40px, 7vw, 96px) var(--gutter) 0;
}
.shot {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: #d7d5cc;
  overflow: hidden;
  cursor: zoom-in;
}
.gallery-col { flex: 1; min-width: 0; }
.shot img { height: auto; }
.shot-video { position: relative; }
.shot-video::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 72px; height: 72px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(20, 26, 25, 0.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6.5v11l9-5.500z' fill='%23fff'/%3E%3C/svg%3E") center / 60% no-repeat;
}
.shot-sample { aspect-ratio: 4 / 3; }
.more { padding: clamp(56px, 9vw, 120px) var(--gutter) 0; }
.more h2 { padding-bottom: 24px; margin-bottom: 28px; border-bottom: 1px solid var(--line); font-size: clamp(1.6rem, 3vw, 2.25rem); }

/* Picture viewer */
.lightbox {
  width: 100vw; height: 100vh; height: 100dvh;
  max-width: none; max-height: none;
  margin: 0; padding: 0;
  border: 0;
  background: rgba(20, 26, 25, 0.96);
  color: #fff;
}
.lightbox-media {
  position: absolute;
  inset: 56px clamp(8px, 6vw, 88px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-media img, .lightbox-media svg, .lightbox-media video { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox-media svg { width: min(100%, 1100px); aspect-ratio: 4 / 3; }
.lightbox-button {
  position: absolute;
  width: 48px; height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-button:hover { background: rgba(255, 255, 255, 0.28); }
.lightbox-close { top: 6px; right: 10px; font-size: 1.8rem; }
.lightbox-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 10px; top: 50%; transform: translateY(-50%); }
.lightbox-count { pointer-events: none; position: absolute; left: 0; right: 0; bottom: 16px; text-align: center; font-size: 0.9rem; }

/* Contact */
.contact-details { max-width: 760px; }
.contact-details a:not(.button) { text-underline-offset: 4px; }

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  padding: 28px var(--gutter);
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}

/* Facts list (contact page) */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 20px;
  margin: 0 0 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.facts dt { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin-top: 4px; font-size: 1.1rem; }

@media (max-width: 640px) {
  .gallery { flex-direction: column; gap: 0; }
  .gallery-col { display: contents; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 8px; transform: none; }
}

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