/* ===========================================================================
   duogit.css — DuoGit — the GitHub-streak case study

   Only this page uses any of it: the process figures, the journey, the widget and screen carousels,
   the feature rows and the design-token swatches.
   It is here rather than in the page because 749 lines of CSS inside the
   markup means scrolling past the styles to reach the HTML.

   Loads last, in the slot its <style> had, so it still overrides the
   shared sheets.
   =========================================================================== */

.hero-image {
  position: relative;
  width: 100%;
  aspect-ratio: 2000/996;
  background: var(--bg-card);
  border: 1px solid var(--stroke-light);
  border-radius: 27.6px;
  overflow: hidden
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover
}

.hero-image-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 13px;
  text-align: center;
  padding: var(--s-24)}

.live-badge {
  position: absolute;
  bottom: 16px;
  right: 16px;
  padding: var(--s-8) var(--s-16);
  background: var(--accent);
  color: var(--bg);
  border-radius: var(--r);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em
}

.section:last-child {
  border-bottom: none
}

/* --- PROCESS STRIP -------------------------------------------------
   The case study used to go straight from the problem to the finished
   product. This is the middle: what the data looked like before, what
   the reframe changed, and the reference sheet the character had to be
   built against so four states would stay the same character. */
.proc { margin-top: 36px; }
.proc + .proc { margin-top: var(--s-48); }
.proc h3 {
  font-family: var(--serif);
  font-size: 1.25rem; font-weight: 700;
  margin-bottom: var(--s-8);
}
.proc > p {
  font-size: 15px; line-height: 1.75;
  color: var(--text-muted);
  max-width: none;
}
.proc-figs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: 18px;
  margin-top: 22px;
}
/* One figure on its own line, filling the column. The image keeps width:100%
   and height:auto, so it scales evenly and cannot distort — the only thing
   that changes is how far it is allowed to grow. It used to stop at 720px.
   Worth knowing: compare-github.webp is 637px wide, so above that it is being
   upscaled. Re-export it around 1920px and it stays sharp at any width. */
.proc-figs--wide { grid-template-columns: 1fr; }
/* The three character references are three exports with slightly different
   heights — 480x721, 480x681 and 480x682 — so the images ended at different
   y and the captions under them stepped down like a ragged list, which is
   what made the row read as a list instead of a set. One shared ratio with
   object-fit: contain squares the boxes up; the art sits on transparency, so
   the letterboxing is invisible and nothing is cropped or stretched. */
.proc-figs--refs .proc-fig img {
  aspect-ratio: 480 / 700;
  object-fit: contain;
}

.proc-fig { margin: 0; }
.proc-fig img {
  width: 100%; height: auto; display: block;
  border-radius: var(--r-md);
  background: var(--bg-sunk);
}
.proc-fig--plain img {
  border: 1px solid var(--stroke-light);
}

/* Four coloured .section-label variants lived here — insight, tradeoff,
   solution, persona. Only `solution` was ever used, and it set a background
   with no padding and no display of its own. paper.css makes .section-label
   a flex row, which is block-level, so that background stretched the full
   width of the container and the label read as a highlighted bar rather than
   a tag. It was also the only label on either case study wearing a colour,
   which made it look like a mistake next to ten plain ones.

   The STAR badge is the marker now. The other three were dead classes. */

.section-text+.section-text {
  margin-top: var(--s-16)}

.section-text strong {
  color: var(--text);
  font-weight: 500
}

.pws-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-16);
  margin-top: var(--s-40)}

@media(min-width:768px) {
  .pws-grid {
    grid-template-columns: 1fr 1.5fr
  }
}







/* A panel for a swatch or a type specimen: the product showing its own
   parts, so it stays dark. It used to share a class with the problem and
   the opportunity, and those are the author's voice — they moved to paper,
   and the shared name stopped describing what was left behind. */
.spec-card {
  padding: var(--s-20);
  background: var(--bg-card);
  border: 1px solid var(--stroke-light);
  border-radius: var(--rl)
}


.quote p {
  font-size: 15px;
  color: var(--text);
  line-height: 1.7
}

.quote cite {
  display: block;
  margin-top: var(--s-8);
  font-size: 12px;
  font-style: normal;
  color: var(--text-faint)
}





.persona-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-24);
  padding: var(--s-28);
  background: var(--bg-card);
  border: 1px solid rgba(139, 92, 246, .25);
  border-radius: var(--rl);
  margin-top: var(--s-32);
  align-items: start
}

.persona-avatar {
  width: 64px;
  height: 64px;
  background: rgba(139, 92, 246, .15);
  border: 1px solid rgba(139, 92, 246, .3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 1.6rem;
  color: #8b5cf6;
  flex-shrink: 0
}

.persona-name {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: var(--s-4)}

.persona-role {
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: var(--s-16);
  letter-spacing: .04em
}

.persona-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-8);
  margin-bottom: var(--s-16)}

.persona-tag {
  padding: var(--s-4) 10px;
  background: var(--stroke);
  border-radius: var(--r-pill);
  font-size: 11px;
  color: var(--text-muted)
}

.persona-quote {
  font-size: 13px;
  color: var(--text-muted);
  border-left: 2px solid rgba(139, 92, 246, .4);
  padding-left: var(--s-12)}

.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-32);
  align-items: center
}

@media(min-width:768px) {
  .two-col {
    grid-template-columns: 1fr 1fr
  }

  .two-col.reverse>*:first-child {
    order: 2
  }
}

/* Three states, so three columns — auto-fit made four tracks and left one
   empty. The sheets carry their own surface now, so the grid no longer draws
   the hairline frame the old stage cards sat in. */
.journey {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-16);
  margin-top: var(--s-32);
}
@media (max-width: 860px) { .journey { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .journey { grid-template-columns: 1fr; } }





.stage-feeling {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4)}

.feeling-tag {
  padding: 3px var(--s-8);
  background: var(--stroke);
  border-radius: var(--r-pill);
  font-size: 10px;
  color: var(--text-faint)
}

.feeling-tag.positive {
  background: var(--success-soft);
  color: var(--success)
}

.tradeoff-visual {
  background: var(--bg-card);
  border: 1px solid var(--stroke-light);
  border-radius: var(--rl);
  padding: var(--s-24)}

.tradeoff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-12);
}

.tradeoff-grid-single {
  margin-top: var(--s-12);
}

.tradeoff-visual .screen-card img {
  width: 100%;
  height: auto;
  border-radius: var(--r);
  display: block;
}

.tradeoff-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-faint);
  margin-bottom: var(--s-20);
  text-transform: uppercase;
  letter-spacing: .05em
}

.tradeoff-bars {
  display: flex;
  gap: var(--s-16);
  align-items: flex-end;
  height: 140px
}

.tradeoff-bar {
  flex: 1;
  border-radius: var(--r) var(--r) 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: var(--s-16) var(--s-12);
  font-size: 11px;
  text-align: center;
  line-height: 1.4
}

.tradeoff-bar.option-a {
  height: 100%;
  background: rgba(239, 68, 68, .15);
  border: 1px solid rgba(239, 68, 68, .3);
  border-bottom: none;
  color: var(--text-muted)
}

.tradeoff-bar.option-b {
  height: 65%;
  background: var(--success-soft);
  border: 2px solid var(--success);
  border-bottom: none;
  color: var(--success);
  font-weight: 600
}


.quote {
  padding: var(--s-24);
  background: var(--bg-card);
  border: 1px solid var(--stroke-light);
  border-radius: var(--rl)
}




.features-list {
  display: grid;
  gap: 1px;
  background: var(--stroke);
  border: 1px solid var(--stroke);
  border-radius: var(--rl);
  overflow: hidden;
  margin-top: var(--s-24)}

.feature-row {
  background: var(--bg-card);
  padding: var(--s-16) var(--s-20);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-16)}

.feature-info h4 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px
}

.feature-info p {
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.4
}

.feature-badge {
  padding: var(--s-4) 10px;
  border-radius: var(--r-pill);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0
}

.feature-badge.shipped {
  background: var(--success-soft);
  color: var(--success)
}

.feature-badge.next {
  background: rgba(251, 191, 36, .12);
  color: var(--accent-amber)
}

.solution-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--s-16);
  margin-top: var(--s-32)}

.screen-card {
  background: var(--bg-card);
  border: 1px solid var(--stroke-light);
  border-radius: var(--rl);
  padding: var(--s-16);
  transition: border-color .2s
}

.screen-card:hover {
  border-color: var(--stroke)
}

.screen-card.featured {
  border-color: var(--accent);
  position: relative
}

.screen-card.featured::before {
  content: "Key Flow";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--s-4) 10px;
  background: var(--accent);
  color: var(--bg);
  font-size: 10px;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .03em
}

.screen-placeholder {
  aspect-ratio: 4/3;
  background: var(--bg-elevated);
  border: 1px dashed var(--stroke-light);
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-faint);
  margin-bottom: var(--s-12)}

.screen-card h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: var(--s-4)}

.screen-card.featured h4 {
  color: var(--accent)
}

.screen-card p {
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.5
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-24)}

@media(min-width:768px) {
  .results-grid {
    grid-template-columns: 1fr 1fr
  }
}

.result-metric {
  margin-bottom: var(--s-28)}

.result-metric .value {
  font-size: 42px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1
}

.result-metric .label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: var(--s-4)}

.result-bar {
  height: 6px;
  background: var(--stroke);
  border-radius: 3px;
  margin-top: var(--s-8);
  overflow: hidden
}

.result-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px
}






.footer {
  padding: var(--s-48) 0;
  text-align: center;
  border-top: 1px solid var(--stroke)
}

.footer-cta .accent {
  color: var(--accent)
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--s-16);
  flex-wrap: wrap
}

.footer-btn {
  padding: var(--s-12) var(--s-24);
  border-radius: var(--r);
  font-size: 14px;
  font-weight: 500;
  transition: all .2s
}

.footer-btn.primary {
  background: var(--accent);
  color: var(--bg)
}

.footer-btn.primary:hover {
  filter: brightness(1.1)
}

.footer-btn.secondary {
  background: var(--bg-card);
  border: 1px solid var(--stroke-light);
  color: var(--text)
}

.footer-btn.secondary:hover {
  border-color: var(--text-faint)
}

.figma-plugin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-48);
  margin-top: 56px;
  align-items: start;
}

.ux-artifacts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-20);
  font-family: 'Bricolage Grotesque', sans-serif;
}

.design-tokens-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-16);
}

.component-library-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-16);
}

/* Hide scrollbar for sliders */
.design-tokens-grid::-webkit-scrollbar,
.component-library-grid::-webkit-scrollbar {
  display: none;
}

.design-tokens-grid,
.component-library-grid {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.webapp-mobile-mockup {
  padding: var(--s-20) 0;
}

.mockup-desktop { display: block; }
.mockup-mobile { display: none; }

@media(max-width:640px) {
  .mockup-desktop { display: none; }
  .mockup-mobile { display: block; }

  .hero {
    padding: var(--s-48) 0 var(--s-40)}

  .section {
    padding: var(--s-48) 0}


  .nav-links {
    display: none
  }

  .persona-card {
    grid-template-columns: 1fr
  }

  .figma-plugin-grid {
    grid-template-columns: 1fr;
    gap: var(--s-32);
  }

  .ux-artifacts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s-16);
  }

  .design-tokens-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: var(--s-12);
    padding-bottom: var(--s-12);
    margin: 0 -24px;
    padding-left: var(--s-24);
    padding-right: var(--s-24);
  }

  .design-tokens-grid > * {
    flex: 0 0 280px;
    scroll-snap-align: start;
  }

  .component-library-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: var(--s-12);
    padding-bottom: var(--s-12);
    margin: 0 -24px;
    padding-left: var(--s-24);
    padding-right: var(--s-24);
  }

  .component-library-grid > * {
    flex: 0 0 280px;
    scroll-snap-align: start;
  }

  .cat-emotions-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
}

.screens-slider { overflow:hidden; position:relative; }
.screens-slider::before,
.screens-slider::after {
  content:''; position:absolute; top:0; bottom:0; width:120px; z-index:2; pointer-events:none;
}
.screens-slider::before { left:0; background:linear-gradient(to right, var(--bg-elevated), transparent); }
.screens-slider::after  { right:0; background:linear-gradient(to left, var(--bg-elevated), transparent); }
.screens-track {
  display:flex; gap: var(--s-20);
  animation: scroll-screens 28s linear infinite;
  width:max-content;
}
.screens-track:hover { animation-play-state: paused; }
@keyframes scroll-screens {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.screen-slide { display:flex; flex-direction:column; align-items:center; gap: var(--s-12); flex-shrink:0; width:260px; }
.screen-slide img { width:100%; display:block; filter:drop-shadow(0 16px 32px rgba(0,0,0,0.6)); transition:transform .3s ease; border-radius:28px; }
.screen-slide:hover img { transform:translateY(-6px); }
.screen-slide span { font-size:10px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:rgba(255,255,255,0.62); }
.screen-slide.featured span { color:var(--accent); }
  
/* --- SHARED CARD LANGUAGE -------------------------------------
   Matches the home: panels are sunken and rounded, statements sit
   on paper, and imagery is mounted in a well instead of running to
   the card edge. Last in this page's own stylesheet on purpose —
   these have to beat the rules above without a specificity war. */
.spec-card, .persona-card, .tradeoff-visual, .feature-row, .screen-card {
  border-radius: var(--r-lg);
  border: 1px solid var(--stroke);
  box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.32);
}
.quote {
  position: relative;
  background: var(--paper);
  color: var(--paper-ink);
  border: 1px solid rgba(34, 29, 51, 0.14);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.42), inset 0 0 22px rgba(90, 78, 58, 0.12);
}
.quote::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: var(--paper-fleck), var(--paper-fiber), var(--wear-blotch);
  background-size: 200px 200px, 155px 155px, 360px 360px;
  filter: grayscale(1);
  mix-blend-mode: multiply;
  opacity: 0.2;
}
.quote h3, .quote h4, .quote strong { color: var(--paper-ink); }
.quote p, .quote li, .quote cite { color: rgba(34, 29, 51, 0.66); }
.hero-image {
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), inset 0 0 70px rgba(0, 0, 0, 0.38);
}
  .quote::before { color: rgba(34, 29, 51, 0.18); }
  

/* ---- Motion figure ------------------------------------------------------
   One motion piece lives in this case study: the widget changing state.

   A widget is glanced at, not watched, so the clip has to end on a frame
   that still reads correctly to someone who looked away mid-transition.
   That is the design point the figure exists to make, and the caption
   states it rather than leaving it to be inferred.

   autoplay + loop + muted + playsinline is the only combination a browser
   will start without a gesture. The pause control is still required: a
   clip that loops forever with no way to stop it is a trap for anyone who
   needs the page still. Under prefers-reduced-motion the video is removed
   and the poster takes its place, so the frame survives and nothing moves. */
.motion-fig {
  margin-top: var(--s-32);
  max-width: 1000px;
}
.motion-fig figure { margin: 0; }
.motion-frame {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--stroke-light);
  background: var(--bg-elevated);
}
.motion-frame video,
.motion-frame .motion-poster {
  display: block;
  width: 100%;
  height: auto;
}
.motion-frame .motion-poster { display: none; }
.motion-fig figcaption {
  margin-top: var(--s-12);
  font-size: 13px;
  line-height: 1.62;
  color: var(--text-muted);
}
.motion-pause {
  position: absolute;
  right: 10px;
  bottom: 10px;
  min-width: 70px;
  padding: 6px 11px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.motion-pause:hover { background: rgba(0, 0, 0, 0.74); }
.motion-pause:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .motion-frame video { display: none; }
  .motion-frame .motion-poster { display: block; }
  .motion-pause { display: none; }
}
