/* ============================================================================
   Hero (home + other pages using legacy classes)
   ============================================================================ */

.hero {
  padding: 60px 0 72px;
  box-shadow: 0 var(--hairline) 0 var(--border-1);
  margin-bottom: 56px;
}
.hero-inner { max-width: 920px; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 5px 10px;
  box-shadow: inset 0 0 0 var(--hairline) var(--border-1);
  border-radius: var(--r-full);
  margin-bottom: 24px;
}

.display {
  font-family: var(--font-serif);
  font-size: clamp(44px, 7vw, 84px);
  font-weight: var(--w-normal);
  line-height: 1.02;
  letter-spacing: var(--ls-tight);
  color: var(--text-0);
  margin-bottom: 24px;
  text-wrap: balance;
}
.display em {
  font-style: italic;
  color: var(--accent);
  font-size: 1em;
}

.lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 680px;
  margin-bottom: 40px;
}

.hero-cta { display: flex; gap: 12px; align-items: center; }


/* ============================================================================
   Hero stats grid (home)
   ============================================================================ */

.hero-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--hairline);
  background: var(--border-1);
  box-shadow: inset 0 0 0 var(--hairline) var(--border-1);
  border-radius: var(--r-4);
  margin-bottom: 32px;
  overflow: hidden;
}
.stat {
  background: var(--bg-0);
  padding: 22px 24px;
  transition: background-color var(--dur-fast) ease;
}
@media (hover: hover) {
  .stat:hover { background: var(--bg-1); }
}
.stat-num {
  display: block;
  font-family: var(--font-serif);
  font-size: 38px;
  line-height: 1;
  color: var(--text-0);
  font-weight: var(--w-normal);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  font-feature-settings: "tnum";
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}


/* ============================================================================
   Pattern grid (home index of patterns)
   ============================================================================ */

.pattern-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.pattern-card {
  padding: 22px;
  background: var(--bg-1);
  box-shadow: 0 0 0 var(--hairline) var(--border-1);
  border-radius: var(--r-4);
  transition: box-shadow var(--dur-fast) var(--ease),
              background-color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}
.pattern-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: translateX(-101%);
  transition: transform var(--dur-slow) var(--ease-out);
}
@media (hover: hover) {
  .pattern-card:hover {
    background: var(--bg-2);
    box-shadow: 0 0 0 var(--hairline) var(--border-2), var(--shadow-2);
    transform: translateY(-2px);
  }
  .pattern-card:hover::before { transform: translateX(0); }
}
.pattern-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.pattern-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-2);
  background: var(--accent-faint);
  color: var(--accent);
  box-shadow: inset 0 0 0 var(--hairline) var(--accent-line);
}
.pattern-count {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: var(--w-semi);
  color: var(--text-2);
}
.pattern-card h3 {
  font-size: 16px;
  font-weight: var(--w-semi);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  color: var(--text-0);
}
.pattern-card p {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.5;
}


/* ============================================================================
   Thesis bars (horizontal distribution chart)
   ============================================================================ */

.thesis-bars { display: flex; flex-direction: column; gap: 2px; }
.thesis-bar {
  display: grid;
  grid-template-columns: 160px 1fr 44px;
  gap: 14px;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--r-3);
  transition: background-color var(--dur-fast) ease;
  text-decoration: none;
  color: inherit;
}
@media (hover: hover) {
  .thesis-bar:hover { background: var(--bg-1); }
}
.thesis-name {
  font-size: 12px;
  color: var(--text-2);
  text-transform: capitalize;
}
.thesis-track {
  height: 8px;
  background: var(--bg-2);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.thesis-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-faint), var(--accent));
  border-radius: 2px;
}
.thesis-count {
  font-size: 11px;
  color: var(--text-3);
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}


/* ============================================================================
   Year bars (activity over time)
   ============================================================================ */

.year-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 150px;
  padding: 20px 0;
  box-shadow:
    0 var(--hairline) 0 var(--border-1),
    0 calc(-1 * var(--hairline)) 0 var(--border-1);
}
.year-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  height: 100%;
  position: relative;
  transition: opacity var(--dur-fast) ease;
  text-decoration: none;
  color: inherit;
}
@media (hover: hover) {
  .year-bar:hover { opacity: 0.75; }
}
.year-fill {
  width: 100%;
  min-height: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-faint));
  border-radius: 2px 2px 0 0;
  transition: transform var(--dur-base) var(--ease);
  transform-origin: bottom;
}
@media (hover: hover) {
  .year-bar:hover .year-fill { transform: scaleY(1.05); }
}
.year-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: 0.03em;
}
.year-count {
  position: absolute;
  top: -14px;
  font-size: 9px;
  color: var(--text-4);
  opacity: 0;
  transition: opacity var(--dur-fast) ease;
  font-variant-numeric: tabular-nums;
}
@media (hover: hover) {
  .year-bar:hover .year-count { opacity: 1; color: var(--accent); }
}


/* ============================================================================
   Mini table (home — top firms etc.)
   ============================================================================ */

.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.mini-table th {
  padding: 8px 10px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: var(--w-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  box-shadow: 0 var(--hairline) 0 var(--border-1);
}
.mini-table th.num, .mini-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.mini-table td {
  padding: 10px;
  box-shadow: 0 var(--hairline) 0 var(--border-1);
  color: var(--text-2);
}
@media (hover: hover) {
  .mini-table tr:hover td { background: var(--bg-1); color: var(--text-0); }
}
.mini-table .link { color: var(--text-0); }
.mini-table .kind-tag { font-size: 9px; padding: 2px 6px; margin-left: 8px; }


/* ============================================================================
   Section primitives (legacy — used across home + some pages)
   ============================================================================ */

.section {
  margin-bottom: 64px;
}
.section-head {
  margin-bottom: 28px;
  max-width: 720px;
}
.section-title {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: var(--w-normal);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 8px;
  color: var(--text-0);
}
.section-sub {
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.55;
}

.section-split {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 48px;
  margin-bottom: 64px;
  padding-top: 48px;
  box-shadow: 0 calc(-1 * var(--hairline)) 0 var(--border-1);
}
.section-split .section-title { font-size: 22px; margin-bottom: 20px; }

@media (max-width: 900px) {
  .section-split { grid-template-columns: 1fr; gap: 24px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}
