/* =========================================================
   FONTS
   ========================================================= */

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader/newsreader-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader/newsreader-italic-variable.woff2") format("woff2");
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/assets/fonts/atkinson/atkinson-next-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/assets/fonts/atkinson/atkinson-next-italic-variable.woff2") format("woff2");
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
}


/* =========================================================
   VARIABLES
   ========================================================= */

:root {
  --font-heading: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Atkinson Hyperlegible Next", Arial, sans-serif;

  --text: white;
  --muted: hsl(0 0% 88%);
  --background: hsl(211 57.6% 46.3%);
  --rule: hsl(0 0% 100% / 0.25);
  --accent: hsl(46 82.4% 59.8%);

  --content-width: 1200px;
  --text-width: none;
}


/* =========================================================
   RESET / BASE
   ========================================================= */

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

figure {
  margin: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}


/* =========================================================
   TYPOGRAPHY
   ========================================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.6em;
  font-family: var(--font-heading);
  font-optical-sizing: auto;
  font-weight: 500;
  text-wrap: balance;
}

h1 {
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.95;
 /* letter-spacing: -0.025em;*/
}

h2 {
  font-size: clamp(2.1rem, 4vw, 3.75rem);
  line-height: 1;
 letter-spacing: -0.015em;
}

h3 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: 1.1;
  font-weight: 550;
}

h4 {
  font-size: 1.25rem;
  line-height: 1.2;
  font-weight: 600;
}

h5,
h6 {
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

p {
  max-width: var(--text-width);
/*  margin: 0 0 1.25em;*/
}

p + p {
  margin-top: 0;
}

strong,
b {
  font-weight: 650;
}

em,
i {
  font-style: italic;
}

small {
  font-size: 0.82rem;
}

blockquote {
  max-width: 120ch;
  margin: 2rem 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--rule);
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-optical-sizing: auto;
  font-style: italic;
  line-height: 1.3;
}

hr {
  border: 0;
  /*border-top: 1px solid var(--rule);*/
  margin: 3rem 0;
}


/* =========================================================
   LINKS
   ========================================================= */

a {
  color: var(--accent);
  text-decoration-color: none;
  text-decoration-thickness: none;
  text-underline-offset: none;
}

a:hover {
  color: var(--accent);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}


/* =========================================================
   PAGE STRUCTURE
   ========================================================= */

.site {
  width: min(calc(100% - 1rem), var(--content-width));
  margin-inline: auto;
}

main {
  width: min(calc(100% - 1rem), var(--content-width));
  margin-inline: auto;
}

section {
  margin-block: clamp(3rem, 7vw, 7rem);
}

.content {
  max-width: var(--text-width);
}

.wide {
  width: 80%;
  max-width: var(--content-width);
}

.full-width {
  width: 80%;
}


/* =========================================================
   HEADER / NAV
   ========================================================= */
.site-header {
  width: min(80%, var(--content-width));
  margin-inline: auto;
  padding-block: 1rem;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
}
.site-nav a {
  text-decoration: none;
}
.site-nav a:hover {
  color: var(--accent);
}
.site-title {
  flex: 0 0 auto;
  font-family: var(--font-heading);
  font-optical-sizing: auto;
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1;
}
.site-links {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 1.25rem;
}
.site-header {
  width: min(calc(100%), var(--content-width));
  margin-inline: auto;
  padding-block: 1rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent);
}

.site-title {
  font-family: var(--font-heading);
  font-optical-sizing: auto;
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1;
}


/* =========================================================
   HOMEPAGE INTRODUCTION
   ========================================================= */

.introduction {
  margin-block: clamp(1rem, 10vw, 2rem);
}

.introduction h1 {
  /*max-width: 12ch;*/
}

.introduction-text {
 /* max-width: 48ch;*/
  margin-bottom: 0;
  font-family: var(--font-heading);
  font-optical-sizing: auto;
  font-size: clamp(1.4rem, 2vw, 1.6rem);
  font-weight: 400;
  line-height: 1.3;
}

.introduction-text-smaller {
    font-family: var(--font-heading);
  font-optical-sizing: auto;

  font-size: clamp(1rem, 1vw, 1.3rem);
}

/* =========================================================
   HOMEPAGE PROJECT CARDS
   ========================================================= */

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 2.5rem);

/*  width: 80%; */
  margin-inline: auto;
}

.project-card {
  display: flex;
  flex-direction: column;
  aspect-ratio: 1 / 1;

  border: 3px solid var(--text);
  color: var(--text);
  text-decoration: none;

  overflow: hidden;
}

.project-card:hover {
  color: var(--text);
  border-color: var(--accent);
}

.project-card-image {
  flex: 0 0 50%;
  overflow: hidden;
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card-content {
  flex: 1;
  padding: clamp(1rem, 2vw, 1.5rem);

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.project-card-content h2 {
  margin-bottom: 0.4rem;
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
}

.project-card-content p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
}


/* =========================================================
   PROJECT TITLES / INTRODUCTIONS
   ========================================================= */

.project-title {
  max-width: none;
  margin-bottom: 0.3em;
}

.project-deck,
.lede {
  max-width: none;
  margin-bottom: 2rem;
  font-family: var(--font-heading);
  font-optical-sizing: auto;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 400;
  line-height: 1.3;
}


/* =========================================================
   PROJECT METADATA
   ========================================================= */

.project-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem 2rem;
  margin: 2rem 0 3rem;
  padding-block: 1.5rem;
  border-top: 0px solid var(--rule);
  border-bottom: 0px solid var(--rule);
  font-family: var(--font-body);
}

.project-meta dt,
.meta-label {
  margin-bottom: 0.3rem;
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.project-meta dd,
.meta-value {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.35;
}


/* =========================================================
   IMAGES / FIGURES / CAPTIONS
   ========================================================= */

figure {
  margin-block: 2.5rem;
}

figcaption,
.caption {
  max-width: 70ch;
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.image-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}


/* =========================================================
   LABELS / EYEBROWS
   ========================================================= */

.eyebrow,
.label,
.kicker {
  margin-bottom: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}


/* =========================================================
   LISTS
   ========================================================= */

ul,
ol {
  max-width: var(--text-width);
  margin: 0 0 1.5rem;
  padding-left: 1.4rem;
}

li {
  margin-bottom: 0.35rem;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.button,
button {
  display: inline-block;
  padding: 0.7rem 1rem;
  border: 1px solid var(--text);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
button:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  width: min(calc(100% - 3rem), var(--content-width));
  margin: 6rem auto 0;
  padding-block: 2rem;
 /* border-top: 1px solid var(--rule);*/
  color: var(--muted);
  font-size: 0.8rem;
}


/* =========================================================
   TEXT SELECTION
   ========================================================= */

::selection {
  background: var(--accent);
  color: #fff;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 700px) {
  html {
    font-size: 17px;
  }

  .site,
  main,
  .site-header,
  .site-footer {
    width: min(calc(100% - 2rem), var(--content-width));
  }

  h1 {
    font-size: clamp(2.7rem, 14vw, 4.5rem);
  }

  h2 {
    font-size: clamp(2rem, 9vw, 3rem);
  }

  .site-nav {
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
  }

  .image-grid,
  .image-grid.three {
    grid-template-columns: 1fr;
  }

  .project-meta {
    grid-template-columns: 1fr;
  }

  section {
    margin-block: 3.5rem;
  }

  /* Homepage cards stack on mobile */
  .project-grid {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project-card {
    aspect-ratio: 1 / 1;
  }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

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