/* Aarhus AI ecosystem — page-specific presentation */
.ecosystem-hero {
  position: relative;
  padding: 88px 0 70px;
}
.ecosystem-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .6fr);
  align-items: end;
  gap: 64px;
}
.ecosystem-intro h1 {
  max-width: 12ch;
  margin: 0 0 22px;
  font-family: var(--font-serif);
  font-size: clamp(48px, 6vw, 82px);
  font-weight: var(--display-weight);
  line-height: 1.04;
  letter-spacing: var(--display-spacing);
  color: var(--text-heading);
}
.ecosystem-intro .lead {
  max-width: 650px;
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.6;
  color: var(--text-body);
}
.ecosystem-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 32px;
}
.ecosystem-stats span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 9px 14px;
  border: 1px solid rgba(26,26,24,.09);
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.48);
  color: var(--text-body);
  font-size: 13px;
  backdrop-filter: blur(12px);
}
.ecosystem-stats strong { color: var(--text-heading); font-size: 15px; }
.ecosystem-note {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 24px;
  border-radius: 24px;
}
.ecosystem-note-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  background: var(--brand-tint);
  color: var(--brand-hover);
  font-size: 21px;
}
.ecosystem-note p { margin: 8px 0 0; color: var(--text-body); font-size: 14px; line-height: 1.55; }

.ecosystem-section { padding: 30px 0 54px; }
.ecosystem-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.ecosystem-toolbar h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 400;
  letter-spacing: -.025em;
  color: var(--text-heading);
}
.filter-reset,
.empty-results button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-body);
  font: 600 13px/1 var(--font-sans);
  cursor: pointer;
}
.filter-reset { padding: 10px 0; text-decoration: underline; text-underline-offset: 4px; }
.filter-reset:hover { color: var(--text-heading); }

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 28px;
}
.category-pill {
  --category: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 13px 8px 10px;
  border: 1px solid rgba(26,26,24,.10);
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.58);
  color: var(--text-heading);
  font: 600 12px/1.2 var(--font-sans);
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease, opacity 150ms ease;
  backdrop-filter: blur(14px);
}
.category-pill:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--category) 50%, transparent); }
.category-pill[aria-pressed="false"] { opacity: .52; background: transparent; }
.category-pill:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.category-pill .category-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--category) 14%, white);
  color: var(--category);
  font-size: 13px;
}
.category-pill[aria-pressed="false"] .category-check { background: rgba(26,26,24,.07); color: transparent; }
.category-count { color: var(--text-muted); font-weight: 500; }

.ecosystem-layout {
  display: block;
}
.ecosystem-map-card {
  position: relative;
  min-height: 560px;
  margin-bottom: 20px;
  overflow: hidden;
  border-radius: 34px;
  clip-path: inset(0 round 34px);
}
.ecosystem-map { position: absolute; inset: 0; border-radius: inherit; background: #e7ebed; }
.map-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 30px;
  text-align: center;
  color: var(--text-muted);
  background: var(--surface-sunken);
}
.map-fallback i { font-size: 32px; }
.ecosystem-map-card.map-unavailable .map-fallback { display: grid; }
.map-overlay,
.map-credit {
  position: absolute;
  z-index: 4;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.84);
  box-shadow: 0 8px 24px rgba(20,30,38,.10);
  backdrop-filter: blur(18px) saturate(1.5);
  color: #34383b;
  font-size: 11px;
}
.map-overlay { top: 16px; left: 16px; display: flex; align-items: center; gap: 8px; padding: 9px 12px; font-weight: 600; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(1,181,248,.13); }
.map-credit { right: 13px; bottom: 12px; }
.map-credit summary { list-style: none; cursor: pointer; padding: 8px 11px; font-weight: 600; }
.map-credit summary::-webkit-details-marker { display: none; }
.map-credit div { padding: 0 11px 9px; }
.map-credit a { color: #34383b; text-decoration: underline; text-underline-offset: 2px; }
.maplibregl-ctrl-attrib { display: none; }
.maplibregl-ctrl-group { overflow: hidden; border: 1px solid rgba(255,255,255,.72); border-radius: 14px !important; box-shadow: 0 8px 24px rgba(20,30,38,.10) !important; }
.maplibregl-ctrl-group button { width: 34px; height: 34px; background-color: rgba(255,255,255,.88); }

.directory-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 6px 15px;
}
.directory-head p { margin: 0; color: var(--text-muted); font-size: 12px; }
.company-pills { display: grid; gap: 9px; }
.company-pill {
  --category: var(--brand);
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 70px;
  padding: 10px 13px 10px 10px;
  border: 1px solid rgba(26,26,24,.09);
  border-radius: 999px;
  background: rgba(255,255,255,.66);
  box-shadow: 0 5px 18px rgba(30,38,44,.035);
  color: var(--text-heading);
  text-decoration: none;
  backdrop-filter: blur(18px);
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.company-pill:hover,
.company-pill.is-highlighted {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--category) 48%, rgba(26,26,24,.09));
  box-shadow: 0 12px 30px rgba(30,38,44,.09);
}
.company-pill:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.company-pill[hidden] { display: none; }
.company-icon,
.company-marker {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: color-mix(in srgb, var(--category) 12%, white);
  color: var(--category);
  font-weight: 700;
  text-transform: uppercase;
}
.company-icon { width: 48px; height: 48px; border: 1px solid color-mix(in srgb, var(--category) 22%, white); font-size: 14px; letter-spacing: -.02em; }
.company-icon img { width: 28px; height: 28px; object-fit: contain; }
.company-pill.featured .company-icon { background: #111418; color: white; border-color: #111418; }
.company-pill.featured .company-icon img { filter: brightness(0) invert(1); }
.company-copy { min-width: 0; }
.company-topline { display: flex; align-items: center; gap: 7px; min-width: 0; }
.company-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 650; }
.company-new { padding: 3px 6px; border-radius: 999px; background: var(--brand-tint); color: var(--brand-hover); font-size: 8px; font-weight: 700; letter-spacing: .07em; }
.company-description { margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-body); font-size: 12px; }
.company-meta { display: flex; align-items: center; gap: 6px; margin-top: 5px; overflow: hidden; color: var(--text-muted); font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.company-meta .category-dot { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--category); }
.company-arrow { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(26,26,24,.055); color: var(--text-body); font-size: 15px; }
.company-pill:hover .company-arrow { background: var(--ink); color: white; }

.company-pills.logo-wall { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.company-pills.logo-wall .company-pill { grid-template-columns: 32px minmax(0, 1fr); min-height: 46px; padding: 6px 10px 6px 6px; }
.company-pills.logo-wall .company-icon { width: 32px; height: 32px; font-size: 9px; }
.company-pills.logo-wall .company-icon img { width: 21px; height: 21px; }
.company-pills.logo-wall .company-description,
.company-pills.logo-wall .company-meta,
.company-pills.logo-wall .company-new,
.company-pills.logo-wall .company-arrow { display: none; }
.company-pills.logo-wall .company-name { font-size: 11.5px; }

.company-marker {
  --category: var(--brand);
  width: 34px;
  height: 34px;
  border: 2px solid white;
  box-shadow: 0 5px 14px rgba(16,23,28,.24);
  font-size: 9px;
  cursor: pointer;
  transition: transform 140ms ease, opacity 140ms ease;
}
.company-marker img { width: 20px; height: 20px; object-fit: contain; }
.company-marker.featured img { filter: brightness(0) invert(1); }
.company-marker:hover,
.company-marker.is-active { transform: scale(1.18); z-index: 2; }
.company-marker.featured { width: 42px; height: 42px; background: #111418; color: white; box-shadow: 0 0 0 3px var(--brand), 0 8px 20px rgba(16,23,28,.28); }
.company-marker.is-hidden { opacity: 0; pointer-events: none; }
.ecosystem-popup .maplibregl-popup-content { min-width: 220px; padding: 15px; border-radius: 18px; box-shadow: 0 18px 40px rgba(16,23,28,.18); }
.ecosystem-popup .maplibregl-popup-close-button { top: 5px; right: 7px; font-size: 18px; color: #74787b; }
.popup-category { margin-bottom: 6px; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--category); }
.popup-name { font-family: var(--font-serif); font-size: 21px; letter-spacing: -.02em; color: #1a1a18; }
.popup-description { margin: 6px 0 9px; color: #5c5b57; font-size: 11px; line-height: 1.45; }
.popup-location { display: flex; gap: 5px; align-items: flex-start; color: #8a8985; font-size: 10px; }

.empty-results { padding: 72px 28px; border: 1px dashed rgba(26,26,24,.16); border-radius: 26px; text-align: center; color: var(--text-body); }
.empty-results i { font-size: 28px; color: var(--text-muted); }
.empty-results h3 { margin: 14px 0 6px; font-family: var(--font-serif); font-size: 24px; color: var(--text-heading); }
.empty-results p { margin: 0 auto 16px; max-width: 38ch; font-size: 13px; }
.empty-results button { color: var(--text-link); text-decoration: underline; text-underline-offset: 3px; }

.ecosystem-editorial { padding: 48px 0 20px; }
.ecosystem-editorial-card { padding: clamp(34px, 5vw, 64px); border-radius: 30px; text-align: center; }
.ecosystem-editorial-card h2 { margin: 14px auto 10px; max-width: 18ch; font-family: var(--font-serif); font-size: clamp(32px, 4vw, 48px); font-weight: 400; line-height: 1.1; letter-spacing: -.03em; color: var(--text-heading); }
.ecosystem-editorial-card p { max-width: 650px; margin: 0 auto 25px; color: var(--text-body); line-height: 1.65; }

[data-theme="dark"] .ecosystem-stats span,
[data-theme="dark"] .category-pill,
[data-theme="dark"] .company-pill { background: rgba(24,27,31,.66); border-color: rgba(255,255,255,.09); }
[data-theme="dark"] .map-overlay,
[data-theme="dark"] .map-credit { background: rgba(24,27,31,.86); color: #e7e9eb; border-color: rgba(255,255,255,.12); }
[data-theme="dark"] .map-credit a { color: #e7e9eb; }
[data-theme="dark"] .company-icon { background: color-mix(in srgb, var(--category) 20%, #1b1e22); border-color: color-mix(in srgb, var(--category) 32%, #1b1e22); }

@media (max-width: 1040px) {
  .ecosystem-map-card { min-height: 520px; }
  .company-pills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .company-pill { grid-template-columns: 42px minmax(0, 1fr) auto; min-height: 64px; }
  .company-icon { width: 42px; height: 42px; }
  .company-pills.logo-wall { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .ecosystem-hero { padding: 54px 0 48px; }
  .ecosystem-hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .ecosystem-intro h1 { font-size: clamp(48px, 15vw, 72px); }
  .ecosystem-toolbar { align-items: start; }
  .ecosystem-map-card { min-height: 430px; border-radius: 22px; }
  .company-pills { grid-template-columns: 1fr; }
  .company-pills.logo-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .company-pills.logo-wall .company-pill { grid-template-columns: 38px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .category-pill,
  .company-pill,
  .company-marker { transition: none; }
}
