/* =================================================================
   SKVK PANDEY — work.css
   Page-specific styles for /work, the contractor-facing page.
   Loaded after styles.css and reuses its tokens. Nothing here
   changes the main site.
   ================================================================= */

/* Loud, unmissable markers for anything still unfilled. If one of
   these ever reaches production it should be obvious in a screenshot,
   which is the point. */
.metric-todo {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-style: italic;
  color: #f0b94a;
  background: rgba(240, 185, 74, 0.09);
  border: 1px dashed rgba(240, 185, 74, 0.5);
  border-radius: 8px;
  padding: 0.35rem 0.7rem;
  line-height: 1.5;
}

/* ---------- Hero ---------- */
.hero--work { padding-bottom: clamp(3rem, 7vw, 5rem); }
.hero--work__title { max-width: 16ch; }
.work-page .hero__sub { max-width: 56ch; }
.hero__note {
  margin-top: 1.6rem;
  font-size: var(--fs-sm);
  color: var(--muted-2);
  max-width: 58ch;
}

.section__lead {
  margin-top: 1rem;
  color: var(--muted);
  font-size: var(--fs-lg);
  max-width: 62ch;
}

/* ---------- Terms ---------- */
.termgrid {
  display: grid;
  gap: 1px;
  grid-template-columns: 1fr;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.term { background: var(--bg-2); padding: 1.6rem 1.5rem; }
.term dt {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.term dd { margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.term dd strong { color: var(--text); }
.terms__foot {
  margin-top: 1.5rem;
  color: var(--muted-2);
  font-size: var(--fs-sm);
  max-width: 68ch;
}

/* ---------- Case studies ---------- */
.case {
  display: grid;
  gap: 1.8rem;
  grid-template-columns: 1fr;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 1.4rem;
}
.case:last-child { margin-bottom: 0; }

.frame {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: var(--bg-3);
}
.frame__bar {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--line);
}
.frame__bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.frame img { width: 100%; height: auto; display: block; }
.frame__empty {
  aspect-ratio: 2 / 1;
  display: grid;
  place-content: center;
  gap: 0.4rem;
  text-align: center;
  color: var(--muted-2);
  font-family: var(--font-head);
  font-weight: 600;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.015) 0 12px, rgba(255,255,255,0.04) 12px 24px),
    var(--bg-3);
}
.frame__empty small { font-weight: 500; font-size: var(--fs-xs); color: #f0b94a; }

.case__tag {
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.case__body h3 { font-size: var(--fs-xl); margin-bottom: 0.9rem; }
.case__block { color: var(--muted); font-size: var(--fs-sm); margin-bottom: 0.85rem; }
.case__block strong { color: var(--text); }
.case__result { margin-bottom: 0; }

/* ---------- Capabilities ---------- */
.caps {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1px;
  grid-template-columns: 1fr;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.caps li { background: var(--bg-2); padding: 1.5rem 1.4rem; }
.caps h3 { font-size: var(--fs-base); margin-bottom: 0.35rem; }
.caps p { color: var(--muted-2); font-size: var(--fs-sm); }

/* ---------- Book ---------- */
.book__inner { text-align: center; max-width: 720px; margin-inline: auto; }
.book__inner .kicker { justify-content: center; }
.book__lead { margin: 1.1rem auto 2rem; color: var(--muted); max-width: 56ch; }
.book__note { margin-top: 1.2rem; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 3rem 0 2.5rem; background: var(--bg-2); }
.footer__inner { display: grid; gap: 2rem; grid-template-columns: 1fr; }
.footer__word { font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; margin-bottom: 0.5rem; }
.footer__meta { color: var(--muted-2); font-size: var(--fs-sm); }
.footer__nav { display: flex; flex-wrap: wrap; gap: 0.9rem 1.6rem; align-items: flex-start; }
.footer__nav a { color: var(--muted); font-size: var(--fs-sm); }
.footer__nav a:hover { color: var(--accent); }

/* ---------- Wider screens ---------- */
@media (min-width: 700px) {
  .termgrid { grid-template-columns: repeat(2, 1fr); }
  .caps { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 940px) {
  .case { grid-template-columns: 1.05fr 1fr; gap: 2.4rem; align-items: start; }
  .caps { grid-template-columns: repeat(4, 1fr); }
  .termgrid { grid-template-columns: repeat(3, 1fr); }
  .footer__inner { grid-template-columns: 1.2fr 1fr; }
}

/* Live client links. Personal site only: anzato.com carries the same two
   case studies but deliberately without outbound links to the clients. */
.case__link {
  margin: -0.5rem 0 0.9rem;
  font-size: var(--fs-sm);
}
.case__link a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  padding-bottom: 1px;
}
.case__link a:hover { border-bottom-color: currentColor; }

/* Case study stat strip. Every figure here is read off Search Console or
   GA4 for the client property, never estimated. */
.case__stats {
  list-style: none;
  padding: 0;
  margin: 1.1rem 0 1rem;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(2, 1fr);
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.case__stats li { background: var(--bg-3); padding: 0.85rem 0.9rem; }
.case__stats b {
  display: block;
  font-family: var(--font-head);
  font-size: var(--fs-lg);
  line-height: 1.15;
  color: var(--text);
}
.case__stats span {
  display: block;
  margin-top: 0.25rem;
  font-size: var(--fs-xs);
  color: var(--muted-2);
}
.case__note { color: var(--muted-2); }

@media (min-width: 1100px) {
  .case__stats { grid-template-columns: repeat(4, 1fr); }
}

/* Media column: stack the site shot and the evidence chart, pinned to the
   top so a tall body column does not leave a void beside a short one. */
.case__media { display: grid; gap: 1.1rem; align-content: start; }

.case__chart {
  margin: 0;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
}
.case__chart img { width: 100%; height: auto; display: block; }
.case__chart figcaption {
  padding: 0.75rem 0.9rem;
  background: var(--bg-3);
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: var(--fs-xs);
  line-height: 1.55;
}

/* ---------- Before / after compare (ESO) ----------
   z-index is set explicitly on BOTH layers on purpose. clip-path makes
   .compare__before a stacking context; without a z-index of its own the
   after layer escapes and paints over the clipped one, which looks like
   "both sides show the same image". */
.compare {
  --pos: 50%;
  position: relative;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  background: var(--bg-3);
  touch-action: pan-y;
}
.compare img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.compare__after  { z-index: 1; }
.compare__before { z-index: 2; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }

.compare__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: var(--accent);
  z-index: 3;
  pointer-events: none;
}
.compare__tag {
  position: absolute;
  bottom: 0.55rem;
  z-index: 3;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}
.compare__tag--before { left: 0.55rem; }
.compare__tag--after  { right: 0.55rem; }

.compare__range {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}
.compare__range:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; opacity: 1; }

.compare__hint {
  margin-top: 0.7rem;
  color: var(--muted-2);
  font-size: var(--fs-xs);
}

/* Stack chips under a case title. An explicit skill claim placed at the
   point of proof, so the technology is attached to evidence rather than
   floating in a generic skills grid. */
.case__stack {
  list-style: none;
  padding: 0;
  margin: 0 0 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.case__stack li {
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  color: var(--text);
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
}
