/* ============================================================
   Sublime LMS — Cohorts showcase (/cohort-management)
   Builds on colors_and_type.css + site.css + platform-pages.css.
   Everything is scoped under .cx; tokens only, no new colours.
   ============================================================ */

.cx { overflow-x: clip; }
.cx .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.cx h3 { font-family: var(--font-display); color: var(--fg); letter-spacing: -0.01em; }
.cx :focus-visible { outline: 3px solid var(--color-violet-500); outline-offset: 3px; border-radius: 10px; }
.cx-overview, .cx-create, .cx-learning, .cx-compare { background: var(--color-ivory); }

/* ---------- browser frame around real product screens ---------- */
.cx-frame {
  margin: 0;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.cx-frame-bar {
  display: flex; align-items: center; gap: 14px;
  height: 34px; padding: 0 14px;
  background: var(--color-mist);
  border-bottom: 1px solid var(--border-strong);
}
.cx-frame-dots { display: inline-flex; gap: 6px; flex: none; }
.cx-frame-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--color-slate-300); }
.cx-frame-url {
  flex: 1; min-width: 0; max-width: 340px; margin: 0 auto;
  height: 20px; line-height: 20px; padding: 0 12px;
  border-radius: var(--radius-pill); background: #fff; border: 1px solid var(--border);
  font-size: 11px; color: var(--fg-muted); text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cx-frame img { width: 100%; height: auto; aspect-ratio: 1440 / 900; background: var(--color-mist); }

/* ---------- hero ---------- */
.cx-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 56px; align-items: center;
}
.cx-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 60px); line-height: 1.04; letter-spacing: -0.03em;
  color: var(--fg); margin: 14px 0 20px; text-wrap: balance;
}
.cx-hero .lede { margin: 0 0 28px; }
.cx-hero .hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.cx-hero-points {
  list-style: none; padding: 0; margin: 28px 0 0;
  display: flex; flex-wrap: wrap; gap: 10px 22px;
}
.cx-hero-points li { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; color: var(--fg-body); }
.cx-hero-points svg { width: 16px; height: 16px; color: var(--color-teal-600); }
.cx-hero-art { position: relative; }
.cx-hero-art .cx-frame { transform: perspective(1800px) rotateY(-4deg); transform-origin: left center; }

/* ---------- icon tile + feature cards ---------- */
.cx-ico {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  display: inline-grid; place-items: center;
}
.cx-ico svg { width: 20px; height: 20px; }
.cx-ico.teal    { background: var(--color-teal-50);    color: var(--color-teal-700); }
.cx-ico.violet  { background: var(--color-violet-100); color: var(--color-violet-700); }
.cx-ico.blue    { background: var(--color-blue-50);    color: var(--color-blue-700); }
.cx-ico.emerald { background: var(--color-emerald-50); color: var(--color-emerald-700); }
.cx-ico.amber   { background: var(--color-amber-50);   color: var(--color-amber-600); }
.cx-ico.rose    { background: var(--color-rose-50);    color: var(--color-rose-600); }

.cx-cards, .cx-uses-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px;
}
.cx-card, .cx-use {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: 26px; box-shadow: var(--shadow-sm);
  transition: transform var(--dur-base, .2s) var(--ease-out), box-shadow var(--dur-base, .2s) var(--ease-out), border-color .2s;
}
.cx-card:hover, .cx-use:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.cx-card h3, .cx-use h3 { font-size: 18px; margin: 16px 0 8px; }
.cx-card p, .cx-use p { font-size: 14.5px; line-height: 1.6; color: var(--fg-body); margin: 0; }

/* ---------- interactive showcase ---------- */
.cx-tabs {
  display: grid;
  grid-template-columns: minmax(0, 0.62fr) minmax(0, 1.38fr);   /* visual ≈ 60–65% */
  gap: 36px; align-items: start;
  scroll-margin-top: 96px;          /* clear the sticky site header */
}
.cx-tablist { display: flex; flex-direction: column; gap: 8px; }
.cx-tab {
  display: flex; align-items: flex-start; gap: 14px; width: 100%;
  text-align: left; padding: 14px 16px;
  background: transparent; border: 1px solid transparent; border-radius: var(--radius-lg);
  color: var(--fg-body); position: relative;
  transition: background .2s var(--ease-out), border-color .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.cx-tab:hover { background: #fff; border-color: var(--border); }
.cx-tab[aria-selected="true"] { background: #fff; border-color: var(--color-violet-200); box-shadow: var(--shadow-md); }
.cx-tab[aria-selected="true"]::before {
  content: ""; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--color-violet-600);
}
.cx-tab-ico {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: var(--color-cloud); color: var(--fg-muted);
  transition: background .2s, color .2s;
}
.cx-tab-ico svg { width: 18px; height: 18px; }
.cx-tab[aria-selected="true"] .cx-tab-ico { background: var(--color-violet-100); color: var(--color-violet-700); }
.cx-tab-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cx-tab-title { font-family: var(--font-display); font-weight: 650; font-size: 15.5px; color: var(--fg); }
.cx-tab-blurb { font-size: 13.5px; line-height: 1.45; color: var(--fg-muted); }
.cx-tab[aria-selected="true"] .cx-tab-title { color: var(--color-violet-700); }

.cx-panel:focus-visible { outline-offset: 6px; border-radius: var(--radius-lg); }
.cx-panel.is-entering { animation: cx-panel-in .32s var(--ease-out) both; }
@keyframes cx-panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.cx-panel-detail { margin: 18px 4px 0; font-size: 15px; line-height: 1.6; color: var(--fg-body); max-width: 720px; }
.cx-panel-detail strong { color: var(--fg); }

/* ---------- split sections (create / manage) ---------- */
.cx-split {
  display: grid; grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 56px; align-items: center;
}
.cx-split.reverse { grid-template-columns: minmax(0, 1.28fr) minmax(0, 0.72fr); }
.cx-split.reverse .cx-split-copy { order: 2; }
.cx-split h2, .cx-split .display-lg { font-size: clamp(30px, 3.6vw, 46px); letter-spacing: -0.025em; margin: 0 0 16px; }
.cx-split .lede { margin: 0 0 24px; }
.cx-split-art { position: relative; }

.cx-steps-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.cx-steps-list li { display: flex; gap: 14px; align-items: flex-start; }
.cx-steps-list h3 { font-size: 16px; margin: 3px 0 3px; }
.cx-steps-list p { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--fg-body); }
.cx-num, .cx-pin {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center;
  background: var(--color-violet-600); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 13px;
}
.cx-annotated { position: relative; }
.cx-pin {
  position: absolute; z-index: 2;
  /* 34px frame bar sits above the screenshot; --x/--y are % of the screenshot */
  left: var(--x); top: calc(34px + (100% - 34px) * var(--y-num, 0));
  box-shadow: 0 0 0 4px rgba(255,255,255,.9), var(--shadow-violet);
  transform: translate(-50%, -50%);
}
.cx-note {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 24px 0 0; padding: 12px 14px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
  font-size: 13.5px; line-height: 1.55; color: var(--fg-body);
}
.cx-note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--color-violet-600); }
.cx-frame-sub {
  position: relative; width: 58%; margin: -4% 0 0 auto; z-index: 3;
  box-shadow: var(--shadow-xl), 0 0 0 6px rgba(255,255,255,.7);
}

.cx-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.cx-checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.55; color: var(--fg-body); }
.cx-checks svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--color-emerald-600); }
.cx-checks strong { color: var(--fg); }

/* ---------- cohort-based learning ---------- */
.cx-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.cx-duo-item h3 { display: flex; align-items: center; gap: 8px; font-size: 18px; margin: 0 0 6px; }
.cx-duo-item h3 svg { width: 18px; height: 18px; color: var(--color-teal-600); }
.cx-duo-item > p { margin: 0 0 18px; font-size: 15px; line-height: 1.55; color: var(--fg-body); }

/* ---------- how it works ---------- */
.cx-flow {
  list-style: none; margin: 0 auto; padding: 0; max-width: 1040px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px;
  position: relative;
}
.cx-flow::before {           /* connecting line behind the three icons */
  content: ""; position: absolute; top: 32px; left: 16.66%; right: 16.66%; height: 2px;
  background: linear-gradient(90deg, var(--color-teal-500), var(--color-violet-600));
  opacity: .45;
}
.cx-flow-step { position: relative; text-align: center; padding: 0 8px; }
.cx-flow-ico {
  width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 16px;
  display: grid; place-items: center; position: relative;
  background: #fff; border: 1px solid var(--border-strong); box-shadow: var(--shadow-md);
  color: var(--color-violet-700);
}
.cx-flow-ico svg { width: 26px; height: 26px; }
.cx-flow-step:not(:last-child) .cx-flow-ico::after {   /* directional cue */
  content: ""; position: absolute; right: -22px; top: 50%; width: 8px; height: 8px;
  border-top: 2px solid var(--color-violet-400); border-right: 2px solid var(--color-violet-400);
  transform: translateY(-50%) rotate(45deg);
}
.cx-flow-n { display: block; font-size: 12px; font-weight: 600; letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--color-teal-700); }
.cx-flow-step h3 { font-size: 22px; margin: 6px 0 8px; }
.cx-flow-step p { margin: 0 auto; max-width: 280px; font-size: 15px; line-height: 1.55; color: var(--fg-body); }

/* ---------- use cases ---------- */
.cx-use { display: flex; flex-direction: column; }
.cx-use p { flex: 1; }
.cx-use-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; align-self: flex-start;
  font-size: 14px; font-weight: 600; color: var(--color-violet-700);
  min-height: 32px;
}
.cx-use-link svg { width: 15px; height: 15px; transition: transform .2s var(--ease-out); }
.cx-use-link:hover svg { transform: translate(2px, -2px); }
.cx-use-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- before / with ---------- */
.cx-compare-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; max-width: 1000px; margin: 0 auto; }
.cx-col { border-radius: var(--radius-xl); padding: 28px; border: 1px solid var(--border); }
.cx-col.before { background: var(--color-mist); }
.cx-col.after { background: #fff; border-color: var(--color-violet-200); box-shadow: var(--shadow-lg); }
.cx-col h3 { display: flex; align-items: center; gap: 10px; font-size: 19px; margin: 0 0 18px; }
.cx-col h3 svg { width: 20px; height: 20px; }
.cx-col.before h3 svg { color: var(--fg-muted); }
.cx-col.after h3 svg { color: var(--color-emerald-600); }
.cx-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.cx-col li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.5; }
.cx-col li svg { width: 17px; height: 17px; flex: none; margin-top: 3px; }
.cx-col.before li { color: var(--fg-muted); }
.cx-col.before li svg { color: var(--color-slate-400); }
.cx-col.after li { color: var(--fg); }
.cx-col.after li svg { color: var(--color-emerald-600); }

/* ---------- final CTA ---------- */
.cx-final-inner { text-align: center; max-width: 860px; }
.cx-final .cta-lede { margin-left: auto; margin-right: auto; }
.cx-final .hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.cx-final .btn-on-dark:focus-visible, .cx-final .btn-ghost-dark:focus-visible { outline-color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .cx-hero-grid, .cx-split, .cx-split.reverse { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .cx-split.reverse .cx-split-copy { order: 0; }
  .cx-hero-copy, .cx-split-copy { max-width: 680px; }
  .cx-hero-art .cx-frame { transform: none; }
  .cx-cards, .cx-uses-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cx-tabs { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr); gap: 24px; }
}

/* Tablet/mobile: the vertical tab list becomes a swipeable row of cards
   above the screen; the long description moves under the screenshot. */
@media (max-width: 900px) {
  .cx-tabs { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .cx-tablist {
    flex-direction: row; overflow-x: auto; gap: 10px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    margin: 0 -20px; padding: 4px 20px 10px; scrollbar-width: thin;
  }
  .cx-tab {
    flex: 0 0 auto; width: auto; min-height: 48px; scroll-snap-align: start;
    align-items: center; padding: 10px 14px; background: #fff; border-color: var(--border);
  }
  .cx-tab-blurb { display: none; }
  .cx-tab-title { font-size: 14.5px; white-space: nowrap; }
  .cx-tab[aria-selected="true"]::before { left: 14px; right: 14px; top: auto; bottom: -1px; width: auto; height: 3px; border-radius: 3px 3px 0 0; }
  .cx-duo { grid-template-columns: minmax(0, 1fr); gap: 44px; }
}

@media (max-width: 760px) {
  .cx-cards, .cx-uses-grid, .cx-compare-grid { grid-template-columns: minmax(0, 1fr); }
  .cx-card, .cx-use, .cx-col { padding: 22px; }
  .cx-flow { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .cx-flow::before { top: 32px; bottom: 32px; left: 50%; right: auto; width: 2px; height: auto; background: linear-gradient(180deg, var(--color-teal-500), var(--color-violet-600)); opacity: .25; }
  .cx-flow-step { background: var(--bg); padding: 4px 0; }
  .cx-flow-step:not(:last-child) .cx-flow-ico::after { right: auto; left: 50%; top: auto; bottom: -22px; transform: translateX(-50%) rotate(135deg); }
  .cx-hero .hero-ctas .btn, .cx-final .hero-ctas .btn { flex: 1 1 100%; }
  .cx-frame-bar { height: 26px; padding: 0 10px; }
  .cx-frame-dots i { width: 7px; height: 7px; }
  .cx-frame-url { font-size: 10px; height: 16px; line-height: 16px; }
  .cx-pin { width: 22px; height: 22px; font-size: 11px; top: calc(26px + (100% - 26px) * var(--y-num, 0)); }
  .cx-frame-sub { width: 78%; margin-top: -4%; }
  .cx-panel-detail { font-size: 14.5px; margin-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .cx-panel.is-entering { animation: none; }
  .cx-card, .cx-use, .cx-tab, .cx-use-link svg { transition: none; }
  .cx-card:hover, .cx-use:hover { transform: none; }
}
