/* ══════════════════════════════════════════════════════════════════
   RetainCLM Visualization Library - renderer + landing section styles
   ------------------------------------------------------------------
   Loaded by BOTH the landing page (auth/login.html, for its Chart
   Intelligence section) and /charts. Split out from charts.css so the
   landing page pays for the renderer and its own six cards, and not
   for the whole feed/detail page stylesheet it never uses.

   Everything here is either .rcv-* (drawn by rc-viz.js) or .ci-*
   (the landing section's cards). Nothing else on the landing page is
   touched - the tokens below repeat the values already declared inline
   in login.html, so if this file were removed the landing page would
   lose the section's styling and nothing else.
   ════════════════════════════════════════════════════════════════ */

:root {
  --rcv-emerald:   #059669;
  --rcv-emerald-l: #10B981;
  --rcv-ink:       #0F172A;
  --rcv-ink2:      #334155;
  --rcv-muted:     #64748B;
  --rcv-faint:     #94A3B8;
  --rcv-rule:      #E2E8F0;
  --rcv-surface:   #F1F5F9;
  --rcv-border:    rgba(15,23,42,.09);
  --rcv-focus:     0 0 0 3px rgba(5,150,105,.16);
}

/* ── RENDERER ────────────────────────────────────────────────────── */
.rcv-canvas { width: 100%; position: relative; min-height: 40px; }
.rcv-svg { display: block; width: 100%; overflow: visible; }

/* A chart that fails to draw must not take the page's prose with it -
   the explanation around it is what a reader (and a crawler) needs. */
.rcv-canvas[data-rcv-error]::after {
  content: 'This chart could not be drawn. The description below explains what it shows.';
  display: block; padding: 20px 4px; font-size: 12.5px; color: var(--rcv-muted); line-height: 1.6;
}

/* Hover feedback that brightens rather than resizes: growing a mark on
   hover would change the very quantity the mark encodes. */
.rcv-bar, .rcv-cell, .rcv-wedge { transition: filter .16s ease; cursor: default; }
.rcv-bar:hover, .rcv-cell:hover, .rcv-wedge:hover { filter: brightness(1.06); }
.rcv-dot { transition: opacity .16s ease; cursor: default; }
.rcv-dot:hover { filter: brightness(1.06); }
.rcv-flow { transition: opacity .16s ease; cursor: default; }
.rcv-flow:hover { opacity: .8; }
.rcv-svg :focus-visible { outline: 2px solid var(--rcv-emerald); outline-offset: 2px; }
@keyframes rcvPulse { 0% { r: 4; opacity: .5; } 100% { r: 13; opacity: 0; } }
.rcv-pulse { animation: rcvPulse 1.8s ease-out infinite; }

/* Fixed-position and clamped inside the viewport by the renderer, so a
   tooltip near the right edge never widens the page - the usual cause
   of horizontal scroll on a phone. */
.rcv-tip {
  position: fixed; z-index: 3000; display: none; pointer-events: none;
  background: rgba(15,23,42,.96); color: #fff; border-radius: 10px;
  padding: 9px 11px; font-size: 12px; line-height: 1.5; max-width: 260px;
  box-shadow: 0 10px 30px rgba(15,23,42,.28);
  font-family: 'Inter', system-ui, sans-serif;
}
.rcv-tip-h { display: block; font-weight: 700; font-size: 12px; margin-bottom: 5px; letter-spacing: -.1px; }
.rcv-tip-row { display: flex; align-items: center; gap: 7px; color: rgba(255,255,255,.72); font-size: 11.5px; }
.rcv-tip-row i { width: 8px; height: 8px; border-radius: 3px; flex: 0 0 auto; }
.rcv-tip-row b { margin-left: auto; color: #fff; font-weight: 700; padding-left: 12px; }

/* Real <button>s, so toggling a series off is keyboard-reachable and
   its pressed state is announced. */
.rcv-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; }
.rcv-legend-item {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; color: var(--rcv-ink2);
  background: none; border: none; padding: 3px 2px; font-family: inherit; border-radius: 6px;
}
button.rcv-legend-item { cursor: pointer; }
button.rcv-legend-item:hover { color: var(--rcv-ink); }
button.rcv-legend-item:focus-visible { outline: none; box-shadow: var(--rcv-focus); }
.rcv-legend-item.is-off { opacity: .4; text-decoration: line-through; }
.rcv-swatch { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }

/* The hidden data table behind every chart: the accessibility text
   alternative, and the version a crawler can read without running JS. */
.rc-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.rc-figure { margin: 0; }
.rc-figure figcaption {
  font-size: 11px; color: var(--rcv-faint); margin-top: 12px; line-height: 1.55;
  display: flex; align-items: flex-start; gap: 6px; text-align: left;
}
.rc-illus {
  display: inline-flex; align-items: center; flex: 0 0 auto;
  font-size: 10px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase;
  color: var(--rcv-muted); background: var(--rcv-surface);
  padding: 3px 8px; border-radius: 6px;
}

/* ── LANDING PAGE: CHART INTELLIGENCE SECTION ────────────────────── */
/* The section lands between the founder band (which is `.alt`, tinted)
   and pricing (plain white). Given `.lp-section`'s white it would run
   straight into pricing as one undifferentiated block, and taking
   `.alt` instead would put two tinted bands back to back. So it gets
   its own soft tint - an id beats the class, no !important needed. */
#visualizations {
  background:
    radial-gradient(760px 330px at 50% 0%, rgba(5,150,105,.07), transparent 70%),
    linear-gradient(180deg, #FBFDFF 0%, #FFFFFF 100%);
}

.ci-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.ci-card {
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid var(--rcv-border); border-radius: 18px;
  padding: 20px 20px 22px; display: flex; flex-direction: column;
  transition: transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s, border-color .25s;
}
.ci-card:hover {
  transform: translateY(-4px); border-color: rgba(5,150,105,.25);
  box-shadow: 0 8px 40px rgba(15,23,42,.10), 0 2px 8px rgba(15,23,42,.06);
}
.ci-viz { margin-bottom: 16px; }
.ci-card h3 { font-size: 16px; font-weight: 800; letter-spacing: -.4px; margin-bottom: 8px; }
.ci-card h3 a { color: var(--rcv-ink); text-decoration: none; }
.ci-card h3 a:hover { color: var(--rcv-emerald); }
.ci-card p { font-size: 12.5px; color: var(--rcv-muted); line-height: 1.6; margin-bottom: 6px; }
.ci-card p b { color: var(--rcv-ink2); font-weight: 700; }
.ci-more {
  display: inline-flex; align-items: center; gap: 5px; margin-top: auto; padding-top: 14px;
  font-size: 13px; font-weight: 700; color: var(--rcv-emerald); text-decoration: none;
}
.ci-more:hover { gap: 9px; }
.ci-more:focus-visible { outline: none; box-shadow: var(--rcv-focus); border-radius: 6px; }

.ci-foot { text-align: center; margin-top: 34px; }
.ci-all {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 14.5px; font-weight: 700; color: #fff; text-decoration: none;
  background: linear-gradient(135deg, var(--rcv-emerald), var(--rcv-emerald-l));
  padding: 14px 26px; border-radius: 13px; box-shadow: 0 8px 26px rgba(5,150,105,.3);
  transition: transform .2s, box-shadow .2s;
}
.ci-all:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(5,150,105,.36); }
.ci-all:focus-visible { outline: none; box-shadow: var(--rcv-focus); }
.ci-note { font-size: 12px; color: var(--rcv-faint); margin-top: 14px; line-height: 1.6; }

@media (max-width: 560px) {
  .ci-card { padding: 16px 15px 18px; }
  .rcv-tip { max-width: 210px; }
}
@media (prefers-reduced-motion: reduce) {
  .rcv-pulse { animation: none; }
  .ci-card, .ci-all, .ci-more { transition: none; }
}
