/* ========================================
   CASE STUDY STYLES
   ======================================== */

/* Hero */
.cs-hero {
  padding: calc(var(--nav-height) + var(--space-2xl)) 0 var(--space-xl);
}

.cs-hero__back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-xl);
  transition: color 0.2s ease;
}

@media (hover: hover) {
  .cs-hero__back:hover {
    color: var(--color-accent);
  }
}

.cs-hero__meta {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-sm);
}

.cs-hero__title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  max-width: 720px;
}

.cs-hero__summary {
  margin-top: var(--space-md);
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  line-height: 1.75;
  color: var(--color-text-secondary);
  max-width: 640px;
}

.cs-hero__details {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.cs-hero__label {
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary);
  margin-bottom: 0.375rem;
}

.cs-hero__details p {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
}

/* Sections */
.cs-section {
  padding: var(--space-2xl) 0;
}

.cs-section__grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-xl);
  max-width: 960px;
}

.cs-section__label h2 {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-tertiary);
  position: sticky;
  top: calc(var(--nav-height) + var(--space-md));
}

.cs-section__content p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-md);
}

.cs-section__content p:last-child {
  margin-bottom: 0;
}

.cs-section__content strong {
  color: var(--color-text);
  font-weight: 600;
}

.cs-section__content h3 {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}

.cs-section__content h3:first-child {
  margin-top: 0;
}

.cs-section__content ul,
.cs-section__content ol {
  margin-bottom: var(--space-md);
  padding-left: 1.25rem;
}

.cs-section__content li {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xs);
  list-style: disc;
}

.cs-section__content ol li {
  list-style: decimal;
}

.cs-section__content .cs-inline-link {
  color: var(--color-accent);
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.cs-section__content .cs-inline-link:hover {
  color: var(--color-accent-hover);
  border-bottom-color: currentColor;
}

.cs-section__content blockquote {
  border-left: 3px solid var(--color-accent);
  padding-left: var(--space-md);
  margin: var(--space-lg) 0;
}

.cs-section__content blockquote p {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  line-height: 1.6;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

.cs-section__content blockquote cite {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-style: normal;
  color: var(--color-text-tertiary);
}

/* Video / GIF demos */
.cs-video {
  margin: var(--space-lg) 0;
}

.cs-video__frame {
  display: block;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-text);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cs-video__frame video {
  display: block;
  width: 100%;
  height: auto;
}

.cs-video__caption {
  margin-top: var(--space-sm);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-text-tertiary);
}

/* Optional zoom/crop — focus a tight, gif-like window on part of the frame.
   Tune per clip with inline vars: --v-aspect (crop shape), --v-zoom (magnify),
   --v-focus (which point to center, e.g. "30% 60%"). */
.cs-video--zoom .cs-video__frame {
  aspect-ratio: var(--v-aspect, 16 / 9);
}

.cs-video--zoom .cs-video__frame video {
  height: 100%;
  object-fit: cover;
  object-position: var(--v-focus, 50% 50%);
  transform: scale(var(--v-zoom, 1));
  transform-origin: var(--v-focus, 50% 50%);
}

/* Images */
.cs-image {
  padding: var(--space-md) 0;
}

.cs-image--full {
  padding: var(--space-lg) 0;
}

.cs-image__placeholder {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-tertiary);
  font-size: 0.875rem;
  font-weight: 500;
}

.cs-image__placeholder--short {
  aspect-ratio: 3 / 2;
}

.cs-image__screenshot {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cs-image__row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

/* Captioned figures inside a row. Browsers give <figure> a default margin, so zero
   it out the same way .cs-pair figure does, or the grid gap stacks on top of it. */
.cs-image__row figure {
  margin: 0;
}

.cs-image__row figcaption {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-tertiary);
}

/* At-a-glance summary (skim layer — the 30-second path through a long case study) */
.cs-glance {
  padding: var(--space-lg);
  /* NOT --color-bg: that's the page background, so the card reads as fill-less.
     --color-surface (#fff) against the warm page is what makes it a card. */
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

.cs-glance .cs-glance__crux {
  font-family: var(--font-serif);
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--color-text);
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border-light);
}

.cs-glance .cs-glance__list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-md);
  display: grid;
  gap: 0.75rem;
}

/* list-style must be killed on the LI, not just the UL — `.cs-section__content li`
   sets `list-style: disc` directly, and a direct rule beats the inherited value.
   Same trap the week-clock hit further down this file. */
.cs-glance .cs-glance__list li {
  list-style: none;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-text-secondary);
  margin-bottom: 0;
  padding-left: 1.125rem;
  position: relative;
}

.cs-glance .cs-glance__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

.cs-glance .cs-glance__jump {
  margin: 0;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border-light);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-text-tertiary);
}

.cs-glance .cs-glance__jump a {
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
}

.cs-glance .cs-glance__jump a:hover {
  text-decoration: underline;
}

/* Metrics */
.cs-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  padding: var(--space-lg);
  background: var(--color-surface);
  border-radius: 16px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}

.cs-metric {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cs-metric__value {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  letter-spacing: -0.03em;
  color: var(--color-accent);
  line-height: 1.1;
}

.cs-metric__label {
  font-size: 0.875rem;
  color: var(--color-text-tertiary);
  font-weight: 500;
}

/* Next Project */
.cs-next {
  padding: var(--space-3xl) 0;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.cs-next__label {
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-sm);
}

.cs-next__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.cs-next__link:hover {
  opacity: 0.7;
}

.cs-next__title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 3rem);
  letter-spacing: -0.02em;
}

.cs-next__arrow {
  font-size: 2rem;
  color: var(--color-accent);
}

/* Dual-card footer variant (Hub Pro): "Next project" + the process piece,
   side by side. Scoped so the other case studies keep the single big link. */
.cs-next--dual .cs-next__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  max-width: 960px;
  margin: 0 auto;
  text-align: left;
}

.cs-next-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: var(--space-lg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  transition: border-color 0.2s ease;
}

.cs-next-card:hover {
  border-color: var(--color-accent);
}

.cs-next-card__eyebrow {
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-tertiary);
}

.cs-next-card__title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--color-text);
}

.cs-next-card__arrow {
  margin-top: auto;
  padding-top: var(--space-sm);
  font-size: 1.5rem;
  color: var(--color-accent);
  transition: transform 0.2s ease;
}

.cs-next-card:hover .cs-next-card__arrow {
  transform: translateX(4px);
}

/* ========================================
   PROCESS DIAGRAM (AI-design page)
   Two paths distinguished by WHERE the designer works (outside vs. inside
   the product). Flat, equal, diagram-like — no "selected/interactive" look.
   ======================================== */
.process {
  margin: var(--space-lg) 0 var(--space-md);
  padding: var(--space-lg);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: rgba(107, 143, 113, 0.06);
}

.process__caption {
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-tertiary);
  margin-bottom: var(--space-sm);
}

/* Two columns = the two pathways (Outside | Inside). Inside holds its
   Complex/Small split. Clean, readable, visually separated. */
.process__lead {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
  max-width: 62ch;
}

.process__lead strong {
  color: var(--color-text);
  font-weight: 600;
}

.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  align-items: stretch;
}

.col {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--space-md);
  background: var(--color-surface);
}

.col__head {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 0.25rem;
}

.col__sub {
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--color-text-secondary);
  padding-bottom: 0.875rem;
  margin-bottom: 0.875rem;
  border-bottom: 1px solid var(--color-border);
}

.path {
  padding: 0.75rem 0;
}

.path:first-of-type {
  padding-top: 0;
}

.path:last-child {
  padding-bottom: 0;
}

.path + .path {
  border-top: 1px solid var(--color-border-light);
}

.path__scale {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-tertiary);
  margin-bottom: 0.375rem;
}

.path__make {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--color-text);
}

.path__make .art {
  font-weight: 400;
  color: var(--color-text-tertiary);
}

.path__out {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
  margin-top: 0.5rem;
}

.path__out::before {
  content: "\2192\00a0";
  color: var(--color-accent);
  font-weight: 700;
}

.process__note {
  margin-top: var(--space-md);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-text-tertiary);
  font-style: italic;
}

/* ========================================
   WEEK CLOCK (Understanding Coaches)
   A coaching staff's game week as a schedule: game -> prep -> next game.
   ======================================== */
.weekclock {
  margin: var(--space-lg) 0;
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
}

.weekclock__lead {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-md);
}

.weekclock__lead strong {
  color: var(--color-text);
  font-weight: 600;
}

.wc-track {
  position: relative;
}

/* Override the inherited list styling from .cs-section__content ol/li
   (decimal markers + padding) so only our custom day markers show. */
.cs-section__content .wc-track {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cs-section__content .wc-item {
  list-style: none;
}

/* the running rail down the left */
.wc-track::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0.4rem;
  bottom: 0.6rem;
  width: 2px;
  background: var(--color-border);
}

.wc-item {
  position: relative;
  padding: 0 0 var(--space-md) 2rem;
}

.wc-item:last-child {
  padding-bottom: 0;
}

/* node marker */
.wc-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 2px solid var(--color-accent);
  box-shadow: 0 0 0 4px var(--color-surface);
}

/* game days are the fixed points the week pivots around */
.wc-item--game::before {
  background: var(--color-accent);
}

/* the next game reads as a target: the deadline the week drives toward */
.wc-item--deadline::before {
  box-shadow: 0 0 0 4px var(--color-surface), 0 0 0 6px var(--color-accent);
}

.wc-item__day {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-tertiary);
  margin-bottom: 0.2rem;
}

/* game-day rows get the accent to match their filled markers */
.wc-item--game .wc-item__day {
  color: var(--color-accent);
}

.wc-item__name {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text);
}

.wc-item__desc {
  display: block;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--color-text-secondary);
  margin-top: 0.2rem;
}

.weekclock__foot {
  margin: var(--space-md) 0 0;
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border-light);
  font-size: 0.875rem;
  font-style: italic;
  color: var(--color-text-tertiary);
}

/* ========================================
   BEFORE/AFTER PAIR (case studies)
   ======================================== */
.cs-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin: var(--space-md) 0;
}

.cs-pair figure {
  margin: 0;
}

.cs-pair img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cs-pair figcaption {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-tertiary);
}

/* ========================================
   GALLERY (Vector / Grad showcases)
   ======================================== */
.gallery {
  max-width: 960px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md) var(--space-3xl);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl) var(--space-lg);
}

.gallery__item {
  margin: 0;
}

.gallery__item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
  background: var(--color-surface);
}

.gallery__cap {
  margin-top: var(--space-sm);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.gallery__cap strong {
  display: block;
  color: var(--color-text);
  font-weight: 600;
}

@media (max-width: 640px) {
  .cs-pair {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 900px) {
  .cs-hero__details {
    grid-template-columns: repeat(2, 1fr);
  }

  .cs-section__grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .cs-section__label h2 {
    position: static;
  }
}

@media (max-width: 640px) {
  .cs-hero__details {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
  }

  .cs-image__row {
    grid-template-columns: 1fr;
  }

  .cs-metrics {
    grid-template-columns: 1fr;
  }

  /* Process: stack the two pathway columns */
  .cols {
    grid-template-columns: 1fr;
  }

  /* Footer: stack the dual "keep exploring" cards */
  .cs-next--dual .cs-next__cards {
    grid-template-columns: 1fr;
  }
}
