:root {
  --bg: #f8f8f8;
  --ink: #0c141f;
  --heading: #1f2937;
  --muted: #4b5563;
  --link: #374151;
  --mark: #374151;
  --card-title: #111827;
  --max-width: 1240px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--ink);
  font-family: 'Barlow', sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* Navbar */

.navbar {
  padding: 32px 20px 0;
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mark {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--mark);
  text-transform: uppercase;
}

.button-group {
  display: flex;
  gap: 12px;
}

.navbutton {
  padding: 6px 16px 8px;
  font-size: 15px;
  color: var(--link);
  transition: opacity 0.15s ease;
}

.navbutton:hover {
  opacity: 0.7;
}

/* Hero */

.hero {
  position: relative;
  padding: 90px 20px 60px;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 90vw);
  aspect-ratio: 1080 / 790;
  background-image: url('images/hero-blob.png');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: top center;
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.hero-eyebrow {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 48px;
  font-weight: 400;
  color: var(--heading);
  margin: 0 0 16px;
}

.hero-title {
  font-family: 'Barlow', sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 32px;
  color: var(--ink);
  margin: 0;
}

/* Gallery */

.gallery {
  max-width: var(--max-width);
  margin: 60px auto 140px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.gallery-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.project-card {
  flex: 1 1 340px;
  max-width: 400px;
}

.card-image {
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 400 / 280;
  background-color: #e5e7eb;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover .card-image img {
  transform: scale(1.03);
}

.project-description {
  padding-top: 16px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--card-title);
  margin: 0 0 6px;
}

.card-description {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* Fade-in on scroll */

.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */

.footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 20px;
}

.footer-inner {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 15px;
  color: var(--ink);
}

/* Responsive */

@media (max-width: 768px) {
  .hero-eyebrow {
    font-size: 36px;
  }

  .hero-title {
    font-size: 17px;
    line-height: 26px;
  }

  .navbar {
    padding-top: 20px;
  }

  .gallery {
    margin: 40px auto 80px;
  }
}

@media (max-width: 480px) {
  .mark {
    font-size: 26px;
  }

  .navbutton {
    padding: 6px 10px 8px;
    font-size: 13px;
  }
}

/* Project pages */

.back-nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 20px 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--muted);
  transition: opacity 0.15s ease;
}

.back-link:hover {
  opacity: 0.7;
}

.back-link img {
  width: 16px;
  height: 16px;
}

.project-hero-img {
  width: 100%;
  max-width: 940px;
  display: block;
  margin: 0 auto;
}

.project-wrap {
  max-width: 940px;
  margin: 32px auto 40px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 19px;
}

.project-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
}

.project-header img {
  width: 48px;
  flex-shrink: 0;
}

.project-h1 {
  font-family: 'Barlow', sans-serif;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--heading);
  margin: 0;
}

.field {
  margin-bottom: 32px;
  max-width: 760px;
}

.field-label {
  font-family: 'Barlow', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 8px;
}

.field-text {
  font-size: 15px;
  color: var(--muted);
  line-height: 24px;
  margin: 0;
}

.field-list {
  padding-left: 18px;
  margin: 0;
  color: var(--muted);
}

.field-list li {
  font-size: 15px;
  line-height: 24px;
  color: var(--muted);
}

.project-image-block {
  max-width: 940px;
  margin: 0 auto;
}

.project-image-block img {
  width: 100%;
  border-radius: 12px;
}

.before-label {
  margin: 96px 0 0;
}

.before-label .field-label {
  margin-bottom: 0;
}

/* Global nav case study */

.case-section {
  max-width: 940px;
  margin: 0 auto 80px;
  padding: 0 20px;
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.case-section.alt {
  padding-top: 32px;
  margin-bottom: 72px;
}

.case-text {
  display: flex;
  flex-direction: column;
  gap: 32px;
  flex: 1 1 340px;
}

.case-image {
  flex: 1 1 420px;
}

.case-image img {
  width: 100%;
  border-radius: 12px;
}

.split-row {
  display: flex;
  gap: 20px;
  max-width: 940px;
  margin: 0 auto 80px;
  padding: 0 20px;
}

.split-row .case-image {
  flex: 1;
}

/* Design system page */

.ds-hero-img {
  width: 100%;
  max-width: 940px;
  display: block;
  margin: 0 auto;
}

.ds-cta {
  max-width: 940px;
  margin: 20px auto 0;
  padding: 0 20px;
}

.button-small {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 6px;
  background-color: var(--heading);
  color: #fff;
  font-size: 14px;
}

.button-small:hover {
  opacity: 0.85;
}

.ds-images {
  max-width: 940px;
  margin: 40px auto 100px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.ds-images img {
  width: 100%;
  border-radius: 12px;
}

/* Branding page */

.brand-hero {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 20px;
}

.brand-hero img {
  width: 100%;
  border-radius: 12px;
}

.brand-overview {
  max-width: 940px;
  margin: 0 auto 80px;
  padding: 40px 20px 0;
}

.brand-title {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 36px;
  font-weight: 500;
  color: var(--mark);
  margin: 0 0 32px;
}

.brand-body {
  display: flex;
  gap: 80px;
  flex-wrap: wrap;
}

.brand-description {
  flex: 2 1 420px;
  font-size: 15px;
  color: var(--muted);
  line-height: 24px;
  max-width: 560px;
}

.brand-role {
  flex: 1 1 260px;
  max-width: 420px;
}

.brand-impact {
  flex: 1 1 300px;
  max-width: 560px;
}

.brand-label {
  font-family: 'Barlow Semi Condensed', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--mark);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.brand-role-text {
  font-size: 13px;
  color: var(--mark);
}

.brand-images {
  max-width: 940px;
  margin: 0 auto 100px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.brand-images img {
  width: 100%;
}

/* Visual gallery page */

.visual-gallery {
  max-width: 940px;
  margin: 24px auto 64px;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.visual-gallery img {
  width: 100%;
  border-radius: 4px;
}

.gallery-pair {
  display: flex;
  gap: 16px;
}

.gallery-pair img {
  flex: 1;
  min-width: 0;
}

@media (max-width: 768px) {
  .case-section,
  .split-row {
    flex-direction: column;
  }

  .brand-body {
    gap: 32px;
  }

  .gallery-pair {
    flex-direction: column;
  }

  .project-header img {
    width: 36px;
  }

  .project-h1 {
    font-size: 20px;
  }
}
