/* ==========================================================================
   BCG TOP SECTION STYLESHEET (top-section.css)
   Dedicated CSS for Site Header, Mega Menu Navigation & Hero Carousel
   Restored Previous Header and Hero Section (10 Cards Slider & Full Master-Detail Mega Menu)
   ========================================================================== */

:root {
  /* ---- Palette -------------------------------------------------------
     Primary   #7DF77A   highlights, active states, focus ring, progress
     Secondary #7DEE9A   buttons, hover fills, borders
     Accent    #A7F3D0   soft backgrounds, panels, dividers
     Neutral   black / white (all text and dark surfaces)
     Button    bg #7DEE9A  /  text #002B1B
     ------------------------------------------------------------------ */
  --brand-primary: #7DF77A;
  --brand-secondary: #7DEE9A;
  --brand-accent: #A7F3D0;
  --brand-black: #000000;
  --brand-white: #FFFFFF;
  --brand-light: var(--brand-accent);
  --brand-muted: rgba(0, 0, 0, 0.72);
  --ink: #000000;                    /* text + dark surfaces */
  --btn-bg: #7DEE9A;
  --btn-text: #002B1B;

  /* Legacy token names re-pointed to the palette (text -> black, tints -> accent) */
  --bcg-forest-green: var(--ink);
  --bcg-deep-green: var(--ink);
  --bcg-accent-green: var(--brand-primary);
  --bcg-accent-green-hover: var(--brand-primary);
  --bcg-mint-bg: var(--brand-accent);
  --bcg-cream-bg: var(--brand-accent);
  --bcg-warm-bg: var(--brand-accent);

  /* Neutral Palette */
  --bcg-dark: var(--ink);
  --bcg-body-text: var(--ink);
  --bcg-muted-text: var(--brand-muted);
  --bcg-border: var(--brand-accent);
  --bcg-card-bg: var(--brand-white);
  --bcg-menu-pill-active: var(--brand-accent);
  --bcg-menu-pill-hover: rgba(125, 247, 122, 0.25);

    /* Typography */
  --font-serif: "Lora", Georgia, "Times New Roman", serif;
  --font-sans: "Lora", Georgia, "Times New Roman", serif;

  /* Layout Constraints (Full Width Design) */
  --site-horizontal-padding: clamp(20px, 4.5vw, 72px);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 28px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.18);
}

/* ==========================================================================
   TOP HEADER / NAVBAR (DESKTOP & MOBILE RESPONSIVE)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background-color: transparent;
  z-index: 100;
  transition: all 0.3s ease;
/*   border-bottom: 1px solid var(--bcg-border); */
  padding-top: 20px;
  padding-bottom: 20px;
}

.site-header.is-scrolled {
/*   box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); */
}

.header-fullwidth {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
  width: 100%;
  padding: 0 var(--site-horizontal-padding);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.12), 0px 2px 6px 0px rgba(0, 0, 0, 0.08);
  padding: 20px;
  border-radius: 30px;
  background: #ffffff91;
  backdrop-filter: blur(15px);
}

.nav-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--bcg-forest-green);
  font-weight: 600;
  font-size: 14px;
  transition: background-color 0.2s ease;
  white-space: nowrap;
  margin-right: -15px;
}
.nav-toggle:hover {
/*   background-color: var(--bcg-menu-pill-active); */
}

.hamburger-box {
  width: 28px;
  height: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
}
.hamburger-line {
  width: 100%;
  height: 2px;
  background-color: var(--bcg-forest-green);
  border-radius: 2px;
}

.brand-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.bcg-logo-svg {
  height: 36px;
  width: auto;
  max-width: 160px;
  display: block;
}

.header-nav {
  display: none !important;
}
@media (min-width: 992px) {
  .header-nav {
    display: block;
  }
}
.header-nav-list {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-item-btn {
  font-size: 15px;
  font-weight: 500;
  color: var(--bcg-dark);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
}
.nav-item-btn:hover {
  background-color: var(--bcg-menu-pill-active);
  color: var(--bcg-forest-green);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.12), 0px 2px 6px 0px rgba(0, 0, 0, 0.08);
  padding: 20px;
  border-radius: 30px;
  background: #ffffff91;
  backdrop-filter: blur(15px);
}

.header-search-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-muted);
  font-size: 14px;
  font-weight: 400;
  padding: 8px 18px;
  border: 1px solid #A7F3D0;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
  background-color: #A7F3D0;
}
.header-search-btn:hover {
  border-color: var(--brand-secondary);
  background-color: #FFFFFF;
}

.header-login-link {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--bcg-forest-green);
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  transition: background-color 0.2s ease;
  white-space: nowrap;
}
.header-login-link:hover {
  background-color: var(--bcg-menu-pill-active);
}

@media (max-width: 1024px) {
	.header-left {
		padding: 15px;
	}
	.header-right {
		padding: 15px;
	}
}

@media (max-width: 768px) {
	.header-left {
		padding: 10px;
	}
	.header-right {
		padding: 10px;
	}
}

/* ==========================================================================
   MOBILE HEADER RESPONSIVE RULES (SOLVES THE OVERFLOW ON 360PX SCREENS)
   ========================================================================== */
@media (max-width: 768px) {
  .header-fullwidth {
    height: 60px;
    padding: 0 16px;
    gap: 10px;
  }

  .header-left {
    gap: 10px;
  }

  .bcg-logo-svg {
    height: 28px;
    max-width: 105px;
  }

  .bcg-logo-subtext {
    display: none; /* Hide wide subtitle text on mobile */
  }

  .nav-toggle {
    padding: 6px 8px;
    font-size: 13px;
    gap: 6px;
  }

  .header-right {
    gap: 8px;
  }

  /* Compact Circular Search Icon Button on Mobile */
  .header-search-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    border-color: transparent;
    background-color: var(--bcg-menu-pill-hover);
  }
  .header-search-btn:hover {
    background-color: var(--bcg-menu-pill-active);
  }

  .search-btn-label {
    display: none !important; /* HIDE the wide "Type to search" text on mobile */
  }

  .header-login-link {
    font-size: 12px;
    padding: 6px 10px;
    white-space: nowrap;
    letter-spacing: 0.3px;
  }
}

@media (max-width: 380px) {
  .header-fullwidth {
    padding: 0 10px;
    gap: 6px;
  }

  .nav-toggle-text {
    display: none; /* Icon-only menu button on narrowest screens */
  }

  .nav-toggle {
    padding: 6px;
  }

  .bcg-logo-svg {
    height: 26px;
    max-width: 80px;
  }

  .header-login-link {
    padding: 6px 6px;
    font-size: 11px;
  }
}


/* ==========================================================================
   MEGA MENU OVERLAY (MATCHES CLIENT REFERENCE IMAGES 1, 2, 3)
   ========================================================================== */
.mega-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.mega-menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.mega-menu-card {
  width: 100%;
  min-height: 600px;
  max-height: 94vh;
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--bcg-border);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  transform: translateY(-20px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.mega-menu-overlay.is-open .mega-menu-card {
  transform: translateY(0);
}

.mega-menu-topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px var(--site-horizontal-padding);
  border-bottom: 1px solid var(--bcg-border);
  background-color: #FFFFFF;
  position: sticky;
  top: 0;
  z-index: 10;
}

.mega-menu-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  color: var(--bcg-dark);
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}
.mega-menu-close:hover {
  background-color: var(--bcg-menu-pill-active);
}

.mega-brand-logo {
  flex-shrink: 0;
}
.mega-brand-logo .bcg-logo-svg {
  height: 30px;
}

.mega-search-wrapper {
  flex: 1;
  max-width: 720px;
  position: relative;
  display: flex;
  align-items: center;
}

.mega-search-wrapper .search-icon {
  position: absolute;
  left: 18px;
  pointer-events: none;
}

.mega-search-input {
  width: 100%;
  height: 44px;
  padding: 0 40px 0 48px;
  border-radius: var(--radius-full);
  border: 1px solid var(--brand-secondary);
  font-family: inherit;
  font-size: 15px;
  color: var(--bcg-dark);
  background-color: #A7F3D0;
  outline: none;
  transition: all 0.2s ease;
}
.mega-search-input:focus {
  border-color: var(--bcg-forest-green);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(125, 238, 154, 0.45);
}

.clear-search-btn {
  position: absolute;
  right: 14px;
  font-size: 14px;
  color: var(--brand-muted);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.clear-search-btn:hover {
  color: var(--bcg-dark);
  background-color: #A7F3D0;
}

.mega-login-link {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--bcg-forest-green);
  margin-left: auto;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.mega-login-link:hover {
  background-color: var(--bcg-menu-pill-active);
}

.mega-menu-content {
  flex: 1;
  padding: 32px var(--site-horizontal-padding);
  display: flex;
  flex-direction: column;
}

.mega-columns-wrapper {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  min-height: 480px;
}

.mega-primary-col {
  border-right: 1px solid #A7F3D0;
  padding-right: 20px;
}

.mega-cat-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mega-cat-header {
  font-size: 16px;
  font-weight: 600;
  color: var(--bcg-dark);
  padding: 8px 16px;
  text-align: left;
  width: 100%;
}

.mega-subcat-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 12px;
  margin-top: 4px;
}

.mega-subitem-btn {
  font-size: 14px;
  font-weight: 500;
  color: var(--brand-muted);
  padding: 8px 18px;
  text-align: left;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
  width: 100%;
}
.mega-subitem-btn:hover {
  background-color: var(--bcg-menu-pill-hover);
  color: var(--bcg-dark);
}
.mega-subitem-btn.is-active {
  background-color: var(--bcg-menu-pill-active);
  color: var(--bcg-forest-green);
  font-weight: 600;
}

.mega-primary-btn {
  font-size: 16px;
  font-weight: 600;
  color: var(--bcg-dark);
  padding: 10px 18px;
  text-align: left;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
  width: 100%;
}
.mega-primary-btn:hover {
  background-color: var(--bcg-menu-pill-hover);
}
.mega-primary-btn.is-active {
  background-color: var(--bcg-menu-pill-active);
  color: var(--bcg-forest-green);
}

.mega-panes-container {
  flex: 1;
}

.mega-pane {
  display: none;
}
.mega-pane.is-active {
  display: block;
  animation: fadeIn 0.2s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.mega-split-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
}

.mega-sub-col {
  border-right: 1px solid #A7F3D0;
  padding-right: 20px;
}

.mega-middle-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mega-middle-btn {
  font-size: 15px;
  font-weight: 500;
  color: var(--bcg-dark);
  padding: 8px 18px;
  text-align: left;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
  width: 100%;
}
.mega-middle-btn:hover {
  background-color: var(--bcg-menu-pill-hover);
}
.mega-middle-btn.is-active {
  background-color: var(--bcg-menu-pill-active);
  font-weight: 600;
}

.mega-detail-col {
  max-width: 560px;
}

.mega-detail-view {
  display: none;
}
.mega-detail-view.is-active {
  display: block;
}

.mega-preview-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.mega-preview-image-wrap {
  width: 100%;
  max-width: 480px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  background-color: #A7F3D0;
}

.mega-preview-img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.mega-preview-title {
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 700;
  color: var(--bcg-dark);
  margin-bottom: 12px;
  line-height: 1.3;
}

.mega-preview-desc {
  font-size: 14px;
  color: var(--brand-muted);
  line-height: 1.55;
  margin-bottom: 20px;
}

.mega-within-block {
  width: 100%;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--bcg-border);
}

.within-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 14px;
}

.within-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 28px;
}

.within-link {
  font-size: 14px;
  color: var(--bcg-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--brand-secondary);
  transition: all 0.2s ease;
}
.within-link:hover {
  text-decoration-color: var(--bcg-forest-green);
  color: var(--bcg-forest-green);
}

.mega-fullwidth-content {
  width: 100%;
}

.mega-header-block {
  margin-bottom: 24px;
}

.mega-fullwidth-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--bcg-dark);
  margin-bottom: 6px;
}

.mega-fullwidth-desc {
  font-size: 14.5px;
  color: var(--brand-muted);
  margin-bottom: 18px;
}

.mega-divider {
  border: none;
  border-top: 1px solid #A7F3D0;
  margin: 0;
}

.mega-industries-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 64px;
}

.industries-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.industry-item-link {
  font-size: 14.5px;
  color: var(--bcg-dark);
  padding: 4px 0;
  transition: color 0.2s ease;
}
.industry-item-link:hover {
  color: var(--bcg-forest-green);
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* ==========================================================================
   1. HERO PERSPECTIVES SECTION (5-UP FOCUS CAROUSEL)
   ========================================================================== */
.hero-section {
  padding: clamp(36px, 5vw, 56px) 0 44px;
  background-color: #FFFFFF;
}

.hero-header-text {
  text-align: center;
  max-width: 1100px;
  margin: 0 auto clamp(24px, 4vw, 44px);
}

.hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--bcg-muted-text);
  margin-bottom: 12px;
}

/* ==========================================================================
   HERO CAROUSEL  -  5-up focus carousel
   --------------------------------------------------------------------------
   * 5 slides visible: centre = active, then 2 on each side.
   * Active slide shows a text panel; on hover / keyboard focus / tap the panel
     grows to cover the whole card and reveals the FULL text + "Learn more".
   * script.js only sets data-pos (-3..3) plus .is-active / .is-shown /
     .is-expanded on the slides; every size and position lives here.
   * All sizes use container units (cqw = 1% of the carousel width), so the
     whole composition scales proportionally with the screen.
   ========================================================================== */
.hero-carousel-container {
  /* Slides visible on EACH side of the active one (script.js reads this):
     2 = five slides (desktop), 1 = three slides (tablet / phone). */
  --hv: 2;

  /* Slide widths (all slides are 3:4 portrait) */
  --w0: 21.5cqw;   /* active (centre)           */
  --w1: 12.8cqw;   /* next to the active slide  */
  --w2: 17.15cqw;  /* outer slides              */
  --w3: 12.8cqw;   /* parked off-stage (hidden) */
  /* Distance of each slide's centre from the middle */
  --x1: 21.7cqw;
  --x2: 41.4cqw;
  --x3: 55cqw;

  --panel-top: 59%;                       /* where the resting text panel starts */
  --hero-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --hero-dur: 0.85s;

  /* "Learn more" button: palette button background + button text */
  --hero-cta-bg: var(--btn-bg);
  --hero-cta-fg: var(--btn-text);

  container-type: inline-size;
  position: relative;
  width: 100%;
  /* max-width: 1440px; */
  margin: 0 auto 20px;
  /* padding: 0 3%; */
  padding-top: 20px;
}

.hero-carousel-track {
  position: relative;
  width: 100%;
  height: calc(var(--w0) * 4 / 3);
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

/* ---- Slide ---------------------------------------------------------------
   Position uses left/top/width/height (no transform) so it never collides
   with the GSAP intro that animates transform on .hero-card.               */
.hero-card {
  --w: var(--w0);
  --x: 0cqw;
  position: absolute;
  left: calc(50% + var(--x) - var(--w) / 2);
  top: calc(50% - var(--w) * 2 / 3);
  width: var(--w);
  height: calc(var(--w) * 4 / 3);
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  background: var(--brand-light);
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    left var(--hero-dur) var(--hero-ease),
    top var(--hero-dur) var(--hero-ease),
    width var(--hero-dur) var(--hero-ease),
    height var(--hero-dur) var(--hero-ease),
    opacity 0.6s ease;
  border-radius: 20px;
}
.hero-card.is-shown { opacity: 1; pointer-events: auto; }
.hero-card.no-anim { transition: none !important; }

.hero-card[data-pos="0"]  { --w: var(--w0); --x: 0cqw;                    z-index: 3; }
.hero-card[data-pos="-1"] { --w: var(--w1); --x: calc(var(--x1) * -1);    z-index: 2; }
.hero-card[data-pos="1"]  { --w: var(--w1); --x: var(--x1);               z-index: 2; }
.hero-card[data-pos="-2"] { --w: var(--w2); --x: calc(var(--x2) * -1);    z-index: 1; }
.hero-card[data-pos="2"]  { --w: var(--w2); --x: var(--x2);               z-index: 1; }
.hero-card[data-pos="-3"] { --w: var(--w3); --x: calc(var(--x3) * -1); }
.hero-card[data-pos="3"]  { --w: var(--w3); --x: var(--x3); }

.hero-card:focus-visible {
  outline: 3px solid var(--brand-primary);
  outline-offset: -3px;
  box-shadow: none;
}

/* ---- Image ---- */
.hero-card-media { position: absolute; inset: 0; z-index: -2; }
.hero-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-user-drag: none;
}

/* soft dark scrim at the top of the active slide so the white tag stays readable */
.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.38) 0%, rgba(0, 0, 0, 0) 38%);
  opacity: 0;
  transition: opacity 0.5s ease;
}
.hero-card.is-active::before { opacity: 1; }
.hero-card.is-active:is(:hover, .is-expanded)::before { opacity: 0; }

/* ---- Overlay (only the active slide shows text) ----
   Opacity is set on the tag and panel themselves, NOT on the overlay, because
   an ancestor with opacity < 1 would stop the panel's backdrop blur working. */
.hero-card-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: #000000;
}

/* Category pill, top of the active slide */
.card-tag {
  position: absolute;
  top: 5.5%;
  left: 5.5%;
  right: 5.5%;
  padding: 0.75em 1.1em;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.38);
  color: #FFFFFF;
  font-size: clamp(10px, 0.95cqw, 13.5px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.4s ease, transform 0.6s var(--hero-ease);
  width: fit-content;
}

/* Frosted panel: a rounded card at the bottom, grows to fill the slide on hover */
.card-panel {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 4.2%;
  top: var(--panel-top);
  padding: 1.1em 1.25em;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(196, 196, 196, 0.7);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  backdrop-filter: blur(18px) saturate(1.1);
  font-size: clamp(11px, 0.95cqw, 13.5px);   /* base for the "em" paddings above */
  opacity: 0;
  transform: translateY(14px);
  transition:
    top 0.7s var(--hero-ease),
    left 0.7s var(--hero-ease),
    right 0.7s var(--hero-ease),
    bottom 0.7s var(--hero-ease),
    border-radius 0.7s var(--hero-ease),
    background-color 0.5s ease,
    opacity 0.5s ease,
    transform 0.7s var(--hero-ease);
}

.hero-card.is-active .card-tag,
.hero-card.is-active .card-panel {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.hero-card.is-active .card-panel { transition-delay: 0s, 0s, 0s, 0s, 0s, 0s, 0.25s, 0.25s; }
.hero-card.is-active .card-tag   { transition-delay: 0.3s; }

.card-meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.2em 0.7em;
  font-size: clamp(10px, 0.9cqw, 12.5px);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #000000;
}
.card-type { font-weight: 700; }
.card-extra { font-weight: 400; }

.card-heading {
  margin: 0.55em 0 0;
  font-family: var(--font-sans);
  font-size: clamp(16px, 1.65cqw, 23px);
  font-weight: 300;
  line-height: 1.24;
  letter-spacing: -0.005em;
  color: #000000;
  /* resting state: up to 3 lines; hover reveals the full heading */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc {
  margin: 1.1em 0 0;
  font-size: clamp(13px, 1.12cqw, 16px);
  line-height: 1.5;
  color: #000000;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.5s var(--hero-ease);
}

.card-cta {
  position: absolute;
  right: 1.35em;
  bottom: 1.35em;
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  padding: 0.85em 1.4em;
  border-radius: 16px;
  background: var(--hero-cta-bg);
  color: var(--hero-cta-fg);
  font-size: clamp(12px, 1cqw, 14px);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.5s var(--hero-ease), background-color 0.25s ease, color 0.25s ease;
}
.card-cta-arrow { transition: transform 0.35s var(--hero-ease); }
.card-cta:hover,
.card-cta:focus-visible { background: var(--ink); color: var(--brand-primary); }
.card-cta:hover .card-cta-arrow,
.card-cta:focus-visible .card-cta-arrow { transform: translateX(4px); }
.card-cta:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

/* ---- Expanded (hover / keyboard focus / tap on the active slide) ---- */
.hero-card.is-active:is(:hover, .is-expanded) .card-tag {
  opacity: 0;
  transform: translateY(-6px);
  transition-delay: 0s;
}
.hero-card.is-active:is(:hover, .is-expanded) .card-panel {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 0;
  padding: 1.7em 1.35em;
  background: rgba(238, 237, 233, 0.84);
}
.hero-card.is-active:is(:hover, .is-expanded) .card-heading {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}
.hero-card.is-active:is(:hover, .is-expanded) .card-desc {
  opacity: 1;
  transform: none;
  transition-delay: 0.22s;
}
.hero-card.is-active:is(:hover, .is-expanded) .card-cta {
  opacity: 1;
  pointer-events: auto;
  transform: none;
  transition-delay: 0.3s, 0.3s, 0s, 0s;
}

/* ---- Controls: pause / prev / next, left-aligned under the first slide ---- */
.hero-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 22px;
}
.carousel-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: var(--brand-light);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.carousel-btn:hover { background: var(--brand-secondary); }
.carousel-btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: none; }
.carousel-play .icon-play { display: none; }
.carousel-play.is-paused .icon-pause { display: none; }
.carousel-play.is-paused .icon-play { display: block; }

/* ==========================================================================
   HERO RESPONSIVE
   ========================================================================== */
/* Tablet: 3 slides (centre + 1 each side) */
@media (max-width: 899px) {
  .hero-carousel-container {
    --hv: 1;
    --w0: 40cqw;
    --w1: 26cqw;
    --x1: 36cqw;
    --w2: 26cqw;
    --x2: 52cqw;
    --w3: 26cqw;
    --x3: 52cqw;
    --panel-top: 56%;
  }
  .card-tag { font-size: clamp(10px, 1.5cqw, 13px); }
  .card-panel { font-size: clamp(11px, 1.5cqw, 13.5px); }
  .card-meta { font-size: clamp(10px, 1.4cqw, 12.5px); }
  .card-heading { font-size: clamp(16px, 2.6cqw, 23px); }
  .card-desc { font-size: clamp(13px, 1.8cqw, 16px); }
  .card-cta { font-size: clamp(12px, 1.6cqw, 14px); }
}

/* Phone: centre slide large, neighbours peek in from the sides */
@media (max-width: 639px) {
  .hero-carousel-container {
    padding: 0;
    --w0: 62cqw;
    --w1: 30cqw;
    --x1: 60cqw;
    --w2: 30cqw;
    --x2: 72cqw;
    --w3: 30cqw;
    --x3: 72cqw;
    --panel-top: 50%;
  }
  .card-tag { font-size: 11px; }
  .card-panel { font-size: 12px; border-radius: 18px; }
  .card-meta { font-size: 11px; }
  .card-heading { font-size: 17px; }
  .card-desc { font-size: 14px; }
  .card-cta { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-card,
  .card-tag,
  .card-panel,
  .card-desc,
  .card-cta,
  .card-cta-arrow { transition-duration: 0.01s !important; transition-delay: 0s !important; }
}

/* If the GSAP layer fails to start, its failsafe would reveal the parked slides too */
html:not(.anim-ready) .hero-card:not(.is-shown) { animation: none !important; }
