/* T018. Site styles, design A (editorial serif). Constitution I: black, white, charcoal and greys
   only (research R6 tokens); one serif (Newsreader) for headings, one sans (Inter) for body;
   subtle fades and hover transitions only, none under reduced motion. */

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Colour tokens - the only colours on the site (FR-030). */
  --black: #000000;
  --charcoal: #111111;
  --grey-700: #3a3a3a;
  --grey-500: #6b6b6b;
  --grey-300: #bdbdbd;
  --grey-100: #ececec;
  --white: #ffffff;

  --serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(20px, 5vw, 56px);
  --measure: 38rem;
  --page: 72rem;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--charcoal);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 2px solid var(--charcoal);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  background: var(--charcoal);
  color: var(--white);
  padding: 0.5rem 0.75rem;
  z-index: 10;
}

.skip-link:focus {
  top: 0.75rem;
}

/* ---------- Frame ---------- */

.wrap {
  width: 100%;
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-top: clamp(1.25rem, 3vw, 2rem);
  padding-bottom: clamp(1.25rem, 3vw, 2rem);
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.nav {
  display: flex;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav a {
  text-decoration: none;
  color: var(--grey-500);
  transition: color 200ms var(--ease);
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--charcoal);
}

main {
  display: block;
  padding-bottom: clamp(4rem, 10vw, 8rem);
  animation: fade-in 400ms var(--ease) both;
}

.site-footer {
  border-top: 1px solid var(--grey-100);
  color: var(--grey-500);
  font-size: 0.8125rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 2rem;
  padding-bottom: 2.5rem;
}

.site-footer a {
  color: var(--grey-500);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--charcoal);
}

/* ---------- Type ---------- */

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--black);
  margin: 0;
  letter-spacing: -0.015em;
}

.page-title {
  font-size: clamp(2.75rem, 7vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin-top: clamp(2.5rem, 8vw, 6rem);
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
  max-width: 16ch;
}

.eyebrow {
  margin: 0 0 1.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey-500);
}

.lead {
  font-family: var(--serif);
  font-size: clamp(1.375rem, 2.6vw, 1.75rem);
  line-height: 1.4;
  color: var(--grey-700);
  max-width: 30ch;
  margin: 0;
}

.prose {
  max-width: var(--measure);
}

.prose p {
  margin: 0 0 1.4em;
}

.muted {
  color: var(--grey-500);
}

.rule {
  border: 0;
  border-top: 1px solid var(--grey-100);
  margin: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 4vw, 3rem);
}

.arrow-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  text-decoration: none;
  border-bottom: 1px solid var(--grey-300);
  padding-bottom: 0.15em;
  transition: border-color 200ms var(--ease);
}

.arrow-link:hover {
  border-color: var(--charcoal);
}

/* ---------- Home (design A) ---------- */

.home-a .hero {
  padding-top: clamp(3rem, 12vw, 9rem);
}

.home-a .hero h1 {
  font-size: clamp(3.5rem, 13vw, 9.5rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin-bottom: clamp(1.5rem, 4vw, 2.75rem);
}

.home-a .hero .lead {
  max-width: 34ch;
}

.home-a .hero .location {
  margin: 1.25rem 0 0;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-500);
}

.home-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  margin: clamp(2.5rem, 6vw, 4rem) 0 0;
  padding: 0;
  list-style: none;
}

.section-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.section-label h2 {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey-500);
  font-weight: 500;
}

.section-label a {
  font-size: 0.8125rem;
  color: var(--grey-500);
  text-decoration: none;
}

.section-label a:hover {
  color: var(--charcoal);
}

/* ---------- Project lists ---------- */

.project-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--grey-100);
}

.project-row {
  border-bottom: 1px solid var(--grey-100);
}

.project-row > a {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  padding: clamp(1.75rem, 4vw, 2.75rem) 0;
  text-decoration: none;
}

.project-row.has-cover > a {
  gap: 1.25rem;
}

.project-row > a > div {
  min-width: 0;
}

.project-row .index {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--grey-500);
  font-variant-numeric: tabular-nums;
}

.project-row h2,
.project-row h3 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.1;
  transition: opacity 200ms var(--ease);
}

.project-row p {
  margin: 0.6rem 0 0;
  color: var(--grey-700);
  max-width: 36rem;
}

.project-row .role {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--grey-500);
}

.project-row .cover {
  aspect-ratio: 16 / 10;
  background: var(--grey-100);
  overflow: hidden;
}

.project-row .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 300ms var(--ease);
}

.project-row > a:hover h2,
.project-row > a:hover h3,
.project-row > a:hover .cover img {
  opacity: 0.72;
}

@media (min-width: 760px) {
  .project-row > a {
    grid-template-columns: 4rem minmax(0, 1fr);
    align-items: baseline;
  }

  .project-row.has-cover > a {
    grid-template-columns: 4rem minmax(0, 5fr) minmax(0, 6fr);
    align-items: start;
  }

  .project-row.has-cover .cover {
    order: 3;
  }
}

.empty {
  color: var(--grey-500);
  padding: 2rem 0;
  border-top: 1px solid var(--grey-100);
  margin: 0;
}

/* ---------- Project detail ---------- */

.project-head .page-title {
  margin-bottom: 1.5rem;
  max-width: 18ch;
}

.project-head .lead {
  max-width: 36ch;
}

.facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem 3rem;
  margin: clamp(2.5rem, 6vw, 4rem) 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--grey-100);
  border-bottom: 1px solid var(--grey-100);
}

.facts div {
  min-width: 0;
}

.facts dt {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey-500);
  margin-bottom: 0.35rem;
}

.facts dd {
  margin: 0;
}

@media (min-width: 760px) {
  .facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.links li + li {
  margin-top: 0.35rem;
}

.status-label {
  color: var(--grey-700);
}

.project-body h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 3rem 0 1.25rem;
}

.gallery {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  margin: clamp(3rem, 8vw, 5rem) 0 0;
}

.gallery figure {
  margin: 0;
  background: var(--grey-100);
}

/* Fill the column; very tall (portrait) images are capped and centred on the grey frame. */
.gallery img {
  width: 100%;
  height: auto;
  max-height: min(90vh, 1100px);
  object-fit: contain;
}

.back-link {
  margin-top: clamp(3rem, 8vw, 5rem);
}

/* ---------- About ---------- */

.about .prose p:first-child {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  line-height: 1.5;
  color: var(--charcoal);
}

.about .closing {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--grey-100);
  font-size: 0.9375rem;
  color: var(--grey-500);
  max-width: var(--measure);
}

/* ---------- Contact ---------- */

.contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--grey-100);
  max-width: 48rem;
}

.contact-list li {
  border-bottom: 1px solid var(--grey-100);
}

.contact-list a {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem;
  padding: 1.5rem 0;
  text-decoration: none;
}

.contact-list .label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey-500);
}

.contact-list .value {
  font-family: var(--serif);
  font-size: clamp(1.375rem, 3.5vw, 2rem);
  line-height: 1.25;
  transition: opacity 200ms var(--ease);
}

.contact-list a:hover .value {
  opacity: 0.65;
}

@media (min-width: 760px) {
  .contact-list a {
    grid-template-columns: 10rem 1fr;
    align-items: baseline;
  }
}

/* ---------- Motion ---------- */

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
