/* ===========================================================
   work.css — Live Showroom + case-study pages
   Depends on the design tokens declared in styles.css
   =========================================================== */

/* ---------- Section intro ---------- */
.showroom__lede {
  max-width: 720px; margin: -28px auto 54px; text-align: center;
  font-size: 1.06rem; line-height: 1.75; color: var(--ink-500);
}
.showroom__lede strong { color: var(--ink-900); font-weight: 700; }

/* ---------- One product ---------- */
.showcase {
  display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 52px; align-items: center;
  padding: 56px 0; border-top: 1px solid var(--ink-200);
}
.showcase:first-of-type { border-top: 0; padding-top: 8px; }
.showcase:nth-of-type(even) .showcase__info { order: 2; }

.showcase__kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans); font-weight: 700; font-size: 12px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--indigo-600); background: var(--indigo-50);
  padding: 7px 13px; border-radius: 999px; margin-bottom: 16px;
}
.showcase__title {
  font-family: var(--font-sans); font-weight: 800;
  font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -.025em;
  line-height: 1.12; margin-bottom: 6px;
}
.showcase__title .urdu { font-size: .78em; color: var(--ink-400); font-weight: 600; }
.showcase__claim {
  font-size: 1.1rem; line-height: 1.6; color: var(--ink-700);
  font-weight: 500; margin-bottom: 18px;
}
.showcase__points { list-style: none; display: grid; gap: 11px; margin-bottom: 22px; }
.showcase__points li {
  display: grid; grid-template-columns: 24px 1fr; gap: 10px;
  font-size: .96rem; line-height: 1.55; color: var(--ink-500);
}
.showcase__points b { color: var(--ink-900); font-weight: 650; }
.showcase__points span[aria-hidden] { font-size: 1.02rem; line-height: 1.45; }

/* ---------- Live badge ---------- */
.live-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-sans); font-size: 12px; font-weight: 700;
  letter-spacing: .04em; color: var(--success);
  background: rgba(5,150,105,.09); border: 1px solid rgba(5,150,105,.22);
  padding: 5px 11px; border-radius: 999px;
}
.live-badge i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--success);
  box-shadow: 0 0 0 0 rgba(5,150,105,.6); animation: pulse 2.2s infinite;
}
@keyframes pulse {
  70%  { box-shadow: 0 0 0 9px rgba(5,150,105,0); }
  100% { box-shadow: 0 0 0 0 rgba(5,150,105,0); }
}

.showcase__cta { display: flex; flex-wrap: wrap; gap: 11px; align-items: center; }
.showcase__cta .btn--ghost { color: var(--ink-900); border-color: var(--ink-200); background: #fff; }
.showcase__cta .btn--ghost:hover { background: var(--ink-50); border-color: var(--ink-400); }

/* ===========================================================
   The browser window
   =========================================================== */
.stage { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.browser {
  --fw: 1440; --fh: 900;
  width: 100%; margin-inline: auto;
  border-radius: 13px; overflow: hidden; background: #fff;
  border: 1px solid var(--ink-200); box-shadow: var(--shadow-lg);
  transition: max-width .5s var(--ease);
}
.browser.is-phone { --fw: 390; --fh: 844; max-width: 384px; border-radius: 22px; }

.browser__bar {
  display: flex; align-items: center; gap: 10px; padding: 0 12px;
  height: 38px; background: linear-gradient(#f8f9fc, #eceef5);
  border-bottom: 1px solid var(--ink-200);
}
.browser__dots { display: flex; gap: 6px; flex: none; }
.browser__dots i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.browser__dots i:nth-child(1) { background: #ff5f57; }
.browser__dots i:nth-child(2) { background: #febc2e; }
.browser__dots i:nth-child(3) { background: #28c840; }
.browser__url {
  flex: 1; min-width: 0; height: 23px; display: flex; align-items: center;
  justify-content: center; gap: 6px; padding: 0 10px;
  background: #fff; border: 1px solid var(--ink-200); border-radius: 999px;
  font-family: var(--font-body); font-size: 11.5px; color: var(--ink-500);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.browser__viewport {
  position: relative; aspect-ratio: var(--fw) / var(--fh);
  background: var(--ink-100); overflow: hidden;
}
.browser__poster {
  width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: top center;
}
.browser__frame {
  position: absolute; inset: 0; border: 0; display: block;
  transform-origin: 0 0; background: #fff;
}

/* Click-to-load veil keeps three heavy sites off the critical path */
.browser__veil {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end; gap: 10px; padding-bottom: 7%;
  background: linear-gradient(to top, rgba(11,16,32,.80) 0%, rgba(11,16,32,.30) 45%, rgba(11,16,32,.05) 100%);
  border: 0; width: 100%; cursor: pointer; text-align: center;
  transition: opacity .3s var(--ease);
}
.browser__veil:hover .browser__veilbtn { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.browser__veilbtn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-sans); font-weight: 700; font-size: 14.5px; color: #fff;
  background: var(--indigo-600); padding: 12px 22px; border-radius: 999px;
  box-shadow: var(--shadow-md); transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.browser__veilnote {
  font-family: var(--font-body); font-size: 12.5px; color: rgba(255,255,255,.82);
}
.browser.is-live .browser__veil { opacity: 0; pointer-events: none; }
.browser.is-live .browser__poster { opacity: 0; }

/* ---------- Device toggle ---------- */
.stage__controls {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
.devtoggle {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--ink-100); border: 1px solid var(--ink-200); border-radius: 9px;
}
.devtoggle button {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-sans); font-size: 12.5px; font-weight: 600; color: var(--ink-500);
  background: transparent; border: 0; border-radius: 7px; padding: 7px 13px; cursor: pointer;
  transition: background .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease);
}
.devtoggle button:hover { color: var(--ink-900); }
.devtoggle button[aria-pressed="true"] {
  background: #fff; color: var(--ink-900); box-shadow: var(--shadow-sm);
}
.stage__hint { font-family: var(--font-body); font-size: 12.5px; color: var(--ink-400); }

/* ===========================================================
   Case-study pages
   =========================================================== */
.cs-hero { background: var(--ink-900); color: #fff; padding: 118px 0 72px; position: relative; overflow: hidden; }
.cs-hero::after {
  content: ""; position: absolute; width: 620px; height: 620px; right: -190px; top: -260px;
  border-radius: 50%; background: radial-gradient(circle, rgba(99,102,241,.42), transparent 66%);
}
.cs-hero .container { position: relative; z-index: 1; }
.crumbs { font-family: var(--font-body); font-size: 13px; color: rgba(255,255,255,.55); margin-bottom: 22px; }
.crumbs a { color: rgba(255,255,255,.8); }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.cs-hero h1 {
  /* styles.css sets a dark colour on every h1 — restate it for the dark hero */
  color: #fff;
  font-family: var(--font-sans); font-weight: 800; letter-spacing: -.03em; line-height: 1.08;
  font-size: clamp(2.1rem, 5vw, 3.3rem); max-width: 18ch; margin-bottom: 18px;
}
.cs-hero__lead { font-size: 1.12rem; line-height: 1.72; color: rgba(255,255,255,.76); max-width: 62ch; }
.cs-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.cs-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px;
  margin-top: 54px; background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); overflow: hidden;
}
.cs-fact { background: var(--ink-900); padding: 20px 22px; }
.cs-fact dt {
  font-family: var(--font-sans); font-size: 11px; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--amber-soft); margin-bottom: 7px;
}
.cs-fact dd { font-size: .95rem; line-height: 1.5; color: rgba(255,255,255,.9); }

.cs-body { padding: 80px 0; }
.cs-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 60px; align-items: start; }
.cs-sticky { position: sticky; top: 92px; }
.prose { max-width: 68ch; }
.prose h2 {
  font-family: var(--font-sans); font-weight: 800; letter-spacing: -.02em;
  font-size: 1.5rem; margin: 44px 0 14px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-family: var(--font-sans); font-weight: 700; font-size: 1.1rem; margin: 28px 0 10px; }
.prose p { font-size: 1.02rem; line-height: 1.78; color: var(--ink-700); margin-bottom: 16px; }
.prose ul { list-style: none; display: grid; gap: 12px; margin: 0 0 20px; }
.prose ul li {
  display: grid; grid-template-columns: 26px 1fr; gap: 10px;
  font-size: 1rem; line-height: 1.68; color: var(--ink-700);
}
.prose ul li b { color: var(--ink-900); font-weight: 650; }
.prose blockquote {
  border-left: 3px solid var(--indigo-500); background: var(--indigo-50);
  padding: 18px 22px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 26px 0;
  font-size: 1.02rem; line-height: 1.7; color: var(--ink-800);
}

/* Next / previous project */
.cs-next { background: var(--ink-50); padding: 62px 0; border-top: 1px solid var(--ink-200); }
.cs-next__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.cs-next__card {
  display: block; background: #fff; border: 1px solid var(--ink-200);
  border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.cs-next__card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--indigo-500); }
.cs-next__card small {
  font-family: var(--font-sans); font-size: 11px; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--ink-400); display: block; margin-bottom: 8px;
}
.cs-next__card strong { font-family: var(--font-sans); font-size: 1.12rem; display: block; margin-bottom: 6px; }
.cs-next__card span { font-size: .93rem; line-height: 1.55; color: var(--ink-500); }

/* ---------- FAQ (also feeds FAQPage structured data) ---------- */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq details {
  background: #fff; border: 1px solid var(--ink-200); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 22px;
  font-family: var(--font-sans); font-weight: 650; font-size: 1.02rem; color: var(--ink-900);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-size: 1.35rem; font-weight: 400; color: var(--indigo-600);
  transition: transform .22s var(--ease); flex: none; line-height: 1;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { padding: 0 22px 20px; font-size: .99rem; line-height: 1.72; color: var(--ink-500); }

/* ===========================================================
   Responsive
   =========================================================== */
@media (max-width: 980px) {
  .showcase { grid-template-columns: 1fr; gap: 30px; padding: 44px 0; }
  .showcase:nth-of-type(even) .showcase__info { order: 0; }
  .cs-grid { grid-template-columns: 1fr; gap: 40px; }
  .cs-sticky { position: static; }
}
@media (max-width: 560px) {
  .showroom__lede { margin-top: -14px; font-size: 1rem; }
  .browser__bar { height: 33px; }
  .browser__url { font-size: 10.5px; }
  .stage__controls { justify-content: center; }
  .stage__hint { display: none; }
  .cs-hero { padding: 96px 0 56px; }
  .cs-body { padding: 56px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .browser, .devtoggle button, .cs-next__card, .browser__veilbtn { transition: none; }
  .live-badge i { animation: none; }
}

/* Pre-existing: .why__glow sits at inset:-20px on its panel and pushed the
   mobile viewport ~2px wider than the screen. Clip it at the section edge. */
#why { overflow: hidden; }

/* Comfortable touch targets. The device toggle was 31px tall, well under the
   ~44px a thumb needs, which made switching Desktop/Phone fiddly on a phone —
   the one control the showroom most wants you to press. */
.devtoggle button { min-height: 40px; }
@media (max-width: 700px) {
  .devtoggle { width: 100%; }
  .devtoggle button { min-height: 44px; flex: 1; justify-content: center; padding: 10px 14px; }
  .stage__controls { gap: 10px; }
}

/* On a phone the fixed WhatsApp / back-to-top buttons sit bottom-right, which
   is exactly where the veil's call-to-action was landing. Centre the veil
   content in the frame so the two never collide. */
@media (max-width: 700px) {
  .browser__veil { justify-content: center; padding-bottom: 0; gap: 8px; }
  .browser__veilnote { max-width: 86%; }
}

/* Stack the product buttons full width instead of leaving a short second
   button beside the status pill. */
@media (max-width: 560px) {
  .showcase__cta { gap: 9px; }
  .showcase__cta .btn { flex: 1 1 100%; }
  .showcase__cta .live-badge { margin-top: 2px; }
}
