/* ============================================================
   partners.css — Mastery Logistics Systems
   Integration Partners page styles.
   Global styles live in style.css.
   Desktop styles first. Mobile overrides at the bottom.

   COMPONENT REUSE:
   - .image-placeholder — same component used on configuration-portal
     and platform pages. A modifier --spotlight is added here for the
     spotlight card thumb sizing.
   - All colors / spacing / typography pull from style.css variables.

   STRUCTURE:
   1. Image placeholder (shared component, + --spotlight modifier)
   2. Partners hero
   3. Partner spotlight + spotlight cards
   4. Integration grid + filter chips + logo cards
   5. Closing CTA
   6. Mobile overrides
============================================================ */


/* ============================================================
   1. IMAGE PLACEHOLDER (shared component, +--spotlight modifier)
   Base styles live across pages; this file adds the spotlight
   sizing variant. Branded copper-on-dark frame with grid texture.
============================================================ */
.image-placeholder {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background:
    radial-gradient(circle at 35% 30%, rgba(252, 147, 101, 0.16) 0%, transparent 62%),
    linear-gradient(135deg, #1a1a1a, #2a2320);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.image-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(252, 147, 101, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(252, 147, 101, 0.05) 1px, transparent 1px);
  background-size: 18px 18px;
  pointer-events: none;
}

.image-placeholder__label {
  position: relative;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: rgba(252, 147, 101, 0.9);
  letter-spacing: 0.02em;
}

.image-placeholder__note {
  position: relative;
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.image-placeholder--spotlight {
  aspect-ratio: 16 / 10;
  border-radius: 0;  /* squared because parent .spotlight-card__thumb handles border-radius */
}


/* ============================================================
   2. PARTNERS HERO
   Dark, centered, no screenshot — logos and content carry visual
   weight downpage. Two CTAs: primary (Book a Demo), secondary
   (anchor link Browse Integrations).
============================================================ */
.partners-hero {
  position: relative;
  background-color: #0a0a0a;
  overflow: hidden;
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.partners-hero__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 70% at 50% 40%, rgba(178, 93, 66, 0.18) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.partners-hero__content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
}

.partners-hero__content .eyebrow {
  color: var(--color-copper-light);
}

.partners-hero__headline {
  font-size: var(--font-size-h1);
  font-weight: var(--weight-semibold);
  color: var(--color-white);
  line-height: var(--leading-tight);
  letter-spacing: -0.025em;
  margin-top: 0.75rem;
  margin-bottom: 1rem;
}

.partners-hero__sub {
  font-size: var(--text-lg);
  line-height: var(--leading-normal);
  color: rgba(255, 255, 255, 0.72);
  margin: 0 auto 2rem;
  max-width: 540px;
}

.partners-hero__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}


/* ============================================================
   3. PARTNER SPOTLIGHT
   3 editorial cards highlighting recent press, blog posts, or
   joint partner stories. Manually updated as content drops.
   Light warm background (#faf6f3) per brand alternation rhythm.
============================================================ */
.spotlight {
  background: #faf6f3;
  padding-top: var(--section-padding-y);
  padding-bottom: var(--section-padding-y);
}

.spotlight__head {
  margin-bottom: 2.5rem;
}

.spotlight__head .eyebrow {
  color: var(--color-copper-dark);
}

.spotlight__head h2 {
  color: var(--color-text-primary);
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.spotlight__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}


/* ----- SPOTLIGHT CARD ----- */
.spotlight-card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border-radius: 12px;
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-decoration: none;
  transition: border-color var(--transition-fast),
              box-shadow var(--transition-fast),
              transform var(--transition-normal);
}

.spotlight-card:hover {
  border-color: rgba(178, 93, 66, 0.4);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.spotlight-card__thumb {
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
}

.spotlight-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.spotlight-card__body {
  padding: 1.125rem 1.375rem 1.375rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.spotlight-card__meta {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 0.625rem;
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: var(--weight-semibold);
}

.spotlight-card__meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-copper);
  flex-shrink: 0;
}

.spotlight-card__title {
  color: var(--color-text-primary);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0 0 0.875rem;
  flex: 1;
}

.spotlight-card__link {
  color: var(--color-copper);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.spotlight-card__arrow {
  display: inline-block;
  transition: transform var(--transition-fast);
}

.spotlight-card:hover .spotlight-card__arrow {
  transform: translateX(4px);
}


/* ============================================================
   4. INTEGRATION GRID + FILTERS
   Section heading, filter chips, count, then a flat grid of logo
   cards. JS toggles a .is-hidden class on cards that don't match
   the active filter.
============================================================ */
.integrations {
  background: var(--color-white);
  padding-top: var(--section-padding-y);
  padding-bottom: var(--section-padding-y);
}

.integrations__head {
  margin-bottom: 2rem;
}

.integrations__head .eyebrow {
  color: var(--color-copper-dark);
}

.integrations__head h2 {
  color: var(--color-text-primary);
  margin-top: 0.5rem;
  margin-bottom: 0;
}


/* ----- FILTER CHIPS ----- */
.integrations__filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}

/* ----- FILTER DROPDOWN (mobile only — hidden on desktop) ----- */
.integrations__filter-dropdown {
  display: none;
}

.filter-select {
  width: 100%;
  padding: 0.625rem 2.5rem 0.625rem 1rem;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-primary);
  background: var(--color-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") no-repeat right 1rem center;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  margin-bottom: 1.25rem;
}

.filter-chip {
  background: var(--color-white);
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: var(--color-text-secondary);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  line-height: 1.2;
}

.filter-chip:hover {
  border-color: rgba(178, 93, 66, 0.4);
  color: var(--color-text-primary);
}

.filter-chip--active,
.filter-chip--active:hover,
.filter-chip:focus-visible {
  background: var(--gradient-copper);
  border-color: transparent;
  color: var(--color-white);
}

.filter-chip:focus-visible {
  outline: 2px solid var(--color-copper-dark);
  outline-offset: 3px;
}


/* ----- COUNT ----- */
.integrations__count {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: var(--weight-semibold);
  margin: 0 0 2rem;
}

.integrations__count-num {
  color: var(--color-copper);
  font-weight: var(--weight-bold);
}


/* ----- LOGO CARD GRID ----- */
.integrations__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.875rem;
  max-width: 1080px;
  margin: 0 auto;
}


/* ----- LOGO CARD ----- */
.logo-card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border: 0.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  transition: border-color var(--transition-fast),
              box-shadow var(--transition-fast),
              transform var(--transition-normal);
}

.logo-card.is-hidden {
  display: none;
}

.logo-card__visual {
  position: relative;
  aspect-ratio: 1.5 / 1;
  background: linear-gradient(135deg, #faf6f3 0%, #fff 100%);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.25rem;
}

.logo-card__image {
  max-width: 80%;
  max-height: 70%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.logo-card__placeholder {
  background: linear-gradient(135deg, rgba(178, 93, 66, 0.1), rgba(178, 93, 66, 0.22));
  color: var(--color-copper-dark);
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  padding: 0.5rem 0.875rem;
  border-radius: 6px;
  text-align: center;
  max-width: 90%;
  line-height: 1.25;
  /* Allow long names (e.g., "Energy Information Administration") to wrap
     cleanly inside the placeholder rather than overflow */
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}

.logo-card__body {
  padding: 0.875rem 1rem 1rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.logo-card__name {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  line-height: 1.3;
  margin: 0 0 0.2rem;
}

.logo-card__category {
  font-size: 11px;
  color: var(--color-copper-dark);
  line-height: 1.3;
  margin: 0 0 0.625rem;
  letter-spacing: 0.02em;
}

.logo-card__desc {
  font-size: 12px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0 0 0.875rem;
  flex: 1;
}



/* ----- EMPTY STATE (shown by JS if filter returns no matches) ----- */
.integrations__empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-text-tertiary);
  font-size: var(--text-base);
}


/* ============================================================
   5. CLOSING CTA — "Don't see your integration?"
   Dark, centered, mirrors the hero block's energy.
============================================================ */
.partners-close {
  position: relative;
  background: #0a0a0a;
  overflow: hidden;
  padding-top: var(--section-padding-y);
  padding-bottom: var(--section-padding-y);
  border-top: 0.5px solid #1f1f1f;
}

.partners-close__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 70% at 50% 50%, rgba(178, 93, 66, 0.14) 0%, transparent 72%);
  pointer-events: none;
}

.partners-close__content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

.partners-close__heading {
  color: var(--color-white);
  font-size: var(--font-size-h2);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.875rem;
}

.partners-close__sub {
  color: rgba(255, 255, 255, 0.65);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  margin: 0 0 1.75rem;
}


/* ============================================================
   6. RESPONSIVE — MOBILE OVERRIDES
============================================================ */
@media (max-width: 768px) {

  /* Hero — tighter spacing, stacked CTAs */
  .partners-hero {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .partners-hero__actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  .partners-hero__actions > a {
    text-align: center;
    justify-content: center;
  }

  /* Spotlight — single column on mobile */
  .spotlight__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Filter — hide chips, show select dropdown */
  .integrations__filters {
    display: none;
  }

  .integrations__filter-dropdown {
    display: block;
  }

  /* Logo grid — 1 column on mobile */
  .integrations__grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .logo-card__visual {
    aspect-ratio: 1.6 / 1;
    padding: 0.875rem 1rem;
  }

  /* Closing CTA — smaller heading */
  .partners-close__heading {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

}


@media (max-width: 480px) {

  /* Spotlight card padding on the smallest screens */
  .spotlight-card__body {
    padding: 1rem 1.125rem 1.125rem;
  }

}
