/* ════════════════════════════════════════════════════════════════════
   AI AGENT — detail page  ( /ai/agents/[slug]/ )
   Rides ON ai.css: inherits the single --ai-rgb accent token, the shared
   eu-system / nav / footer, and reusable bits (.ai-hero*, .ai-subhead,
   .ai-techwall, .eu-eyebrow.ai-kicker, .ai-inline-link, .eu-emphasis,
   .ai-close-quote). Only the pieces unique to a single-agent page live here.
   ════════════════════════════════════════════════════════════════════ */
@import url('ai.css?v=20260607-12');

/* ─── Hero extras ─────────────────────────────────────────────────── */
/* Back-to-Exploring-AI link above the agent name */
.agent-back {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 500;
  color: rgba(255, 255, 255, 0.7); text-decoration: none; margin-bottom: 20px;
  transition: color 0.2s ease;
}
.agent-back:hover { color: #fff; }
.agent-back svg { width: 16px; height: 16px; }

/* Agent name — matches the case-study project hero (96px desktop), fluid so
   longer names and the denser agent hero scale down gracefully */
.agent-hero .ai-hero-title { font-size: clamp(2.6rem, 6.4vw, 6rem); max-width: 18ch; }

/* ─── Split hero — copy left, cropped product peek right ──────────────
   Scoped to .agent-hero--split so other agent pages keep the single column. */
.agent-hero--split .agent-hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
/* In the narrower column the title wraps naturally to two lines */
.agent-hero--split .ai-hero-title { max-width: 14ch; }

.agent-hero-shot { position: relative; }
.agent-hero-shot-frame {
  position: relative; height: clamp(300px, 40vw, 460px); overflow: hidden;
  border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.12);
  /* fade the cropped base into the dark hero so it reads as a peek, not a cut */
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
}
.agent-hero-shot-frame img {
  display: block; width: 100%; height: auto;
}
/* Scaffold placeholder for the hero peek (until a real product shot exists) */
.agent-hero-shot-frame.is-placeholder {
  -webkit-mask-image: none; mask-image: none;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.20);
}
.agent-hero-shot-ph {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px;
  text-align: center; color: rgba(255, 255, 255, 0.5);
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 600; letter-spacing: 0.03em;
}
.agent-hero-shot-ph svg { width: 42px; height: 42px; opacity: 0.6; }

@media (max-width: 860px) {
  .agent-hero--split .agent-hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .agent-hero--split .ai-hero-title { max-width: 18ch; }
  .agent-hero-shot-frame { height: clamp(180px, 42vw, 260px); }
}
@media (max-width: 560px) {
  /* keep the hero tight on phones — the report reappears in "What You Get" */
  .agent-hero-shot { display: none; }
}

/* Status pill — Live demo / Video overview / Preview soon */
.agent-status {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 22px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid rgba(var(--ai-rgb), 0.5); background: rgba(var(--ai-rgb), 0.14);
  color: #fff; font-family: 'DM Sans', sans-serif; font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.agent-status::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: rgba(var(--ai-rgb), 0.98);
}

/* Compact tech chips in the hero (dark background) */
.agent-hero-tech { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.agent-hero-tech span {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.86); font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 500;
}
.agent-hero-tech svg { width: 17px; height: 17px; flex: 0 0 auto; }

/* ─── Video overview — responsive 16:9 embed ──────────────────────── */
.agent-video {
  position: relative; width: 100%; max-width: 980px; aspect-ratio: 16 / 9;
  margin: clamp(28px, 4vw, 40px) 0 0; border-radius: 18px; overflow: hidden;
  background: #0d0f12; border: 1px solid var(--ai-line);
  box-shadow: 0 1px 2px rgba(15,23,42,0.06), 0 22px 48px rgba(15,23,42,0.16);
}
.agent-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* deep-link target (#video) clears the fixed site nav when scrolled to */
#video { scroll-margin-top: 90px; }

/* Placeholder shown until a real embed is dropped in */
.agent-video-ph {
  position: absolute; inset: 0; display: grid; place-items: center; gap: 14px;
  color: rgba(255, 255, 255, 0.5); font-family: 'DM Sans', sans-serif; font-size: 14px;
}
.agent-video-ph svg { width: 54px; height: 54px; }

/* ─── "What it does" capability list (story section) ──────────────── */
.agent-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; max-width: 760px; }
.agent-list li {
  display: flex; align-items: flex-start; gap: 13px;
  font-family: 'Inter', sans-serif; font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.55;
  color: rgba(60, 64, 67, 0.9);
}
.agent-list .tick { flex: 0 0 auto; width: 22px; height: 22px; margin-top: 2px; color: rgba(var(--ai-rgb), 0.95); }

/* ─── Inside the build — MindStudio workflow screenshot(s) ─────────── */
.agent-figure { margin: clamp(28px, 4vw, 40px) 0 0; }
.agent-figure + .agent-figure { margin-top: 28px; }
.agent-shot {
  display: block; width: 100%; border-radius: 16px; border: 1px solid var(--ai-line);
  box-shadow: 0 1px 2px rgba(15,23,42,0.05), 0 16px 34px rgba(15,23,42,0.09);
}

/* Hover-to-magnify — wrap an .agent-shot in .agent-zoom. The frame moves to
   the wrapper so the scaled image clips cleanly; agent-zoom.js tracks the
   cursor and sets transform-origin so the area under the pointer magnifies. */
.agent-zoom {
  position: relative; overflow: hidden; cursor: zoom-in;
  border-radius: 16px; border: 1px solid var(--ai-line);
  box-shadow: 0 1px 2px rgba(15,23,42,0.05), 0 16px 34px rgba(15,23,42,0.09);
}
.agent-zoom .agent-shot {
  border: 0; border-radius: 0; box-shadow: none;
  transform-origin: center center; transition: transform 0.22s ease; will-change: transform;
}
.agent-zoom.is-zoomed .agent-shot { transform: scale(2.4); transition: transform 0.12s ease; }
/* Touch devices have no hover — leave the image static there. */
@media (hover: none) {
  .agent-zoom { cursor: default; }
  .agent-zoom.is-zoomed .agent-shot { transform: none; }
}

/* ─── Region annotations (OPA-style dot · line · label) ────────────────
   Callouts above the diagram, each pointing down to a colour-coded band.
   Positioned by --x (% across the image). Sit OUTSIDE .agent-zoom so the
   hover-magnify never clips or scales them. */
/* padding-top (NOT margin-top on the child — that collapses through the
   wrapper) reserves the band above the image where the callouts live. */
.agent-annoshot { position: relative; padding-top: 140px; }
.agent-anno {
  position: absolute; top: 0; left: var(--x); height: 140px;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  width: max-content; max-width: 230px;
  pointer-events: none; z-index: 3;
}
.agent-anno-label {
  font-family: 'DM Sans', sans-serif; font-size: 16px; line-height: 1.35; font-weight: 600;
  text-align: center; color: rgba(var(--ai-rgb), 0.98);
  background: rgba(var(--ai-rgb), 0.10); border: 1px solid rgba(var(--ai-rgb), 0.30);
  border-radius: 11px; padding: 9px 13px; box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}
.agent-anno-line {
  width: 2px; height: 26px; margin-top: 6px; border-radius: 2px;
  background: rgba(var(--ai-rgb), 0.85);
}
.agent-anno-dot {
  width: 16px; height: 16px; border-radius: 50%; margin-top: -1px;
  border: 3px solid rgba(var(--ai-rgb), 0.95); background: rgba(var(--ai-rgb), 0.38);
  box-shadow: 0 0 0 6px rgba(var(--ai-rgb), 0.12);
}
/* No room beside a shrunken diagram — hide cleanly; the image keeps its own
   baked-in band headers, so no information is lost. */
@media (max-width: 860px) {
  .agent-anno { display: none; }
  .agent-annoshot { padding-top: 0; }
}

/* ─── Tech wall on an agent page ──────────────────────────────────────
   Lists only the few tools used, so cap the strip to its item count
   instead of stretching full width. Set --n to the number of <li>.
   auto-fit collapses the empty trailing tracks; max-width keeps it ~N
   items wide and left-aligned, and it still wraps on narrow screens. */
.agent-techwall {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  max-width: calc(var(--n, 4) * 200px);
}

/* ─── "Want a demo?" CTA — coral panel, contact + LinkedIn links ───── */
.agent-cta {
  text-align: center; max-width: 760px; margin: 0 auto;
  background: rgba(var(--ai-rgb), 0.07); border: 1px solid rgba(var(--ai-rgb), 0.22);
  border-radius: 22px; padding: clamp(36px, 5vw, 56px) clamp(24px, 4vw, 56px);
}
.agent-cta-eyebrow {
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: rgba(var(--ai-rgb), 0.95); margin: 0;
}
.agent-cta-title {
  font-family: 'Cal Sans', sans-serif; font-weight: 600; font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1; color: var(--ai-ink); margin: 12px 0 0;
}
.agent-cta-text {
  font-family: 'Inter', sans-serif; font-size: clamp(1rem, 1.5vw, 1.18rem); line-height: 1.6;
  color: rgba(60, 64, 67, 0.82); margin: 16px auto 0; max-width: 560px;
}
.agent-cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 28px; }
.agent-cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'DM Sans', sans-serif; font-size: 16px; font-weight: 600; text-decoration: none;
  padding: 13px 22px; border-radius: 999px; transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.agent-cta-btn.is-primary { background: rgba(var(--ai-rgb), 0.98); color: #fff; }
.agent-cta-btn.is-primary:hover { background: rgba(var(--ai-rgb), 1); transform: translateY(-1px); }
.agent-cta-btn:not(.is-primary) { background: #fff; color: var(--ai-ink); border: 1px solid var(--ai-line); }
.agent-cta-btn:not(.is-primary):hover { border-color: rgba(var(--ai-rgb), 0.4); transform: translateY(-1px); }
.agent-figcaption {
  margin-top: 16px; font-family: 'Inter', sans-serif; font-size: 18px; line-height: 1.6;
  color: var(--ai-muted);
}
.agent-figcaption-hint { color: rgba(var(--ai-rgb), 0.95); font-weight: 500; }
@media (hover: none) { .agent-figcaption-hint { display: none; } }

/* ─── Tabbed screenshot gallery — swap between multiple shots (see ODH hi-fi tabs) ─── */
.agent-tabs {
  display: flex; flex-wrap: wrap; gap: 28px; margin: 8px 0 0;
  border-bottom: 1px solid var(--ai-line);
}
.agent-tab {
  font-family: 'Cal Sans', sans-serif; font-size: 18px; font-weight: 600; letter-spacing: -0.01em;
  color: rgba(15, 23, 42, 0.5); background: transparent; border: 0; padding: 10px 0; cursor: pointer;
  position: relative; transition: color 0.18s ease;
}
.agent-tab:hover { color: rgba(15, 23, 42, 0.85); }
.agent-tab.is-active { color: var(--ai-ink); }
.agent-tab.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: rgba(var(--ai-rgb), 0.95); border-radius: 2px;
}
.agent-tabpanel { display: none; }
.agent-tabpanel.is-active { display: block; }
.agent-tabpanel .agent-figure { margin-top: 24px; }

/* ─── Right-side annotations (OPA "Foundation, Shipped" style) ──────────
   The shot is capped so labels sit in the space to its right. Each dot is
   placed by --x / --y (% across / down the image); the line auto-grows and
   the labels align in a column at the right. Coral-themed. Tune --x/--y per
   dot; raise/lower the 290px to move the label column. */
.agent-rannostage { position: relative; max-width: 990px; }
.agent-rannostage > .agent-shot { width: 100%; }
.agent-ranno {
  position: absolute; top: var(--y); left: var(--x);
  transform: translate(-10px, -50%);
  display: flex; align-items: center;
  width: calc(100% - var(--x) + 270px);
  pointer-events: none; z-index: 3;
}
.agent-ranno-dot {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid rgba(var(--ai-rgb), 0.95); background: rgba(var(--ai-rgb), 0.32);
  box-shadow: 0 0 0 7px rgba(var(--ai-rgb), 0.12);
}
.agent-ranno-line {
  flex: 1 1 auto; min-width: 16px; height: 3px; border-radius: 2px;
  background: rgba(var(--ai-rgb), 0.85);
}
.agent-ranno-label {
  flex: 0 0 auto; max-width: 240px; margin-left: 12px;
  font-family: 'DM Sans', sans-serif; font-size: 16px; line-height: 1.4; font-weight: 600;
  color: rgba(var(--ai-rgb), 0.98); background: rgba(var(--ai-rgb), 0.10);
  border: 1px solid rgba(var(--ai-rgb), 0.30); border-radius: 11px; padding: 9px 13px;
}
/* not enough room beside the shot — hide cleanly; the image reads as a plain shot */
@media (max-width: 1320px) { .agent-ranno { display: none; } }
/* Screenshot placeholder */
.agent-shot-ph {
  display: grid; place-items: center; gap: 12px; width: 100%; aspect-ratio: 16 / 10;
  border: 1px dashed rgba(15, 23, 42, 0.18); border-radius: 16px; background: #fafafa;
  color: var(--ai-muted); font-family: 'DM Sans', sans-serif; font-size: 14px;
}
.agent-shot-ph svg { width: 44px; height: 44px; opacity: 0.5; }
