/* ---------------------------------------
//  0 SCROLLBAR
-----------------------------------------*/
html {
  /* Reserves space for the scrollbar so the page width never changes */
  scrollbar-gutter: stable;
  overflow-y: scroll !important;
}

/* ONLY hide the native scrollbar on devices with a mouse (Desktop) */
@media (pointer: fine) {
  body::-webkit-scrollbar {
    display: none;
  }

  body {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
  }
}

/* Style the custom floating thumb */
.custom-scrollbar-thumb {
  position: fixed;
  right: 4px;
  top: 0;
  background-color: #CBCBCB;
  border-radius: 10px;
  z-index: 9999;
  pointer-events: none;

  /* Added 'width' to the transition so it animates if the user resizes their window */
  transition: opacity 0.3s ease, width 0.3s ease;

  /* 1. Default Mobile Width (Thinner) */
  width: 3px;
}

/* 2. Desktop Width (Thicker) */
@media (pointer: fine) {
  .custom-scrollbar-thumb {
    width: 8px;
    /* Adjust this to whatever thickness looks best to you */
  }
}

/* ---------------------------------------
//  1 TAB SLIDER & MARKER SYSTEM
-----------------------------------------*/

[data-marker="placeholder-marker"] {
  display: block;
  width: var(--_design-elements---tabs--filter-marker);
  transform-origin: left center;
  transform: scaleX(0);
  will-change: transform;
}

[data-tabs-line] {
  will-change: transform;
}

/* ---------------------------------------
//  2 INSIGHT LIST
-----------------------------------------*/

/* Text and Colour Transitions

/* Target ONLY the tags to prevent the first-hover flash */
.u-text-tag {
  -webkit-font-smoothing: antialiased;
  transform: translateZ(0);
  will-change: color, background-color, border-color;
}

/* Fades text and borders smoothly when the dark mode class is added */
.insight_list_cms_item,
.insight_list_cms_item * {
  -webkit-font-smoothing: antialiased;

  transition: color 0.4s cubic-bezier(0.0, 0.0, 0.2, 1),
    background-color 0.4s cubic-bezier(0.0, 0.0, 0.2, 1),
    border-color 0.4s cubic-bezier(0.0, 0.0, 0.2, 1);
}

/* The Gliding Background */

.insight_hover_background {
  position: absolute !important;
  top: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
  /* Stops the background from blocking your mouse */

  /* Dimensions and position controlled by JavaScript */
  width: var(--bg-width, 0px);
  height: var(--bg-height, 0px);

  /* Glides to position and scales Y based on hover state */
  transform: translate(var(--bg-left, 0px), var(--bg-top, 0px)) scaleY(var(--bg-scale, 0));
  transform-origin: bottom center;

  transition: transform 0.4s cubic-bezier(0.0, 0.0, 0.2, 1),
    width 0.4s cubic-bezier(0.0, 0.0, 0.2, 1),
    height 0.4s cubic-bezier(0.0, 0.0, 0.2, 1);
}

.insight_list_link {
  position: absolute;
  z-index: 2;
}

/* Thumbnial Overlay */

/* Define timing variables on the parent wrapper */
.list_thumbnail_overlay {
  --arrow-in-dur: 0.4s;
  --arrow-in-delay: 0.15s;
  --arrow-out-dur: 0.3s;
  --arrow-out-delay: 0s;
  --arrow-easing: cubic-bezier(0.0, 0.0, 0.2, 1);

  /* Hide the overlay initially */
  transform: scale(0) !important;
  transform-origin: bottom left !important;
  transition: transform 0.4s var(--arrow-easing) !important;
}

/* Active hover state (triggered by JS adding .u-theme-dark) */
.u-theme-dark .list_thumbnail_overlay {
  transform: scale(1) !important;
}

/* Arrow Rotation */

.insight_list_cms_item .svg_arrow_wrapper.list {
  transform: rotate(-45deg) !important;
  transform-origin: center;
  display: inline-block;
  /* Crucial for transform to work on SVGs */

  transition: transform var(--arrow-out-dur) var(--arrow-easing) var(--arrow-out-delay) !important;
}

.u-theme-dark .svg_arrow_wrapper.list {
  transform: rotate(0deg) !important;

  /* Use the IN timing variables */
  transition: transform var(--arrow-in-dur) var(--arrow-easing) var(--arrow-in-delay) !important;
}

/* ---------------------------------------
//  Full width text
-----------------------------------------*/

[data-fit-width] {
  display: inline-block;
  white-space: nowrap;
  margin: 0;
}

/* ---------------------------------------
//  Footer Stagger text
-----------------------------------------*/
[data-animate="stagger-center"] {
  opacity: 0;
}

/* ---------------------------------------
//  ANIMATED CTA CSS Stroke Animations
-----------------------------------------*/

:root {
  /* Stroke Sizes */
  --stroke-mobile-top: 165;
  --stroke-mobile-bottom: 155;

  --stroke-tablet-top: 110;
  --stroke-tablet-bottom: 95;

  --stroke-desktop-top: 65;
  --stroke-desktop-bottom: 55;

  --stroke-color: var(--swatch--brand-500);
  --bg-color: #e9e9e9;
}

.svg-stroke-container {
  width: 110%;
  height: auto;
  display: block;
  overflow: visible !important;
}

.main-path {
  fill: none;
  stroke: var(--stroke-color);
  stroke-linecap: round;
  stroke-linejoin: round;
  visibility: hidden;
}

.svg-line-wrapper {
  position: absolute;
  /* Removed the generic width and left properties from here */
}

/* =========================================
      ANIMATED CTA CSS Stroke Animations  1. MOBILE (DEFAULT) CONTROLS
       ========================================= */
.path-top {
  stroke-width: var(--stroke-mobile-top);
}

.path-bottom {
  stroke-width: var(--stroke-mobile-bottom);
}

.svg-wrapper-top {
  width: 130vw;
  /* Adjust mobile top width here */
  left: -20vw;
  /* Slide left/right to reveal curve */
  top: 15%;
}

.svg-wrapper-bottom {
  width: 130vw;
  /* Adjust mobile bottom width here */
  left: -10vw;
  bottom: -8vw;
}

/* =========================================
     ANIMATED CTA CSS Stroke Animations   2. TABLET CONTROLS
       ========================================= */
@media (min-width: 768px) {
  .path-top {
    stroke-width: var(--stroke-tablet-top);
  }

  .path-bottom {
    stroke-width: var(--stroke-tablet-bottom);
  }

  .svg-wrapper-top {
    width: 120vw;
    /* Adjust tablet top width here */
    left: -10vw;
    top: 10%;
  }

  .svg-wrapper-bottom {
    width: 120vw;
    /* Adjust tablet bottom width here */
    left: -10vw;
    bottom: -10vw;
  }
}

/* =========================================
      ANIMATED CTA CSS Stroke Animations 3. DESKTOP CONTROLS
       ========================================= */
@media (min-width: 1024px) {
  .path-top {
    stroke-width: var(--stroke-desktop-top);
  }

  .path-bottom {
    stroke-width: var(--stroke-desktop-bottom);
  }

  .svg-wrapper-top {
    width: 120vw;
    /* Adjust desktop top width here */
    left: -5vw;
    top: 4svh;
  }

  .svg-wrapper-bottom {
    width: 120vw;
    /* Adjust desktop bottom width here */
    left: -10vw;
    bottom: -58vw;
  }
}

/* ---------------------------------------
// HOME STICKY TABS
-----------------------------------------*/

/* --- 1. THE "NUCLEAR" OVERFLOW FIX --- */
.sticky-list,
.sticky-tabs-item,
.tab-header,
.tab-content {
  overflow: visible !important;
  transform-style: preserve-3d;
}

.sticky-tabs-scroll-section {
  z-index: 5;
  position: relative;
}

/* --- 2. TITLE STYLES --- */
.tab-title,
h1.tab-title,
h2.tab-title,
h3.tab-title {
  display: inline-block !important;
  position: relative;
  z-index: 999 !important;
  transition: none !important;
  background: transparent !important;
}

.ghost-title {
  display: inline-block !important;
}

/* ---------------------------------------
// TABLE OF CONTENTS
-----------------------------------------*/
[data-toc-item][data-toc-status="active"] {
  color: #004846;
  border-color: #004846;
}

[data-toc-item][data-toc-depth="3"] {
  padding-left: 2.5em;
  font-size: .75em;
}

[data-toc-content] h2:first-child {
  margin-top: 0;
  padding-top: 0;
}

/* ---------------------------------------
// FULL WIDTH TEXT
-----------------------------------------*/
/* Ensure the parent doesn't show overlapping negative margins */
.header_container {
  width: 100%;
  overflow: hidden;
}

[data-fit-width] {
  display: inline-block;
  white-space: nowrap;
  margin: 0;
  line-height: 0.85;
}

/* ---------------------------------------
// CUSTOM DYNAMIC CURSOR
-----------------------------------------*/

/* Custom Cursor Global Styles */
@media (hover: hover) and (pointer: fine) {
  [data-cursor] .cursor_wrapper {
    transition: transform 0.4s cubic-bezier(0.625, 0.05, 0, 1), opacity 0.4s cubic-bezier(0.625, 0.05, 0, 1);
    transform: translateX(0%) scale(0.9) rotate(0.001deg);
  }

  [data-cursor="active"] .cursor_wrapper {
    opacity: 1;
    transform: translateX(0%) scale(1) rotate(0.001deg);
  }

  [data-cursor="active-edge"] .cursor_wrapper {
    opacity: 1;
    transform: translateX(-100%) scale(1) rotate(0.001deg);
  }
}

@media (hover: none) and (pointer: coarse) {
  .cursor {
    display: none;
  }
}
