/* =============================================================================
   FEATURES PAGE
   ============================================================================= */

/* ── Hero ── */
.feat-hero {
  background: linear-gradient(180deg, var(--bg-blue) 0%, var(--bg) 100%);
  padding-bottom: 0;
}

.feat-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-16);
  align-items: center;
  padding-bottom: var(--s-16);
}

.feat-hero-copy h1 {
  font-size: var(--t-hero-page);
  margin-top: var(--s-2);
  margin-bottom: var(--s-5);
}

.feat-hero-sub {
  font-size: var(--t-lead);
  color: var(--text-sec);
  line-height: var(--lh-relaxed);
  max-width: 480px;
  margin-bottom: var(--s-8);
}

.feat-hero-ctas {
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
  margin-bottom: var(--s-8);
}

.feat-hero-proof {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.feat-hero-proof li {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--t-sm);
  color: var(--text-sec);
}
.feat-hero-proof li svg {
  width: 15px; height: 15px;
  color: var(--green);
  flex-shrink: 0;
}
.feat-hero-proof li strong { color: var(--text); font-weight: var(--w-semibold); }

.feat-hero-visual { position: relative; }


/* ── Sticky feature nav ── */
.feat-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 800;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--border-sub);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.feat-nav-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--s-6);
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.feat-nav-inner::-webkit-scrollbar { display: none; }

.feat-nav-link {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-4) var(--s-3);
  font-size: var(--t-sm);
  font-weight: var(--w-semibold);
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
  letter-spacing: 0.01em;
}
.feat-nav-link svg { width: 14px; height: 14px; flex-shrink: 0; }
.feat-nav-link:hover { color: var(--text); }
.feat-nav-link.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}


/* ── Hero video section ── */
.feat-video-section { background: var(--bg-subtle); }

.feat-video-header { margin-bottom: var(--s-10); }

.feat-video-browser {
  max-width: 900px;
  margin-inline: auto;
}

.feat-video-wrap {
  background: var(--bg-muted);
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.feat-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.feat-video-wrap-sm {
  aspect-ratio: 4/3;
}

.feat-video-note {
  font-size: var(--t-sm);
  color: var(--text-muted);
  margin-top: var(--s-4);
  max-width: 900px;
  margin-inline: auto;
}
.feat-video-note a {
  color: var(--blue);
  font-weight: var(--w-semibold);
}
.feat-video-note a:hover { text-decoration: underline; }


/* ── Section head ── */
.feat-section-head {
  display: flex;
  align-items: flex-start;
  gap: var(--s-5);
  margin-bottom: var(--s-12);
}
.feat-section-head .card-icon { flex-shrink: 0; }
.feat-section-head h2 {
  font-size: var(--t-4xl);
  font-weight: var(--w-xbold);
  color: var(--text);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-tight);
  margin-bottom: var(--s-3);
}
.feat-section-head p {
  font-size: var(--t-lead);
  color: var(--text-sec);
  line-height: var(--lh-relaxed);
  max-width: 640px;
  margin: 0;
}


/* ── Two-column layout ── */
.feat-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-16);
  align-items: start;
}
.feat-two-col-reverse { direction: rtl; }
.feat-two-col-reverse > * { direction: ltr; }

.feat-item {
  margin-bottom: var(--s-7);
}
.feat-item h3 {
  font-size: var(--t-card);
  font-weight: var(--w-xbold);
  color: var(--text);
  margin-bottom: var(--s-2);
  line-height: var(--lh-snug);
}
.feat-item p {
  font-size: var(--t-base);
  color: var(--text-sec);
  line-height: var(--lh-relaxed);
}
.feat-item code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--bg-muted);
  border: 1px solid var(--border-sub);
  border-radius: var(--r-sm);
  padding: 1px 6px;
  color: var(--blue);
}

.feat-checklist {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin-top: var(--s-6);
  padding-top: var(--s-6);
  border-top: 1px solid var(--border-sub);
}
.feat-checklist li {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--t-sm);
  font-weight: var(--w-semibold);
  color: var(--text-sec);
}
.feat-checklist li svg {
  width: 15px; height: 15px;
  color: var(--green);
  flex-shrink: 0;
}


/* ── Security — tenant diagram ── */
.feat-tenant-diagram {
  background: var(--bg);
  border: 1px solid var(--border-sub);
  border-radius: var(--r-xl);
  padding: var(--s-8);
}

.feat-tenant-shell {}

.feat-tenant-label {
  font-size: var(--t-caption);
  font-weight: var(--w-bold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  color: var(--text-muted);
  margin-bottom: var(--s-5);
}

.feat-tenants {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  margin-bottom: var(--s-6);
}

.feat-tenant-note {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--t-sm);
  font-weight: var(--w-semibold);
  color: var(--green);
  padding-top: var(--s-5);
  border-top: 1px solid var(--border-sub);
}
.feat-tenant-note svg { width: 16px; height: 16px; flex-shrink: 0; }


/* ── Dynamic data — routing diagram ── */
.feat-routing-diagram {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-4);
  background: var(--bg);
  border: 1px solid var(--border-sub);
  border-radius: var(--r-xl);
  padding: var(--s-8);
}

.feat-routing-yurbi {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  background: var(--blue-soft);
  border: 1.5px solid var(--blue);
  border-radius: var(--r-lg);
  padding: var(--s-5) var(--s-6);
}
.feat-routing-yurbi svg { width: 28px; height: 28px; color: var(--blue); }
.feat-routing-yurbi span {
  font-size: var(--t-sm);
  font-weight: var(--w-bold);
  color: var(--blue);
}

.feat-routing-lines {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  align-items: center;
}
.feat-routing-line {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--border) 100%);
  opacity: .4;
}

.feat-routing-dbs {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.feat-routing-db {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  background: var(--bg-subtle);
  border: 1px solid var(--border-sub);
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4);
}
.feat-routing-db svg { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; }
.feat-routing-db-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.feat-routing-db strong { display: block; font-size: var(--t-sm); font-weight: var(--w-bold); color: var(--text); }
.feat-routing-db span { font-size: var(--t-caption); color: var(--text-muted); font-family: var(--mono); }


/* ── Dashboards — capabilities grid ── */
.feat-caps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
}

.feat-cap-card {
  background: var(--bg);
  border: 1px solid var(--border-sub);
  border-radius: var(--r-xl);
  padding: var(--s-7);
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.feat-cap-card:hover {
  border-color: var(--blue);
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
}

.feat-cap-icon {
  width: 40px; height: 40px;
  background: var(--blue-soft);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  margin-bottom: var(--s-4);
}
.feat-cap-icon svg { width: 18px; height: 18px; }

.feat-cap-card h3 {
  font-size: var(--t-base);
  font-weight: var(--w-xbold);
  color: var(--text);
  margin-bottom: var(--s-2);
  line-height: var(--lh-snug);
}
.feat-cap-card p {
  font-size: var(--t-sm);
  color: var(--text-sec);
  line-height: var(--lh-relaxed);
  margin: 0;
}


/* ── Visualizations grid ── */
.feat-viz-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-3);
}

.feat-viz-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-5) var(--s-3);
  background: var(--bg);
  border: 1px solid var(--border-sub);
  border-radius: var(--r-lg);
  text-align: center;
  transition: border-color .15s, box-shadow .15s;
}
.feat-viz-item:hover {
  border-color: var(--blue);
  box-shadow: var(--sh-sm);
}
.feat-viz-item svg {
  width: 24px; height: 24px;
  color: var(--blue);
  flex-shrink: 0;
}
.feat-viz-item span {
  font-size: var(--t-sm);
  font-weight: var(--w-semibold);
  color: var(--text-sec);
  line-height: 1.3;
}


/* ── FastCache diagram ── */
.feat-cache-diagram {
  background: var(--bg);
  border: 1px solid var(--border-sub);
  border-radius: var(--r-xl);
  padding: var(--s-8);
}

.feat-cache-row {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  margin-bottom: var(--s-5);
}

.feat-cache-label {
  font-size: var(--t-sm);
  font-weight: var(--w-semibold);
  color: var(--text-sec);
  white-space: nowrap;
  min-width: 160px;
}

.feat-cache-bar-wrap { flex: 1; }

.feat-cache-bar {
  height: 36px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  padding: 0 var(--s-3);
  min-width: 80px;
}
.feat-cache-bar span {
  font-size: var(--t-sm);
  font-weight: var(--w-bold);
  white-space: nowrap;
}

.feat-cache-bar-slow {
  background: rgba(229,62,62,.12);
  border: 1px solid rgba(229,62,62,.25);
}
.feat-cache-bar-slow span { color: #C53030; }

.feat-cache-bar-fast {
  background: var(--green-soft);
  border: 1px solid var(--green-border);
}
.feat-cache-bar-fast span { color: var(--green); }

.feat-cache-note {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--t-sm);
  font-weight: var(--w-semibold);
  color: var(--text-muted);
  padding-top: var(--s-5);
  border-top: 1px solid var(--border-sub);
}
.feat-cache-note svg { width: 15px; height: 15px; color: var(--blue); flex-shrink: 0; }


/* ── API — code block ── */
.feat-code-block {
  background: var(--navy);
  border-radius: var(--r-xl);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.feat-code-header {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.feat-code-badge {
  font-size: var(--t-caption);
  font-weight: var(--w-bold);
  letter-spacing: var(--ls-wide);
  background: var(--green);
  color: #fff;
  padding: 3px 10px;
  border-radius: var(--r-full);
}

.feat-code-url {
  font-family: var(--mono);
  font-size: var(--t-sm);
  color: #C8DCE9;
}

.feat-code-body {
  padding: var(--s-5) var(--s-6);
  margin: 0;
  overflow-x: auto;
}
.feat-code-body code {
  font-family: var(--mono);
  font-size: var(--t-sm);
  color: #B8D460;
  line-height: 1.7;
  white-space: pre;
}

.feat-code-footer {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-4) var(--s-5);
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: var(--t-sm);
  font-weight: var(--w-semibold);
  color: #94ADBF;
}
.feat-code-footer svg { width: 14px; height: 14px; color: var(--green); flex-shrink: 0; }


/* ── Self-hosted ── */
.feat-platform-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-5);
  margin-bottom: var(--s-12);
}

.feat-platform-card {
  background: var(--bg);
  border: 1px solid var(--border-sub);
  border-radius: var(--r-xl);
  padding: var(--s-7);
}

.feat-platform-card h3 {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--t-card);
  font-weight: var(--w-xbold);
  color: var(--text);
  margin-bottom: var(--s-5);
  line-height: var(--lh-snug);
}
.feat-platform-card h3 svg { width: 20px; height: 20px; color: var(--blue); flex-shrink: 0; }

.feat-platform-card ul {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin-bottom: var(--s-5);
}
.feat-platform-card ul li {
  font-size: var(--t-sm);
  color: var(--text-sec);
  line-height: var(--lh-snug);
  padding-left: var(--s-4);
  position: relative;
}
.feat-platform-card ul li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.feat-platform-link {
  font-size: var(--t-sm);
  font-weight: var(--w-semibold);
  color: var(--blue);
  text-decoration: none;
  transition: color .15s;
}
.feat-platform-link:hover { color: var(--blue-dark); text-decoration: underline; }

.feat-platform-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-5);
  text-align: center;
  background: var(--navy);
  border-radius: var(--r-xl);
  padding: var(--s-8);
  -webkit-font-smoothing: antialiased;
}

.feat-platform-fact-num {
  font-size: var(--t-3xl);
  font-weight: var(--w-xbold);
  color: #fff;
  letter-spacing: var(--ls-tight);
  margin-bottom: var(--s-2);
}
.feat-platform-fact-label {
  font-size: var(--t-sm);
  color: #94ADBF;
  font-weight: var(--w-medium);
}


/* ── Responsive ── */
@media (max-width: 1024px) {
  .feat-hero-inner       { grid-template-columns: 1fr; }
  .feat-hero-visual      { display: none; }
  .feat-two-col          { grid-template-columns: 1fr; gap: var(--s-10); }
  .feat-two-col-reverse  { direction: ltr; }
  .feat-caps-grid        { grid-template-columns: repeat(2, 1fr); }
  .feat-viz-grid         { grid-template-columns: repeat(3, 1fr); }
  .feat-routing-diagram  { grid-template-columns: 1fr; gap: var(--s-6); }
  .feat-routing-lines    { flex-direction: row; }
  .feat-routing-line     { width: 1px; height: 24px; background: linear-gradient(180deg, var(--blue) 0%, var(--border) 100%); }
  .feat-platform-facts   { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .feat-hero-copy h1     { font-size: var(--t-3xl); }
  .feat-section-head     { flex-direction: column; gap: var(--s-3); }
  .feat-section-head h2  { font-size: var(--t-3xl); }
  .feat-caps-grid        { grid-template-columns: 1fr; }
  .feat-viz-grid         { grid-template-columns: repeat(2, 1fr); }
  .feat-platform-grid    { grid-template-columns: 1fr; }
  .feat-platform-facts   { grid-template-columns: repeat(2, 1fr); }
  .feat-cache-label      { min-width: 120px; }
}

@media (max-width: 480px) {
  .feat-viz-grid         { grid-template-columns: repeat(2, 1fr); }
  .feat-platform-facts   { grid-template-columns: 1fr 1fr; }
}


/* =============================================================================
   HV-* BROWSER MOCKUP CLASSES
   Copied from homepage.css — these should be moved to global.css since they
   are now used on both the homepage and features page.
   TODO: Move to global.css and remove from both page CSS files.
   ============================================================================= */
.hv-browser {
  background:#fff;
  border-radius:var(--r-lg);
  box-shadow:var(--sh-xl);
  overflow:hidden;
  border:1px solid var(--border);
}
.hv-bar {
  background:#F1F5F9;
  border-bottom:1px solid var(--border);
  padding:10px var(--s-4);
  display:flex; align-items:center; gap:var(--s-3);
}
.hv-dots { display:flex; gap:5px; flex-shrink:0; }
.hv-dots span { width:10px; height:10px; border-radius:50%; display:block; }
.hv-dots span:nth-child(1){background:#FF5F57}
.hv-dots span:nth-child(2){background:#FEBC2E}
.hv-dots span:nth-child(3){background:#28C840}
.hv-url {
  flex:1; background:#fff; border:1px solid var(--border); border-radius:5px;
  padding:4px 10px; font-family:var(--mono); font-size:11px; color:var(--text-muted);
  max-width:260px; margin-inline:auto; display:flex; align-items:center; gap:5px;
}
.hv-url svg { width:10px; height:10px; opacity:.6; }
.hv-brand-pill {
  background:var(--blue); color:#fff; font-size:10px; font-weight:var(--w-bold);
  padding:3px 10px; border-radius:var(--r-full); white-space:nowrap; flex-shrink:0;
}
.hv-body { display:flex; min-height:280px; }
.hv-sidebar {
  width:52px; background:var(--navy); padding:12px 8px;
  display:flex; flex-direction:column; gap:6px; flex-shrink:0;
}
.hv-logo-spot { width:36px; height:24px; background:var(--blue); border-radius:var(--r-sm); margin-bottom:8px; }
.hv-nav-item { width:36px; height:8px; background:rgba(255,255,255,.12); border-radius:4px; }
.hv-nav-active { background:rgba(255,255,255,.35) !important; }
.hv-content { flex:1; padding:16px; background:var(--bg-subtle); }
.hv-page-title { width:140px; height:10px; background:var(--border); border-radius:4px; margin-bottom:14px; }
.hv-kpis { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-bottom:12px; }
.hv-kpi { background:#fff; border:1px solid var(--border-sub); border-radius:var(--r-sm); padding:10px; }
.hv-kpi-val { font-size:1rem; font-weight:var(--w-xbold); line-height:1.2; }
.hv-kpi-label { font-size:10px; color:var(--text-muted); margin-top:2px; }
.hv-kpi-chg { font-size:10px; font-weight:var(--w-bold); margin-top:2px; }
.hv-up { color:var(--green); }
.hv-charts { display:grid; grid-template-columns:1fr auto; gap:10px; margin-bottom:10px; }
.hv-chart-main,.hv-chart-side {
  background:#fff; border:1px solid var(--border-sub); border-radius:var(--r-sm); padding:10px;
}
.hv-chart-label { font-size:10px; font-weight:var(--w-bold); color:var(--text-muted); margin-bottom:8px; text-transform:uppercase; letter-spacing:.05em; }
.hv-bars { display:flex; align-items:flex-end; gap:4px; height:60px; }
.hv-bar { flex:1; background:var(--blue-soft2); border-radius:3px 3px 0 0; }
.hv-bar-accent { background:var(--blue) !important; }
.hv-donut { width:64px; height:64px; }
.hv-donut svg { width:100%; height:100%; }
.hv-chart-side { display:flex; flex-direction:column; align-items:center; }
.hv-tenant-badge {
  display:inline-flex; align-items:center; gap:6px;
  background:var(--green-soft); border:1px solid var(--green-border);
  color:var(--green); font-size:11px; font-weight:var(--w-semibold);
  padding:5px 10px; border-radius:var(--r-full);
}
.hv-tenant-badge svg { width:12px; height:12px; }


/* =============================================================================
   FEATURES.CSS ADDITIONS
   Append to end of features.css.

   1. feat-hero-matrix  — feature overview card in hero (replaces hv-browser)

   PENDING GLOBAL.CSS MIGRATION NOTE:
   The hv-* classes at the bottom of features.css are duplicated from
   homepage.css. Once both pages are stable, move those classes to global.css
   and remove from both page files. Do not do this until homepage.css and
   features.css are confirmed final to avoid a cascade break.
   ============================================================================= */


/* ── Hero feature matrix card ── */
.feat-hero-matrix {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  overflow: hidden;
}

.feat-hero-matrix-head {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  background: var(--green-soft);
  border-bottom: 1px solid var(--green-border);
  padding: var(--s-4) var(--s-6);
  font-size: var(--t-sm);
  font-weight: var(--w-bold);
  color: var(--green);
  letter-spacing: 0.01em;
}

.feat-hero-matrix-head svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--green);
}

.feat-hero-matrix-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: var(--s-5) var(--s-6);
  gap: var(--s-1);
}

.feat-hero-matrix-item {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-2);
  border-radius: var(--r-sm);
  transition: background .15s;
}

.feat-hero-matrix-item:hover {
  background: var(--bg-subtle);
}

.feat-hero-matrix-item svg {
  width: 15px;
  height: 15px;
  color: var(--blue);
  flex-shrink: 0;
}

.feat-hero-matrix-item span {
  font-size: var(--t-caption);
  font-weight: var(--w-semibold);
  color: var(--text-sec);
  line-height: var(--lh-snug);
}

.feat-hero-matrix-foot {
  padding: var(--s-4) var(--s-6);
  border-top: 1px solid var(--border-sub);
  background: var(--bg-subtle);
  font-size: var(--t-caption);
  font-weight: var(--w-semibold);
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.01em;
}

/* Responsive — matrix hides at same breakpoint as hero visual */
@media (max-width: 1024px) {
  .feat-hero-matrix { display: none; }
}
