/* =============================================================================
   BillGrid public site: a close-up of the real app on a tinted stage. One component at a time (a client's
   money, a project's work, a schedule, an invoice), captured at 3x by scripts/site-closeups.mjs and shown at
   least at the app's own size, so its words read at a glance. Always flat: no tilt, no perspective.
   Used by the home page, the features directory, the feature pages and the trade pages; method and rules in
   docs/marketing/FEATURE_SCREENSHOTS.md ("Close-ups").
   ============================================================================= */

.spotlight {
  --spot: var(--stage-gold);
  --spot-pad: clamp(20px, 5vw, 64px);
  margin: 0;
  padding: var(--spot-pad);
  overflow: hidden;
  border-radius: clamp(18px, 2.4vw, 28px);
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(255, 255, 255, .85) 0%, rgba(255, 255, 255, 0) 58%),
    radial-gradient(90% 80% at 100% 100%, color-mix(in srgb, var(--spot), var(--ink) 5%) 0%, transparent 70%),
    var(--spot);
}
.spotlight--sage { --spot: var(--stage-sage); }
.spotlight--sky { --spot: var(--stage-sky); }
.spotlight--clay { --spot: var(--stage-clay); }
.spotlight--sand { --spot: var(--stage-sand); }

/* the screen: as wide as the stage allows, never wider than --shot (its CSS size times the zoom the page wants);
   two classes, so a page's own figure and img rules never undo it */
.spotlight .spotlight__shot {
  display: block;
  width: 100%;
  max-width: var(--shot, 100%);
  height: auto;
  margin-inline: auto;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 50px 100px -48px rgba(var(--shadow-rgb), .55), 0 18px 36px -24px rgba(var(--shadow-rgb), .25), 0 0 0 1px rgba(var(--shadow-rgb), .07);
}
/* a screen that rises out of the bottom of the stage (a long list, a page that goes on); its caption moves above it */
.spotlight--rise { display: flex; flex-direction: column; padding-bottom: 0; }
.spotlight--rise .spotlight__shot, .spotlight--rise .spotlight__pair .spotlight__shot { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }

/* two screens side by side, each at its own size (a rule and the example it makes) */
.spotlight__pair { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: clamp(16px, 3vw, 40px); align-items: center; }

/* three phones in a row, the steps of one flow; on a phone they slide sideways, one and a bit in view */
.spotlight__trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2.4vw, 32px); align-items: start; max-width: 860px; margin-inline: auto; }
.spotlight__trio .spotlight__shot--phone { max-width: 100%; }
@media (max-width: 560px) {
  .spotlight__trio { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 72%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--space-2); }
  .spotlight__trio > * { scroll-snap-align: start; }
}

/* screens one above the other, sharing the stage (a client's money over its project's work) */
.spotlight__stack { display: grid; gap: clamp(14px, 2vw, 24px); }

/* a phone's page, in a quiet bezel */
.spotlight .spotlight__shot--phone { max-width: var(--shot, 360px); border: 6px solid var(--sand-900); border-radius: 30px; }
.spotlight--rise .spotlight__shot--phone { border-bottom: 0; }

.spotlight > figcaption {
  padding: 0;
  background: none;
  margin-top: clamp(16px, 2vw, 24px);
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--caption);
  text-align: center;
}
.spotlight--rise > figcaption { order: -1; margin: 0 0 clamp(16px, 2vw, 24px); }

/* Neutral product proof: complete capture, quiet frame, caption beneath. */
.spotlight--plain {
  --spot-pad: clamp(12px, 2vw, 28px);
  padding-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--bg-panel);
}
.spotlight--plain .spotlight__shot {
  object-fit: contain;
  border-radius: var(--r-md);
  box-shadow: none;
}
.spotlight--plain > figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  margin-top: 16px;
  text-align: left;
  font-size: var(--fs-xs);
}
.spotlight--plain > figcaption a { color: var(--ink); text-underline-offset: 3px; }
/* the split is for a caption and its link; a caption alone sits under the centred shot, centred */
.spotlight--plain > figcaption:not(:has(a)) { justify-content: center; text-align: center; }

@media (max-width: 720px) {
  .spotlight { --spot-pad: 16px; }
  .spotlight__pair { grid-template-columns: minmax(0, 1fr); }
}
/* a wide screen on a phone: shown larger, cropped to the part that matters (--m-w its width, --m-x its offset, both set
   on the figure), rather than shrunk until its words can't be read */
@media (max-width: 640px) {
  .spotlight--crop .spotlight__shot { width: var(--m-w, 100%); max-width: none; margin-left: var(--m-x, 0); border-radius: 10px; }
}

/* a wall of screens, each its report's head (cropped to one window's shape) and its name: every report at a glance */
.spotlight__wall { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); margin: 0; padding: 0; list-style: none; }
.spotlight__wall .spotlight__shot { aspect-ratio: 16 / 10; object-fit: cover; object-position: left top; }
.spotlight__wall p { margin: 12px 0 0; font-size: var(--fs-sm); font-weight: 600; color: inherit; text-align: center; }
@media (max-width: 720px) {
  .spotlight__wall { grid-template-columns: minmax(0, 1fr); }
}

/* The studio: the product on its own, as a product page shows it. A quiet neutral tile lit from above (no tint, no
   wash), and on it either a cut-out (the component alone, its own corners on a clear ground: a dialog, a menu, a
   panel) or a close-up (a window crop on whole components, framed), each at its own size or larger, with one soft
   shadow that follows its shape. The blog's own figure wash and height cap never reach it (outer/pages.css). Captured
   at 3x so a shot reads sharp up to 1.5x; --shot is the CSS width it shows at. */
.spotlight--studio {
  --spot: #f2f1ed;
  --spot-pad: clamp(24px, 6vw, 88px);
  border-radius: clamp(20px, 2.6vw, 32px);
  background: linear-gradient(180deg, #f8f7f4 0%, var(--spot) 62%, #efeee9 100%);
}
.spotlight--studio .spotlight__shot {
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(var(--shadow-rgb), .06), 0 2px 4px rgba(var(--shadow-rgb), .05),
    0 24px 48px -16px rgba(var(--shadow-rgb), .16), 0 64px 96px -48px rgba(var(--shadow-rgb), .22);
}
/* a cut-out carries its own shape and edge: no frame, and the shadow follows its alpha */
.spotlight--studio .spotlight__shot--cut {
  border-radius: 0;
  background: none;
  box-shadow: none;
  filter: drop-shadow(0 1px 1.5px rgba(var(--shadow-rgb), .10)) drop-shadow(0 18px 28px rgba(var(--shadow-rgb), .12))
    drop-shadow(0 46px 60px rgba(var(--shadow-rgb), .14));
}
/* the opening: the stage runs the article's width and the screen stands taller in it */
.spotlight--opening { --spot-pad: clamp(24px, 7vw, 112px); margin-top: clamp(32px, 4vw, 56px); }
.spotlight--studio > figcaption { margin-top: clamp(20px, 2.6vw, 32px); }
@media (max-width: 600px) {
  .spotlight--studio { --spot-pad: 20px; border-radius: 20px; }
  .spotlight--studio .spotlight__shot { border-radius: 10px; }
  .spotlight--studio .spotlight__shot--cut { border-radius: 0; }
}

/* the app in its window (fragments/feature-page.html :: window; a guide's opening, pages.css .guide-opening), as the home hero shows it: about 0.9x of the capture's
   1280 CSS pixels in the wrap, so the app's own words stay readable; on a phone, the app on a phone, its top */
.app-window { max-width: 1160px; margin: 0 auto; overflow: hidden; border-radius: var(--r-2xl); background: var(--bg-panel); text-align: left;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--inv-strong) 10%, transparent), 0 30px 60px -30px rgba(var(--shadow-rgb), .4), 0 70px 120px -60px rgba(var(--shadow-rgb), .35); }
.app-window__chrome { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 40px; padding-inline: 16px; border-bottom: 1px solid var(--line); background: var(--sand-50); }
.app-window__chrome::before { content: ""; justify-self: start; width: 8px; height: 8px; border-radius: 50%; background: var(--sand-300); box-shadow: 14px 0 var(--sand-300), 28px 0 var(--sand-300); }
.app-window__chrome span { min-width: 0; padding: 3px 18px; border-radius: var(--r-pill); background: var(--bg-panel); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-xs); color: var(--caption); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-window picture { display: block; aspect-ratio: 1280 / 800; background: var(--bg-app); }
.app-window picture img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
@media (max-width: 600px) {
  .app-window { max-width: 400px; border-radius: var(--r-xl); }
  .app-window__chrome { height: 34px; }
  .app-window picture { aspect-ratio: 390 / 560; }
}
