/* [FORCA] Command Grid — public features showcase.
   Self-contained stylesheet (no Tailwind dependency) so it renders regardless of the
   compiled app.css build. Palette + fonts mirror the app's design tokens exactly.
   Everything is namespaced under .sg- to avoid colliding with the app shell. */

.sg-root {
  --sg-space: #0a0e16;
  --sg-panel: #10151f;
  --sg-panel2: #161d29;
  --sg-line: #222d3e;
  --sg-gold: #f4a52b;
  --sg-cyan: #46cfe0;
  --sg-kill: #3fb950;
  --sg-loss: #f0533f;
  --sg-ink: #e8eef6;
  --sg-muted: #8a98ab;
  --sg-faint: #5a6678;
  --sg-display: "Chakra Petch", ui-sans-serif, system-ui, sans-serif;
  --sg-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --sg-mono: "JetBrains Mono", ui-monospace, monospace;
  /* Break out of base.html's max-w-6xl content column into a wider stage. */
  width: 100%;
  color: var(--sg-ink);
  font-family: var(--sg-body);
}

/* --- shared bits ---------------------------------------------------------- */
.sg-callsign {
  font-family: var(--sg-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--sg-muted); /* AA contrast on the dark ground (faint was too low for 11px) */
}
.sg-callsign .sg-idx { color: var(--sg-gold); }

/* --- hero ----------------------------------------------------------------- */
.sg-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--sg-line);
  border-radius: 18px;
  background:
    radial-gradient(120% 140% at 85% -10%, rgba(70, 207, 224, 0.10), transparent 45%),
    radial-gradient(90% 120% at 0% 110%, rgba(244, 165, 43, 0.10), transparent 50%),
    var(--sg-panel);
  padding: clamp(2.25rem, 5vw, 4.5rem) clamp(1.25rem, 4vw, 3.5rem);
}
/* Faint HUD grid backdrop — the "command grid" made literal. */
.sg-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--sg-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--sg-line) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.14;
  mask-image: radial-gradient(120% 100% at 50% 0%, #000 30%, transparent 78%);
  pointer-events: none;
}
.sg-hero > * { position: relative; }
.sg-hero-eyebrow {
  font-family: var(--sg-mono);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--sg-gold);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.sg-hero-eyebrow::before {
  content: "";
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--sg-kill);
  box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.18);
  animation: sg-pulse 2.4s ease-in-out infinite;
}
.sg-hero-title {
  font-family: var(--sg-display);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.01em;
  font-size: clamp(2.1rem, 5.4vw, 3.9rem);
  margin: 1rem 0 0;
  max-width: 20ch;
}
.sg-hero-title em { color: var(--sg-gold); font-style: normal; }
.sg-hero-lede {
  margin-top: 1.25rem;
  max-width: 60ch;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.6;
  color: var(--sg-muted);
}
.sg-hero-cta { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.sg-stats {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem 2.75rem;
  border-top: 1px solid var(--sg-line);
  padding-top: 1.5rem;
}
.sg-stat-n {
  font-family: var(--sg-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  color: var(--sg-ink);
  line-height: 1;
}
.sg-stat-n span { color: var(--sg-gold); }
.sg-stat-l {
  margin-top: 0.35rem;
  font-family: var(--sg-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sg-muted);
}

/* --- buttons -------------------------------------------------------------- */
.sg-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--sg-display); font-weight: 600; font-size: 0.95rem;
  padding: 0.7rem 1.3rem; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.sg-btn-gold { background: var(--sg-gold); color: #14100a; box-shadow: 0 6px 22px -10px rgba(244, 165, 43, 0.7); }
.sg-btn-gold:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -10px rgba(244, 165, 43, 0.85); }
.sg-btn-ghost { border-color: var(--sg-line); color: var(--sg-muted); background: rgba(22, 29, 41, 0.4); }
.sg-btn-ghost:hover { color: var(--sg-ink); border-color: rgba(244, 165, 43, 0.45); }
.sg-btn:focus-visible,
.sg-chip:focus-visible,
.sg-lightbox-close:focus-visible { outline: 2px solid var(--sg-cyan); outline-offset: 2px; }

/* --- filter rail ---------------------------------------------------------- */
.sg-filter {
  position: sticky; top: 0; z-index: 20;
  margin: 2.5rem 0 0;
  padding: 0.75rem 0;
  /* Wrap so every category chip stays visible — nowrap+scroll clipped the last chip
     on desktop with no scroll affordance. */
  display: flex; gap: 0.5rem; flex-wrap: wrap;
  background: linear-gradient(var(--sg-space) 62%, transparent);
}
.sg-chip {
  flex: 0 0 auto;
  font-family: var(--sg-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.45rem 0.9rem; border-radius: 999px;
  border: 1px solid var(--sg-line); background: var(--sg-panel);
  color: var(--sg-muted); cursor: pointer; white-space: nowrap;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.sg-chip:hover { color: var(--sg-ink); border-color: rgba(70, 207, 224, 0.4); }
.sg-chip[aria-pressed="true"] { color: var(--sg-space); background: var(--sg-gold); border-color: var(--sg-gold); font-weight: 600; }
.sg-chip .sg-chip-n { opacity: 0.8; margin-left: 0.35rem; }

/* --- feature rows --------------------------------------------------------- */
.sg-feed { margin-top: 1.5rem; display: flex; flex-direction: column; gap: clamp(2.5rem, 5vw, 4.5rem); }
.sg-feature {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(1.5rem, 3.5vw, 3rem);
  align-items: center;
}
.sg-feature.sg-flip .sg-shot { order: 2; }
.sg-feature.sg-flip .sg-copy { order: 1; }

/* Screenshot in a HUD targeting frame (the signature element). */
.sg-shot { position: relative; }
.sg-frame {
  position: relative; display: block; width: 100%;
  /* Fixed window onto each screenshot's top — screenshots are full-page (often very
     tall), so show a consistent widescreen crop here and the full image in the lightbox.
     A reserved aspect-ratio box also eliminates layout shift as images lazy-load. */
  aspect-ratio: 16 / 10;
  border: 1px solid var(--sg-line); border-radius: 12px; overflow: hidden;
  background: var(--sg-panel2); cursor: zoom-in;
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.9);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.sg-frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.sg-frame:hover { transform: translateY(-3px); border-color: rgba(244, 165, 43, 0.5); }
.sg-frame:focus-visible { outline: 2px solid var(--sg-cyan); outline-offset: 3px; }
/* four reticle corner brackets */
.sg-shot .sg-corner {
  position: absolute; width: 18px; height: 18px; border: 2px solid var(--sg-gold);
  opacity: 0.85; pointer-events: none; transition: opacity 0.25s ease;
}
.sg-shot .sg-corner.tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: 12px; }
.sg-shot .sg-corner.tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; border-top-right-radius: 12px; }
.sg-shot .sg-corner.bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; border-bottom-left-radius: 12px; }
.sg-shot .sg-corner.br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: 12px; }
.sg-shot:hover .sg-corner { opacity: 1; }
.sg-zoomhint {
  position: absolute; right: 0.6rem; bottom: 0.6rem; z-index: 2;
  font-family: var(--sg-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--sg-ink); background: rgba(10, 14, 22, 0.72); border: 1px solid var(--sg-line);
  padding: 0.25rem 0.5rem; border-radius: 6px; pointer-events: none;
  opacity: 0; transition: opacity 0.2s ease;
}
.sg-frame:hover .sg-zoomhint { opacity: 1; }

/* Selling card */
.sg-copy { min-width: 0; }
.sg-copy .sg-callsign { display: block; margin-bottom: 0.75rem; }
.sg-copy-title {
  font-family: var(--sg-display); font-weight: 700;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.15; color: var(--sg-ink);
}
.sg-copy-lede { margin-top: 0.7rem; color: var(--sg-muted); font-size: 1.02rem; line-height: 1.6; }
.sg-benefits { margin-top: 1.1rem; display: flex; flex-direction: column; gap: 0.55rem; }
.sg-benefit { display: flex; gap: 0.65rem; align-items: flex-start; font-size: 0.95rem; color: var(--sg-ink); }
.sg-benefit svg { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; color: var(--sg-cyan); }
.sg-thumbs { margin-top: 1.1rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sg-thumb {
  width: 66px; height: 44px; border-radius: 6px; overflow: hidden; border: 1px solid var(--sg-line);
  cursor: zoom-in; background: var(--sg-panel2); padding: 0; transition: border-color 0.15s ease;
}
.sg-thumb:hover { border-color: rgba(244, 165, 43, 0.55); }
.sg-thumb:focus-visible { outline: 2px solid var(--sg-cyan); outline-offset: 2px; }
.sg-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }

/* --- CTA band ------------------------------------------------------------- */
.sg-cta {
  margin-top: clamp(3rem, 6vw, 5rem);
  border: 1px solid var(--sg-line); border-radius: 18px;
  background:
    radial-gradient(100% 160% at 50% -30%, rgba(244, 165, 43, 0.12), transparent 55%),
    var(--sg-panel);
  padding: clamp(2rem, 4vw, 3.25rem); text-align: center;
}
.sg-cta h2 {
  font-family: var(--sg-display); font-weight: 700; color: var(--sg-ink);
  font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.15; margin: 0.5rem 0 0;
}
.sg-cta p { margin: 0.75rem auto 0; max-width: 52ch; color: var(--sg-muted); }
.sg-cta .sg-hero-cta { justify-content: center; margin-top: 1.75rem; }

/* --- lightbox ------------------------------------------------------------- */
.sg-lightbox {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: flex-start; justify-content: center;
  overflow: auto;  /* tall full-page screenshots scroll vertically here */
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(6, 9, 14, 0.9); backdrop-filter: blur(4px);
}
.sg-lightbox img {
  max-width: min(1100px, 92vw); width: 100%; height: auto; border-radius: 10px;
  border: 1px solid var(--sg-line); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9);
}
.sg-lightbox-cap {
  position: fixed; left: 50%; bottom: max(1rem, 3vh); transform: translateX(-50%);
  font-family: var(--sg-mono); font-size: 12px; letter-spacing: 0.08em; color: var(--sg-muted);
  background: rgba(10, 14, 22, 0.8); border: 1px solid var(--sg-line);
  padding: 0.4rem 0.85rem; border-radius: 8px; text-align: center; max-width: 90vw;
}
.sg-lightbox-close {
  position: fixed; top: 1rem; right: 1rem;
  width: 40px; height: 40px; border-radius: 10px; cursor: pointer;
  background: rgba(22, 29, 41, 0.8); border: 1px solid var(--sg-line); color: var(--sg-ink);
  display: grid; place-items: center;
}
.sg-lightbox-close:hover { border-color: rgba(240, 83, 63, 0.6); color: var(--sg-loss); }

/* --- motion --------------------------------------------------------------- */
.sg-root [x-cloak] { display: none !important; }
/* Progressive enhancement: only hide-for-reveal when JS armed it (js-sg on <html>).
   Without JS the content is visible by default — never a blank gallery. */
.js-sg .sg-reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.sg-reveal.is-visible { opacity: 1; transform: none; }
@keyframes sg-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

@media (prefers-reduced-motion: reduce) {
  .js-sg .sg-reveal { opacity: 1; transform: none; transition: none; }
  .sg-frame, .sg-btn { transition: none; }
  .sg-hero-eyebrow::before { animation: none; }
}

/* --- the command deck (private / no-screenshot features) ------------------ */
.sg-classified { margin-top: clamp(3rem, 6vw, 5rem); }
.sg-classified-head { max-width: 60ch; margin-bottom: 1.75rem; }
.sg-classified-head h2 {
  font-family: var(--sg-display); font-weight: 700; color: var(--sg-ink);
  font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.15; margin: 0.75rem 0 0;
}
.sg-classified-head p { margin-top: 0.7rem; color: var(--sg-muted); line-height: 1.6; }
.sg-classified-grid {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.sg-cf-card {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--sg-line); border-radius: 12px; background: var(--sg-panel);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.sg-cf-card:hover { transform: translateY(-3px); border-color: rgba(244, 165, 43, 0.5); }

/* "Restricted view" panel standing in for a withheld screenshot */
.sg-cf-viewport {
  position: relative; aspect-ratio: 16 / 8; overflow: hidden;
  background:
    repeating-linear-gradient(45deg, rgba(90, 102, 120, 0.10) 0 2px, transparent 2px 9px),
    linear-gradient(var(--sg-line) 1px, transparent 1px) 0 0 / 26px 26px,
    linear-gradient(90deg, var(--sg-line) 1px, transparent 1px) 0 0 / 26px 26px,
    var(--sg-panel2);
  border-bottom: 1px solid var(--sg-line);
}
.sg-cf-viewport .sg-corner {
  position: absolute; width: 16px; height: 16px; border: 2px solid var(--sg-gold);
  opacity: 0.8; pointer-events: none;
}
.sg-cf-viewport .sg-corner.tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.sg-cf-viewport .sg-corner.tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.sg-cf-viewport .sg-corner.bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.sg-cf-viewport .sg-corner.br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
/* scan sweep */
.sg-cf-viewport::after {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; top: -10%;
  background: linear-gradient(90deg, transparent, rgba(70, 207, 224, 0.55), transparent);
  animation: sg-scan 3.6s linear infinite;
}
.sg-cf-lock {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0.4rem;
  color: var(--sg-faint);
}
.sg-cf-lock svg { width: 26px; height: 26px; color: var(--sg-gold); opacity: 0.85; }
.sg-cf-lock span {
  font-family: var(--sg-mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
}
.sg-cf-body { padding: 1.1rem 1.15rem 1.25rem; display: flex; flex-direction: column; }
.sg-cf-top { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.sg-cf-icon { width: 24px; height: 24px; color: var(--sg-gold); }
.sg-cf-tag {
  font-family: var(--sg-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--sg-cyan); border: 1px solid rgba(70, 207, 224, 0.35); border-radius: 999px;
  padding: 0.2rem 0.55rem; white-space: nowrap;
}
.sg-cf-title {
  font-family: var(--sg-display); font-weight: 700; color: var(--sg-ink);
  font-size: 1.2rem; line-height: 1.2; margin: 0.85rem 0 0;
}
.sg-cf-lede { margin-top: 0.5rem; color: var(--sg-muted); font-size: 0.92rem; line-height: 1.55; }
.sg-cf-benefits { margin-top: 0.85rem; display: flex; flex-direction: column; gap: 0.45rem; }
.sg-cf-benefits li {
  position: relative; padding-left: 1.1rem; font-size: 0.9rem; color: var(--sg-ink); line-height: 1.45;
}
.sg-cf-benefits li::before {
  content: "▸"; position: absolute; left: 0; top: 0; color: var(--sg-gold); font-size: 0.8rem;
}
@keyframes sg-scan { 0% { top: -10%; } 100% { top: 110%; } }
@media (prefers-reduced-motion: reduce) { .sg-cf-viewport::after { animation: none; opacity: 0.3; top: 50%; } }

/* --- responsive ----------------------------------------------------------- */
/* Below lg the app shows a 56px sticky mobile top bar; drop the filter rail below it
   so it doesn't stick underneath the header. */
@media (max-width: 1023px) { .sg-filter { top: 56px; } }
@media (max-width: 860px) {
  .sg-feature { grid-template-columns: 1fr; gap: 1.25rem; }
  .sg-feature.sg-flip .sg-shot { order: 0; }
  .sg-feature.sg-flip .sg-copy { order: 0; }
}
