@import url("../../_ds/fonts.css");
@import url("../../_ds/theme.css");
@import url("../../_shared/chrome.css");
@import url("../../_shared/components.css");
@import url("../../_shared/audience-switcher.css");

/* ──────────────────────────────────────────────────────────
   /agents/plugins — Interactive client picker.

   Sub-page under /agents.  WIP: Act 1 styled, Acts 2 + 3
   hidden until we land them one at a time.
─────────────────────────────────────────────────────────── */


main {
  position: relative;
  z-index: 1;
}

.back-to-top {
  cursor: pointer;
}

/* Cursor suppression for the interactives.  The .pill chip
   comes from _shared/components.css; we override its default
   cursor: pointer here so the custom-cursor portal is the only
   pointer on hover (per the cursor-portal rule). */
.ag-plugins-rail .pill,
.ag-plugins-cmd,
.ag-plugins-cmd *,
.ag-plugins-end-cmd,
.ag-plugins-end-cmd * {
  cursor: pointer;
}

/* ──────────────────────────────────────────────────────────
   Act 1 — Hero.

   Left-anchored editorial intro, consistent with /agents/skills
   so the two sub-pages share an opening cadence.
─────────────────────────────────────────────────────────── */

[data-act="1"] {
  position: relative;
  min-height: 70vh;
  background: var(--background);
  padding: clamp(120px, 16vh, 180px) clamp(20px, 5vw, 80px) clamp(48px, 7vh, 80px);
  display: flex;
  align-items: center;
}

.ag-plugins-hero {
  width: 100%;
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}


.ag-plugins-h1 {
  margin: 0;
  font-family: var(--font-display, "Rawest", system-ui, sans-serif);
  font-size: var(--mkt-hero-xl);
  line-height: 1.02;
  letter-spacing: var(--tracking-dense, -0.032em);
  font-weight: 500;
  color: var(--text-primary);
  text-wrap: balance;
  max-width: 16ch;
  opacity: 0;
  transform: translateY(10px);
}

.ag-plugins-sub {
  margin: clamp(20px, 2.6vh, 32px) 0 0;
  font-family: var(--font-base);
  font-size: var(--mkt-body);
  line-height: 1.5;
  color: var(--text-secondary);
  text-wrap: balance;
  max-width: 580px;
  opacity: 0;
  transform: translateY(8px);
}

/* ──────────────────────────────────────────────────────────
   Act 2 — The picker.

   Chip rail of 8 hosts at the top.  Active chip drives a
   2-col detail below: install command on the left (clickable,
   copies to clipboard), bundle list ("what gets installed")
   on the right.  Reads as a small configurator.
─────────────────────────────────────────────────────────── */

[data-act="2"] {
  position: relative;
  background: var(--background);
  padding: clamp(48px, 7vh, 80px) clamp(20px, 5vw, 80px) clamp(72px, 10vh, 120px);
}

.ag-plugins-stage {
  width: 100%;
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(36px, 5vh, 64px);
}

/* Chip rail — 8 host buttons in a wrapping flexbox.  The chip
   itself is the shared .pill component (see
   _shared/components.css); this page only owns the rail
   container, the page-specific status colours (auto / manual /
   portable), and the entry-reveal animation hook. */
.ag-plugins-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  opacity: 0;
  transform: translateY(10px);
}

/* Page-specific status colors driven by data-status on the
   shared .pill-status sub-element. */
.ag-plugins-rail .pill-status[data-status="auto"]     { color: var(--zen-cyan-6, #7ADAE6); }
.ag-plugins-rail .pill-status[data-status="manual"]   { color: var(--text-tertiary); }
.ag-plugins-rail .pill-status[data-status="portable"] { color: var(--text-tertiary); }

/* Detail — 2-col grid below the chip rail.  Install command
   on the left (the deliverable), bundle list on the right
   (what the install does). */
.ag-plugins-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
  opacity: 0;
  transform: translateY(12px);
}

/* Install command (clickable button, copies to clipboard). */
.ag-plugins-cmd {
  appearance: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(20px, 2.6vh, 28px) clamp(20px, 2.4vw, 30px);
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-display, 20px);
  color: var(--text-primary);
  font-family: inherit;
  text-align: left;
  outline: none;
  transition:
    background 200ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 200ms cubic-bezier(0.22, 1, 0.36, 1);
  width: 100%;
}

.ag-plugins-cmd:hover,
.ag-plugins-cmd:focus-visible {
  background: var(--sunken-hover);
  border-color: var(--zen-purple-7, #7C4FE8);
}

.ag-plugins-cmd.is-copied {
  border-color: var(--zen-cyan-6, #7ADAE6);
}

.ag-plugins-cmd-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-code, monospace);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-tertiary);
}

.ag-plugins-cmd-prompt {
  color: var(--zen-purple-7, #7C4FE8);
}

.ag-plugins-cmd-code {
  display: block;
  color: var(--text-primary);
  font-family: var(--font-code, monospace);
  font-size: var(--mkt-body);
  font-weight: 500;
  letter-spacing: -0.005em;
  word-break: break-word;
  line-height: 1.4;
}

.ag-plugins-cmd-hint {
  color: var(--text-tertiary);
  font-family: var(--font-code, monospace);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  transition: color 220ms ease;
}

.ag-plugins-cmd.is-copied .ag-plugins-cmd-hint {
  color: var(--zen-cyan-6, #7ADAE6);
}

/* Bundle list — "what gets installed".  Clean definition-list
   format: each row is a 2-column grid (label / path) on a
   single baseline; rows separated by hairlines so the list
   reads as one cohesive panel, not 4 disassembled units. */
.ag-plugins-bundle {
  display: flex;
  flex-direction: column;
  padding: clamp(8px, 1vh, 12px) 0;
}

.ag-plugins-bundle-label {
  margin: 0 0 clamp(12px, 1.6vh, 18px);
  font-family: var(--font-code, "IBM Plex Mono", monospace);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-tertiary);
}

.ag-plugins-bundle-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border-subtle);
}

.ag-plugins-bundle-list li {
  display: grid;
  grid-template-columns: minmax(110px, auto) minmax(0, 1fr);
  column-gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
  align-items: baseline;
}

.ag-plugins-bundle-list .label {
  font-family: var(--font-code, "IBM Plex Mono", monospace);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.ag-plugins-bundle-list .path {
  font-family: var(--font-code, "IBM Plex Mono", monospace);
  font-size: var(--mkt-body-xs);
  line-height: 1.4;
  color: var(--text-tertiary);
  letter-spacing: -0.005em;
  word-break: break-word;
}

/* ──────────────────────────────────────────────────────────
   Act 3 — Closer.

   Left-anchored editorial moment.  H2 + clickable install-
   all command + CTA stack.  Same shape as /agents/skills
   closer so the two sub-pages share a closing cadence.
─────────────────────────────────────────────────────────── */

[data-act="3"] {
  position: relative;
  background: var(--background);
  padding: clamp(72px, 10vh, 120px) clamp(20px, 5vw, 80px) clamp(96px, 14vh, 160px);
}

.ag-plugins-end {
  width: 100%;
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(20px, 2.6vh, 32px);
}


.ag-plugins-end-h2 {
  margin: 0;
  font-family: var(--font-display, "Rawest", system-ui, sans-serif);
  font-size: var(--mkt-h2);
  line-height: 1.02;
  letter-spacing: var(--tracking-dense, -0.034em);
  font-weight: 500;
  color: var(--text-primary);
  text-wrap: balance;
  opacity: 0;
  transform: translateY(8px);
}

.ag-plugins-end-cmd {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: clamp(12px, 1.6vh, 20px) 0 0;
  padding: clamp(16px, 2vh, 22px) clamp(18px, 2.2vw, 26px);
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-display, 20px);
  font-family: inherit;
  text-align: left;
  outline: none;
  transition:
    background 220ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 220ms cubic-bezier(0.22, 1, 0.36, 1);
  opacity: 0;
  transform: translateY(10px);
  max-width: 100%;
}

.ag-plugins-end-cmd:hover,
.ag-plugins-end-cmd:focus-visible {
  background: var(--sunken-hover);
  border-color: var(--zen-purple-7, #7C4FE8);
}

.ag-plugins-end-cmd.is-copied {
  border-color: var(--zen-cyan-6, #7ADAE6);
}

.ag-plugins-end-code {
  color: var(--text-primary);
  font-family: var(--font-code, monospace);
  font-size: var(--mkt-body-sm);
  letter-spacing: -0.005em;
  font-weight: 500;
  word-break: break-word;
}

.ag-plugins-end-hint {
  color: var(--text-tertiary);
  font-family: var(--font-code, monospace);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  transition: color 220ms ease;
  white-space: nowrap;
}

.ag-plugins-end-cmd.is-copied .ag-plugins-end-hint {
  color: var(--zen-cyan-6, #7ADAE6);
}

/* Layout + tag styles come from .cta-stack + .cta-stack-tag
   in components.css.  Only the page-specific bits remain. */
.ag-plugins-end-cta {
  gap: 12px;
  margin-top: clamp(8px, 1vh, 16px);
  opacity: 0;
  transform: translateY(8px);
}

/* ── Mobile responsive ──────────────────────────────────── */

@media (max-width: 1023px) {
  [data-act="1"] {
    padding: clamp(96px, 13vh, 140px) clamp(18px, 5vw, 32px) clamp(40px, 6vh, 64px);
    min-height: auto;
  }
  [data-act="2"] {
    padding: clamp(32px, 5vh, 56px) clamp(18px, 5vw, 32px) clamp(56px, 8vh, 88px);
  }
  [data-act="3"] {
    padding: clamp(56px, 8vh, 96px) clamp(18px, 5vw, 32px) clamp(80px, 12vh, 140px);
  }
  .ag-plugins-detail {
    grid-template-columns: 1fr;
    gap: clamp(28px, 4vh, 40px);
  }
}

@media (max-width: 600px) {
  .ag-plugins-h1 {
    font-size: var(--mkt-h2);
    line-height: 1.04;
  }
  .ag-plugins-rail .pill { font-size: 13px; padding: 8px 12px; }
  .ag-plugins-rail .pill-status { font-size: 9px; }
  .ag-plugins-cmd-code {
    font-size: var(--mkt-body-sm);
    word-break: break-all;
  }
  .ag-plugins-end-h2 { font-size: var(--mkt-h3); }
  .ag-plugins-end-cmd { padding: 14px 18px; flex-direction: column; align-items: flex-start; gap: 10px; }
  .ag-plugins-end-code {
    font-size: clamp(12px, 3.6vw, 15px);
    word-break: break-all;
  }
}

/* ── Wide-desktop tiers ─────────────────────────────────── */

@media (min-width: 1600px) {
  .ag-plugins-hero,
  .ag-plugins-stage,
  .ag-plugins-end { max-width: 920px; }
  
  .ag-plugins-sub { font-size: 20px; max-width: 640px; }
  .ag-plugins-cmd-code { font-size: 19px; }
  .ag-plugins-end-h2 { font-size: 72px; }
  .ag-plugins-end-code { font-size: 17px; }
}

@media (min-width: 1920px) {
  .ag-plugins-hero,
  .ag-plugins-stage,
  .ag-plugins-end { max-width: 1040px; }
  
  .ag-plugins-sub { font-size: 21px; max-width: 700px; }
  .ag-plugins-cmd-code { font-size: 20.5px; }
  .ag-plugins-end-h2 { font-size: 84px; }
  .ag-plugins-end-code { font-size: 18.5px; }
}

@media (min-width: 2400px) {
  .ag-plugins-hero,
  .ag-plugins-stage,
  .ag-plugins-end { max-width: 1240px; }
  
  .ag-plugins-sub { font-size: 24px; max-width: 800px; }
  .ag-plugins-cmd-code { font-size: 24px; }
  .ag-plugins-end-h2 { font-size: 108px; }
  .ag-plugins-end-code { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .eyebrow,
  .ag-plugins-h1,
  .ag-plugins-sub,
  .ag-plugins-rail,
  .ag-plugins-detail,
  .eyebrow,
  .ag-plugins-end-h2,
  .ag-plugins-end-cmd,
  .ag-plugins-end-cta {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ══════════════════════════════════════════════════════════
   BU light overrides.  --font-display auto-flips to Mq12 via
   DS-level override.
═══════════════════════════════════════════════════════════ */
html:not(.dark) body {
  background: var(--zen-gray-3);
  color: var(--text-primary);
}
html:not(.dark) [data-act="1"],
html:not(.dark) [data-act="2"],
html:not(.dark) [data-act="3"] {
  background: var(--zen-gray-3);
}

