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

/* root */
:root {
  /* Colors */
  --bg: #f3f4f6;
  --text: #22252b;
  --muted: #6b7280;
  --border: #dcdfe4;

  /* Layout */
  --page-padding: 24px;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 2rem;
  --space-xl: 4rem;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Instrument Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;

  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

h1,
h2,
h3 {
  line-height: 1.1;
}

.italic {
  font-style: italic;
}

.tagline {
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 52ch;
}

ul {
  padding-left: 1.25rem;
  margin-bottom: var(--space-m);
  max-width: 65ch;
}

li {
  margin-bottom: var(--space-xs);
  color: var(--muted);
}

.inline-link,
.inline-link:visited {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted var(--muted);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.inline-link:hover {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* ── Hero ── */

.hero {
  padding-top: 5rem;
  padding-bottom: 2rem;
}

.hero h1 {
  font-family: "Hahmlet", serif;
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
}

.tagline {
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 52ch;
}

/* ── Nav ── */
nav {
  display: flex;
  justify-content: space-between;
  align-items: top;
  padding: 1.25rem var(--page-padding);
}

.logo {
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}
nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
}
nav a:hover,
nav a.active {
  color: var(--text);
}

/* ── Sections ── */
section {
  padding: var(--space-l) var(--page-padding);
}

/* ── Case studies ── */

.case-studies {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-l);
}

.case-card {
  display: block;
  text-decoration: none;
  color: var(--text);
}

.case-thumb {
  border: 1px solid var(--border);
  background: #f5f6f8;
  margin-bottom: var(--space-s);
  overflow: hidden;
}

.case-thumb span {
  color: var(--muted);
  font-size: 0.9rem;
}
.case-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

.case-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-s);
  margin-bottom: var(--space-xs);
}

.case-card h2 {
  font-family: "Hahmlet", serif;
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
}

.case-card p {
  color: var(--muted);
  max-width: 60ch;
}

.meta {
  font-size: 1rem;
  color: var(--muted);
  white-space: nowrap;
}

/* ── Case study page ── */

.case-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-xl);
  padding: var(--space-xl) var(--page-padding);
}

.case-nav {
  position: sticky;
  top: var(--space-l);
  align-self: start;

  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.case-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.case-nav a:hover {
  color: var(--text);
}

.case-content {
  max-width: 900px;
}

.case-section {
  padding: var(--space-xl) 0;
  scroll-margin-top: 2rem;
}

.case-section:first-child {
  padding: 0;
}

.case-section h1 {
  font-family: "Hahmlet", serif;
  font-size: clamp(2.5rem, 4vw, 2.75rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-top: var(--space-m);
  margin-bottom: var(--space-s);
}

.case-section h2 {
  font-family: "Hahmlet", serif;
  font-size: clamp(1.75rem, 3vw, 2rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-m);
}

.case-section h3 {
  margin-top: var(--space-l);
  margin-bottom: var(--space-xs);
}

.case-section p {
  color: var(--muted);
  max-width: 65ch;
  margin-bottom: var(--space-m);
}

.eyebrow {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: var(--space-s);
  letter-spacing: 0.04em;
}

.serif-accent {
  font-family: "Hahmlet", serif;
  font-size: 1.4rem;
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: -0.03em;
  color: var(--text);
}

/* ── Case overview ── */

.case-overview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-l);

  padding: var(--space-s) 0;
  margin-bottom: 2rem;
}

.overview-item {
  display: flex;
  flex-direction: column;
}

.overview-item p {
  color: var(--muted);
}

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

/* ── Impact overview ── */

.impact-overview {
  padding: 0;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-s);

  margin-top: var(--space-m);
}

.impact-card {
  background: rgba(255, 255, 255, 0.75);

  border-radius: 12px;

  padding: var(--space-l);
}

.impact-card h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-s);
}

.impact-card p {
  color: var(--muted);
}

/* ── About / Contact prose ── */

.prose {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 55ch;
}
.prose p {
  color: var(--muted);
}
.prose a {
  color: var(--text);
}

.about-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-xl);
  align-items: start;
}

.about-image img {
  width: 100%;
  height: auto;
  display: block;
}

.contact-layout {
  max-width: 720px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  margin-top: var(--space-m);
}

.contact-links a {
  font-family: "Hahmlet", serif;
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dotted var(--muted);
  width: fit-content;
}

.contact-links a:hover {
  border-bottom-color: var(--text);
}

/* ── Footer ── */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-m);

  padding: var(--space-m) var(--page-padding);

  font-size: 0.85rem;
  color: var(--muted);

  border-top: 1px solid var(--border);
}

.footer-links {
  display: flex;
  gap: var(--space-m);
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
}

/* ── Mobile ── */
@media (max-width: 767px) {
  :root {
    --page-padding: 20px;
  }

  nav {
    align-items: flex-start;
    gap: var(--space-s);
  }

  nav ul {
    gap: var(--space-s);
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  nav a {
    font-size: 0.9rem;
  }

  .hero {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .hero h1 {
    font-size: 2.75rem;
  }

  .case-card {
    padding: var(--space-l) 0;
  }

  .case-studies {
    grid-template-columns: 1fr;
  }

  .case-header {
    flex-direction: column;
    gap: 0.25rem;
  }

  .case-overview {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-s);
    padding-bottom: 4rem;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-links {
    flex-wrap: wrap;
  }

  .case-layout {
    display: block;
  }

  .case-nav {
    display: none;
  }

  .case-section {
    padding-bottom: 4rem;
  }

  .case-section h1 {
    font-size: 2.75rem;
  }

  .case-section h2 {
    font-size: 1.75rem;
  }

  .impact-grid {
    grid-template-columns: 1fr;
  }

  .about-layout {
    grid-template-columns: 1fr;
  }
}
