/* ==========================================================================
   Wayland Housing Production Plan
   ========================================================================== */

/* Fonts (self-hosted, variable) ------------------------------------------ */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/assets/fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/assets/fonts/source-serif-4-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

/* Tokens ----------------------------------------------------------------- */

:root {
  --black: #000000;
  --white: #ffffff;
  --blue: #204674;
  --blue-dark: #142c49;
  --blue-light: #e8eef5;
  --yellow: #ffcf3c;
  --grey: #4a4a4a;

  --font-head: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;

  --rule: 2px solid var(--black);
  --rule-heavy: 6px solid var(--black);

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --max: 76rem;
  --measure: 40rem;
}

/* Base (after h5bp / modern-normalize) ----------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

main:focus {
  outline: none;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

p,
ul,
ol {
  margin: 0 0 1em;
}

a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--blue-dark);
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--yellow);
}

mark {
  background: var(--blue);
  color: white;
  padding: 0 0.12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Utilities -------------------------------------------------------------- */

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

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -10rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 700;
}

.skip-link:focus {
  top: 0.5rem;
}

/* Black-bar label, as on the flyer */
.label-heading {
  display: inline-block;
  margin: 0 0 1.25rem;
  padding: 0.1em 0.35em 0.15em;
  background: var(--black);
  color: var(--white);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.015em;
}

/* Header ----------------------------------------------------------------- */

.site-header {
  background: var(--blue);
  color: var(--white);
}

.site-header :focus-visible {
  outline-color: var(--white);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--white);
  text-decoration: none;
}

.brand:hover {
  color: var(--white);
}

.logo-mark {
  width: 3.5rem;
  flex: none;
  color: var(--white);
}

.wordmark {
  font-family: var(--font-body);
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.005em;
}

.wordmark__line {
  display: block;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding-block: 0.35rem;
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}

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

.site-nav a[aria-current="page"] {
  border-bottom-color: var(--yellow);
}

/* Hero ------------------------------------------------------------------- */

.hero {
  padding-block: clamp(2rem, 5vw, 3.75rem) clamp(1.5rem, 4vw, 2.5rem);
  border-bottom: var(--rule);
}

.hero__line {
  max-width: 22ch;
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 1.2rem + 3.6vw, 3rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.hero__more {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 600;
}

/* Home grid -------------------------------------------------------------- */

.home-grid {
  display: grid;
  gap: 2.5rem;
  padding-block: 2rem 3rem;
}

@media (min-width: 48em) {
  .home-grid {
    grid-template-columns: 2fr 3fr;
    gap: 0;
  }

  .home-grid > :first-child {
    padding-right: var(--gutter);
    border-right: var(--rule);
  }

  .home-grid > :last-child {
    padding-left: var(--gutter);
  }
}

.news-list,
.involved-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-list li {
  padding-block: 0.75rem;
  border-top: 1px solid var(--black);
}

.news-list a {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.25;
}

.news-list time,
.post-date {
  font-family: var(--font-head);
  font-size: 0.9rem;
  color: var(--grey);
}

.empty {
  color: var(--grey);
  font-style: italic;
}

.involved-list {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 64em) {
  .involved-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

.involved {
  padding-top: 0.75rem;
  border-top: var(--rule);
}

.involved h3 {
  font-size: 1.25rem;
  margin-bottom: 0.35em;
}

.involved p {
  font-size: 1rem;
  line-height: 1.5;
}

.involved p:last-child {
  margin-bottom: 0;
}

/* Interior pages --------------------------------------------------------- */

.page {
  padding-block: clamp(2rem, 5vw, 3.5rem) 4rem;
}

.page__header {
  margin-bottom: 1.5rem;
}

.page__title {
  max-width: 24ch;
  font-size: clamp(2rem, 1.4rem + 2.5vw, 3rem);
  letter-spacing: -0.02em;
}

.kicker {
  margin: 0 0 0.75rem;
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
}

.lede {
  max-width: var(--measure);
  font-size: 1.3rem;
}

.prose {
  max-width: var(--measure);
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2 {
  margin-top: 2.5rem;
  padding-top: 0.6rem;
  border-top: var(--rule);
  font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.75rem);
}

.prose h3 {
  margin-top: 2rem;
  font-size: 1.25rem;
}

.prose ul,
.prose ol {
  padding-left: 1.25em;
}

.prose li {
  margin-bottom: 0.35em;
}

.prose li::marker {
  color: var(--blue);
}

.file-type {
  font-family: var(--font-head);
  font-size: 0.85em;
  color: var(--grey);
}

.figure-wide {
  margin: 2.5rem 0;
}

@media (min-width: 60em) {
  .figure-wide {
    width: 52rem;
  }
}

.figure-wide img {
  width: 100%;
  aspect-ratio: 5 / 2;
  object-fit: cover;
  border: var(--rule);
}

.figure-wide figcaption {
  margin-top: 0.5rem;
  font-family: var(--font-head);
  font-size: 0.85rem;
  color: var(--grey);
}

/* Contact cards */
.prose .contacts {
  display: grid;
  gap: 1.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 40em) {
  .prose .contacts {
    grid-template-columns: repeat(2, 1fr);
  }
}

.contacts li {
  margin: 0;
  padding-top: 0.75rem;
  border-top: var(--rule-heavy);
}

.prose .contacts h2 {
  margin: 0 0 0.25rem;
  padding: 0;
  border: 0;
  font-size: 1.35rem;
}

.contacts p {
  margin: 0;
}

/* Footer ----------------------------------------------------------------- */

.site-footer {
  border-top: var(--rule-heavy);
  padding-block: 2rem;
  font-size: 0.95rem;
}

.site-footer .wrap {
  display: grid;
  gap: 2rem;
}

@media (min-width: 56em) {
  .site-footer .wrap {
    grid-template-columns: 3fr 2fr;
    column-gap: 3rem;
  }

  .colophon {
    grid-column: 1 / -1;
  }
}

.footer-label {
  margin-bottom: 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.partners__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  align-items: center;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.partner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
  height: 100%;
  color: var(--black);
  text-decoration: none;
}

.partner img {
  max-height: 3.5rem;
  width: auto;
}

/* Stand-in until real logos arrive */
.partner__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4.5rem;
  padding: 0.5rem;
  border: 2px dashed var(--black);
  font-family: var(--font-head);
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
}

.partner__role {
  font-family: var(--font-head);
  font-size: 0.8rem;
  color: var(--grey);
}

.partner:hover .partner__placeholder {
  background: var(--blue-light);
}

.access p {
  margin: 0;
}

.colophon {
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--black);
  font-family: var(--font-head);
  font-size: 0.85rem;
  color: var(--grey);
}

/* Small screens ---------------------------------------------------------- */

@media (max-width: 30em) {
  .logo-mark {
    width: 2.75rem;
  }

  .wordmark {
    font-size: 1.1rem;
  }

  .site-nav ul {
    gap: 0.25rem 1.1rem;
  }
}

/* Print ------------------------------------------------------------------ */

@media print {
  .skip-link,
  .site-nav,
  .partners {
    display: none;
  }

  .label-heading {
    background: none;
    color: var(--black);
    padding: 0;
  }

  .prose a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
  }
}

/* Motion ----------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
