/* ==========================================================================
   02 — Hero (Elementor id ba8848d)
   Measured box: desktop 1440x656, tablet 768x1089, mobile 390x622.
   All computed values below come from research/components/02-hero.spec.md,
   research/components/02-hero.content.json and research/tab-states.json
   (heroPills). Tab behaviour is owned by src/js/main.js (.is-active + hidden).
   ========================================================================== */

.s-hero {
  padding: 25px 0 0;
  margin-top: 100px;
  font-family: var(--f-body);
  font-size: var(--t-body-15);
  font-weight: 300;
  line-height: 1.5em;
  color: var(--c-text);
}

/* The measured hero is NOT clamped to the 1140px container: the left copy
   block starts at x=245 on a 1440 viewport (952 / 473 column split of a
   1425px row). Reproduced here so the screenshot matches 1:1. */
.s-hero .hero__inner {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  width: 100%;
  max-width: 1425px;
  margin-inline: auto;
}

.s-hero .hero__col--copy {
  display: flex;
  flex-direction: column;
  flex: 0 0 66.8%;
  max-width: 66.8%;
  padding: 0 10px;
}

.s-hero .hero__copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 10px 0;
  width: 466px;
  max-width: 100%;
  margin-inline: auto;
}

/* ---------------------------------------------------------------- rating */

.s-hero .hero__rating {
  display: block;
  width: 118px;
  margin-bottom: -20px;
}

.s-hero .hero__rating img {
  width: 118px;
  height: 35px;
  object-fit: fill;
}

/* ----------------------------------------------------------------- title */

.s-hero .hero__title {
  font-family: var(--f-display);
  /* Token --t-h1 is 52px, but the hero H1 measures ~44px / 47.5px leading on
     the live page (4 lines in a 466px column = 190px tall). Measurement wins. */
  font-size: 44px;
  line-height: 1.08;
  font-weight: 400;
  color: var(--c-black);
  letter-spacing: -0.5px;
  text-align: left;
}

.s-hero .hero__title b {
  font-weight: 700;
}

/* The target renders the bold lockup as its own block, so the line always breaks
   after "Agency" rather than wherever the 466px column happens to run out. */
.s-hero .hero__title br {
  display: block;
}

/* ------------------------------------------------------------- strapline */

.s-hero .hero__strapline {
  margin-top: 10px;
  background-color: var(--c-blue-tint);
  border-radius: 7px;
  padding: 8px 14px;
}

.s-hero .hero__strapline-text {
  font-family: var(--f-display);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--c-navy);
}

/* ------------------------------------------------------------------ tabs */

.s-hero .hero__tabs {
  /* widget container measures 486px against a 466px column (margin-right -20) */
  margin-right: -20px;
}

.s-hero .hero__tablist {
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
  list-style: none;
}

.s-hero .hero__tabitem {
  display: block;
}

.s-hero .hero__tab {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  padding: 5px 10px;
  background-color: var(--c-white);
  color: var(--c-black);
  font-family: var(--f-body);
  font-size: 18px;
  font-weight: 300;
  line-height: 22.5px;
  text-align: left;
  border-radius: 0;
  border: 0;
  cursor: pointer;
  transition: background-color 0.5s, color 0.5s;
}

.s-hero .hero__tab.is-active {
  background-color: var(--c-offwhite);
}

.s-hero .hero__tab:hover {
  background-color: var(--c-offwhite);
}

.s-hero .hero__tab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--c-green);
}

.s-hero .hero__tab-icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

.s-hero .hero__tab-label {
  font-family: var(--f-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--c-black);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- panels */

.s-hero .hero__panel {
  padding: 10px 10px 10px 20px;
  background-color: var(--c-grey-light);
  text-align: left;
}

.s-hero .hero__panel[hidden] {
  display: none;
}

.s-hero .hero__panel p {
  font-family: var(--f-body);
  font-size: var(--t-body-15);
  font-weight: 300;
  line-height: 30px;
  color: #8b8b8b;
}

/* ------------------------------------------------------------------- cta */

.s-hero .hero__cta {
  display: flex;
  flex-direction: column;
}

.s-hero .hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  align-self: flex-start;
  min-height: 60px;
  padding: 0 26px;
  background-color: var(--c-black);
  color: var(--c-white);
  border-radius: 6px;
  font-family: var(--f-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.6px;
  line-height: 1.2;
  transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.s-hero .hero__btn:hover {
  background-color: var(--c-green);
}

.s-hero .hero__btn-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
}

.s-hero .hero__note {
  margin-top: 10px;
  padding-left: 20px;
  font-family: var(--f-display);
  font-size: 14.4px;
  font-weight: 400;
  font-style: italic;
  line-height: 22.5px;
  color: var(--c-text-grey);
}

/* ----------------------------------------------------------------- media */

.s-hero .hero__col--media {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  flex: 0 0 33.2%;
  max-width: 33.2%;
  gap: 20px;
  text-align: right;
}

.s-hero .hero__animation {
  width: 478px;
  height: 478px;
  max-width: 100%;
  object-fit: fill;
  margin-left: auto;
}

/* ============================ tablet 768–1024 ============================ */

@media (max-width: 1024px) {
  .s-hero {
    margin-top: 60px;
  }

  /* The target keeps the desktop 66.8 / 33.2 split at tablet. The copy block
     itself is the part that narrows: it sits centred inside the wide copy
     column at ~247px, so the H1 runs to six lines and the strapline to seven,
     which is where the extra tablet height comes from. */
  .s-hero .hero__col--copy {
    flex: 0 0 66.8%;
    max-width: 66.8%;
  }

  .s-hero .hero__col--media {
    flex: 0 0 33.2%;
    max-width: 33.2%;
    justify-content: flex-end;
  }

  .s-hero .hero__animation {
    width: 100%;
    height: auto;
  }

  .s-hero .hero__copy {
    width: 247px;
  }

  /* Tablet type is set larger against a fixed leading, which is what produces
     the target's six-line H1 and seven-line strapline. The manual break after
     "Agency" is dropped so the line runs "Agency For" as in the reference. */
  .s-hero .hero__title {
    font-size: 40px;
    line-height: 38.88px;
  }

  .s-hero .hero__strapline {
    margin-top: 0;
    padding: 8px 12px;
  }

  .s-hero .hero__strapline-text {
    font-size: 39px;
    line-height: 44.7px;
  }

  .s-hero .hero__tabs {
    margin-right: 0;
  }

  .s-hero .hero__tab-label {
    white-space: normal;
  }

  .s-hero .hero__btn {
    font-size: 15px;
    padding: 0 20px;
  }
}

/* In the tablet reference the open panel sits directly under its own tab
   (accordion order: tab 1, panel, tab 2, tab 3) rather than after the whole
   tab list. The markup order is unchanged; only the visual order is remapped,
   and the list items keep hugging their labels via align-items. */
@media (min-width: 768px) and (max-width: 1024px) {
  /* Rating lockup renders small at tablet (64x19 in the reference); the
     negative bottom margin is trimmed so the H1 still starts at y=70. */
  .s-hero .hero__rating {
    width: 64px;
    margin-bottom: -9px;
  }

  .s-hero .hero__rating img {
    width: 64px;
    height: 19px;
  }

  /* No forced break after "Agency": the reference line reads "Agency For".
     Dropping the <br> also drops the whitespace it stood for, so the word
     space is restored after the bold lockup. */
  .s-hero .hero__title br {
    display: none;
  }

  .s-hero .hero__title b::after {
    content: " ";
  }

  .s-hero .hero__tabs {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: -12px;
  }

  .s-hero .hero__tab {
    padding: 6px 10px;
  }

  .s-hero .hero__panel {
    padding: 10px 10px 25px 20px;
  }

  .s-hero .hero__panel p {
    font-size: 16px;
  }

  /* Two-line note at tablet, as in the reference. */
  .s-hero .hero__note {
    font-size: 18px;
    line-height: 30px;
  }

  .s-hero .hero__tablist {
    display: contents;
  }

  .s-hero .hero__tabitem:nth-child(1) { order: 1; }
  .s-hero .hero__panel[data-panel="0"] { order: 2; }
  .s-hero .hero__tabitem:nth-child(2) { order: 3; }
  .s-hero .hero__panel[data-panel="1"] { order: 4; }
  .s-hero .hero__tabitem:nth-child(3) { order: 5; }
  .s-hero .hero__panel[data-panel="2"] { order: 6; }

  .s-hero .hero__panel {
    align-self: stretch;
  }
}

/* ================================ mobile ================================= */

@media (max-width: 767px) {
  .s-hero {
    margin-top: 30px;
    padding-top: 15px;
  }

  .s-hero .hero__inner {
    flex-direction: column;
  }

  .s-hero .hero__col--copy {
    flex: 1 1 auto;
    max-width: 100%;
    padding: 0 20px;
  }

  .s-hero .hero__copy {
    width: 100%;
    gap: 16px;
  }

  .s-hero .hero__rating {
    margin: 0 auto -10px;
  }

  .s-hero .hero__title {
    font-size: 24px;
    line-height: 1.33;
    text-align: center;
    letter-spacing: 0;
  }

  .s-hero .hero__strapline {
    margin-top: 0;
    padding: 10px 14px;
  }

  .s-hero .hero__strapline-text {
    font-size: 17px;
    line-height: 1.45;
    text-align: center;
  }

  .s-hero .hero__tablist {
    flex-direction: column;
  }

  .s-hero .hero__tab {
    font-size: 16px;
  }

  .s-hero .hero__btn {
    min-height: 56px;
  }

  .s-hero .hero__note {
    padding-left: 0;
  }
}
