/* ============================================================
   bayan-animations.css — v4
   Values extracted verbatim from Bayan_Group_Homepage_v3_dc.html.
   Supersedes v3, which was reverse-engineered from a screenshot
   and got the header, the card tints and the CTA wrong.

   Load AFTER Elementor's CSS.
   Pairs with bayan-animations.js (GSAP panel pinning + scroll state).
   ============================================================ */

:root {
  --navy:       #0B2033;
  --cover-navy: #194179;
  --paper:      #FAFAFA;
  --blue:       #206ACA;
  --consulting: #1A4178;
  --assessment: #4C706D;
  --learning:   #8469AC;
  --lime:       #B4E5A1;
}

html { scroll-behavior: smooth; }

/* ------------------------------------------------------------
   1. KEYFRAMES — all 14 from the reference
   ------------------------------------------------------------ */
@keyframes heroDrift  {0%,100%{transform:scale(1) translateY(0);}50%{transform:scale(1.03) translateY(-8px);}}
@keyframes fadeUp     {from{opacity:0;transform:translateY(26px);}to{opacity:1;transform:translateY(0);}}
@keyframes floatSlow  {0%,100%{transform:translateY(0);}50%{transform:translateY(-10px);}}
@keyframes marquee    {from{transform:translateX(0);}to{transform:translateX(-50%);}}

@keyframes drawBranch {0%{stroke-dashoffset:131;opacity:1;}70%{stroke-dashoffset:0;opacity:1;}90%{stroke-dashoffset:0;opacity:1;}96%{opacity:0;}100%{opacity:0;stroke-dashoffset:131;}}
@keyframes nodePulseTop    {0%,4%{r:1.8;opacity:.6;}9%{r:3.2;opacity:1;}16%,100%{r:1.8;opacity:.6;}}
@keyframes nodePulseSide   {0%,32%{r:1.8;opacity:.6;}40%{r:3.2;opacity:1;}48%,100%{r:1.8;opacity:.6;}}
@keyframes nodePulseBottom {0%,66%{r:1.8;opacity:.6;}76%{r:3.6;opacity:1;}92%,100%{r:1.8;opacity:.6;}}
@keyframes frameGlow  {0%,66%{box-shadow:0 30px 80px rgba(0,0,0,.5);}78%{box-shadow:0 30px 80px rgba(0,0,0,.5),0 0 46px 10px rgba(200,255,90,.85);}92%{box-shadow:0 30px 80px rgba(0,0,0,.5),0 0 46px 10px rgba(200,255,90,.85);}100%{box-shadow:0 30px 80px rgba(0,0,0,.5);}}
@keyframes dashFlow   {to{stroke-dashoffset:-16;}}
@keyframes pulseDot   {0%,100%{r:2.4;opacity:.65;}50%{r:3.6;opacity:1;}}
@keyframes glowPulse  {0%,100%{box-shadow:0 8px 30px rgba(0,0,0,.35),0 0 0 rgba(200,255,90,0);}50%{box-shadow:0 8px 34px rgba(0,0,0,.4),0 0 22px rgba(200,255,90,.25);}}

@keyframes orbitFloat1 {0%,100%{transform:translate(0,0) rotate(-2deg);}50%{transform:translate(6px,-14px) rotate(1deg);}}
@keyframes orbitFloat2 {0%,100%{transform:translate(0,0) rotate(2deg);}50%{transform:translate(-8px,10px) rotate(-1.5deg);}}
@keyframes orbitFloat3 {0%,100%{transform:translate(0,0) rotate(-1deg);}50%{transform:translate(-6px,-12px) rotate(2deg);}}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ------------------------------------------------------------
   2. HEADER — fixed dark-navy glass pill.
   CORRECTION: v3 made this a LIGHT pill with dark links.
   The reference is dark navy glass with white links.
   .is-scrolled is toggled by bayan-animations.js
   ------------------------------------------------------------ */
#bayan-header {
  position: fixed !important;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1320px, 94%);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(20px, 4vw, 40px) !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(11, 32, 51, .35) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  transition: all .35s cubic-bezier(.4, 0, .2, 1);
}
#bayan-header.is-scrolled {
  top: 12px;
  padding: 12px clamp(20px, 4vw, 40px) !important;
  border-color: rgba(255, 255, 255, .16);
  background: rgba(11, 32, 51, .75) !important;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .28);
}

#bayan-header .elementor-icon-list-items {
  display: flex !important;
  flex-wrap: nowrap;
  align-items: center;
  gap: 32px;
}
#bayan-header .elementor-icon-list-icon { display: none; }
#bayan-header .elementor-icon-list-text {
  color: rgba(255, 255, 255, .78) !important;
  font-size: 13px;
  font-weight: 500;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: all .2s;
  white-space: nowrap;
}
#bayan-header .elementor-icon-list-item:hover .elementor-icon-list-text {
  color: #fff !important;
  border-color: rgba(255, 255, 255, .4);
}
#bayan-header .elementor-button {
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .3px;
  padding: 11px 20px;
  border-radius: 5px;
  transition: all .2s;
}
#bayan-header .elementor-button:hover {
  background: #1a58a8;
  transform: translateY(-1px);
}

/* hero must clear the fixed header */
#hero { padding-top: 168px !important; }

/* ------------------------------------------------------------
   3. HERO — drifting background + orbiting division badges
   ------------------------------------------------------------ */
.hero-visual-wrap { position: relative; }
.hero-bg-drift { animation: heroDrift 14s ease-in-out infinite; }

.hero-float-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  box-shadow: 0 16px 36px rgba(11, 32, 51, .3);
  padding: 12px 20px;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  z-index: 3;
}
.hero-float-badge--consulting {
  left: -2%; top: 50%; transform: translateY(-50%);
  background: linear-gradient(135deg, #1A4178f2 0%, #00235af2 100%);
  animation: fadeUp .7s cubic-bezier(.22,1,.36,1) .5s both, orbitFloat1 7s ease-in-out infinite;
}
.hero-float-badge--assessment {
  right: -2%; top: 50%; transform: translateY(-50%);
  background: linear-gradient(135deg, #4C706Df2 0%, #2e524ff2 100%);
  animation: fadeUp .7s cubic-bezier(.22,1,.36,1) .65s both, orbitFloat2 8.5s ease-in-out infinite;
}
.hero-float-badge--learning {
  top: -2%; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, #8469ACf2 0%, #664b8ef2 100%);
  animation: fadeUp .7s cubic-bezier(.22,1,.36,1) .8s both, orbitFloat3 6.5s ease-in-out infinite;
}

/* animated delivery-model diagram */
#hero-connect .conn-line {
  stroke-dasharray: 131;
  animation: drawBranch 6s ease-in-out infinite;
}
#hero-connect .conn-line--2 { animation-delay: .3s; }
#hero-connect .conn-line--3 { animation-delay: .6s; }
#hero-connect .conn-node        { animation: nodePulseTop 6s ease-in-out infinite; }
#hero-connect .conn-node--side  { animation: nodePulseSide 6s ease-in-out infinite; }
#hero-connect .conn-node--bottom{ animation: nodePulseBottom 6s ease-in-out infinite; }
#hero-connect .conn-frame       { animation: frameGlow 6s ease-in-out infinite; }

/* hover freezes the sequence in its "complete" state */
#hero-connect:hover .conn-line {
  stroke-dashoffset: 0 !important; opacity: 1 !important;
  animation-play-state: paused !important;
}
#hero-connect:hover .conn-node {
  r: 3.6 !important; opacity: 1 !important;
  animation-play-state: paused !important;
}
#hero-connect:hover .conn-frame {
  box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 46px 10px rgba(200,255,90,.85) !important;
  animation-play-state: paused !important;
}

/* ------------------------------------------------------------
   4. SCROLL-SPY RAIL — 7 dots, driven by bayan-animations.js
   ------------------------------------------------------------ */
#bayan-rail {
  position: fixed;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding-top: 20px;
}
#bayan-rail button { padding: 4px; }
#bayan-rail .rail-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255, 255, 255, .25);
  box-shadow: none;
  transition: all .3s ease;
  display: block;
}
#bayan-rail .rail-dot.is-active {
  width: 9px; height: 9px;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(32, 106, 202, .25);
}

/* ------------------------------------------------------------
   5. DIVISION CARD STACK
   CORRECTION: v3 painted multiply colour washes over these.
   The reference keeps the photos clean on a white card; only the
   bottom label bar is tinted.
   ------------------------------------------------------------ */
.bayan-division-card {
  flex: 0 0 240px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 300px;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  box-shadow: 0 20px 40px rgba(11, 32, 51, .22);
  transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s ease;
  animation: fadeUp .7s cubic-bezier(.22,1,.36,1) both;
}
.bayan-division-card:nth-child(1) { z-index: 1; animation-delay: 0s;    }
.bayan-division-card:nth-child(2) { z-index: 2; animation-delay: .12s;
  margin-inline-start: -56px; margin-top: 18px; }
.bayan-division-card:nth-child(3) { z-index: 3; animation-delay: .24s;
  margin-inline-start: -56px; margin-top: 36px; }

.bayan-division-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 52px rgba(11, 32, 51, .3);
  z-index: 4;
}

/* ------------------------------------------------------------
   6. SERVICE PANELS — exact gradients + watermark coordinates
   Panel pinning/scaling lives in bayan-animations.js (GSAP).
   ------------------------------------------------------------ */
.bayan-service-panel {
  min-height: 560px;
  display: flex;
  align-items: center;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(11, 32, 51, .4);
  position: relative;
}
#service-panel-consulting { background: linear-gradient(135deg, #1A4178 0%, #00235A 100%) !important; }
#service-panel-assessment { background: linear-gradient(135deg, #4C706D 0%, #2E524F 100%) !important; }
#service-panel-learning   { background: linear-gradient(135deg, #8469AC 0%, #664B8E 100%) !important; }

.service-watermark-num {
  position: absolute !important;
  top: -30px; right: 24px;
  line-height: 1; pointer-events: none; z-index: 0; margin: 0 !important;
}
.service-watermark-num .elementor-heading-title {
  font-size: 220px; font-weight: 800;
  color: rgba(255, 255, 255, .08) !important;
  line-height: 1;
}
.service-watermark-name {
  position: absolute !important;
  top: 150px; right: 24px;
  line-height: 1; pointer-events: none; z-index: 0; margin: 0 !important;
}
.service-watermark-name .elementor-heading-title {
  font-size: 34px; font-weight: 800; letter-spacing: 6px;
  color: rgba(255, 255, 255, .1) !important;
  white-space: nowrap; text-transform: uppercase; line-height: 1;
}
.service-panel-inner,
.bayan-service-inner { position: relative; z-index: 1; }

.bayan-service-panel .elementor-icon-list-text { color: #fff !important; font-size: 14px; }
.bayan-service-panel .elementor-icon-list-item {
  border-bottom: 1px solid rgba(255, 255, 255, .16);
  padding: 11px 0;
}
.bayan-service-panel .elementor-icon-list-item:last-child { border-bottom: 0; }

/* ------------------------------------------------------------
   7. DIGITAL PRODUCT CARDS
   ------------------------------------------------------------ */
.bayan-product-card {
  background: #fff;
  border: 1px solid rgba(11, 32, 51, .07);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 26px rgba(11, 32, 51, .07);
  transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s ease;
  cursor: pointer;
  animation: fadeUp .6s cubic-bezier(.22,1,.36,1) both;
}
.bayan-product-card:nth-child(2) { animation-delay: .1s; }
.bayan-product-card:nth-child(3) { animation-delay: .2s; }
.bayan-product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px rgba(11, 32, 51, .14);
}

/* ------------------------------------------------------------
   8. WHY BAYAN — cut-corner mask + accordion
   ------------------------------------------------------------ */
.why-bayan-image {
  position: relative; width: 100%; height: 420px;
  overflow: hidden; border-radius: 0 26px 0 30px;
}
.why-bayan-image::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 64%; height: 84%; background: #fff;
  clip-path: polygon(0 0, 100% 0, 0 100%);
  z-index: 2; pointer-events: none;
}
#why-bayan .elementor-tab-title {
  padding: 22px 24px;
  border-radius: 12px;
  background: #f4f5f6;
  border: none;
  transition: background .3s ease;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 600;
}
#why-bayan .elementor-tab-title.elementor-active {
  background: var(--navy);
  color: #fff !important;
}
#why-bayan .elementor-tab-title.elementor-active a { color: #fff !important; }

/* ------------------------------------------------------------
   9. CLIENT LOGO MARQUEE
   CORRECTION: v3 left this as a static carousel.
   ------------------------------------------------------------ */
.bayan-marquee-viewport { overflow: hidden; width: 100%; }
.bayan-marquee-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: marquee 22s linear infinite;
}
.bayan-marquee-viewport:hover .bayan-marquee-track { animation-play-state: paused; }
.bayan-marquee-cell {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 10px;
  min-height: 84px; width: 170px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; text-align: center;
  transition: all .3s;
  filter: grayscale(1);
  opacity: .65;
}
.bayan-marquee-cell img {
  max-width: 100%; max-height: 52px;
  width: auto; height: auto;
  object-fit: contain; display: block;
}
.bayan-marquee-cell:hover {
  filter: grayscale(0);
  opacity: 1;
  border-color: rgba(255, 255, 255, .22);
}

/* partner tabs */
.elementor-widget-tabs .elementor-tab-title {
  border: 0 !important;
  padding: 10px 22px !important;
  font-size: 13px; font-weight: 700; letter-spacing: .2px;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, .55) !important;
  transition: all .25s ease;
}
.elementor-widget-tabs .elementor-tab-title.elementor-active {
  background: var(--lime) !important;
  color: #0B2033 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
  transform: translateY(-1px);
}

/* ------------------------------------------------------------
   10. CTA
   CORRECTION: v3 invented a blue gradient with diagonal facets.
   The reference is flat navy.
   ------------------------------------------------------------ */
#contact-cta-card {
  width: 100%; max-width: 1180px; margin: 0 auto;
  position: relative;
  background: #0B2033 !important;
  border-radius: 20px;
  overflow: hidden;
  min-height: 280px;
  display: flex;
  align-items: center;
}

/* ------------------------------------------------------------
   11. RESPONSIVE
   ------------------------------------------------------------ */
@media (max-width: 900px) {
  #bayan-rail { display: none; }
  .hero-float-badge { position: static; transform: none; margin: 6px; }
}
@media (max-width: 767px) {
  #bayan-header {
    flex-wrap: wrap;
    border-radius: 20px !important;
    width: calc(100% - 24px);
  }
  .bayan-division-card {
    flex: 0 0 132px;
    height: 170px;
  }
  .bayan-division-card:nth-child(2) { margin-inline-start: -28px; margin-top: 8px; }
  .bayan-division-card:nth-child(3) { margin-inline-start: -28px; margin-top: 16px; }
  .service-watermark-num .elementor-heading-title  { font-size: 110px; }
  .service-watermark-name .elementor-heading-title { font-size: 22px; letter-spacing: 4px; }
  body { overflow-x: hidden; }
}
