/* ==========================================================================
   Site-wide layout, readability and accessibility fixes.
   Loaded after every other stylesheet on all pages.
   ========================================================================== */

/* --- Page title (inner pages) ------------------------------------------- */
/* 64px on phones broke long words mid-word ("managem-ent"). */
.page-title .title {
  font-size: clamp(32px, 4.2vw + 18px, 64px);
  line-height: 1.15;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
}

/* The header overlaps the top of the hero (132px, 159px from 992px up), so the
   top padding adds that height to keep the title centred in the visible area. */
.page-title {
  padding: 239px 0 80px;
}

@media (max-width: 991.98px) {
  .page-title {
    padding: 212px 0 80px;
  }
}

@media (max-width: 767.98px) {
  .page-title {
    padding: 180px 0 48px;
  }
}

.page-title .title:last-child,
.page-title p:last-child {
  margin-bottom: 0;
}

.page-title--center .title {
  text-align: center;
}

/* --- Header top bar ------------------------------------------------------ */
@media (max-width: 991.98px) {
  .home-header .header-top .info-btn strong {
    font-size: 13px;
  }
}

/* --- Scroll to top ------------------------------------------------------- */
.scroll-to-top {
  display: block;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 18px;
  line-height: 40px;
  border: 2px solid #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 200ms ease, transform 200ms ease, visibility 0s linear 200ms,
    background-color 200ms ease;
}

@media (max-width: 1399.98px) {
  .scroll-to-top {
    bottom: max(16px, env(safe-area-inset-bottom));
  }
}

.scroll-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 200ms ease, transform 200ms ease, visibility 0s,
    background-color 200ms ease;
}

.scroll-to-top:focus-visible {
  outline: 3px solid var(--theme-color-dark);
  outline-offset: 3px;
}

/* Keep it out of the way of the cookie banner and of form fields being typed in. */
.cookie-banner-open .scroll-to-top,
body:has(input:focus, textarea:focus, select:focus) .scroll-to-top {
  opacity: 0;
  visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-to-top,
  .scroll-to-top.is-visible {
    transition: none;
  }
}

/* --- Accordions (Consultancy, Systems) ----------------------------------- */
/* Leave room for the 54px toggle icon so titles are never covered. */
.accordion-box .block .acc-btn {
  padding-right: 76px;
  min-height: 68px;
}

.accordion-box .block .acc-btn:focus-visible {
  outline: 2px solid var(--theme-color1);
  outline-offset: -2px;
}

/* --- Index: about section ------------------------------------------------ */
.about-section {
  overflow-x: clip;
}

.about-section .image-column .inner-column .image-box .exp-box {
  max-width: calc(100% - 15px);
}

.about-section .image-column .inner-column .image-box .exp-box .inner .icon-box {
  margin-bottom: 0;
  padding-left: 76px;
}

.about-section .image-column .inner-column .image-box .exp-box .inner .icon-box .title {
  line-height: 1.4;
}

/* --- Vendor Performance Management -------------------------------------- */
.about-section-two,
.contact-section {
  overflow-x: clip;
}

@media (max-width: 575.98px) {
  .about-section-two .image-column .experience {
    left: 0;
    min-width: 0;
    max-width: calc(100% - 15px);
  }
}

/* --- Obscurity into Opportunity: feature cards --------------------------- */
.opportunity-page .feature-block-four .inner-box .image-box {
  width: 270px;
}

@media (max-width: 575.98px) {
  .opportunity-page .feature-block-four .inner-box .image-box {
    width: 100%;
  }

  .opportunity-page .feature-block-four .inner-box .image-box .image img {
    aspect-ratio: 16 / 10 !important;
  }
}

.opportunity-page .feature-block-two strong {
  font-weight: 700;
}

/* --- What We Believe: closing call to action ----------------------------- */
.call-to-action.call-to-action-light {
  padding: 120px 0;
}

@media (max-width: 991.98px) {
  .call-to-action.call-to-action-light {
    padding: 72px 0;
  }
}

.call-to-action.call-to-action-light::before {
  opacity: 0.93;
}

.call-to-action.call-to-action-light p {
  color: #2b2b2b;
}

html[data-home-theme="dark"] .call-to-action.call-to-action-light::before {
  background-color: #12161d;
}

/* --- Vendor Management Systems: carousel section background -------------- */
.vendor-management-systems .features-section-three.style-two .bg-image {
  height: 100%;
}

/* --- Contact form -------------------------------------------------------- */
/* Labels sit on the orange form panel, so use dark text for contrast. */
.why-choose-us-three .contact-form .form-group > .field-label {
  margin-bottom: 8px;
  color: #1b1d22;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
}

/* 16px stops iOS Safari from zooming in when a field is focused. */
.why-choose-us-three .contact-form .form-group input:not([type=submit]),
.why-choose-us-three .contact-form .form-group textarea,
.why-choose-us-three .contact-form .form-group select {
  font-size: 16px;
}

/* --- Legal tables (Privacy, Cookie) -------------------------------------- */
@media (max-width: 767.98px) {
  .privacy-content__table-wrap {
    overflow: visible;
    border: 0;
  }

  .privacy-content table.responsive-table {
    min-width: 0;
  }

  .privacy-content table.responsive-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .privacy-content table.responsive-table,
  .privacy-content table.responsive-table tbody,
  .privacy-content table.responsive-table tr,
  .privacy-content table.responsive-table td {
    display: block;
    width: 100%;
  }

  .privacy-content table.responsive-table tr {
    margin-bottom: 16px;
    border: 1px solid #dce0e5;
  }

  .privacy-content table.responsive-table tr:last-child {
    margin-bottom: 0;
  }

  .privacy-content table.responsive-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #dce0e5;
    overflow-wrap: break-word;
  }

  .privacy-content table.responsive-table tbody tr:last-child td {
    border-bottom: 1px solid #dce0e5;
  }

  .privacy-content table.responsive-table tr td:last-child {
    border-bottom: 0;
  }

  .privacy-content table.responsive-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: #20232a;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  html[data-home-theme="dark"] .privacy-content table.responsive-table td::before {
    color: #f4f6fa;
  }
}

/* Legal text: wrap long words only when they would overflow. */
.terms-content__document {
  overflow-wrap: break-word;
}

/* --- Footer: comfortable touch targets ----------------------------------- */
.site-footer__group li + li {
  margin-top: 0;
}

.site-footer__group li a,
.site-footer__group > a {
  display: inline-block;
  padding: 10px 0;
  line-height: 24px;
}

/* --- Index: closing call to action decoration ---------------------------- */
.contact-section-six {
  overflow-x: clip;
}

/* Footer email breaks after "@" (via <wbr>) instead of mid-domain. */
.site-footer a[href^="mailto:"] {
  padding: 0;
  overflow-wrap: normal;
}

/* --- Index hero: show the background video on tablets and phones --------- */
/* The template hides .image-box below 992px; show it as a full-width band
   under the buttons, with an angled top edge echoing the desktop shape. */
@media (max-width: 991.98px) {
  .home-page .banner-style-three .image-box {
    display: block;
    position: relative;
    width: 100vw;
    height: clamp(220px, 62vw, 440px);
    margin: 32px 0 -56px calc(50% - 50vw);
    overflow: hidden;
  }

  .home-page .banner-style-three .image-box .bg-image {
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    clip-path: polygon(0 16%, 100% 0, 100% 100%, 0 100%);
  }

  .home-page .banner-style-three .image-box .overlay-shape {
    display: none;
  }
}

/* The arrow decoration lands on the buttons on phones once the video is shown. */
@media (max-width: 767.98px) {
  .home-page .banner-style-three .icon-angle {
    display: none;
  }
}

/* --- First section after the page title (What We Believe, Let's Talk) ---- */
.about-section-two.pull-up,
.why-choose-us-three.pull-up {
  padding-top: 80px;
}

@media (max-width: 991.98px) {
  .about-section-two.pull-up,
  .why-choose-us-three.pull-up {
    padding-top: 48px;
  }
}

/* --- Obscurity into Opportunity: spacing and risk card heading ----------- */
.opportunity-page .features-section-three {
  padding-top: 80px;
}

@media (max-width: 991.98px) {
  .opportunity-page .features-section-three {
    padding-top: 48px;
  }
}

.opportunity-page .feature-block-two__heading {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  text-align: left;
}

.opportunity-page .beliefs-section .feature-block-two__heading .icon {
  flex-shrink: 0;
  margin-bottom: 0;
}

.opportunity-page .beliefs-section .feature-block-two__heading .title {
  margin-bottom: 0;
}

@media (max-width: 575.98px) {
  .opportunity-page .feature-block-two__heading {
    gap: 16px;
  }

  .opportunity-page .beliefs-section .feature-block-two__heading .icon {
    font-size: 52px;
    line-height: 52px;
  }
}

/* --- Vendor Management Systems hero: centre the title below the header ---- */
.vendor-management-systems .banner-section-four .content-box {
  min-height: 640px;
  padding: 199px 0 40px;
}

@media (max-width: 991.98px) {
  .vendor-management-systems .banner-section-four .content-box {
    min-height: 0;
    padding: 228px 0 96px;
  }
}

@media (max-width: 767.98px) {
  .vendor-management-systems .banner-section-four .content-box {
    padding: 204px 0 72px;
  }
}

/* --- Vendor Management Consultancy hero: centre the title below the header */
.vendor-management-consultancy .banner-section {
  padding: 280px 0 120px;
}

.vendor-management-consultancy .banner-section .inner-column .title {
  margin-top: 0;
  margin-bottom: 0;
}

@media (max-width: 991.98px) {
  .vendor-management-consultancy .banner-section {
    padding: 212px 0 80px;
  }

  .vendor-management-consultancy .banner-section .inner-column .border-box {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .vendor-management-consultancy .banner-section {
    padding: 196px 0 64px;
  }
}

.vendor-management-consultancy .banner-section .inner-column .title {
  font-size: clamp(30px, 2.4vw + 22px, 48px);
}

.vendor-management-consultancy .banner-section .inner-column {
  padding-top: 0;
  padding-bottom: 0;
}

/* VMS hero: a single slide, so let it size to its content instead of the
   height Owl measured at start-up (which clipped the title on tablets). */
.vendor-management-systems .banner-section-four .owl-stage-outer {
  height: auto !important;
}

.vendor-management-systems .banner-section-four .content-box .title {
  font-size: clamp(34px, 3.2vw + 22px, 64px);
  line-height: 1.15;
}
