/* ============================================================
   v2 home — differentials, tribe, mission and closing sections.
   Source: maquette Web Desktop (1440) l.85-165 / Web Movil (440) l.92-173.
   Mobile first; desktop from UIkit @m (960px). Layout pieces come
   from UIkit (uk-grid, uk-child-width, uk-slider); the mobile slider
   dots are shared (css/v2/slider-dots.css). This file adds the brand
   look and the maquette metrics. Every rule is scoped under a section
   class to beat UIkit's heading / paragraph / list defaults.
   ============================================================ */

/* Shared: photo boxes are fixed-height frames; the image covers them, centred. The files are the
   designer crops per view (-mobile below @m, -desktop from @m), so no reframing is needed. */
.bf-home-dif__img,
.bf-home-tribe__img,
.bf-home-mission__img {
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
}

/* ---- Differentials ---- */

.bf-home-dif {
  overflow: hidden; /* clips the mobile swipe track that bleeds past the gutters */
  padding: 44px 0 40px;
  background: var(--bf-c-sand);
  border-bottom: 1px solid var(--bf-c-line-light);
}

/* Mobile: two balanced lines, "Aquí, tú y la música / pegáis igual de fuerte" in es-es.
   Section titles (dif, tribe, mission, closing claim) are fluid: their maquette size from 390px
   up (mobile) / 1280px up (desktop), down to ~0.78 of it below, so narrow phones and small
   desktops keep the line breaks. Mobile: (viewport − 2 gutters) / R, R = 350 / size. */
.bf-home-dif .bf-home-dif__title {
  margin: 0;
  font: 400 38px/1.08 var(--bf-font-display);
  font-size: clamp(30px, calc((100vw - 40px) / 9.2), 38px);
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--bf-c-black);
}

/* Per-locale text-fit (es-es is the reference): the es line count, the es clamp scaled by a
   factor. Body class language-{locale} from base_v2. */
@media (max-width: 959.98px) {
  .language-es-ar .bf-home-dif .bf-home-dif__title,
  .language-fr-fr .bf-home-dif .bf-home-dif__title {
    font-size: clamp(26.5px, calc((100vw - 40px) / 10.35), 34px); /* 0.89 × es */
  }

  .language-de-de .bf-home-dif .bf-home-dif__title,
  .language-pt-pt .bf-home-dif .bf-home-dif__title {
    font-size: clamp(28.5px, calc((100vw - 40px) / 9.7), 36px); /* 0.95 × es */
  }
}

.bf-home-dif__track {
  margin-top: 16px;
  padding-bottom: 6px;
}

/* UIkit slider track: the gap is a gutter (negative margin + item padding), as uk-grid does. */
.bf-home-dif .bf-home-dif__items {
  margin-left: -12px;
}

.bf-home-dif .bf-home-dif__item {
  display: flex;
  padding-left: 12px;
}

.bf-home-dif__card {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}

.bf-home-dif__media {
  height: 376px;
  overflow: hidden;
  background: var(--bf-c-line-light);
}

.bf-home-dif .bf-home-dif__card-title {
  margin: 16px 0 8px;
  font: 400 26px/1 var(--bf-font-display);
  text-transform: uppercase;
  color: var(--bf-c-black);
}

.bf-home-dif .bf-home-dif__text {
  margin: 0 0 16px;
  font: 400 15px/1.55 var(--bf-font-body);
  color: var(--bf-c-black);
}

.bf-home-dif__cta {
  display: flex;
  justify-content: center;
  padding-top: 28px;
}

/* Black-outline secondary CTA, yellow fill on hover (maquette); full width on mobile.
   :hover keeps the idle look so UIkit's `a:hover` (blue, underlined) never wins; the yellow fill
   shows while tapped (:active), on keyboard focus, and on mouse hover where a pointer can hover. */
.bf-home-dif__btn,
.bf-home-dif__btn:visited,
.bf-home-dif__btn:hover {
  width: 100%;
  padding: 16px 22px;
  background: transparent;
  border: 1px solid var(--bf-c-black);
  font-size: 19px;
  letter-spacing: .04em;
  text-decoration: none;
  color: var(--bf-c-black);
}

.bf-home-dif__btn:active,
.bf-home-dif__btn:focus-visible {
  background: var(--bf-c-yellow);
}

@media (hover: hover) {
  .bf-home-dif__btn:hover {
    background: var(--bf-c-yellow);
  }
}

/* Mobile swipe: cards are 86% of the content width (+ the 12px gutter) and run to the screen
   edge. UIkit's uk-slider-container clips at the gutter: let it overflow, .bf-home-dif clips
   instead. */
@media (max-width: 959.98px) {
  .bf-home-dif .bf-home-dif__track.uk-slider-container {
    overflow: visible;
  }

  .bf-home-dif .bf-home-dif__item {
    width: calc((100% - 12px) * .86 + 12px);
  }
}

/* Tablet (UIkit @s to @m): the mobile layout on a wider screen. The swipe shows 2 cards (half
   the track = one card + its gutter), and the full-width CTAs are capped, in their context's
   alignment (differentials centred, closing left). */
@media (min-width: 640px) and (max-width: 959.98px) {
  .bf-home-dif .bf-home-dif__item {
    width: 50%;
  }

  .bf-home-dif__btn,
  .bf-home-closing__btn {
    max-width: 480px;
  }
}

/* ---- Tribe ---- */

.bf-home-tribe {
  padding: 44px 0 48px;
  background: var(--bf-c-white);
}

.bf-home-tribe .bf-home-tribe__title {
  margin: 0;
  font: 400 38px/.95 var(--bf-font-display);
  font-size: clamp(30px, calc((100vw - 40px) / 9.2), 38px);
  text-transform: uppercase;
  color: var(--bf-c-black);
}

.bf-home-tribe .bf-home-tribe__lead {
  margin: 14px 0 0;
  font: 400 16px/1.55 var(--bf-font-body);
  color: var(--bf-c-black);
}

/* 2 columns, gap 8 (uk-grid gutter rebuilt over uk-grid-collapse). */
.bf-home-tribe .bf-home-tribe__photos {
  margin-top: 26px;
  margin-left: -8px;
}

.bf-home-tribe .bf-home-tribe__item {
  padding-left: 8px;
}

.bf-home-tribe .bf-home-tribe__photo {
  margin: 0;
}

.bf-home-tribe__media {
  height: 280px;
  overflow: hidden;
  background: var(--bf-c-sand);
}

.bf-home-tribe__caption {
  margin-top: 10px;
  font: 400 19px/1.05 var(--bf-font-display);
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--bf-c-black);
}

/* ---- Mission ---- */

.bf-home-mission {
  background: var(--bf-c-sand);
  border-top: 1px solid var(--bf-c-line-light);
}

/* Mobile: the photo runs edge to edge, so the container drops its gutters; the body has them. */
.bf-home-mission .bf-home-mission__inner {
  padding-left: 0;
  padding-right: 0;
}

.bf-home-mission__media {
  height: 340px;
  overflow: hidden;
  background: var(--bf-c-sand);
}

.bf-home-mission__body {
  padding: 32px var(--bf-gutter) 44px;
}

.bf-home-mission .bf-home-mission__title {
  margin: 0;
  font: 400 38px/.95 var(--bf-font-display);
  font-size: clamp(30px, calc((100vw - 40px) / 9.2), 38px);
  text-transform: uppercase;
  color: var(--bf-c-black);
}

.bf-home-mission .bf-home-mission__claim {
  margin: 14px 0 0;
  font: 400 22px/1.35 var(--bf-font-body);
  color: var(--bf-c-black);
}

/* Mobile: fluid size capped at the maquette's 20px so the es claim fits one line down to 320
   (text ≈ 18.8px per px of font-size, + 12px padding; /19.3 keeps a small margin). Longer
   locales may still wrap. */
.bf-home-mission__mark {
  padding: 2px 6px;
  background: var(--bf-c-yellow);
  font-size: min(20px, calc((100vw - 2 * var(--bf-gutter) - 12px) / 19.3));
}

.bf-home-mission .bf-home-mission__lead {
  margin: 12px 0 0;
  font: 400 16px/1.55 var(--bf-font-body);
  color: var(--bf-c-black);
}

.bf-home-mission .bf-home-mission__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.bf-home-mission .bf-home-mission__item {
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--bf-c-line-light);
}

/* The last item closes the list with a hairline. */
.bf-home-mission .bf-home-mission__item:last-child {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--bf-c-line-light);
}

.bf-home-mission .bf-home-mission__item-title {
  margin: 0 0 6px;
  font: 400 22px/1 var(--bf-font-display);
  text-transform: uppercase;
  color: var(--bf-c-black);
}

.bf-home-mission .bf-home-mission__item-text {
  margin: 0;
  font: 400 15px/1.5 var(--bf-font-body);
  color: var(--bf-c-black);
}

/* ---- Closing ---- */

.bf-home-closing {
  padding: 48px 0 52px;
  background: var(--bf-c-white);
  border-top: 1px solid var(--bf-c-line-light);
}

.bf-home-closing .bf-home-closing__text {
  margin: 0;
  font: 400 18px/1.4 var(--bf-font-body);
  text-wrap: pretty;
  color: var(--bf-c-black);
}

.bf-home-closing__text strong {
  font-weight: 500;
}

/* Stacked on mobile: uk-grid-collapse zeroes the row margin, set it back to the maquette's. */
.bf-home-closing .bf-home-closing__aside {
  margin-top: 22px;
}

.bf-home-closing .bf-home-closing__claim {
  margin: 0;
  font: 400 32px/.98 var(--bf-font-display);
  font-size: clamp(25px, calc((100vw - 40px) / 10.93), 32px);
  text-transform: uppercase;
  color: var(--bf-c-black);
}

/* Per-locale text-fit (es-es is the reference): the es line count (3, 2 on tablet), the es clamp
   scaled by a factor; desktop below. fr-fr ("Parce que quand tu trouves une activité qui te plaît
   vraiment, …") stays one line longer at the ≈ 0.75 floor: shorter copy needed. */
@media (max-width: 959.98px) {
  .language-ca-es .bf-home-closing .bf-home-closing__claim,
  .language-pt-br .bf-home-closing .bf-home-closing__claim {
    font-size: clamp(23.5px, calc((100vw - 40px) / 11.75), 30px); /* 0.93 × es */
  }

  /* Not below 31px: at ~500px es is 3 lines by a hair, es-mx at 30px would drop to 2. */
  .language-es-mx .bf-home-closing .bf-home-closing__claim {
    font-size: clamp(24px, calc((100vw - 40px) / 11.35), 31px); /* 0.965 × es */
  }

  .language-de-de .bf-home-closing .bf-home-closing__claim {
    font-size: clamp(21px, calc((100vw - 40px) / 13), 27px); /* 0.84 × es */
  }

  .language-fr-fr .bf-home-closing .bf-home-closing__claim {
    font-size: clamp(19px, calc((100vw - 40px) / 14.6), 24px); /* 0.75 × es */
  }
}

/* Black CTA, yellow text; yellow fill, black text on hover (maquette). :hover keeps the idle look
   so UIkit's `a:hover` (blue, underlined) never wins; the flip shows while tapped (:active), on
   keyboard focus (gold ring, .bf-btn) and on mouse hover where a pointer can hover. */
.bf-home-closing__btn,
.bf-home-closing__btn:visited,
.bf-home-closing__btn:hover {
  display: flex;
  width: 100%;
  margin-top: 30px;
  padding: 20px 18px;
  background: var(--bf-c-black);
  font-size: 22px;
  white-space: normal;
  text-align: center;
  text-decoration: none;
  color: var(--bf-c-yellow);
}

.bf-home-closing__btn:active,
.bf-home-closing__btn:focus-visible {
  background: var(--bf-c-yellow);
  color: var(--bf-c-black);
}

@media (hover: hover) {
  .bf-home-closing__btn:hover {
    background: var(--bf-c-yellow);
    color: var(--bf-c-black);
  }
}

/* ---- Desktop ---- */

@media (min-width: 960px) {
  /* Differentials */
  .bf-home-dif {
    padding: 72px 0;
  }

  /* One line in es-es (maquette). */
  .bf-home-dif .bf-home-dif__title {
    font-size: clamp(40px, 4.07vw, 52px);
    line-height: .95;
    text-wrap: pretty;
  }

  .bf-home-dif .bf-home-dif__track {
    margin-top: 32px;
    padding-bottom: 0;
  }

  /* Desktop card order: Boom first (user decision, as the maquette); the mobile swipe keeps the
     DOM order. All 3 cards fit, so the finite slider never moves (UIkit clamps it at 0). */
  .bf-home-dif .bf-home-dif__item--boom {
    order: -1;
  }

  /* 3 items fill the row: the maquette's 3-column grid, gap 24. */
  .bf-home-dif .bf-home-dif__items {
    margin-left: -24px;
  }

  .bf-home-dif .bf-home-dif__item {
    padding-left: 24px;
  }

  .bf-home-dif__media {
    height: 340px;
    height: min(340px, 40vh);
    background: var(--bf-c-sand);
  }

  .bf-home-dif .bf-home-dif__card-title {
    margin: 22px 0 10px;
    font-size: 32px;
  }

  .bf-home-dif .bf-home-dif__text {
    max-width: 360px;
    margin: 0;
    font-size: 17px;
  }

  .bf-home-dif__cta {
    padding-top: 56px;
  }

  .bf-home-dif__btn,
  .bf-home-dif__btn:visited,
  .bf-home-dif__btn:hover {
    width: auto;
    padding: 20px 30px;
    font-size: 21px;
  }

  /* Tribe: text 1fr, photos 1.25fr, vertically centred. */
  .bf-home-tribe {
    padding: 72px 0;
  }

  .bf-home-tribe__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 64px;
    align-items: center;
  }

  .bf-home-tribe .bf-home-tribe__title {
    font-size: clamp(40px, 4.07vw, 52px);
  }

  .bf-home-tribe .bf-home-tribe__lead {
    max-width: 440px;
    margin-top: 20px;
    font-size: 19px;
    line-height: 1.6;
  }

  .bf-home-tribe .bf-home-tribe__photos {
    margin-top: 0;
    margin-left: -16px;
  }

  .bf-home-tribe .bf-home-tribe__item {
    padding-left: 16px;
  }

  .bf-home-tribe .bf-home-tribe__item + .bf-home-tribe__item {
    margin-top: 48px;
  }

  .bf-home-tribe__media {
    height: 480px;
  }

  .bf-home-tribe__caption {
    margin-top: 14px;
    font-size: 22px;
  }

  /* Mission: in the 1360 column, photo 1fr / text 1.15fr, gap 80, vertically centred. */
  .bf-home-mission .bf-home-mission__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 80px;
    align-items: center;
    padding: 72px var(--bf-gutter-desktop);
  }

  .bf-home-mission__media {
    height: 560px;
  }

  .bf-home-mission__body {
    max-width: 620px;
    padding: 0;
  }

  .bf-home-mission .bf-home-mission__title {
    font-size: clamp(40px, 4.07vw, 52px);
  }

  .bf-home-mission .bf-home-mission__claim {
    margin-top: 20px;
    font-size: 30px;
    line-height: 1.3;
  }

  /* Claim 21px (user decision; the maquette's inline span size). */
  .bf-home-mission__mark {
    padding: 2px 8px;
    font-size: 21px;
  }

  .bf-home-mission .bf-home-mission__lead {
    margin-top: 18px;
    font-size: 19px;
    line-height: 1.6;
  }

  .bf-home-mission .bf-home-mission__list {
    gap: 22px;
    margin-top: 44px;
  }

  .bf-home-mission .bf-home-mission__item {
    padding-top: 22px;
  }

  .bf-home-mission .bf-home-mission__item:last-child {
    padding-bottom: 28px;
  }

  .bf-home-mission .bf-home-mission__item-title {
    margin-bottom: 8px;
    font-size: 28px;
  }

  .bf-home-mission .bf-home-mission__item-text {
    font-size: 17px;
    line-height: 1.55;
  }

  /* Closing: 2 columns, gap 80 (uk-grid gutter rebuilt over uk-grid-collapse). */
  .bf-home-closing {
    padding: 72px 0;
  }

  .bf-home-closing .bf-home-closing__grid {
    margin-left: -80px;
  }

  .bf-home-closing .bf-home-closing__grid > * {
    padding-left: 80px;
  }

  .bf-home-closing .bf-home-closing__text {
    font-size: 24px;
    line-height: 1.45;
  }

  .bf-home-closing .bf-home-closing__aside {
    margin-top: 0;
  }

  .bf-home-closing .bf-home-closing__claim {
    max-width: 442px;
    font-size: clamp(33px, 3.29vw, 42px);
  }

  /* Per-locale text-fit, see the mobile block. */
  .language-ca-es .bf-home-closing .bf-home-closing__claim,
  .language-es-ar .bf-home-closing .bf-home-closing__claim,
  .language-es-mx .bf-home-closing .bf-home-closing__claim,
  .language-it-it .bf-home-closing .bf-home-closing__claim {
    font-size: clamp(29.5px, 2.96vw, 38px); /* 0.9 × es */
  }

  .language-pt-br .bf-home-closing .bf-home-closing__claim {
    font-size: clamp(29px, 2.9vw, 37px); /* 0.88 × es */
  }

  .language-de-de .bf-home-closing .bf-home-closing__claim {
    font-size: clamp(26.5px, 2.63vw, 33.5px); /* 0.8 × es */
  }

  .language-fr-fr .bf-home-closing .bf-home-closing__claim {
    font-size: clamp(24.5px, 2.43vw, 31px); /* 0.74 × es */
  }

  .bf-home-closing__btn,
  .bf-home-closing__btn:visited,
  .bf-home-closing__btn:hover {
    display: inline-flex;
    width: auto;
    margin-top: 42px;
    padding: 22px 34px;
    white-space: nowrap;
  }
}
