/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f7f7f5;
  --text: #1a1a1a;
  --muted: #595959;
  --accent: rgb(180, 83, 9);
  --divider: rgba(0, 0, 0, 0.08);
  --font: "Helvetica Neue", Helvetica, Arial, ui-sans-serif, system-ui, sans-serif;
  --content-max: 640px;
  --page-padding-x: 32px;
  --page-padding-y: 80px;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  padding: 8px 16px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  border-radius: 4px;
  z-index: 1000;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 8px;
}

/* ===== FOCUS STYLES ===== */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ===== NAV ===== */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--page-padding-x);
  max-width: 1200px;
  margin: 0 auto;
}

.nav-brand {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 1.65px;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-number {
  font-size: 11px;
  color: var(--muted);
  margin-right: 4px;
}

/* ===== MAIN CONTENT ===== */
main {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--page-padding-y) var(--page-padding-x);
}

/* ===== SECTION LABELS ===== */
.section-number {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-label,
h2.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
  margin-top: 0;
}

/* ===== DIVIDER ===== */
.divider {
  border: none;
  border-top: 1px solid var(--divider);
  margin: 48px 0;
}

/* ===== FOOTER ===== */
footer {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 40px var(--page-padding-x) 60px;
  border-top: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

footer p {
  font-size: 13px;
  color: var(--muted);
}

.footer-icons {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-icons a {
  color: var(--muted);
  transition: color 0.2s;
  display: inline-flex;
}

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

/* ===== HOMEPAGE: HERO ===== */
.hero h1 {
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 24px;
}

.hero-description {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 520px;
}

.hero-links {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 0;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s;
}

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

/* ===== HOMEPAGE: SECTION LABEL OVERRIDE ===== */
.case-studies ~ .section-label,
main > .section-label {
  margin-bottom: 32px;
}

/* ===== HOMEPAGE: CASE STUDY CARDS ===== */
.case-studies { display: flex; flex-direction: column; gap: 64px; }

.case-study-card {
  display: block;
  transition: opacity 0.2s;
}
.case-study-card:hover { opacity: 0.85; }

.case-study-card .card-image {
  width: calc(100% + 200px);
  margin-left: -100px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 24px;
  background: rgba(0,0,0,0.03);
  aspect-ratio: 16 / 9;
}

.case-study-card .card-image img,
.case-study-card .card-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-number {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

.card-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}

.card-tags {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}

.card-description {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 520px;
}

/* ===== CASE STUDY PAGES: BACK LINK ===== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 48px;
  transition: color 0.2s;
}
.back-link:hover { color: var(--accent); }

/* ===== CASE STUDY PAGES: HEADER ===== */
.cs-header { margin-bottom: 48px; }
.cs-header h1 { font-size: 28px; font-weight: 400; line-height: 1.2; margin-bottom: 8px; }
.cs-header .cs-tags { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.cs-header .cs-summary { font-size: 16px; color: var(--muted); line-height: 1.6; max-width: 520px; }

/* ===== CASE STUDY PAGES: HERO IMAGE ===== */
.cs-hero-image {
  width: calc(100% + 200px);
  margin-left: -100px;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 48px;
  background: rgba(0,0,0,0.03);
  aspect-ratio: 16/9;
}
.cs-hero-image img,
.cs-hero-image video { width: 100%; height: 100%; object-fit: cover; }

/* ===== CASE STUDY PAGES: BODY ===== */
.cs-body h2 { font-size: 18px; font-weight: 500; margin-bottom: 16px; margin-top: 48px; }
.cs-body h2:first-child { margin-top: 0; }
.cs-body p { font-size: 16px; line-height: 1.7; color: var(--muted); margin-bottom: 20px; }
.cs-body ul, .cs-body ol { padding-left: 20px; margin-bottom: 20px; }
.cs-body li { font-size: 16px; line-height: 1.7; color: var(--muted); margin-bottom: 12px; }
.cs-body li strong { color: var(--text); font-weight: 500; }

/* ===== CASE STUDY PAGES: INLINE IMAGES ===== */
.cs-image {
  width: calc(100% + 200px);
  margin: 32px 0 32px -100px;
  border-radius: 4px;
  overflow: hidden;
  background: rgba(0,0,0,0.03);
}
.cs-image img { width: 100%; display: block; }
.cs-image-caption { font-size: 13px; color: var(--muted); text-align: center; padding: 12px 16px; }

/* ===== CASE STUDY PAGES: METRICS (Team Scaling) ===== */
.cs-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 32px 0; }
.metric { text-align: center; }
.metric-value { font-size: 32px; font-weight: 400; color: var(--text); line-height: 1.2; margin-bottom: 4px; }
.metric-label { font-size: 13px; color: var(--muted); letter-spacing: 0.5px; }

/* ===== CASE STUDY PAGES: NEXT LINK ===== */
.cs-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  color: var(--text);
  transition: opacity 0.2s;
}
.cs-next:hover { opacity: 0.7; }
.cs-next-label { font-size: 11px; font-weight: 500; letter-spacing: 2.2px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.cs-next-title { font-size: 18px; font-weight: 500; }
.cs-next-arrow { font-size: 24px; color: var(--muted); }

/* ===== ABOUT PAGE ===== */
.about-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}

.about-photo {
  border-radius: 4px;
  overflow: hidden;
  background: rgba(0,0,0,0.03);
  aspect-ratio: 1 / 1;
}

.about-content h1 {
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 24px;
}

.about-body p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 20px;
}

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

.about-links {
  display: flex;
  gap: 16px;
  align-items: center;
}

.about-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  :root { --page-padding-y: 48px; }
  .nav-links { gap: 20px; }
  .hero h1 { font-size: 24px; }
  .cs-header h1 { font-size: 24px; }
  .case-study-card .card-image,
  .cs-hero-image,
  .cs-image { width: 100%; margin-left: 0; }
  .cs-metrics { grid-template-columns: 1fr; gap: 20px; }
  .about-layout { grid-template-columns: 1fr; gap: 32px; }
  .about-photo { max-width: 200px; }
}

@media (max-width: 480px) {
  nav { flex-wrap: wrap; gap: 12px; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 10px; }
}
