/* ============================================================
   v2 — Company detail page
   ============================================================ */

/* Header — large logo + name */
.company-header {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 36px;
  align-items: center;
  margin-bottom: 40px;
  padding-top: 8px;
}
.company-logo-frame {
  width: 180px;
  height: 180px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--rule-soft);
  padding: 18px;
  overflow: hidden;
}
.company-logo-frame img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.company-logo-fallback {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 36px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--navy);
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.company-header-info { min-width: 0; }
.company-name {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 400;
  font-size: clamp(48px, 6vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 4px 0 12px;
  text-wrap: balance;
}
.company-tagline {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 17px;
  line-height: 1.45;
  font-style: italic;
  color: var(--ink-3);
  max-width: 70ch;
}

/* ============== Revenue chart (SVG line + area) ============== */
.rev-chart {
  position: relative;
  margin-top: 24px;
  padding: 56px 24px 48px;
  background: var(--paper-2);
  border: 1px solid var(--rule-soft);
  height: 320px;
  box-sizing: border-box;
}
.rev-chart-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.rev-pt {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
}
.rev-pt-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--blue);
  box-shadow: 0 4px 14px rgba(37,99,235,0.35);
}
.rev-pt-value {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--ink);
  white-space: nowrap;
  font-feature-settings: "lnum";
  background: rgba(247,248,251,0.95);
  padding: 2px 8px;
}
.rev-axis {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  height: 24px;
  pointer-events: none;
}
.rev-axis-tick {
  position: absolute;
  transform: translateX(-50%);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}

.revenue-growth-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--rule-soft);
}
.revenue-growth-label {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.revenue-growth-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  background: #fff;
  border: 1px solid var(--rule-soft);
}
.revenue-growth-pill.up { color: var(--up); border-color: var(--up); }
.revenue-growth-pill.down { color: var(--down); border-color: var(--down); }

/* ============== CEO block ============== */
.company-ceo {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 28px;
  background: var(--paper-2);
  border-left: 3px solid var(--blue);
  margin-top: 16px;
  max-width: 720px;
}
.company-ceo-photo {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid var(--rule-soft);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.company-ceo-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.company-ceo-fallback {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--navy);
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}
.company-ceo-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.company-ceo-role {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 500;
}
.company-ceo-name {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.012em;
  color: var(--ink);
}

/* ============== Markets list (replaces .rank-industries quirky grid) ============== */
.company-markets {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
.company-markets > * {
  flex: 1 1 240px;
  max-width: 320px;
  min-width: 0;
}
.company-market-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 20px;
  background: #fff;
  border: 1px solid var(--rule-soft);
  text-decoration: none;
  color: inherit;
  transition: background .15s, border-color .15s, transform .15s;
}
.company-market-card:hover {
  background: var(--blue-pale);
  border-color: var(--blue);
  transform: translateY(-2px);
}
.company-market-code {
  align-self: flex-start;
  background: var(--ink);
  color: #fff;
  padding: 4px 8px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}
.company-market-name {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.2;
  color: var(--ink);
}
.company-market-cta {
  margin-top: auto;
  padding-top: 8px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.company-market-cta span { transition: transform .15s; display: inline-block; }
.company-market-card:hover .company-market-cta span { transform: translateX(3px); }

@media (max-width: 720px) {
  .company-header {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }
  .company-logo-frame {
    width: 140px;
    height: 140px;
    margin: 0 auto;
    padding: 14px;
  }
  .company-name { font-size: clamp(36px, 9vw, 56px); }
  .company-tagline { margin: 0 auto; }
  .rev-chart { padding: 40px 12px 40px; height: 260px; }
  .rev-pt-value { font-size: 14px; padding: 1px 5px; bottom: 18px; }
  .rev-pt-dot { width: 10px; height: 10px; border-width: 2px; }
  .rev-axis-tick { font-size: 10px; letter-spacing: 0.1em; }
  .company-ceo { flex-direction: column; gap: 16px; padding: 20px; text-align: center; }
  .company-ceo-photo { width: 80px; height: 80px; }
  .company-ceo-name { font-size: 22px; }
  .company-markets { grid-template-columns: 1fr; }
}
