/* ============================================================
   Component: Roles & Behaviour Change Section (roles.css)
   BEM Notation: block_element--modifier
   Matched to Figma Node 0:5275
   "Every step changes everyone’s role."
   3-column unified card shell with ambient background glow
   ============================================================ */

/* Section Shell */
.roles {
  width: 100%;
  padding-block: 72px 88px;
  background-color: rgba(247, 247, 254, 0.70);
  position: relative;
  overflow: hidden;
}

@media (min-width: 992px) {
  .roles {
    padding-block: 104px 120px;
  }
}

/* Ambient Gradient Glow between Title and Table (Figma Node 0:5276 / behaviour_bg.png) */
.roles_glow {
  display: none;
  position: absolute;
  top: 240px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1154px, 92vw);
  height: 385px;
  background: url('../../../assets/images/sections/behaviour-bg.webp') no-repeat center top / contain;
  pointer-events: none;
  z-index: 1;
}

@media (min-width: 768px) {
  .roles_glow {
    display: block;
  }
}

@media (min-width: 992px) {
  .roles_glow {
    top: 285px;
  }
}

/* Centered 1280px Container */
.roles_container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 16px;
  position: relative;
  z-index: 2;
}

@media (min-width: 768px) {
  .roles_container {
    padding-inline: 40px;
  }
}

@media (min-width: 1200px) {
  .roles_container {
    padding-inline: 80px;
  }
}

/* Header Content (Figma Node 0:5277: 840px max-width, center-aligned) */
.roles_header {
  max-width: 840px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: 56px;
}

@media (min-width: 992px) {
  .roles_header {
    margin-bottom: 72px;
  }
}

/* Eyebrow Tag */
.roles_eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  font-size: var(--font-size-eyebrow, 13px);
  font-weight: var(--font-weight-bold, 700);
  letter-spacing: var(--letter-spacing-eyebrow, 0.12em);
  text-transform: uppercase;
  color: var(--color-eyebrow, #7339D4);
}

/* Main Section Heading H2 */
.roles_title {
  margin: 0 0 20px 0;
  font-size: clamp(2rem, 3.8vw, 48px);
  font-weight: var(--font-weight-extrabold, 700);
  line-height: 1.15;
  letter-spacing: var(--letter-spacing-tighter, -0.02em);
  color: var(--color-text-primary, #0F0D15);
}

@media (max-width: 767px) {
  .roles_title {
    font-size: 40px;
    font-weight: var(--font-weight-medium, 500);
  }
}

/* Subtitle Description */
.roles_desc {
  margin: 0 auto;
  font-size: clamp(1rem, 1.2vw, 18px);
  font-weight: var(--font-weight-regular, 400);
  line-height: 1.55;
  color: var(--color-text-primary, #0F0D15);
  max-width: 698px;
}

/* Unified 3-Column White Card Shell (Figma Node 0:5281) */
.roles_card {
  width: 100%;
  background-color: #FFFFFF;
  border-radius: var(--hero-card-radius, 24px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 14px 36px -10px rgba(131, 74, 224, 0.08);
  overflow: hidden;
}

/* 3-Column Layout */
.roles_grid {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .roles_grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Individual Role Column (Figma Node 0:5282, 0:5288, 0:5294) */
.roles_col {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
  box-sizing: border-box;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transition: background-color var(--duration-fast, 0.2s) var(--ease-out-smooth);
}

@media (min-width: 768px) {
  .roles_col {
    min-height: 320px;
    padding: 36px 32px 40px;
    border-bottom: none;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
  }

  .roles_col:last-child {
    border-right: none;
  }
}

.roles_col:hover {
  background-color: rgba(245, 239, 255, 0.35);
}

/* Column Top Header Area */
.roles_col-top {
  margin-bottom: 48px;
}

/* Category Title ("The organisation", "The manager", "The team") */
.roles_category-title {
  margin: 0;
  font-size: clamp(1.25rem, 1.6vw, 24px);
  font-weight: var(--font-weight-bold, 700);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--color-text-primary, #0F0D15);
}

/* Column Bottom Content Area */
.roles_col-bottom {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Role Sub-Heading ("Direction and patience", etc.) */
.roles_role-title {
  margin: 0;
  font-size: clamp(1.1rem, 1.3vw, 18px);
  font-weight: var(--font-weight-bold, 700);
  line-height: 1.3;
  color: var(--color-text-primary, #0F0D15);
}

/* Role Description Body Copy */
.roles_role-desc {
  margin: 0;
  font-size: var(--font-size-body, 16px);
  font-weight: var(--font-weight-regular, 400);
  line-height: 1.55;
  color: var(--color-text-primary, #0F0D15);
}

/* ============================================================
   Subtle Staggered Entrance Animations on Scroll
   ============================================================ */
.roles_header.roles_animate,
.roles_col.roles_animate {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity 0.65s var(--ease-out-smooth, cubic-bezier(0.16, 1, 0.3, 1)),
              transform 0.65s var(--ease-out-smooth, cubic-bezier(0.16, 1, 0.3, 1));
  will-change: opacity, transform;
}

/* Triggered State */
.roles.is-visible .roles_header.roles_animate,
.roles.is-visible .roles_col.roles_animate {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Stagger Delays */
.roles.is-visible .roles_header {
  transition-delay: 0.08s;
}

.roles.is-visible .roles_col--1 {
  transition-delay: 0.18s;
}

.roles.is-visible .roles_col--2 {
  transition-delay: 0.30s;
}

.roles.is-visible .roles_col--3 {
  transition-delay: 0.42s;
}

/* ============================================================
   Accessibility: Prefers-reduced-motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .roles_header.roles_animate,
  .roles_col.roles_animate {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .roles_col {
    transition: none;
  }
}
