/* ==========================================================================
   pages.css — shared components for the MedtechVendors + Community subpages.
   Builds on colors_and_type.css + styles.css (loaded first).
   ========================================================================== */

/* ---- Hub nav hide-on-scroll ---- */
.navbar { transition: transform 320ms var(--ease); will-change: transform; }
.navbar.nav-hidden { transform: translateY(-100%); }

/* ---- Floating section rail ---- */
.section-rail {
  position: fixed;
  right: 18px; top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px;
  border-radius: 14px;
  background: oklch(0.99 0 0 / 0.96);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid var(--slate-200);
  box-shadow: 0 8px 28px rgb(0 0 0 / 0.12), 0 2px 6px rgb(0 0 0 / 0.06);
  opacity: 0;
  transition: opacity 320ms var(--ease), transform 320ms var(--ease);
  pointer-events: none;
}
.section-rail.show { opacity: 1; pointer-events: auto; }
.section-rail a {
  display: flex; align-items: center; gap: 10px;
  justify-content: flex-end;
  padding: 7px 8px;
  border-radius: 9px;
  color: var(--muted-foreground);
  font-size: 12.5px; font-weight: 500;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.section-rail a:hover { background: var(--slate-100); color: var(--slate-950); }
.section-rail .rl-label {
  white-space: nowrap;
  max-width: 0; opacity: 0; overflow: hidden;
  transition: max-width 320ms var(--ease), opacity 240ms var(--ease);
}
.section-rail a:hover .rl-label { max-width: 180px; opacity: 1; }
.section-rail .rl-dot {
  width: 10px; height: 10px; border-radius: 9999px; flex-shrink: 0;
  background: var(--slate-300);
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.section-rail a:hover .rl-dot { background: var(--slate-500); }
.section-rail a.active { color: var(--slate-950); font-weight: 600; }
.section-rail a.active .rl-dot { background: var(--rail-accent, var(--xos-primary-600)); transform: scale(1.25); }
@media (max-width: 1100px) { .section-rail { display: none; } }

/* ---- Simple page nav (subpages) ---- */
.nav-links-simple { gap: 28px; height: 64px; }
.nav-links-simple a {
  font-size: 14px; font-weight: 500; color: var(--slate-700);
  display: inline-flex; align-items: center;
}
.nav-links-simple a:hover { color: var(--slate-950); }
.nav-links-simple a.external::after { content: "↗"; margin-left: 4px; font-size: 11px; color: var(--slate-400); }
@media (max-width: 980px) {
  .nav-links-simple { display: none; }
  .nav-cta-btn { display: none; }
}

/* ---- Dark "match engine" card (MTV hero) ---- */
.dark-card {
  position: relative;
  background: var(--slate-950);
  border-radius: 22px;
  padding: 32px;
  overflow: hidden;
  color: var(--slate-100);
  box-shadow: var(--shadow-lg);
}
.dark-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(ellipse 50% 40% at 80% 10%, oklch(0.72 0.13 200 / 0.35), transparent 60%),
              radial-gradient(ellipse 45% 40% at 10% 90%, oklch(0.65 0.13 229 / 0.28), transparent 60%);
  pointer-events: none;
}
.dark-card > * { position: relative; }
.dark-card .dc-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--slate-400);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 22px;
}
.dark-card .dc-label .dot { width: 7px; height: 7px; border-radius: 9999px; background: var(--accent-mtv); }

/* match columns */
.match-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  align-items: center;
}
.match-col { display: flex; flex-direction: column; gap: 12px; }
.match-col .col-cap {
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--slate-500); margin-bottom: 2px;
}
.match-pill {
  background: oklch(1 0 0 / 0.06);
  border: 1px solid oklch(1 0 0 / 0.1);
  border-radius: 11px;
  padding: 12px 14px;
  font-size: 13px; font-weight: 500;
  color: var(--slate-100);
  display: flex; align-items: center; gap: 10px;
}
.match-pill .mp-ic {
  width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: oklch(1 0 0 / 0.08); color: var(--accent-mtv);
}
.match-pill .mp-ic svg { width: 15px; height: 15px; }
.match-pill.vendor .mp-ic { color: oklch(0.78 0.12 200); }
.match-lines { width: 64px; align-self: stretch; position: relative; }
.match-lines svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---- Flow steps (how it works) ---- */
.flow-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  counter-reset: step;
}
@media (max-width: 860px) { .flow-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .flow-steps { grid-template-columns: 1fr; } }
.flow-step {
  position: relative;
  background: oklch(1 0 0 / 0.04);
  border: 1px solid oklch(1 0 0 / 0.09);
  border-radius: 14px;
  padding: 22px 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.flow-step-header {
  display: flex; align-items: center; gap: 10px;
}
.flow-step .fs-num {
  width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
  background: var(--accent-mtv); color: var(--slate-950);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}
.flow-step .fs-ic { color: var(--accent-mtv); flex-shrink: 0; }
.flow-step .fs-ic svg { width: 18px; height: 18px; }
.flow-step h4 { font-size: 15px; font-weight: 600; margin: 0; color: var(--slate-50); }
.flow-step p { font-size: 13px; line-height: 1.55; color: var(--slate-400); margin: 0; }

/* ---- Problem section ---- */
.problem {
  max-width: 760px; margin: 0 auto; text-align: center;
}
.problem .lead { font-size: clamp(16px, 1.5vw, 18px); color: var(--muted-foreground); margin: 16px 0 32px; }
.problem-list {
  list-style: none; padding: 0; margin: 0 auto 28px; max-width: 620px;
  display: grid; gap: 12px; text-align: left;
}
.problem-list li {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 15.5px; line-height: 1.5; color: var(--slate-800);
  background: white; border: 1px solid var(--slate-200); border-radius: 12px;
  padding: 16px 18px;
}
.problem-list li::before { content: "→"; color: var(--accent-mtv); font-weight: 700; flex-shrink: 0; }
.problem-list li b { font-weight: 700; color: var(--slate-950); }
.problem .punch { font-size: clamp(17px, 1.8vw, 20px); font-weight: 600; color: var(--slate-950); letter-spacing: -0.01em; text-wrap: balance; }
.problem .punch .hl { color: var(--accent-mtv); }

/* ---- Verified badge (gold) ---- */
.verified-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px 8px 10px;
  border-radius: 9999px;
  white-space: nowrap;
  background: linear-gradient(180deg, oklch(0.97 0.04 90), oklch(0.93 0.06 88));
  border: 1px solid var(--golden);
  color: oklch(0.35 0.06 70);
  font-size: 13px; font-weight: 600;
}
.verified-badge img, .verified-badge svg { width: 18px; height: 18px; }

/* ---- Mock vendor profile (buyer screenshot) ---- */
.mock-frame {
  border-radius: 16px;
  border: 1px solid var(--slate-200);
  background: white;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.mock-profile { padding: 22px; }
.mock-profile .mp-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.mock-profile .mp-logo {
  width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0;
  background: var(--accent-mtv-soft); color: var(--accent-mtv);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px;
}
.mock-profile .mp-name { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.mock-profile .mp-loc { font-size: 12.5px; color: var(--muted-foreground); margin-top: 2px; }
.mock-row { margin-bottom: 16px; }
.mock-row .mr-label { font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted-foreground); margin-bottom: 8px; }
.mock-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mock-chip {
  font-size: 12px; font-weight: 500; padding: 5px 10px; border-radius: 9999px;
  background: var(--slate-100); color: var(--slate-700); border: 1px solid var(--slate-200);
}
.mock-chip.teal { background: var(--accent-mtv-soft); color: var(--mtv-primary-700); border-color: transparent; }
.mock-profile .mp-cta {
  margin-top: 18px; display: flex; gap: 10px; align-items: center;
}
.mock-stagebar { display: flex; gap: 4px; margin-top: 6px; }
.mock-stagebar .seg { height: 6px; border-radius: 3px; flex: 1; background: var(--slate-200); }
.mock-stagebar .seg.on { background: var(--accent-mtv); }

/* ---- Founding Partners 3-col grid ---- */
.fp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 860px) { .fp-grid { grid-template-columns: 1fr; } }

.fp-card {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: 18px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 200ms ease, border-color 200ms ease;
}
.fp-card:hover { box-shadow: var(--shadow-md); border-color: var(--slate-300); }

.fp-category {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-xos);
}
.fp-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--slate-950);
}
.fp-sub {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--slate-600);
  margin: 0;
}
.fp-desc {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted-foreground);
  margin: 0;
  flex: 1;
}
.fp-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.fp-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-700);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 150ms ease;
}
.fp-link:hover { color: var(--slate-950); }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ---- Vendor grid screenshot ---- */
.mock-frame-clean {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 16px;
  overflow: hidden;
}
.vendor-grid-screenshot {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

/* ---- MTV hero logo ---- */
.mtv-hero-logo {
  height: 52px;
  width: auto;
  display: block;
}

/* ---- Social proof bar ---- */
.proof-bar { background: var(--accent-community-soft); border-block: 1px solid var(--slate-200); }
.proof-grid {
  max-width: var(--content-max); margin: 0 auto; padding: 32px 24px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
}
@media (max-width: 860px) { .proof-grid { grid-template-columns: 1fr; gap: 20px; } }
.proof-quote { font-size: 14.5px; line-height: 1.5; color: var(--slate-800); font-style: italic; }
.proof-quote .who { display: block; font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--slate-950); margin-top: 8px; }
.proof-quote .who span { font-weight: 400; color: var(--muted-foreground); }

/* ---- Playbook categories ---- */
.playbook-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 800px) { .playbook-cats { grid-template-columns: 1fr; } }
.cat-card {
  background: white; border: 1px solid var(--slate-200); border-radius: 16px; padding: 24px;
}
.cat-card .cc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cat-card .cc-ic {
  width: 34px; height: 34px; border-radius: 9px;
  background: oklch(1 0 0 / 0.08); color: var(--accent-xos);
  display: flex; align-items: center; justify-content: center;
}
.cat-card .cc-ic svg { width: 18px; height: 18px; }
.cat-card h4 { font-size: 15px; font-weight: 700; margin: 0; letter-spacing: -0.01em; color: var(--slate-100); }
.cat-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.cat-card li { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; color: var(--slate-400); }
.cat-card li::before { content: "→"; color: var(--accent-xos); font-weight: 600; flex-shrink: 0; }
/* dark bg override */
.cat-card {
  background: oklch(1 0 0 / 0.04); border: 1px solid oklch(1 0 0 / 0.10); border-radius: 16px; padding: 24px;
}

/* ---- Roadmap report list ---- */
.report-list { columns: 2; column-gap: 24px; list-style: none; padding: 0; margin: 24px 0 0; }
@media (max-width: 520px) { .report-list { columns: 1; } }
.report-list li {
  break-inside: avoid; display: flex; gap: 9px; align-items: flex-start;
  font-size: 14px; line-height: 1.5; color: var(--slate-700); margin-bottom: 10px;
}
.report-list li svg { width: 16px; height: 16px; color: var(--accent-xos); flex-shrink: 0; margin-top: 2px; }

/* ---- Episode topic tags ---- */
.topic-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.topic-tag {
  font-size: 13px; font-weight: 500; padding: 7px 13px; border-radius: 9999px;
  white-space: nowrap;
  background: oklch(1 0 0 / 0.06); border: 1px solid oklch(1 0 0 / 0.12); color: var(--slate-300);
  display: inline-flex; align-items: center; gap: 7px;
}
.topic-tag::before { content: "→"; color: var(--accent-xos); }

/* ---- Partner bar ---- */
.partner-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px; margin-top: 36px; }
.partner-logo {
  height: 64px; min-width: 180px; padding: 0 28px;
  border: 1px solid var(--slate-200); border-radius: 14px; background: white;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 16px; font-weight: 700; letter-spacing: -0.01em; color: var(--slate-700);
}
.partner-logo .pl-sub { font-size: 11px; font-weight: 500; color: var(--muted-foreground); }

/* ---- Mock community window ---- */
.mock-community { display: flex; min-height: 320px; }
.mc-side { width: 168px; background: var(--slate-950); padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.mc-side .mc-brand { display: flex; align-items: center; gap: 8px; padding: 6px 8px 14px; }
.mc-side .mc-brand img { height: 18px; }
.mc-tab { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--slate-400); }
.mc-tab svg { width: 16px; height: 16px; }
.mc-tab.active { background: oklch(1 0 0 / 0.08); color: white; }
.mc-main { flex: 1; padding: 20px; background: white; }
.mc-main .mc-h { font-size: 15px; font-weight: 700; margin: 0 0 14px; }
.mc-post { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--slate-100); }
.mc-post .mc-av { width: 34px; height: 34px; border-radius: 9999px; background: var(--accent-community-soft); color: var(--accent-community); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; flex-shrink: 0; }
.mc-post .mc-name { font-size: 13px; font-weight: 600; }
.mc-post .mc-txt { font-size: 12.5px; color: var(--muted-foreground); line-height: 1.45; margin-top: 2px; }

/* ---- Closing dark band ---- */
.closing-band {
  position: relative; overflow: hidden;
  background: var(--slate-950); color: var(--slate-100);
  border-radius: 24px;
  padding: clamp(48px, 6vw, 80px) 32px;
  text-align: center;
}
.closing-band::before {
  content: ""; position: absolute; inset: -40%;
  background: radial-gradient(ellipse 40% 50% at 50% 0%, oklch(0.72 0.13 200 / 0.3), transparent 60%);
  pointer-events: none;
}
.closing-band > * { position: relative; }
.closing-band h2 { font-size: clamp(30px, 4vw, 46px); font-weight: 700; letter-spacing: -0.025em; margin: 0; color: white; }
.closing-band p { font-size: 17px; color: var(--slate-400); margin: 16px auto 0; max-width: 520px; }
.closing-band .cta-bar { justify-content: center; margin-top: 32px; }
.closing-band .btn-primary { background: white; color: var(--slate-950); }
.closing-band .btn-primary:hover { background: var(--slate-100); }
.closing-band .btn-secondary { color: white; border-color: oklch(1 0 0 / 0.3); background: transparent; }
.closing-band .btn-secondary:hover { background: oklch(1 0 0 / 0.08); border-color: oklch(1 0 0 / 0.5); }

/* warm-themed closing for community */
.closing-band.warm::before {
  background: radial-gradient(ellipse 45% 55% at 50% 0%, oklch(0.62 0.13 65 / 0.32), transparent 60%);
}

/* ---- eyebrow color override helpers ---- */
.eyebrow.teal .dot { background: var(--accent-mtv); }
.eyebrow.warm .dot { background: var(--accent-community); }

/* page hero spacing reuse */
.page-hero { padding: clamp(56px, 7vw, 96px) 0 clamp(40px, 5vw, 72px); position: relative; overflow: hidden; }
.page-hero .hero-grid { align-items: center; }
@media (max-width: 980px) { .page-hero .hero-grid { grid-template-columns: 1fr; gap: 36px; } }

/* ---- MTV mobile fixes ---- */
@media (max-width: 640px) {
  /* 1. Hero copy — prevent overflow, wrap text */
  .page-hero .hero-grid > div:first-child {
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
  }
  .page-hero .hero-grid > div:first-child h1,
  .page-hero .hero-grid > div:first-child p,
  .page-hero .hero-grid > div:first-child .cta-bar {
    max-width: 100% !important;
  }

  /* 2. Dark card — constrain and center on mobile */
  .dark-card {
    width: calc(100% - 0px);
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    padding: 22px 18px;
  }
  .match-grid {
    width: 100%;
    overflow: hidden;
  }

  /* 3. Problem list — ensure bold text stays inline */
  .problem-list li {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .problem-list li b {
    display: inline;
  }

  /* 4. Problem section — reduce vertical padding */
  .section-tinted-mtv.section {
    padding-top: calc(var(--section-pad-y) * 0.6);
    padding-bottom: calc(var(--section-pad-y) * 0.6);
  }
}

/* roadmap split visual */
.report-visual { padding: 18px; background: var(--accent-community-soft); }
.report-doc {
  background: white; border: 1px solid var(--slate-200); border-radius: 12px; padding: 20px;
  box-shadow: var(--shadow-sm);
}
.report-doc .rd-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.report-doc .rd-badge { font-size: 10px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent-community); background: var(--accent-community-soft); padding: 3px 8px; border-radius: 6px; }
.report-doc .rd-line { height: 9px; border-radius: 5px; background: var(--slate-100); margin-bottom: 9px; }
.report-doc .rd-line.short { width: 55%; }
.report-doc .rd-sec { font-size: 12px; font-weight: 700; color: var(--slate-800); margin: 16px 0 8px; }
