/* Switchery — shared layout and typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #fafafa;
  color: #1a1a1a;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.site-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.site-logo {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.site-logo a { color: inherit; text-decoration: none; }
.site-nav a {
  color: #555;
  text-decoration: none;
  margin-left: 1.25rem;
  font-size: 0.9375rem;
}
.site-nav a:hover { color: #1a1a1a; }

/* Main content width */
.main-wrap {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
/* Wider wrap for timeline page so left/right cards have room */
.main-wrap.timeline-page {
  max-width: 56rem;
}
@media (min-width: 640px) {
  .main-wrap { padding: 3rem 2rem; }
}

/* Typography */
.page-title {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
}
.page-subtitle {
  color: #555;
  font-size: 1rem;
  margin: 0 0 1.5rem;
}
.lead {
  color: #333;
  font-size: 1.0625rem;
  margin-bottom: 1.5rem;
}

/* CTA button */
.cta-link {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: #1a1a1a;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 6px;
  margin-top: 0.25rem;
}
.cta-link:hover { background: #333; }

/* Breadcrumb / back */
.breadcrumb, .back-link {
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}
.breadcrumb a, .back-link {
  color: #555;
  text-decoration: none;
}
.breadcrumb a:hover, .back-link:hover { color: #1a1a1a; }
.back-link { display: inline-block; }

/* Company list */
.company-list {
  display: grid;
  gap: 0.5rem;
}
.company-list a {
  display: block;
  padding: 0.875rem 1rem;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  color: #1a1a1a;
  text-decoration: none;
  font-weight: 500;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.company-list a:hover {
  border-color: #ccc;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* Timeline — center line, alternating left/right cards */
.timeline {
  margin-top: 1.5rem;
  position: relative;
  padding-bottom: 2rem;
}
/* Vertical line down the center */
.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #d1d5db;
  transform: translateX(-50%);
  z-index: 0;
}
@media (max-width: 767px) {
  .timeline::before { left: 1.25rem; transform: none; }
}

.timeline-entry {
  display: grid;
  grid-template-columns: 1fr 2.5rem 1fr;
  gap: 0;
  align-items: start;
  position: relative;
  z-index: 1;
  margin-bottom: 2rem;
  min-height: 80px;
}
.timeline-entry:last-child { margin-bottom: 0; }
@media (max-width: 767px) {
  .timeline-entry {
    grid-template-columns: 2.5rem 1fr;
    grid-template-rows: auto auto;
    gap: 0 1rem;
  }
  .timeline-entry .timeline-spacer { display: none; }
  .timeline-entry--left .timeline-card,
  .timeline-entry--right .timeline-card {
    grid-column: 2;
  }
  .timeline-entry--left .timeline-marker,
  .timeline-entry--right .timeline-marker {
    grid-column: 1;
    grid-row: 1 / -1;
  }
}

/* Left card: content | marker | spacer */
.timeline-entry--left .timeline-card { grid-column: 1; grid-row: 1; padding-right: 1rem; }
.timeline-entry--left .timeline-marker { grid-column: 2; grid-row: 1; }
.timeline-entry--left .timeline-spacer { grid-column: 3; grid-row: 1; }

/* Right card: spacer | marker | content */
.timeline-entry--right .timeline-card { grid-column: 3; grid-row: 1; padding-left: 1rem; }
.timeline-entry--right .timeline-marker { grid-column: 2; grid-row: 1; }
.timeline-entry--right .timeline-spacer { grid-column: 1; grid-row: 1; }

.timeline-marker {
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  border-radius: 50%;
  background: #e5e7eb;
  border: 3px solid #fafafa;
  box-shadow: 0 0 0 2px #d1d5db;
  margin-top: 0.25rem;
  justify-self: center;
  position: relative;
  z-index: 2;
}
@media (max-width: 767px) {
  .timeline-marker { margin-top: 0.5rem; justify-self: start; }
}

.timeline-card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 1.25rem 1.25rem 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.timeline-entry--left .timeline-card { margin-right: 0; }
.timeline-entry--right .timeline-card { margin-left: 0; }

.timeline-date {
  font-size: 0.8125rem;
  color: #666;
  margin-bottom: 0.35rem;
  font-style: italic;
}
.timeline-title {
  font-weight: 600;
  font-size: 1.0625rem;
  margin: 0 0 0.5rem;
  line-height: 1.4;
}
.timeline-desc {
  color: #444;
  font-size: 0.9375rem;
  margin-bottom: 0.75rem;
}
.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.timeline-tag {
  font-size: 0.75rem;
  color: #666;
  background: #eee;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}
.timeline-tag.ethical { background: #fde8e8; color: #8b2a2a; }
.timeline-tag.acquisition { background: #e8f0fe; color: #1a3a5c; }
.timeline-tag.ownership { background: #f0e8e0; color: #5c3a1a; }
.timeline-sources {
  font-size: 0.8125rem;
}
.timeline-sources a {
  color: #0066cc;
  text-decoration: none;
}
.timeline-sources a:hover { text-decoration: underline; }
.timeline-sources ul {
  margin: 0;
  padding-left: 1.25rem;
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e5e5;
  font-size: 0.8125rem;
  color: #666;
}
.site-footer a {
  color: #0066cc;
  text-decoration: none;
}
.site-footer a:hover { text-decoration: underline; }

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -3rem;
  left: 0.5rem;
  background: #1a1a1a;
  color: #fff;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  font-size: 0.875rem;
  z-index: 100;
  border-radius: 4px;
}
.skip-link:focus {
  top: 0.5rem;
}
