/* /features v4: the product-shot showcase. Every render is a front-on close-up of the real app,
   cropped by its panel like a photograph: no tilt, no rotation, no WebGL. Depth is light and shadow.
   Area files (run.css, anywhere.css, ...) only place the window inside each shot and style the
   parts that row adds; everything a shot looks like lives here. */

.pg-features {
  --fx-tint: var(--s-working);
  --fx-gap: clamp(40px, 5vw, 88px);
}

/* ---- page hero ---- */
.fx-hero { max-width: 1560px; margin: 0 auto; padding: clamp(72px, 9vw, 128px) var(--gutter) 0; }
.fx-hero h1 { margin: 0; font-size: clamp(48px, 7.4vw, 112px); line-height: 0.96; letter-spacing: -0.04em; font-weight: 600; }
.fx-hero > p { margin: 22px 0 0; font-size: clamp(18px, 1.6vw, 22px); color: var(--fg-2); max-width: 34ch; }
.fx-hero .shot { margin-top: clamp(48px, 6vw, 80px); }

/* ---- the site nav stays at the top, as on the home page ---- */
body:has(.pg-features) .bar { position: fixed; left: 0; right: 0; top: 0; z-index: 30; }
body:has(.pg-features) .bar::before {
  content: ''; position: absolute; inset: 0 calc(50% - 50vw) -24px; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(14, 15, 17, 0.9), rgba(14, 15, 17, 0.6) 60%, rgba(14, 15, 17, 0));
}
.pg-features { padding-top: 68px; }
.fx-area { scroll-margin-top: 84px; }

/* ---- the areas as a dot rail on the left, the same rail the home page uses ---- */
.fx-areas { position: fixed; left: 22px; top: 50%; transform: translateY(-50%); z-index: 25; }
.fx-areas ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.fx-areas a { display: flex; align-items: center; gap: 12px; height: 22px; padding-right: 8px; text-decoration: none; color: var(--fg-3); }
.fx-areas .dot {
  width: 7px; height: 7px; border-radius: 50%; background: rgba(228, 229, 232, 0.28); flex: none; margin-left: 4px;
  transition: transform 300ms var(--ease), background-color 300ms var(--ease), box-shadow 300ms var(--ease);
}
.fx-areas .lab {
  font-size: 13px; white-space: nowrap; opacity: 0; transform: translateX(-4px);
  transition: opacity 240ms var(--ease), transform 240ms var(--ease);
  background: rgba(14, 15, 17, 0.8); padding: 2px 6px; border-radius: 5px;
}
.fx-areas a:hover .lab, .fx-areas a:focus-visible .lab { opacity: 1; transform: none; color: var(--fg); }
.fx-areas a:hover .dot { background: var(--fg-2); }
.fx-areas a[aria-current='true'] .dot { background: var(--fg); transform: scale(1.45); box-shadow: 0 0 0 4px rgba(228, 229, 232, 0.08); }
.fx-areas:hover a[aria-current='true'] .lab { opacity: 1; transform: none; }
@media (max-width: 899px) {
  .fx-areas { left: 7px; }
  .fx-areas ol { gap: 2px; }
  .fx-areas a { height: 16px; gap: 8px; }
}

/* ---- area opener: words only, the rows are the pictures ---- */
.fx-area { scroll-margin-top: 54px; }
.fx-open { max-width: 1560px; margin: 0 auto; padding: clamp(112px, 12vw, 176px) var(--gutter) clamp(64px, 7vw, 104px); }
.fx-open h2 { margin: 0; font-size: clamp(38px, 4.8vw, 72px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 600; max-width: 16ch; text-wrap: balance; }
.fx-open p { margin: 22px 0 0; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.5; color: var(--fg-2); max-width: 40ch; }

/* ---- feature row: words 38, shot 62; the first row of an area puts the shot on the right ---- */
.fx-row {
  display: grid; grid-template-columns: minmax(0, 38fr) minmax(0, 62fr); gap: var(--fx-gap); align-items: center;
  max-width: 1560px; margin: 0 auto clamp(120px, 11vw, 168px); padding: 0 var(--gutter);
}
.fx-row--l { grid-template-columns: minmax(0, 62fr) minmax(0, 38fr); }
.fx-row--l .shot { order: -1; }
.fx-text { max-width: 30rem; }
.fx-row--l .fx-text { justify-self: end; }
.fx-text h3 { margin: 0 0 18px; font-size: clamp(26px, 2.4vw, 36px); line-height: 1.08; letter-spacing: -0.025em; font-weight: 600; }
.fx-text p { margin: 0 0 14px; font-size: 16.5px; line-height: 1.6; color: var(--fg-2); }
.fx-text p.lead { font-size: clamp(18px, 1.4vw, 20px); line-height: 1.5; color: var(--fg); }
.fx-text kbd, .fx-faq kbd {
  font: 500 0.82em/1 var(--font-mono); color: var(--fg); border: 1px solid var(--line-2); border-bottom-width: 2px;
  border-radius: 5px; padding: 2px 6px; background: rgba(255, 255, 255, 0.03); white-space: nowrap;
}
.fx-facts { margin: 22px 0 0; display: grid; grid-template-columns: auto 1fr; border-top: 1px solid var(--line); font-size: 14px; }
.fx-facts dt, .fx-facts dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--line); }
.fx-facts dt { padding-right: 18px; font: 500 12.5px/1.6 var(--font-mono); color: var(--fg-2); white-space: nowrap; }
.fx-facts dd { color: var(--fg-3); line-height: 1.55; }
.fx-legend { list-style: none; margin: 4px 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.fx-legend li {
  display: flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border-radius: 15px; font-size: 13.5px;
  color: var(--fg-3); border: 1px solid var(--line); transition: color 300ms var(--ease), border-color 300ms var(--ease), background-color 300ms var(--ease);
}
.fx-legend li .ic { width: 12px; height: 12px; color: var(--st); }
.fx-legend li.on { color: var(--fg); border-color: color-mix(in srgb, var(--st) 55%, transparent); background: color-mix(in srgb, var(--st) 10%, transparent); }
.fx-legend .st-working { --st: var(--s-working); } .fx-legend .st-needs { --st: var(--amber); } .fx-legend .st-idle { --st: var(--s-idle); }
.fx-legend .st-paused { --st: var(--s-paused); } .fx-legend .st-held { --st: #a99ddf; } .fx-legend .st-limit { --st: var(--s-limit); } .fx-legend .st-dead { --st: #d96d6d; }

/* ---- the shot: one panel, one light, one window, one shadow ---- */
.shot {
  position: relative; margin: 0; padding: 0; max-width: none; border-radius: 22px; overflow: hidden; isolation: isolate;
  background: #0f1012; border: 1px solid rgba(255, 255, 255, 0.06);
}
.shot--run, .shot--hero { --fx-tint: #62bd8c; }
.shot--anywhere { --fx-tint: #70a6db; }
.shot--models { --fx-tint: #8fa3bf; }
.shot--agents { --fx-tint: #62bd8c; }
.shot--quiet { --fx-tint: #8d9199; }
/* the light: one soft ellipse of the area's tint behind the focus, and the house grain */
.shot-light {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(58% 62% at var(--lx, 58%) var(--ly, 40%), color-mix(in srgb, var(--fx-tint) 8%, transparent), transparent 72%);
}
.shot-light::after {
  content: ''; position: absolute; inset: 0; opacity: 0.035; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
.shot-frame { z-index: 1; border-radius: 0; background: none; }
.shot .pui-stage { overflow: visible; }

/* the window inside a shot: native app size, placed by its area file with --x --y --w --h
   (app px inside the shot canvas), usually larger than the canvas so the panel edge crops it */
.shot-win { position: absolute; left: var(--x, 40px); top: var(--y, 40px); width: var(--w, 1000px); height: var(--h, 620px); }
.shot .pui-win {
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.11); border-top-color: rgba(255, 255, 255, 0.16);
}
.shot-grid { grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
.shot-grid > .shot-a { grid-row: span 2; }
.shot-win--three .shot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); }

/* the one lifted element a shot may have (card, palette, dialog, phone) */
.shot-lift { position: absolute; z-index: 5; }
.shot-scrim { position: absolute; inset: 0; z-index: 4; background: rgba(8, 9, 10, 0.5); }
.pui .shot-scrim[data-in] { transform: none; }

/* the engine's Pause button: quiet, in the panel's corner */
.shot .loop-btn {
  top: auto; bottom: 14px; right: 14px; height: 28px; padding: 0 11px; border-radius: 14px; font-size: 12.5px;
  color: var(--fg-2); background: rgba(14, 15, 17, 0.92); border-color: rgba(255, 255, 255, 0.08); opacity: 0.8;
  transition: opacity 200ms var(--ease);
}
/* it waits out of the shot until a pointer comes near or a key reaches it; touch screens keep it */
@media (hover: hover) { .shot .loop-btn { opacity: 0; } }
.shot:hover .loop-btn, .shot .loop-btn:focus-visible { opacity: 1; }

/* the hero: the whole window, uncropped, centred on a wide stage */
.shot-win--hero { --x: 80px; --y: 28px; --w: 1020px; --h: 450px; }
.shot-win--hero .demo-grid { gap: 10px; }
.shot--hero .shot-light { --lx: 50%; --ly: 46%; background: radial-gradient(52% 70% at 50% 46%, color-mix(in srgb, var(--fx-tint) 9%, transparent), transparent 72%); }
.shot--hero .pui-frame.sm .shot-win--hero { --x: 14px; --y: 22px; --w: 352px; --h: 560px; }
.shot--hero .pui-frame.sm .demo-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.shot--hero .pui-frame.sm .demo-b, .shot--hero .pui-frame.sm .demo-c,
.shot--hero .pui-frame.sm .pui-top .nm, .shot--hero .pui-frame.sm .pui-wk .r, .shot--hero .pui-frame.sm .pui-new { display: none; }
.shot--hero .pui-frame.sm .pui-term { white-space: pre-wrap; }

/* ---- FAQ and the close ---- */
.fx-faq { max-width: 1560px; margin: 0 auto; padding: clamp(96px, 10vw, 140px) var(--gutter) 0; }
.fx-faq h2, .fx-close h2 { margin: 0 0 32px; font-size: clamp(32px, 3.6vw, 52px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 600; }
.fx-close { max-width: 1560px; margin: 0 auto; padding: clamp(112px, 12vw, 168px) var(--gutter) clamp(112px, 12vw, 168px); }
.fx-close > p { margin: -14px 0 0; color: var(--fg-2); font-size: 18px; }

/* ---- below 1180: words above the shot; below 760: the shot's small layout at 4:5 ---- */
@media (max-width: 1179px) {
  .fx-row, .fx-row--l { grid-template-columns: minmax(0, 1fr); gap: 32px; margin-bottom: 104px; }
  .fx-row--l .shot { order: 0; }
  .fx-row--l .fx-text { justify-self: start; }
  .fx-text { max-width: 40rem; }
  .fx-row .shot { width: 100%; max-width: 760px; }
}
/* the hero's small layout takes over below 800 (its canvas would scale under 0.62 there) */
@media (max-width: 1099px) { .fx-hero .shot { max-width: 460px; margin-inline: auto; } }
@media (max-width: 759px) {
  .fx-row .shot { max-width: 420px; }
  .fx-row { margin-bottom: 88px; }
  .fx-open { padding-top: 96px; padding-bottom: 48px; }
  .shot { border-radius: 18px; }
  .fx-text p { font-size: 16px; }
  .fx-facts { grid-template-columns: 1fr; }
  .fx-facts dt { padding-bottom: 0; border-bottom: 0; }
}
