/* style.css — CRM Switch AI-Native CRM Directory */

/* ========== DESIGN TOKENS ========== */
:root {
  /* CRM Switch Brand Colors */
  --color-primary-dark: #093c54;
  --color-accent: #468917;
  --color-accent-hover: #3a7413;
  --color-accent-light: #5ba52a;
  --color-bg: #f2f8f2;
  --color-bg-alt: #f7f7f7;
  --color-white: #ffffff;
  --color-text: #1a2a1f;
  --color-text-muted: #5a6b60;
  --color-text-faint: #8a9b8f;
  --color-text-inverse: #f2f8f2;
  --color-border: #d4ddd6;
  --color-divider: #e2ebe4;
  --color-surface: #ffffff;
  --color-surface-offset: #edf5ed;

  /* Type Scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(9, 60, 84, 0.06);
  --shadow-md: 0 4px 16px rgba(9, 60, 84, 0.08);
  --shadow-lg: 0 12px 40px rgba(9, 60, 84, 0.12);

  /* Content widths */
  --content-narrow: 720px;
  --content-default: 1020px;
  --content-wide: 1240px;

  /* Fonts */
  --font-body: 'General Sans', 'Inter', sans-serif;
  --font-display: 'Cabinet Grotesk', 'General Sans', sans-serif;
}

/* ========== GLOBAL ========== */
a {
  color: inherit;
  text-decoration: none;
}

/* ========== HEADER ========== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-4) var(--space-6);
  background: rgba(9, 60, 84, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.header-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo img {
  height: 32px;
  width: auto;
}

.header-link {
  color: var(--color-text-inverse);
  font-size: var(--text-sm);
  opacity: 0.8;
  transition: opacity var(--transition-interactive);
}
.header-link:hover {
  opacity: 1;
}

/* ========== HERO ========== */
.hero {
  background: var(--color-primary-dark);
  padding: calc(var(--space-32) + 60px) var(--space-6) var(--space-24);
  position: relative;
  overflow: hidden;
}

.hero-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

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

.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  line-height: 1.05;
  color: #fff;
  margin-bottom: var(--space-6);
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.75);
  margin-bottom: var(--space-8);
  max-width: 520px;
  line-height: 1.6;
}

.hero-source {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.5);
}
.hero-source a {
  color: var(--color-accent-light);
  text-decoration: underline;
  text-decoration-color: rgba(91, 165, 42, 0.4);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--transition-interactive);
}
.hero-source a:hover {
  text-decoration-color: var(--color-accent-light);
}

/* Hero SVG animation */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual svg {
  width: 100%;
  max-width: 480px;
  height: auto;
}

/* ========== SECTION STYLING ========== */
.section {
  padding: clamp(var(--space-12), 8vw, var(--space-24)) var(--space-6);
}

.section-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-primary-dark);
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}

.section-desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 600px;
  margin-bottom: var(--space-10);
}

/* ========== FUNDING CHART ========== */
.funding-section {
  background: var(--color-bg-alt);
}

.funding-chart {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.funding-row {
  display: grid;
  grid-template-columns: 140px 1fr 120px;
  gap: var(--space-4);
  align-items: center;
}

.funding-company {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-primary-dark);
  text-align: right;
  white-space: nowrap;
}

.funding-bar-wrap {
  height: 44px;
  background: rgba(9, 60, 84, 0.06);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.funding-bar {
  height: 100%;
  background: linear-gradient(135deg, var(--color-accent), #5bb82a);
  border-radius: var(--radius-lg);
  width: 0;
  transition: width 1.2s var(--ease-out);
  position: relative;
  display: flex;
  align-items: center;
  min-width: 2px;
}

.funding-bar.bootstrapped {
  background: linear-gradient(135deg, var(--color-primary-dark), #0d5a7d);
  min-width: 120px;
}

.funding-bar-inner-label {
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 600;
  padding-left: var(--space-3);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.4s 0.8s;
}

.funding-bar.animated .funding-bar-inner-label {
  opacity: 1;
}

.funding-amount {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-primary-dark);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.funding-amount.bootstrapped-label {
  color: var(--color-text-muted);
  font-weight: 600;
  font-style: italic;
}

/* ========== COMPANY CARDS ========== */
.companies-section {
  background: var(--color-bg);
}

/* Featured card (Attio) */
.company-featured {
  background: var(--color-surface);
  border-radius: var(--radius-2xl);
  padding: var(--space-10);
  margin-bottom: var(--space-12);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  position: relative;
  overflow: hidden;
}

.company-featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-primary-dark));
}

.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent);
  background: rgba(70, 137, 23, 0.1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.company-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-primary-dark);
  margin-bottom: var(--space-2);
  letter-spacing: -0.01em;
}

.company-name a {
  transition: color var(--transition-interactive);
}
.company-name a:hover {
  color: var(--color-accent);
}

.company-desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  line-height: 1.7;
}

.company-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.meta-item svg {
  width: 16px;
  height: 16px;
  color: var(--color-accent);
  flex-shrink: 0;
}

.funding-highlight {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(70, 137, 23, 0.08);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
}

.funding-highlight-amount {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-accent);
}

.funding-highlight-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.investors-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
  line-height: 1.6;
}

.investors-label {
  font-weight: 600;
  color: var(--color-text);
}

/* Features */
.features-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.feature-tag {
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-3);
  background: var(--color-surface-offset);
  border-radius: var(--radius-full);
  color: var(--color-text);
  border: 1px solid var(--color-divider);
  line-height: 1.5;
}

/* Customers */
.customers-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.customer-pill {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: var(--space-1) var(--space-3);
  background: var(--color-primary-dark);
  color: #fff;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

/* Founders */
.founders-section-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-faint);
  margin-bottom: var(--space-3);
}

.founders-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.founder-chip {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-divider);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}
.founder-chip:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-sm);
}

.founder-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary-dark);
}

.founder-role {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.linkedin-icon {
  width: 16px;
  height: 16px;
  color: #0A66C2;
  flex-shrink: 0;
}

/* Company links row */
.company-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.company-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  transition: all var(--transition-interactive);
}
.company-link:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(70, 137, 23, 0.04);
}
.company-link svg {
  width: 16px;
  height: 16px;
}

/* ========== TWO-COLUMN CARDS GRID ========== */
.cards-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-10);
}

/* ========== FULL-WIDTH CARD ========== */
.company-card-full {
  background: var(--color-surface);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  margin-bottom: var(--space-8);
  position: relative;
}

.company-card-full .card-inner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
}

/* ========== STANDARD CARD ========== */
.company-card {
  background: var(--color-surface);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Card accent markers */
.card-marker {
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-4);
  flex-shrink: 0;
}

/* ========== STATS SECTION ========== */
.stats-section {
  background: var(--color-primary-dark);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

.stat-card {
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-accent-light);
  margin-bottom: var(--space-2);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.6);
}

/* Geo map */
.geo-visual {
  max-width: 800px;
  margin: 0 auto;
}

.geo-visual svg {
  width: 100%;
  height: auto;
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--color-primary-dark);
  padding: var(--space-12) var(--space-6);
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-left {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.footer-logo img {
  height: 28px;
  width: auto;
}

.footer-links {
  display: flex;
  gap: var(--space-6);
}

.footer-link {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.5);
  transition: color var(--transition-interactive);
}
.footer-link:hover {
  color: rgba(255,255,255,0.8);
}

.footer-copy {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.35);
}

/* ========== ANIMATIONS ========== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-visual {
    display: none;
  }
  .featured-grid {
    grid-template-columns: 1fr;
  }
  .cards-grid-2col {
    grid-template-columns: 1fr;
  }
  .company-card-full .card-inner-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero {
    padding: calc(var(--space-24) + 60px) var(--space-4) var(--space-16);
  }
  .hero h1 {
    font-size: var(--text-2xl);
  }
  .section {
    padding: var(--space-12) var(--space-4);
  }
  .funding-row {
    grid-template-columns: 100px 1fr 80px;
    gap: var(--space-2);
  }
  .funding-company {
    font-size: var(--text-sm);
  }
  .funding-amount {
    font-size: var(--text-sm);
  }
  .funding-bar-wrap {
    height: 36px;
  }
  .company-featured,
  .company-card,
  .company-card-full {
    padding: var(--space-6);
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-6);
  }
  .footer-left {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: var(--space-3) var(--space-4);
  }
  .funding-row {
    grid-template-columns: 1fr;
    gap: var(--space-1);
  }
  .funding-company {
    text-align: left;
  }
  .funding-bar-wrap {
    height: 32px;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
  }
  .company-meta {
    flex-direction: column;
    gap: var(--space-2);
  }
}
