/*
  Dialed website: the Partners page (/partners). A faithful copy of the live Framer page.
  Every value below was read from the live page's CSS and computed styles
  (reference/partners/live/), so change one only after checking it there.

  Breakpoints, as in site.css:
    layout      (max-width: 1199.98px)  Phone: the cards stack in one column
    text sizes  (max-width: 1199px)     Framer's text styles use 1199, not 1199.98

  The tabs (Bike Shops, Suspension Service, Online Retailer) are run by /js/partners.js,
  which hides the cards outside the selected category with the `hidden` attribute.
*/

/* ---------- Page title ("hero text") ---------- */

.partners-hero {
  display: flex;
  flex-flow: column;
  flex: 0 0 auto;
  place-content: center;
  align-items: center;
  gap: 24px;
  width: 100%;
  height: min-content;
  padding: 24px 64px 0;
  position: relative;
  overflow: hidden;
  overflow: clip;
}
.partners-hero__title {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex: 0 0 auto;
  width: 100%;
  max-width: 800px;
  height: auto;
  position: relative;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
  outline: none;
}
.partners-hero__title h1 {
  margin: 0;
  padding: 0;
  font-family: var(--font-dm-sans);
  font-size: 64px;
  font-style: normal;
  font-weight: 700;
  line-height: 110%;
  letter-spacing: -2px;
  color: var(--color-text);
  text-align: center;
  text-transform: none;
  text-decoration: none;
}

/* ---------- Directory: tabs above a 2 column grid of cards ---------- */

.partners-directory {
  background-color: var(--color-core-black);
  display: flex;
  flex-flow: column;
  flex: 0 0 auto;
  place-content: center flex-start;
  align-items: center;
  gap: 32px;
  width: 100%;
  height: min-content;
  padding: 72px 64px 136px;
  position: relative;
  overflow: visible;
}
.partners-directory__container {
  display: flex;
  flex-flow: column;
  flex: 0 0 auto;
  place-content: flex-start;
  align-items: flex-start;
  gap: 28px;
  width: 100%;
  max-width: 1040px;
  height: min-content;
  padding: 0;
  position: relative;
}

/* Tabs. On the live site each tab is a button inside a wrapper; here the button is the item. */
.partners-tabs {
  display: flex;
  flex-flow: wrap;
  flex: 0 0 auto;
  place-content: flex-start;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  height: min-content;
  padding: 0;
  position: relative;
}
.partners-tab {
  display: flex;
  flex-flow: column;
  flex: 0 0 auto;
  place-content: center;
  align-items: center;
  gap: 0;
  width: min-content;
  height: min-content;
  margin: 0;
  padding: 10px 16px;
  border: 0;
  border-radius: 10px;
  position: relative;
  background-color: rgb(21, 32, 40);
  cursor: pointer;
}
.partners-tab.is-active {
  background-color: rgb(15, 99, 140);
}
.partners-tab__title {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex: 0 0 auto;
  width: auto;
  height: auto;
  position: relative;
  white-space: pre;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
}
.partners-tab__title p {
  margin: 0;
  padding: 0;
  font-family: var(--font-dm-sans);
  font-size: 16px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.2em;
  letter-spacing: 0;
  color: rgb(154, 167, 174);
  text-align: start;
}
.partners-tab.is-active .partners-tab__title p {
  color: rgb(255, 255, 255);
}

/* A click fades the colours like the live tabs, whose curves were recorded frame by frame
   (reference/partners/live/transition-1440.json): the background on a spring with a slight
   overshoot, the label a little slower. The label curve differs by direction because the live
   site mixes text colours in linear light. Like the live site, Reduce Motion keeps the fade.
   /js/partners.js sets data-ready after the first render, so the tab chosen by the address is
   shown straight away rather than faded in. */
.partners-tabs[data-ready] .partners-tab {
  transition: background-color 0.323s cubic-bezier(0.3, 0.8, 0.4, 1);
  transition-timing-function: linear(0, 0.01 1.9%, 0.1 5.9%, 0.25 11.5%, 0.42 17%, 0.58 22.6%, 0.71 28.2%, 0.82 33.7%, 0.89 39.3%, 0.94 44.9%, 0.98 50.5%, 1 56%, 1.01 61.6%, 1.01 67.2%, 1.02 72.4%, 1.01 78.3%, 1.01 94.4%, 1);
}
.partners-tabs[data-ready] .partners-tab__title p {
  transition: color 0.253s cubic-bezier(0.45, 0, 0.55, 1);
  transition-timing-function: linear(0, 0.0099 7.5%, 0.0396 14.6%, 0.0891 21.7%, 0.1683 28.9%, 0.2574 36%, 0.3564 43.1%, 0.4752 50.2%, 0.604 57.3%, 0.7228 64.4%, 0.8218 71.5%, 0.9109 78.7%, 0.9604 85.8%, 0.9901 92.5%, 1);
}
.partners-tabs[data-ready] .partners-tab.is-active .partners-tab__title p {
  transition: color 0.234s cubic-bezier(0.4, 0, 0.55, 1);
  transition-timing-function: linear(0, 0 2.6%, 0.0198 8.1%, 0.0693 15.8%, 0.1485 23.5%, 0.2475 31.2%, 0.3564 38.9%, 0.4752 46.6%, 0.604 54.3%, 0.7129 62%, 0.8119 69.7%, 0.8812 77.4%, 0.9406 85%, 0.9802 92.7%, 1);
}

/* Cards: 2 columns of 240px rows. A card taller than its row (one with a promo box) runs into
   the space below it, exactly as on the live site. */
.partners-list {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  grid-auto-rows: 240px;
  justify-content: start;
  gap: 16px;
  width: 100%;
  height: min-content;
  padding: 0;
  position: relative;
}
.partner-card {
  background-color: rgb(12, 20, 24);
  border-radius: 16px;
  display: flex;
  flex-flow: column;
  flex: 0 0 auto;
  place-content: flex-start space-between;
  place-self: start;
  align-items: flex-start;
  width: 100%;
  height: min-content;
  min-height: 240px;
  padding: 24px;
  position: relative;
}
/* Borders are drawn over the box, as Framer does, so they take no space. */
.partner-card::after,
.partner-promo::after,
.partners-empty::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border-radius: inherit;
  pointer-events: none;
}
.partner-card::after {
  border: 1px solid #152028;
}
.partner-card[hidden],
.partners-empty[hidden] {
  display: none;
}
.partner-card__content {
  display: flex;
  flex-flow: column;
  flex: 0 0 auto;
  place-content: flex-start;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  height: min-content;
  padding: 0;
  position: relative;
}

/* Text boxes behave like Framer's rich-text containers (a flex column holding one block). */
.partner-card__name,
.partner-card__location,
.partner-card__blurb,
.partner-card__disclosure,
.partner-promo__text,
.partner-promo__badge,
.partner-card__visit,
.partners-empty__text {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex: 0 0 auto;
  height: auto;
  position: relative;
  outline: none;
}
.partner-card__name,
.partner-card__location,
.partner-card__blurb,
.partner-card__disclosure {
  width: 100%;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
}
.partner-promo__badge,
.partner-card__visit,
.partners-empty__text {
  width: auto;
  white-space: pre;
}
.partner-promo__text {
  flex: 1 0 0px;
  width: 1px;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: break-word;
}

.partner-card p,
.partners-empty p {
  margin: 0;
  padding: 0;
  font-family: var(--font-dm-sans);
  font-style: normal;
  letter-spacing: 0;
  text-align: start;
}
.partner-card__name p {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2em;
  letter-spacing: -0.02em;
  color: rgb(240, 242, 245);
}
.partner-card__location p {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3em;
  color: rgb(122, 138, 146);
}
.partner-card__blurb p {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55em;
  color: rgb(154, 167, 174);
}

/* Promo box (Suspension Service and Online Retailer cards). */
.partner-promo {
  background-color: rgba(8, 107, 159, 0.18);
  border-radius: 12px;
  display: flex;
  flex-flow: wrap;
  flex: 0 0 auto;
  place-content: center flex-start;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: min-content;
  padding: 12px 14px;
  position: relative;
}
.partner-promo::after {
  border: 1px solid #086b9f8c;
}
.partner-promo__badge p {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2em;
  color: rgb(240, 242, 245);
}
.partner-promo__text p,
.partner-card__disclosure p {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45em;
  color: rgb(154, 167, 174);
}

/* "Visit site" row; an affiliate partner's disclosure sits above the link. */
.partner-card__visit-row {
  display: flex;
  flex-flow: column;
  flex: 0 0 auto;
  place-content: flex-start;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  height: min-content;
  padding: 14px 0 0;
  position: relative;
}
/* The live paragraph and its link are both underlined, at the same place. */
.partner-card__visit p {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2em;
  color: rgb(79, 166, 207);
  text-decoration-line: underline;
}
.partner-card__visit a {
  font-family: var(--font-dm-sans);
  font-style: normal;
  font-weight: 600;
  font-size: 16px;
  color: #4fa6cf;
  text-decoration-line: underline;
  cursor: pointer;
}
.partner-card__visit a:hover {
  color: #8fd0f0;
}

/* Shown when the address names no category (for example ?selected-category=xyz). */
.partners-empty {
  border-radius: 16px;
  display: flex;
  flex-flow: column;
  flex: 0 0 auto;
  grid-column: 1 / -1;
  place-content: center;
  place-self: start;
  align-items: center;
  gap: 8px;
  width: min-content;
  min-width: 100%;
  height: min-content;
  padding: 40px;
  position: relative;
}
.partners-empty::after {
  border: 1px dashed #ffffff1f;
}
.partners-empty__text p {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2em;
  color: rgb(122, 138, 146);
}

/* ---------- Phone layout ---------- */

@media (max-width: 1199.98px) {
  .partners-directory {
    padding: 72px 32px 64px;
  }
  .partners-tabs {
    overflow: visible;
  }
  .partners-list {
    display: flex;
    flex-flow: column;
    place-content: flex-start;
    align-items: flex-start;
  }
  .partner-card,
  .partners-empty {
    align-self: unset;
  }
}
@media (max-width: 1199px) {
  .partners-hero__title h1 {
    font-size: 45px;
  }
}
