:root {
  --text-dark: #2b2b2b;
  --text-grey: #a3a3a3;
  --gutter: 24px;
  --page-pad: 48px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #ffffff;
  font-family: "Inter", Futura, "Futura PT", "Century Gothic", "URW Gothic", sans-serif;
  color: var(--text-dark);
}

/* Header */
.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 40px var(--page-pad) 32px;
  max-width: 1400px;
  margin: 0 auto;
}

.site-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

.site-title-link {
  color: inherit;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 28px;
}

.nav-link {
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-grey);
}

.nav-link.active {
  color: var(--text-dark);
}

/* Grid */
.grid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--page-pad) 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gutter);
}

.tile {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  text-decoration: none;
  background: #f0f0f0;
}

.tile-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22%;
  min-height: 74px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 0 24px;
  background: rgba(20, 12, 12, 0.88);
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.tile:hover .tile-overlay,
.tile:focus-visible .tile-overlay {
  opacity: 1;
  transform: translateY(0);
}

.overlay-title {
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
}

.overlay-dates {
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
}

/* Responsive */
@media (max-width: 760px) {
  :root { --page-pad: 20px; --gutter: 14px; }
  .site-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .grid { grid-template-columns: 1fr; }
}

/* Profile page */
.profile {
  max-width: 1400px;
  margin: 0 auto;
  padding: 8px var(--page-pad) 100px;
}

.profile-heading {
  font-size: 44px;
  font-weight: 700;
  margin: 0 0 48px;
}

.profile-section {
  max-width: 620px;
  margin-bottom: 56px;
}

.section-heading {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 20px;
}

.entry {
  margin-bottom: 28px;
}

.entry:last-child {
  margin-bottom: 0;
}

.entry-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
}

.profile-section p,
.entry p {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  margin: 0;
  color: var(--text-dark);
}

.text-link {
  color: #2563eb;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

/* Case study page */
.case-study {
  max-width: 1400px;
  margin: 0 auto;
  padding: 8px var(--page-pad) 100px;
}

.cs-title {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 32px;
  max-width: 720px;
}

.cs-hero {
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16 / 10;
  background: #f0f0f0;
  border-radius: 4px;
  margin-bottom: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-grey);
  font-size: 14px;
  overflow: hidden;
}

.cs-hero img, .cs-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cs-video {
  width: 100%;
  margin-bottom: 56px;
  border-radius: 4px;
  overflow: hidden;
}

.cs-section {
  margin-bottom: 48px;
}

.cs-section h2,
.cs-section h3,
.cs-section p,
.cs-section ul,
.persona h3,
.persona p {
  max-width: 620px;
}

.cs-section h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 16px;
}

.cs-section h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 24px 0 4px;
}

.cs-section p {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  margin: 0 0 12px;
}

.cs-section ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.cs-section li {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 6px;
}

.cs-figure {
  max-width: 720px;
  background: #f0f0f0;
  border-radius: 4px;
  margin: 24px 0;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-grey);
  font-size: 14px;
  overflow: hidden;
}

.cs-figure.wide {
  max-width: 900px;
}

.cs-figure.narrow {
  max-width: 620px;
}

.cs-figure.full {
  max-width: none;
  width: 100%;
}

.cs-caption {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-dark);
  margin: -12px 0 24px;
  max-width: 620px;
}

/* When a caption is followed directly by another image within the same
   section (rather than a divider), add 50% more space above that image. */
.cs-caption + .cs-figure {
  margin-top: 48px;
}

/* Body copy (not a caption) followed directly by an image or video:
   space it out to 48px, matching the caption-to-image spacing above. */
.cs-section p:not(.cs-caption) + .cs-figure,
.cs-section p:not(.cs-caption) + .cs-video {
  margin-top: 48px;
}

/* A caption directly following a video sits closer to it (24px) than a
   caption following an image, since the video already carries its own
   56px bottom margin. */
.cs-video + .cs-caption {
  margin-top: -32px;
}

.persona {
  margin-bottom: 40px;
}

.persona-photo {
  width: 100%;
  max-width: 620px;
  margin-bottom: 16px;
}

.persona-photo img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.cs-divider {
  border: none;
  border-top: 1px solid #eaeaea;
  width: 100%;
  margin: 8px 0 48px;
}

.cs-footer {
  text-align: center;
  max-width: 900px;
  margin: 64px auto 0;
  padding-top: 32px;
  border-top: 1px solid #eaeaea;
}

.cs-footer p {
  font-size: 14px;
  color: var(--text-grey);
  margin: 4px 0;
}

/* Site menu — footer nav listing every case study, with the current page
   emphasized and the rest faded, echoing the original site's footer. */
.site-menu {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.site-menu a,
.site-menu-current {
  display: block;
  font-size: 15px;
  line-height: 2;
  text-decoration: none;
}

.site-menu a {
  color: #e2e2e2;
  transition: color 0.2s ease;
}

.site-menu a:hover {
  color: var(--text-grey);
}

.site-menu-current {
  color: var(--text-dark);
  font-weight: 700;
}

/* Data tables — used to present research / usability testing results */
.cs-table-group {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin: 20px 0 8px;
}

.cs-table-wrap {
  flex: 1 1 260px;
  max-width: 320px;
}

.cs-table-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-grey);
  margin: 0 0 10px;
}

.cs-table {
  width: 100%;
  border-collapse: collapse;
}

.cs-table th,
.cs-table td {
  text-align: left;
  font-size: 15px;
  font-weight: 300;
  padding: 8px 6px;
  border-bottom: 1px solid #eaeaea;
}

.cs-table th {
  font-weight: 600;
  color: var(--text-dark);
}

.cs-table td:first-child,
.cs-table th:first-child {
  color: var(--text-grey);
  font-weight: 400;
  padding-left: 0;
}

/* Meta grid — used for methodology overview (setup / materials / participants) */
.cs-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 20px 0 32px;
}

.cs-meta-grid h4 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-grey);
  margin: 0 0 8px;
}

.cs-meta-grid ul {
  margin: 0;
  padding-left: 18px;
}

.cs-meta-grid li {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.5;
  margin-bottom: 4px;
}

/* Two-column comparison — used for hypotheses (current vs new experience) */
.cs-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 900px;
  margin: 20px 0 32px;
}

.cs-compare h4 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px;
}

.cs-compare ul {
  margin: 0;
  padding-left: 18px;
}

.cs-compare li {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 10px;
}

/* Small uppercase tag — flags a section still needing content/imagery */
.cs-tbd {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #b0793f;
  background: #fbf1e6;
  border-radius: 3px;
  padding: 3px 8px;
  margin: 0 0 12px;
}

/* Clickable preview figure — shown at copy-width, expands via lightbox.
   Used for dense reference material (research boards, JTBD maps) that
   people should be able to inspect closely without it dominating the page. */
.cs-figure-preview {
  position: relative;
  max-width: 620px;
  cursor: zoom-in;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #eaeaea;
  display: block;
  margin: 24px 0;
}

.cs-figure-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.cs-figure-preview::after {
  content: "Click to view full size";
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(23, 23, 25, 0.85);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 3px;
  letter-spacing: 0.01em;
}

.cs-lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 16, 0.92);
  z-index: 1000;
  padding: 48px;
  overflow: auto;
  cursor: zoom-out;
}

.cs-lightbox-overlay.active {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.cs-lightbox-overlay img {
  max-width: 100%;
  width: 100%;
  height: auto;
  border-radius: 4px;
  cursor: zoom-out;
}

.cs-lightbox-close {
  position: fixed;
  top: 20px;
  right: 28px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 3px;
  padding: 8px 14px;
  cursor: pointer;
  z-index: 1001;
}

@media (max-width: 700px) {
  .cs-meta-grid,
  .cs-compare {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Facts block — Company / Team / Role, sits under the case study title
   ============================================ */
.cs-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin: 0;
  padding-bottom: 24px;
  max-width: 900px;
}

.cs-facts-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cs-facts-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-grey);
}

.cs-facts-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dark);
}

/* ============================================
   Sticky section nav
   ============================================ */
html {
  scroll-behavior: smooth;
}

.cs-section[id] {
  scroll-margin-top: 110px;
}

.cs-section-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  gap: 24px;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-top: 1px solid #eaeaea;
  border-bottom: 1px solid #eaeaea;
  padding: 22px 0 14px;
  margin: 0 0 40px;
}

.cs-section-nav a {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-grey);
  text-decoration: none;
  white-space: nowrap;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.cs-section-nav a:hover {
  color: var(--text-dark);
}

.cs-section-nav a.active {
  color: var(--text-dark);
  border-bottom-color: var(--text-dark);
}

/* ============================================
   Scroll-reveal
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Site style — Option B: Space Grotesk headings + indigo accent
   ============================================ */
.site-title,
.cs-title,
.cs-section h2,
.cs-section h3,
.persona h3,
.overlay-title,
.profile-heading,
.section-heading,
.entry-title {
  font-family: "Space Grotesk", sans-serif;
}

.cs-title {
  font-weight: 700;
  font-size: 38px;
  letter-spacing: -0.01em;
  display: inline-block;
  background: linear-gradient(90deg, #4640DE, #7C77F0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cs-facts-label {
  color: #4640DE;
}

.cs-section-nav a.active {
  color: #4640DE;
  border-bottom-color: #4640DE;
}

.text-link {
  color: #4640DE;
}

.profile-photo {
  display: block;
  width: 100%;
  max-width: 620px;
  height: auto;
  border-radius: 4px;
  margin-bottom: 40px;
}
