/* Research hub — layout aligned with blog / typography-tokens */

html {
  scroll-padding-top: calc(var(--research-global-nav-height, 64px) + var(--research-sticky-stack-height, 140px));
}

:root {
  --research-global-nav-height: 64px;
  --research-sticky-stack-height: 140px;
  --research-page-max: 1120px;
  --research-gap-lg: 28px;
  --research-gap-md: 20px;
  --research-gap-sm: 16px;
  --bv-purple: var(--bv-blue-400);
  --bv-purple-light: var(--bv-blue-100);
  --bv-dark: var(--gradient-start);
  --text-primary: var(--ink);
  --text-secondary: var(--neutral-700);
  --text-tertiary: var(--neutral-400);
  --surface: #fff;
  --surface-raised: var(--neutral-50);
  --surface-muted: var(--neutral-100);
  --border: var(--neutral-200);
  --border-light: var(--neutral-100);
  --serif: var(--font-display);
  --sans: var(--font-primary);
}

main.research-index-main {
  padding-top: var(--research-global-nav-height);
  max-width: var(--research-page-max);
  margin: 0 auto;
}

/* ── Sticky stack ── */
.research-sticky-stack {
  position: sticky;
  top: var(--research-global-nav-height, 64px);
  z-index: 100;
  margin: 0 auto var(--research-gap-lg);
  padding: 0 var(--space-page-gutter) 0;
  background: color-mix(in srgb, var(--paper) 98%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--neutral-200) 55%, transparent);
}

.research-access-card--quiet {
  padding: 14px 0 12px;
  margin: 0;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  text-align: left;
}

.research-access-card__inner {
  display: grid;
  gap: 12px;
  align-items: center;
}

.research-access-card__label {
  font-family: var(--sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-secondary);
  margin: 0;
  letter-spacing: 0;
  line-height: var(--leading-snug);
}

.research-access-card__copy p {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin: 4px 0 0;
  line-height: 1.45;
  max-width: 52ch;
}

.research-access-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  width: fit-content;
  font-family: var(--sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  padding: 10px 22px;
  background: var(--bv-purple);
  color: var(--text-inverse);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s var(--ease-spring);
}

.research-access-btn:hover {
  background: var(--bv-blue-600);
}

.research-access-btn:focus-visible {
  outline: 2px solid var(--bv-blue-400);
  outline-offset: 2px;
}

@media (min-width: 640px) {
  .research-access-card__inner {
    grid-template-columns: 1fr auto;
    gap: 16px 24px;
  }

  .research-access-btn {
    justify-self: end;
  }
}

.research-jump {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  padding: 8px 0 10px;
  border-bottom: none;
}

.research-jump a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  font-family: var(--sans);
  color: var(--text-secondary);
  text-decoration: none;
  padding: 10px 0;
  white-space: nowrap;
  transition: color 0.15s var(--ease-spring), font-weight 0.15s var(--ease-spring);
}

.research-jump a:hover {
  color: var(--text-primary);
}

.research-jump a.is-active {
  color: var(--text-primary);
  font-weight: var(--weight-semibold);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
  text-decoration-color: color-mix(in srgb, var(--bv-purple) 45%, transparent);
}

.research-jump a:focus-visible {
  outline: 2px solid var(--bv-blue-400);
  outline-offset: 2px;
  border-radius: 2px;
}

.research-jump .nav-sep {
  color: var(--neutral-400);
  margin: 0 12px;
  user-select: none;
  font-size: var(--text-sm);
  line-height: 1;
}

#flagship,
#models,
#library,
#consulting {
  scroll-margin-top: calc(var(--research-global-nav-height) + var(--research-sticky-stack-height) + 12px);
}

/* ── Hero ── */
.research-hero {
  padding: 28px var(--space-page-gutter) var(--research-gap-lg);
  border-bottom: 1px solid var(--border);
}

.research-hero__eyebrow {
  font-size: 11px;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bv-purple);
  margin: 0 0 14px;
}

.research-hero__title {
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: var(--weight-regular, 400);
  line-height: var(--leading-tight, 1.15);
  color: var(--text-primary);
  max-width: 18ch;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}

.research-hero__title em {
  font-style: italic;
  font-weight: 300;
}

.research-hero__dek {
  font-size: var(--text-body-lg, 17px);
  color: var(--text-secondary);
  max-width: 62ch;
  line-height: 1.55;
  margin: 0 0 12px;
}

.research-hero__bridge {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  max-width: 62ch;
  line-height: 1.55;
  margin: 0 0 var(--research-gap-lg);
}

.research-hero__bridge a {
  color: var(--bv-purple);
  font-weight: var(--weight-medium);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.research-hero__bridge a:hover {
  color: var(--bv-blue-600);
}

.research-hero__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  max-width: 720px;
}

.research-hero__stat {
  background: var(--surface);
  padding: 22px 20px;
}

.research-hero__stat-value {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin: 0 0 4px;
  line-height: 1.1;
}

.research-hero__stat-label {
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.4;
  letter-spacing: 0.02em;
}

/* ── Sections ── */
.research-index-main .research-section {
  padding: var(--research-gap-lg) var(--space-page-gutter) 56px;
}

.research-section-divider {
  height: 1px;
  background: var(--border-light);
  margin: 0 var(--space-page-gutter);
}

.research-section__eyebrow {
  font-size: 11px;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bv-purple);
  margin: 0 0 12px;
}

.research-section__title {
  font-family: var(--serif);
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 400;
  line-height: 1.2;
  color: var(--text-primary);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.research-section__desc {
  font-size: var(--text-body);
  color: var(--text-secondary);
  max-width: 56ch;
  line-height: 1.55;
  margin: 0 0 var(--research-gap-lg);
}

.research-section__desc a {
  color: var(--bv-purple);
  font-weight: var(--weight-medium);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.research-section__desc a:hover {
  color: var(--bv-blue-600);
}

/* ── Cards (override typography-tokens shadow) ── */
.research-index-main .card-border {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: none;
}

.research-index-main .model-card,
.research-index-main .research-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  min-height: 44px;
  text-align: left;
  text-decoration: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.15s var(--ease-spring), background 0.15s var(--ease-spring);
}

.research-index-main .model-card:hover,
.research-index-main .research-item:hover {
  border-color: var(--neutral-300);
  background: var(--surface-raised);
  opacity: 1;
}

.research-index-main .model-card:focus-visible,
.research-index-main .research-item:focus-visible {
  outline: 2px solid var(--bv-blue-400);
  outline-offset: 2px;
}

.research-index-main .model-card h3,
.research-index-main .research-item h3,
.research-index-main .research-item h4 {
  font-family: var(--sans);
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  color: var(--text-primary);
  margin: 0;
}

.research-index-main .model-card:hover h3,
.research-index-main .research-item:hover h3,
.research-index-main .research-item:hover h4 {
  color: var(--text-accent);
}

.research-index-main .model-card p,
.research-index-main .research-item p,
.research-index-main .consulting-step p,
.research-index-main .preview-toc li,
.research-index-main .preview-toc a {
  max-width: none;
}

.research-index-main .model-card p,
.research-index-main .research-item p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: var(--research-gap-sm);
}

.research-list {
  display: flex;
  flex-direction: column;
  gap: var(--research-gap-sm);
}

.research-field-note {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: var(--research-gap-md);
  padding: 18px 20px;
  text-align: left;
}

.research-field-note__eyebrow {
  font-size: 11px;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bv-purple);
  margin: 0;
}

.research-field-note__body {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
  max-width: 62ch;
}

.research-field-note__cta {
  font-size: 12px;
  font-weight: var(--weight-semibold);
  color: var(--bv-purple);
  text-decoration: none;
  width: fit-content;
}

.research-field-note__cta:hover {
  text-decoration: underline;
}

.research-field-note__cta:focus-visible {
  outline: 2px solid var(--bv-blue-400);
  outline-offset: 2px;
  border-radius: 2px;
}

.model-meta,
.research-item-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.model-tag,
.research-tag {
  display: inline-block;
  width: fit-content;
  font-size: 10px;
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 3px;
  line-height: 1.6;
}

.model-tag.live,
.research-tag.access-free {
  background: var(--green-50);
  color: var(--green-700);
}

.model-tag.gated,
.research-tag.access-gated {
  background: var(--bv-blue-100);
  color: var(--bv-blue-600);
}

.model-tag.planned {
  background: var(--neutral-100);
  color: var(--text-tertiary);
}

.model-tag.quarterly,
.model-tag.interactive,
.research-tag.access-interactive {
  background: var(--yellow-100);
  color: var(--gold-700);
}

.research-tag.date {
  background: var(--neutral-100);
  color: var(--text-tertiary);
}

.model-card-cta,
.research-item-cta {
  display: inline-block;
  margin-top: auto;
  padding-top: 8px;
  font-size: 12px;
  font-weight: var(--weight-semibold);
  color: var(--bv-purple);
}

.research-index-main .model-card:hover .model-card-cta,
.research-index-main .research-item:hover .research-item-cta {
  text-decoration: underline;
}

/* ── Flagship ── */
.flagship {
  background: var(--bv-dark);
  border-radius: var(--radius-section);
  padding: clamp(32px, 5vw, 56px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 56px);
  align-items: center;
}

.flagship-content {
  color: var(--text-inverse);
}

.flagship-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: color-mix(in srgb, var(--bv-blue-400) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--bv-blue-400) 38%, transparent);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--bv-blue-100);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.flagship-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bv-blue-100);
}

.flagship-sub {
  font-size: var(--text-sm);
  color: color-mix(in srgb, var(--text-inverse) 60%, transparent);
  line-height: 1.6;
  margin: 0 0 28px;
}

.flagship-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 28px;
}

.flagship-metric {
  border-left: 2px solid var(--bv-purple);
  padding-left: 14px;
}

.flagship-metric-val {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-inverse);
  margin-bottom: 2px;
}

.flagship-metric-label {
  font-size: 11px;
  color: color-mix(in srgb, var(--text-inverse) 45%, transparent);
}

.flagship-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.research-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  background: var(--bv-purple);
  color: var(--text-inverse);
  font-size: 13px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 100px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s var(--ease-spring);
}

.research-btn-primary:hover {
  background: var(--bv-blue-600);
}

.research-btn-primary:focus-visible,
.research-btn-secondary:focus-visible {
  outline: 2px solid var(--bv-blue-100);
  outline-offset: 2px;
}

.research-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  background: transparent;
  color: var(--text-inverse);
  font-size: 13px;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: 100px;
  text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--text-inverse) 22%, transparent);
  transition: border-color 0.15s var(--ease-spring), background 0.15s var(--ease-spring);
}

.research-btn-secondary:hover {
  border-color: color-mix(in srgb, var(--text-inverse) 42%, transparent);
  background: color-mix(in srgb, var(--text-inverse) 8%, transparent);
}

.flagship-preview-img {
  width: 100%;
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--text-inverse) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--text-inverse) 10%, transparent);
  aspect-ratio: 4/5;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 28px;
  overflow: hidden;
}

.preview-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--text-inverse) 32%, transparent);
  margin-bottom: 14px;
  font-weight: 600;
}

.preview-toc {
  list-style: none;
  margin: 0;
  padding: 0;
}

.preview-toc li {
  font-size: 13px;
  color: color-mix(in srgb, var(--text-inverse) 50%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--text-inverse) 8%, transparent);
}

.preview-toc li:last-child {
  border-bottom: none;
}

.preview-toc li > a,
.preview-toc li.modal-toc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 10px 8px;
  margin: 0 -8px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  transition: color 0.15s var(--ease-spring), background 0.15s var(--ease-spring);
}

.preview-toc li > a:hover,
.preview-toc li.modal-toc-item:hover {
  color: color-mix(in srgb, var(--text-inverse) 92%, transparent);
  background: color-mix(in srgb, var(--text-inverse) 6%, transparent);
}

.preview-toc li > a:focus-visible,
.preview-toc li.modal-toc-item:focus-visible {
  outline: 2px solid var(--bv-blue-100);
  outline-offset: 2px;
}

.preview-toc li > a .toc-action {
  color: var(--green-400);
}

.preview-toc li > a[href="#research-access-form"] .toc-action {
  color: var(--bv-blue-100);
}

.preview-toc li.modal-toc-item {
  cursor: pointer;
}

.preview-toc li.modal-toc-item .toc-action {
  font-size: 11px;
  font-weight: var(--weight-semibold);
  color: var(--bv-blue-100);
  white-space: nowrap;
}

.preview-toc li > a .toc-action,
.preview-toc .toc-action {
  font-size: 11px;
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

/* ── Advisory ── */
.consulting-section {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-section);
  padding: clamp(32px, 4vw, 48px);
  margin-top: var(--research-gap-sm);
}

.consulting-section .research-btn-primary {
  margin-top: 4px;
}

.consulting-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--research-gap-md) 24px;
  margin-bottom: var(--research-gap-lg);
}

.consulting-step {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 22px 20px;
  background: var(--text-inverse);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  border-top: 3px solid var(--bv-purple);
}

.step-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bv-blue-600);
  background: var(--bv-blue-100);
  line-height: 1;
  padding: 7px 12px;
  border-radius: 999px;
  display: inline-block;
  width: fit-content;
  margin-bottom: 12px;
}

.consulting-step h4 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text-primary);
  line-height: 1.25;
}

.consulting-step .step-price {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--bv-purple);
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.step-arrow {
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--neutral-400);
  font-size: 18px;
  z-index: 1;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--neutral-900) 62%, transparent);
  backdrop-filter: blur(8px);
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s var(--ease-spring);
  padding: var(--space-page-gutter);
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal {
  background: var(--text-inverse);
  border-radius: var(--radius-section);
  padding: 28px;
  max-width: 480px;
  width: 100%;
  position: relative;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-section);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-tertiary);
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--surface-muted);
}

.modal h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  margin: 0 32px 8px 0;
}

.modal-lead {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 16px;
  line-height: 1.55;
}

.modal-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 16px;
  font-size: 13px;
  padding: 12px 24px;
  cursor: pointer;
  font-family: var(--sans);
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-weight: var(--weight-medium);
}

.modal-form-label {
  font-size: 11px;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin: 0 0 10px;
}

.modal-form-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--neutral-50);
}

.modal-form-panel.is-highlight {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--bv-purple) 35%, transparent);
}

/* ── Reveal (subtle) ── */
.reveal {
  opacity: 0;
  transition: opacity 0.5s var(--ease-spring);
}

.reveal.visible {
  opacity: 1;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .research-hero__stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .flagship {
    grid-template-columns: 1fr;
  }

  .flagship-preview {
    display: none;
  }

  .consulting-steps {
    grid-template-columns: 1fr;
  }

  .step-arrow {
    display: none;
  }
}

@media (max-width: 600px) {
  .research-index-main .research-section {
    padding-bottom: 40px;
  }

  .research-hero__stats,
  .flagship-metrics {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transition: none;
  }

  .research-index-main .model-card,
  .research-index-main .research-item {
    transition: none;
  }
}
