/* ==========================================================================
   Oscar Studio — Work page + case studies
   Loaded after site.css. Only page-specific layout lives here; colours,
   type and components all come from the tokens in site.css.
   ========================================================================== */

/* ---------- Page wrapper ----------
   On these pages .hero wraps the header AND <main>, so the landmarks stay
   correct (header → main → footer). The dotted texture is limited to the
   top of the page and fades out, so lower dark sections stay plain. */
.hero--page { background-image: none; }
.hero--page::before {
  content: ""; position: absolute; inset: 0 0 auto; height: min(1000px, 100%); pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 4px 4px;
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
}
.hero--page > main { position: relative; } /* paint content above the glows */

.page-intro {
  display: flex; flex-direction: column; gap: 24px;
  padding-block: clamp(40px, 7vw, 104px) clamp(40px, 5vw, 64px);
}
.page-intro .lede { max-width: 600px; }

/* ---------- Work list page ---------- */
.work-section { padding-top: 0; }
.work-tools { margin-bottom: clamp(24px, 3vw, 36px); }
.work-note { margin-top: clamp(32px, 4vw, 48px); font-size: 18px; color: var(--soft); }

/* ---------- Case study: facts row ---------- */
.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
  gap: 20px 24px; margin: 16px 0 0; padding-top: 24px; border-top: 1px solid var(--line);
}
.facts dt { font-size: 14px; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-size: 17px; font-weight: 500; overflow-wrap: anywhere; }

/* ---------- Case study: sections ---------- */
.cs-flush { padding-top: 0; }
.cs-caption { margin-top: 16px; font-size: 15px; color: var(--muted); }
.on-light .cs-caption { color: var(--muted-on-light); }

.cs-split {
  display: grid; gap: 32px 64px; align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
}
.cs-prose { display: flex; flex-direction: column; gap: 20px; font-size: clamp(17px, 1.4vw, 20px); max-width: 640px; }

/* What I changed: numbered rows */
.cs-changes { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.cs-change {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 32px; align-items: baseline;
  padding-block: clamp(24px, 3vw, 36px); border-bottom: 1px solid var(--line);
}
.cs-change__num { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cs-change__title { font-size: clamp(24px, 2.6vw, 36px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.cs-change p { color: var(--soft); max-width: 520px; }
@media (max-width: 820px) {
  .cs-change { grid-template-columns: 36px minmax(0, 1fr); }
  .cs-change p { grid-column: 2; }
}

/* Big screenshots */
.cs-shots { display: flex; flex-direction: column; gap: clamp(48px, 7vw, 96px); }

/* Phone views: three across, swipeable row on small screens */
.cs-phones {
  list-style: none; padding: 0; margin-inline: auto; max-width: 980px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 4vw, 56px);
}
.cs-phones figcaption { margin-top: 14px; font-size: 15px; text-align: center; }
@media (max-width: 700px) {
  .cs-phones {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1); padding: 4px var(--gutter) 16px;
    scroll-padding-inline: var(--gutter);
  }
  .cs-phones > li { flex: 0 0 64%; scroll-snap-align: start; }
}

/* Results */
.cs-stats {
  list-style: none; padding: 0; display: grid; gap: 40px 48px;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
}
.cs-stat { display: flex; flex-direction: column; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.cs-stat__num { font-size: clamp(64px, 8vw, 120px); font-weight: 700; letter-spacing: -0.05em; line-height: 0.9; color: var(--ember); }
.cs-stat__label { font-size: 17px; color: var(--soft); max-width: 340px; }

/* Next project link */
.cs-next { display: flex; flex-direction: column; gap: 16px; }
.cs-next__link { display: flex; align-items: center; justify-content: space-between; gap: 24px; text-decoration: none; }
.cs-next__link:hover { color: var(--paper); }
.cs-next__arrow {
  flex-shrink: 0; width: clamp(56px, 7vw, 88px); aspect-ratio: 1; border-radius: 50%;
  border: 1px solid rgba(242, 239, 233, 0.25); display: grid; place-items: center;
  transition: transform 0.35s var(--ease-out), background-color 0.25s, color 0.25s, border-color 0.25s;
}
.cs-next__arrow svg { width: 40%; height: 40%; }
.cs-next__link:hover .cs-next__arrow,
.cs-next__link:focus-visible .cs-next__arrow { background: var(--ember); color: var(--ink); border-color: var(--ember); transform: rotate(-45deg); }
