/* Groundwork Minerals - one stylesheet for every page.
   Tokens come from logo/palette/palette.css. Mobile first; breakpoints sm 36rem, md 48rem, lg 64rem only. */

@font-face {
  font-family: "Lato";
  src: url("/assets/fonts/lato-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lato";
  src: url("/assets/fonts/lato-bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --gw-navy: #1E2B45;
  --gw-navy-raised: #2C3B5A;
  --gw-gold: #B38B4D;
  --gw-sand: #E4D8C3;
  --gw-stone: #C3B9A4;
  --gw-mist: #8C95A8;
  --gw-white: #FFFFFF;
  --gw-accent: var(--gw-gold);
  --font: "Lato", "Carlito", "Calibri", "Segoe UI", sans-serif;
  --text: var(--gw-navy);
  --line: color-mix(in srgb, var(--gw-navy) 14%, transparent);
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --s8: 4.5rem;
  --radius: 0.5rem;
  --gutter: 1rem;
  --container: 72rem;
  --narrow: 44rem;
  --header-h: 3.5rem;
  --focus: 0 0 0 2px var(--gw-white), 0 0 0 5px var(--gw-navy);
}

.hero,
.panel-navy,
.hub-navy,
.band,
.site-footer {
  --focus: 0 0 0 2px var(--gw-navy), 0 0 0 5px var(--gw-gold);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  margin: 0;
  background: var(--gw-white);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

main {
  flex: 1 0 auto;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 var(--s4);
  font-weight: 700;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem);
}

h2 {
  font-size: clamp(1.5rem, 1.15rem + 1.6vw, 2.25rem);
}

h3 {
  font-size: 1.125rem;
}

p {
  margin: 0 0 var(--s4);
}

a {
  color: inherit;
  text-decoration-color: var(--gw-gold);
  text-underline-offset: 0.2em;
}

a:focus-visible,
summary:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container.narrow,
.narrow {
  max-width: var(--narrow);
}

.lead {
  font-size: 1.125rem;
}

.skip-link {
  position: absolute;
  left: var(--s2);
  top: calc(-1 * var(--s7));
  z-index: 20;
  padding: var(--s2) var(--s3);
  background: var(--gw-navy);
  color: var(--gw-white);
}

.skip-link:focus {
  top: var(--s2);
}

/* ---------- placeholder content: visibly marked until real content replaces it ---------- */

[data-placeholder]:not(li)::before,
.principles li[data-placeholder]::after {
  content: "Placeholder";
  display: block;
  grid-column: 1 / -1;
  width: max-content;
  margin-bottom: var(--s2);
  padding: 0.05rem 0.5rem;
  border: 1px dashed currentColor;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* the photo slots already say so in their caption; numbered principles keep their counter */
.band[data-placeholder]::before,
.project-photo[data-placeholder]::before {
  content: none;
}

.principles li[data-placeholder]::after {
  content: "To be confirmed";
  margin: var(--s3) 0 0;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--gw-white);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--s3);
  max-width: var(--container);
  height: var(--header-h);
  margin-inline: auto;
  padding-inline: var(--s3);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-width: 2.75rem;
  min-height: 2.75rem;
}

.brand-full {
  display: none;
}

.brand-icon {
  width: 1.75rem;
  height: 1.75rem;
}

.site-nav {
  display: flex;
  gap: 0.625rem;
  margin-left: auto;
  font-size: 0.8125rem;
  font-weight: 700;
  white-space: nowrap;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover {
  border-bottom-color: var(--gw-stone);
}

.site-nav a[aria-current] {
  border-bottom-color: var(--gw-gold);
}

/* the logo already links home on phones; Home stays in the nav for screen readers */
.site-nav a[data-spy="home"]:not(:focus-visible) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.lang-menu {
  position: relative;
  flex: none;
  font-size: 0.8125rem;
  font-weight: 700;
}

.lang-menu summary {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  list-style: none;
  cursor: pointer;
  padding: 0 var(--s2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.lang-menu summary::-webkit-details-marker {
  display: none;
}

.lang-menu summary::after {
  content: " ▾";
}

.lang-menu ul {
  position: absolute;
  right: 0;
  top: calc(100% + var(--s1));
  margin: 0;
  padding: var(--s2) 0;
  list-style: none;
  background: var(--gw-white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 0.5rem 1.5rem color-mix(in srgb, var(--gw-navy) 18%, transparent);
  min-width: 8rem;
}

.lang-menu li a {
  display: block;
  padding: var(--s2) var(--s4);
  text-decoration: none;
}

.lang-menu a[aria-current] {
  text-decoration: underline;
  text-decoration-color: var(--gw-gold);
  text-decoration-thickness: 2px;
}

.lang-menu a[aria-disabled] {
  color: var(--gw-mist);
  cursor: not-allowed;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  min-height: 2.75rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--gw-gold);
  color: var(--gw-navy);
}

.btn-primary:hover {
  background: var(--gw-sand);
}

.btn-secondary {
  border-color: var(--gw-sand);
  color: var(--gw-sand);
}

.btn-secondary:hover {
  background: var(--gw-navy-raised);
}

/* ---------- homepage panels ---------- */

.panel {
  position: relative;
  padding-block: var(--s7) var(--s8);
}

.panel-sand {
  background: var(--gw-sand);
}

.panel-navy,
.hub-navy {
  background: var(--gw-navy);
  color: var(--gw-sand);
}

.hero {
  display: flex;
  align-items: center;
  min-height: calc(100svh - var(--header-h));
  background: var(--gw-navy) url("/assets/bg/strata.svg") center bottom / cover no-repeat;
  color: var(--gw-white);
}

.hero-logo {
  display: block;
  width: min(18rem, 80%);
  height: auto;
  margin-bottom: var(--s6);
}

.hero h1 {
  max-width: 22ch;
  font-size: clamp(1.875rem, 1.2rem + 3vw, 3.25rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s5);
}

#approach {
  background: var(--gw-sand) url("/assets/bg/contours.svg") center / cover no-repeat;
}

.next {
  position: absolute;
  left: 50%;
  bottom: var(--s4);
  width: 2.75rem;
  height: 2.75rem;
  margin-left: -1.375rem;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0.55;
}

.next::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 42%;
  width: 0.6rem;
  height: 0.6rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}

.next:hover,
.next:focus-visible {
  opacity: 1;
}

.ways {
  padding-left: 1.25rem;
}

.ways li {
  margin-bottom: var(--s2);
}

.principles {
  display: grid;
  gap: var(--s4);
  margin: var(--s5) 0 0;
  padding: 0;
  list-style: none;
  counter-reset: principle;
}

.principles li {
  position: relative;
  padding: var(--s5) var(--s5) var(--s4);
  background: color-mix(in srgb, var(--gw-white) 72%, transparent);
  border-top: 3px solid var(--gw-gold);
  border-radius: 0 0 var(--radius) var(--radius);
  counter-increment: principle;
}

.principles li::before {
  content: counter(principle, decimal-leading-zero);
  display: block;
  margin-bottom: var(--s2);
  color: var(--gw-navy);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
}

.principles p {
  margin: 0;
}

.band {
  margin: 0;
  position: relative;
  background: var(--gw-navy-raised);
  color: var(--gw-sand);
}

.band-image {
  height: 40vh;
  min-height: 14rem;
  background: var(--gw-navy-raised) url("/assets/bg/strata.svg") center / cover no-repeat;
}

.band figcaption,
.project-photo figcaption {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: var(--s3);
  font-size: 0.8125rem;
  color: var(--gw-sand);
}

.cycle {
  display: grid;
  gap: var(--s5);
  align-items: center;
}

.cycle-diagram {
  width: 100%;
  max-width: 40rem;
  margin-inline: auto;
}

.steps {
  margin: 0;
  padding-left: var(--s5);
}

.steps li {
  margin-bottom: var(--s3);
}

.steps li::marker {
  color: var(--gw-navy);
  font-weight: 700;
}

.steps h3 {
  margin-bottom: var(--s1);
  font-size: 1rem;
}

.steps p {
  margin: 0;
}

.closing {
  margin-top: var(--s5);
  font-size: 1.125rem;
  font-weight: 700;
}

/* ---------- hub pages ---------- */

.hub {
  padding-block: var(--s5) var(--s7);
}

.hub-sand {
  background: var(--gw-sand);
}

.page-only {
  padding-block: var(--s7);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin: 0 0 var(--s5);
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
}

.breadcrumb a,
.pager a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.breadcrumb li + li::before {
  content: "›";
  margin-right: var(--s2);
  color: var(--gw-gold);
}

.hub-navy .breadcrumb {
  color: var(--gw-sand);
}

/* ---------- projects map and list ---------- */

.project-map {
  margin: var(--s5) calc(-1 * var(--gutter)) var(--s5);
  overflow: hidden;
}

/* phones: the off-map labels are hidden, so crop their column away (width - 100% = margin, so the east edge stays) */
.project-map[data-placeholder]::before {
  margin-left: var(--gutter);
}

.project-map-svg {
  display: block;
  width: 143%;
  max-width: none;
  height: auto;
  margin-left: -43%;
}

.map-province {
  fill: var(--gw-sand);
  text-transform: uppercase;
  font: 700 13px var(--font);
  letter-spacing: 2px;
}

.map-leader {
  stroke: var(--gw-gold);
  stroke-width: 1.5;
  display: none;
}

.map-label {
  display: none;
  text-decoration: none;
}

.map-label text {
  fill: var(--gw-gold);
}

.map-label-name {
  font: 700 17px var(--font);
}

.map-label-sub {
  font: 400 12px var(--font);
  fill: var(--gw-mist);
}

.map-hit {
  fill: transparent;
}

.map-dot {
  fill: var(--gw-gold);
  stroke: var(--gw-navy);
  stroke-width: 2;
  r: 15px;
  transition: r 0.15s ease;
}

.map-plus {
  stroke: var(--gw-navy);
  stroke-width: 2;
}

.map-tip {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.map-tip rect {
  fill: var(--gw-white);
  stroke: var(--gw-gold);
}

.map-tip text {
  fill: var(--gw-navy);
  font: 700 12px var(--font);
}

.map-project:hover .map-dot,
.map-project:focus-within .map-dot {
  r: 17px;
  fill: var(--gw-sand);
}

.map-project:hover .map-leader,
.map-project:focus-within .map-leader {
  stroke-width: 2.5;
}

.map-project:hover .map-label text,
.map-project:focus-within .map-label text {
  fill: var(--gw-sand);
}

.map-marker:hover .map-tip,
.map-marker:focus-visible .map-tip {
  opacity: 1;
}

.map-marker:focus-visible,
.map-label:focus-visible {
  outline: none;
}

.map-marker:focus-visible .map-dot {
  stroke: var(--gw-white);
  stroke-width: 3;
}

.project-list {
  display: grid;
  gap: var(--s3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-card a {
  display: grid;
  gap: var(--s1);
  height: 100%;
  padding: var(--s4);
  background: var(--gw-navy-raised);
  border-left: 3px solid var(--gw-gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--gw-sand);
  text-decoration: none;
}

.project-card a:hover {
  background: color-mix(in srgb, var(--gw-navy-raised) 80%, var(--gw-mist));
}

.project-card-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gw-white);
}

.project-card-meta,
.project-card-stage {
  font-size: 0.875rem;
}

.project-card-status {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--gw-white);
}

.project-card-status::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: var(--s2);
  border-radius: 50%;
  background: var(--gw-gold);
}

.project-card-summary {
  font-size: 0.875rem;
  color: var(--gw-sand);
}

/* ---------- project pages ---------- */

.project-photo {
  position: relative;
  margin: 0;
}

.project-photo-image {
  height: 35vh;
  min-height: 12rem;
  background: var(--gw-navy) url("/assets/bg/strata.svg") center bottom / cover no-repeat;
}

.project {
  padding-block: var(--s5) var(--s7);
}

.project-intro {
  display: grid;
  gap: var(--s5);
  margin-bottom: var(--s6);
}

.facts {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.facts div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: var(--s3);
  padding-block: var(--s2);
  border-bottom: 1px solid var(--line);
}

.facts dt {
  font-weight: 700;
}

.facts dd {
  margin: 0;
}

.locator {
  margin: 0;
}

.locator img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
}

.project-body section {
  margin-top: var(--s6);
}

.project-cta {
  margin-top: var(--s6);
}

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3) var(--s5);
  margin-top: var(--s6);
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
  font-weight: 700;
}

/* ---------- management ---------- */

.people {
  display: grid;
  gap: var(--s5);
}

.person img {
  display: block;
  width: 100%;
  max-width: 16rem;
  margin-bottom: var(--s3);
  border-radius: var(--radius);
}

.person-role {
  margin-bottom: var(--s2);
  color: var(--gw-navy-raised);
  font-weight: 700;
}

/* ---------- prose pages ---------- */

.prose {
  padding-block: var(--s5) var(--s7);
}

.prose h2 {
  margin-top: var(--s6);
  font-size: 1.375rem;
}

.note {
  padding: var(--s3) var(--s4);
  background: var(--gw-sand);
  border-left: 3px solid var(--gw-gold);
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--gw-navy);
  color: var(--gw-sand);
  padding-block: var(--s7);
}

.footer-inner {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.footer-brand img {
  width: 11.75rem;
  height: auto;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s5);
  margin-block: var(--s5);
  font-weight: 700;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.disclaimer,
.copyright {
  max-width: 48rem;
  font-size: 0.8125rem;
  color: var(--gw-mist);
}

/* ---------- wider screens ---------- */

@media (min-width: 36rem) {
  .header-inner {
    padding-inline: var(--gutter);
  }

  .site-nav {
    gap: var(--s4);
    font-size: 0.875rem;
  }

  .site-nav a[data-spy="home"]:not(:focus-visible) {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
  }

  .principles,
  .project-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .facts div {
    grid-template-columns: 11rem 1fr;
  }
}

@media (min-width: 48rem) {
  :root {
    --gutter: 1.5rem;
    --header-h: 4rem;
  }

  .brand-full {
    display: block;
    width: 11.75rem;
    height: auto;
  }

  .brand-icon {
    display: none;
  }

  .panel {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .project-map {
    margin-inline: 0;
  }

  .project-map[data-placeholder]::before {
    margin-left: 0;
  }

  .project-map-svg {
    width: 100%;
    margin-left: 0;
  }

  .map-leader {
    display: inline;
  }

  .map-label {
    display: inline;
  }

  /* tablets draw the map at about 70% of its size: enlarge the labels so they stay readable */
  .map-label-name {
    font-size: 22px;
  }

  .map-label-sub {
    font-size: 15px;
  }

  .map-dot {
    r: 11px;
  }

  .map-project:hover .map-dot,
  .map-project:focus-within .map-dot {
    r: 13px;
  }

  .people {
    grid-template-columns: repeat(3, 1fr);
  }

  .project-intro {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

@media (min-width: 64rem) {
  .site-nav {
    gap: var(--s5);
    font-size: 0.9375rem;
  }

  .principles {
    grid-template-columns: repeat(3, 1fr);
  }

  .project-list {
    grid-template-columns: repeat(5, 1fr);
  }

  .map-label-name {
    font-size: 17px;
  }

  .map-label-sub {
    font-size: 12px;
  }

  .cycle {
    grid-template-columns: 3fr 2fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
