/* ========================================================== */
/* HOME HERO                                                  */
/* ========================================================== */

.ab-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 200px;
  width: 100%;
  position: relative;
  z-index: 2;
}

/* VIBRANCY: Background Nebula Effect */
.ab-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -20%;
  width: 140%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(27, 138, 255, 0.15) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
  opacity: 0.8;
}

/* Technical Eyebrow Label */
.ab-hero-eyebrow {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 13px;
  letter-spacing: 0.2em;
  font-weight: 600;
  color: #8f98b6;
  text-transform: uppercase;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ab-eyebrow-accent { color: var(--ab-accent); }

/* MAIN HEADLINE */
.ab-hero-copy h1 {
  font-size: clamp(56px, 6vw, 90px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 46px;
  color: #ffffff;
  font-weight: 700;
}

/* The Accent Span */
.ab-text-accent {
  background-image: linear-gradient(
    90deg,
    #5c9cff 0%, 
    #ffffff 50%, 
    #5c9cff 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 5s linear infinite;
}

/* Removed the Safari-specific disable rule here to match about.css */

@keyframes shine { to { background-position: 200% center; } }

/* HERO SUBTEXT */
.ab-hero-copy p {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.01em; 
  max-width: 560px;
  color: rgba(255, 255, 255, 0.75); 
  margin-bottom: 56px;
}

/* HERO VIDEO & VISUALS */
.ab-hero-diagram {
  display: flex;
  justify-content: center;
  width: 100%;
  position: relative;
}

.ab-hero-video-wrap {
  width: 100%;
  max-width: 800px;
  position: relative;
  display: flex;
  justify-content: center;
}

.ab-hero-video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  opacity: 1;
  border-radius: 20px;
  pointer-events: none;
}

.ab-hero-static {
  width: 100%;
  height: auto;
  display: none;
  object-fit: cover;
  border-radius: 20px;
  opacity: 1;
  border: none;
  background: none;
}

body.is-safari .ab-hero-video { display: none !important; }
body.is-safari .ab-hero-static { display: block !important; }

.ab-hero-canvas-container { display: none; }


/* ========================================================== */
/* ANIMATIONS & TRANSITIONS                                   */
/* ========================================================== */

.ab-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s ease-out, transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ab-reveal.ab-visible {
  opacity: 1;
  transform: translateY(0);
}

.service-rows-container .service-row:nth-child(2) .ab-reveal { transition-delay: 0.1s; }
.service-rows-container .service-row:nth-child(3) .ab-reveal { transition-delay: 0.1s; }


/* ========================================================== */
/* THE REALITY GAP                                            */
/* ========================================================== */

.ab-reality-section {
  max-width: 900px;
  margin: 0 auto 160px;
  text-align: center;
}

.ab-reality-title {
  font-size: clamp(32px, 4vw, 48px);
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 32px;
  line-height: 1.1;
}

.ab-reality-text {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 40px;
}

.ab-reality-text strong { color: #fff; }


/* ========================================================== */
/* STATS GRID                                                 */
/* ========================================================== */

.ab-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 160px;
}

.ab-stat-card {
  min-height: 340px; 
  background: linear-gradient(180deg, rgba(10, 12, 20, 0.4) 0%, rgba(10, 12, 20, 0.8) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease, border-color 0.4s ease;
  z-index: 1;
}

.ab-stat-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6), 0 0 20px rgba(27, 138, 255, 0.1);
  border-color: rgba(27, 138, 255, 0.4);
}

.ab-stat-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--ab-accent), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  opacity: 0.5;
}
.ab-stat-card:hover::after { transform: translateX(100%); transition: transform 1.5s ease; }

.ab-stat-card::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 120%; height: 120%;
  background: radial-gradient(circle at center, rgba(27, 138, 255, 0.08) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: -1;
}
.ab-stat-card:hover::before { opacity: 1; }

.ab-stat-number, .ab-stat-label {
  transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.3s ease;
}

.ab-stat-number {
  font-size: clamp(56px, 5vw, 72px);
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  background: linear-gradient(180deg, #fff 0%, #94a3b8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ab-stat-card:hover .ab-stat-number { transform: translateY(-40px) scale(0.9); }

.ab-stat-label {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.6); 
}

.ab-stat-card:hover .ab-stat-label { transform: translateY(-40px); color: var(--ab-accent); }

.ab-stat-context {
  position: absolute;
  bottom: 0; left: 0; width: 100%;
  padding: 0 32px 40px 32px;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #cddef4;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  pointer-events: none;
}

.ab-stat-card:hover .ab-stat-context {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.05s;
}


/* ========================================================== */
/* WHAT WE DO                                                 */
/* ========================================================== */

.home-services-preview { margin-bottom: 200px; }

.home-services-header {
  margin-bottom: 60px;
  text-align: left;
}

.home-services-header h2 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 20px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: #ffffff;
  display: inline-block;
  position: relative;
  padding-bottom: 8px;
}

.home-services-header h2::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0; width: 100%; height: 2px;
  background: var(--ab-accent);
}

.service-rows-container {
  display: flex;
  flex-direction: column;
  gap: 180px;
}

.service-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.service-row-reverse .service-visual { order: -1; }
.service-row-reverse .service-text { order: 1; }

.service-visual {
  width: 100%;
  position: relative;
  z-index: 1;
  padding: 12px;
  border: 1px solid var(--ab-accent); 
  background: rgba(2, 3, 8, 0.6);
  box-shadow: 0 0 50px rgba(27, 138, 255, 0.15); 
  transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
}

.service-visual img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/10; 
  object-fit: cover;
  display: block;
  filter: grayscale(0%) contrast(1.15); 
  transition: filter 0.4s ease;
}

.service-visual::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  background: radial-gradient(circle at center, rgba(27, 138, 255, 0.12) 0%, transparent 60%);
  opacity: 0.8; 
  transition: opacity 0.4s ease;
}

.service-row:hover .service-visual { transform: translateY(-4px); }

.service-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.service-index {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--ab-accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 20px;
  opacity: 0.9;
}

.service-text h3 {
  font-size: 36px;
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 24px;
  color: #fff;
  letter-spacing: -0.02em;
}

.service-text p {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 40px;
  max-width: 90%;
}

.service-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
}

.service-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--ab-accent);
  border-radius: 50%;
  color: #000;
  transition: transform 0.2s ease;
}

.service-btn-icon svg { width: 14px; height: 14px; display: block; }
.service-btn:hover .service-btn-icon { transform: translateX(6px); }


/* ========================================================== */
/* FAQ                                                        */
/* ========================================================== */

.ab-accordion-section {
  max-width: 900px;
  margin: 0 auto 160px;
}

.ab-accordion-item { border-bottom: 1px solid rgba(255,255,255,0.1); }

.ab-accordion-trigger {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 32px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: color 0.3s ease;
}

.ab-accordion-trigger h3 {
  font-size: 20px;
  color: #fff;
  margin: 0;
  font-weight: 500;
}

.ab-accordion-trigger:hover h3 { color: var(--ab-accent); }

.ab-accordion-icon {
  font-size: 24px;
  color: var(--ab-text-subtle);
  transition: transform 0.3s ease;
}

.ab-accordion-item.is-open .ab-accordion-icon { transform: rotate(45deg); color: var(--ab-accent); }

.ab-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ab-accordion-inner {
  padding-bottom: 32px;
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.75); 
}

.ab-accordion-item.is-open .ab-accordion-content { max-height: 300px; }


/* ========================================================== */
/* FOOTER CTA                                                 */
/* ========================================================== */

.ab-home-footer-cta {
  text-align: center;
  padding: 160px 0 120px;
  position: relative;
  overflow: hidden;
}

.ab-home-footer-cta::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(27, 138, 255, 0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  transition: opacity 1.5s ease;
  -webkit-mask-image: radial-gradient(closest-side, black 40%, transparent 100%);
  mask-image: radial-gradient(closest-side, black 40%, transparent 100%);
}

.ab-home-footer-cta.ab-visible::before { opacity: 1; }

.ab-cta-signal-line {
  width: 1px;
  height: 100px;
  background: linear-gradient(to bottom, transparent, var(--ab-accent));
  margin: 0 auto 40px;
  opacity: 0;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 1s ease;
}

.ab-visible .ab-cta-signal-line { opacity: 1; transform: scaleY(1); }

.ab-cta-title {
  font-size: clamp(40px, 6vw, 80px);
  color: #fff;
  text-transform: uppercase;
  margin-bottom: 40px;
  line-height: 1.1;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: 0.2s; 
}

.ab-visible .ab-cta-title { opacity: 1; transform: translateY(0); }

.ab-cta-wrapper {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: 0.4s; 
}

.ab-visible .ab-cta-wrapper { opacity: 1; transform: translateY(0); }

.ab-cta-large {
  transform: scale(1.2);
  transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.ab-cta-large:hover {
  transform: scale(1.25);
  box-shadow: 0 0 30px rgba(27, 138, 255, 0.3);
}


/* ========================================================== */
/* RESPONSIVE LAYOUT (COMBINED)                               */
/* ========================================================== */

@media (max-width: 1024px) {
  .ab-hero { grid-template-columns: 1fr; gap: 40px; }
  .ab-hero-diagram { order: -1; justify-content: center; }
  .ab-stats-grid { grid-template-columns: 1fr; }
  .service-row { grid-template-columns: 1fr; gap: 40px; text-align: left; }
}

@media (max-width: 900px) {
  .ab-hero { text-align: left; }
  .ab-hero-diagram { justify-content: center; }
  .service-rows-container { gap: 100px; }
}

/* MOBILE BOLDNESS */
@media (max-width: 768px) {
  .ab-hero {
    display: flex;
    flex-direction: column;
    padding-top: 0;
    margin-bottom: 120px; 
    gap: 24px; 
    position: relative;
  }

  .ab-hero-copy {
    order: 1; 
    width: 100%;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    z-index: 2;
  }

  .ab-hero-canvas-container {
    display: block !important;
    position: absolute;
    top: -40px; 
    left: 50%;
    transform: translateX(-50%);
    width: 100vw; 
    height: 120%; 
    z-index: -1; 
    opacity: 0.75; 
    pointer-events: none; 
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
  }

  canvas#neural-canvas { display: block; width: 100%; height: 100%; }

  .ab-hero-copy h1 { order: 1; font-size: 52px; line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 0; }
  .ab-hero-eyebrow { order: 2; margin-bottom: 0; justify-content: flex-start; white-space: nowrap; font-size: 11px; letter-spacing: 0.2em; }
  .ab-hero-copy p { order: 3; font-size: 18px; line-height: 1.6; margin-bottom: 0; opacity: 0.9; margin-top: 12px; }
  .ab-hero-copy div { order: 4; display: flex; flex-direction: row; flex-wrap: wrap; gap: 16px; width: 100%; margin-top: 12px; }

  .ab-cta { width: auto; min-width: 160px; justify-content: center; background: var(--ab-accent); color: #000; font-weight: 700; border: none; padding: 14px 28px; font-size: 14px; }
  .ab-link-button { width: auto; justify-content: center; border: 1px solid rgba(255,255,255,0.3) !important; color: #fff !important; padding: 14px 28px; font-size: 14px; }

  .ab-hero-diagram, .ab-hero-video, .ab-hero-static { display: none !important; }
  .ab-hero::before { display: none; }

  .ab-reality-section { margin-bottom: 120px; }
  .ab-stats-grid { margin-bottom: 120px; }
  .home-services-preview { margin-bottom: 120px; }
  .service-rows-container { gap: 160px; } 
  .ab-accordion-section { margin-bottom: 120px; }
  #home-services { margin-top: 0 !important; padding-top: 0; }

  .ab-reality-section {
    text-align: left;
    padding-left: 20px;
    border-left: 1px solid rgba(27, 138, 255, 0.3); 
    position: relative;
  }
  
  .ab-reality-section::before {
    content: ""; position: absolute; left: -1px; top: 0; height: 60px; width: 2px;
    background: var(--ab-accent); box-shadow: 0 0 15px var(--ab-accent);
  }

  .ab-reality-title { font-size: 32px; text-transform: uppercase; line-height: 1.1; margin-bottom: 24px; }
  .ab-reality-text { font-size: 16px; line-height: 1.7; }
  .ab-reality-text strong { color: var(--ab-accent); display: block; margin-bottom: 8px; font-size: 18px; }

  .ab-stats-grid { display: flex; flex-direction: column; gap: 80px; margin-bottom: 120px; }

  .ab-stat-card {
    background: none; border: none; border-left: 2px solid rgba(255, 255, 255, 0.1);
    padding: 0 0 0 24px; text-align: left; box-shadow: none; margin: 0;
    align-items: flex-start; position: relative; opacity: 0.5; transform: scale(0.98);
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    min-height: auto;
  }

  .ab-stat-card.is-scroll-active {
    opacity: 1; transform: scale(1); border-left-color: var(--ab-accent);
    box-shadow: -15px 0 30px -10px rgba(27, 138, 255, 0.15);
  }

  .ab-stat-number {
    font-size: 56px; line-height: 1; margin-bottom: 8px;
    background: linear-gradient(180deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  }
  
  .ab-stat-card.is-scroll-active .ab-stat-number { text-shadow: 0 0 40px rgba(56, 189, 248, 0.4); }

  .ab-stat-label {
    font-size: 13px; letter-spacing: 0.1em; color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase; margin-bottom: 0; transition: margin-bottom 0.4s ease, color 0.4s ease;
  }
  
  .ab-stat-card.is-scroll-active .ab-stat-label { color: #fff; margin-bottom: 12px; }

  .ab-stat-context {
    display: block; font-size: 15px; line-height: 1.6; color: #94a3b8;
    max-width: 100%; margin-top: 0; max-height: 0; opacity: 0; transform: translateY(10px);
    overflow: hidden; position: relative; padding: 0;
    transition: all 0.6s cubic-bezier(0.215, 0.61, 0.355, 1);
  }

  .ab-stat-card.is-scroll-active .ab-stat-context { max-height: 200px; opacity: 1; transform: translateY(0); margin-top: 12px; }

  .service-row, .service-row-reverse { display: flex; flex-direction: column; gap: 24px; position: relative; padding-left: 20px; }
  .service-row::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px;
    background: linear-gradient(to bottom, var(--ab-accent) 0%, rgba(27, 138, 255, 0.1) 80%, transparent 100%);
  }

  .service-row h3, .service-row p, .service-row .service-btn { opacity: 0; transform: translateY(20px); transition: opacity 1s ease, transform 1s ease; }
  
  .service-row .service-visual {
    order: 3 !important; width: 100%; margin-bottom: 0;
    border: 1px solid rgba(255,255,255,0.1); border-bottom: 1px solid var(--ab-accent);
    background: #000; padding: 0; box-shadow: 0 20px 40px -10px rgba(0,0,0,0.8);
    opacity: 0; transform: translateX(40px); transition: opacity 1s ease, transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .service-visual img { opacity: 0.9; filter: contrast(1.1) grayscale(0.2); }
  .service-text { order: 2; padding-right: 10px; display: contents; }

  .service-row.is-active h3, .service-row.is-active p, .service-row.is-active .service-btn, .service-row.is-active .service-visual { opacity: 1; transform: none; }
  
  .service-row.is-active h3 { transition-delay: 0ms; }
  .service-row.is-active p { transition-delay: 150ms; }
  .service-row.is-active .service-btn { transition-delay: 300ms; }
  .service-row.is-active .service-visual { transition-delay: 450ms; }

  .service-index { font-size: 11px; font-weight: 700; letter-spacing: 0.2em; color: var(--ab-accent); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; order: 1; }
  .service-index::before { display: none; }

  .service-text h3 { font-size: 30px; line-height: 1.1; margin-bottom: 16px; letter-spacing: -0.02em; color: #fff; order: 2; }
  .service-text p { font-size: 16px; line-height: 1.7; color: rgba(255, 255, 255, 0.7); margin-bottom: 32px; order: 4; }
  
  .service-btn { font-size: 14px; letter-spacing: 0.05em; text-transform: uppercase; padding-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,0.2); width: fit-content; transition: border-color 0.3s ease; order: 5; }
  .service-btn:active { border-color: var(--ab-accent); color: var(--ab-accent); }
  .service-btn-icon { width: 24px; height: 24px; background: none; border: 1px solid var(--ab-accent); color: var(--ab-accent); }
  .service-btn-icon svg { width: 10px; height: 10px; }

  .ab-home-footer-cta { padding: 100px 0 80px; }
  .ab-cta-signal-line { height: 60px; margin-bottom: 30px; }
  .ab-cta-title { margin-bottom: 32px; font-size: 36px; }
  .ab-cta-large { transform: scale(1.1); width: 100%; max-width: 300px; }
  .ab-cta-large:hover { transform: scale(1.1); }
  
  .ab-accordion-section { margin-bottom: 120px; }
  .ab-accordion-item {
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);
    border: 1px solid rgba(255,255,255,0.1); border-left: 2px solid rgba(255,255,255,0.1);
    margin-bottom: 16px; transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative; overflow: hidden;
  }

  .ab-accordion-item.is-open {
    background: linear-gradient(180deg, rgba(27, 138, 255, 0.08) 0%, rgba(255,255,255,0) 100%);
    border-color: rgba(27, 138, 255, 0.3); border-left-color: var(--ab-accent);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5); transform: translateX(4px);
  }

  .ab-accordion-trigger { padding: 24px 20px; }
  .ab-accordion-trigger h3 { font-size: 16px; letter-spacing: 0.02em; font-weight: 600; }
  .ab-accordion-inner { padding: 0 20px 24px 20px; font-size: 15px; color: #94a3b8; line-height: 1.6; }
  .ab-accordion-icon { color: var(--ab-accent); opacity: 0.7; }
}

/* =========================================
   LATEST PERSPECTIVES GRID (Ported)
   ========================================= */

.ab-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 60px;
  /* Ensure items stretch to equal height on desktop too */
  align-items: stretch;
}

.ab-related-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08); 
  transition: transform 0.4s ease, border-color 0.4s ease;
  /* No fixed height: allow stretch */
}

.ab-related-card:hover {
  transform: translateY(-5px);
  border-color: var(--ab-accent);
}

/* VISUALS */
.ab-related-visual {
  width: 100%;
  height: 220px;
  overflow: hidden;
  position: relative;
  background: #000;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0; /* Prevent image shrink */
}

.ab-related-visual img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(100%) contrast(1.1);
  opacity: 0.7;
  transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform: scale(1.0);
}

.ab-related-card:hover .ab-related-visual img {
  filter: grayscale(0%) contrast(1.0);
  opacity: 1;
  transform: scale(1.05);
}

.ab-card-tech-id {
    position: absolute; top: 12px; right: 12px;
    background: rgba(0,0,0,0.8); border: 1px solid rgba(255,255,255,0.2);
    color: #fff; font-family: monospace; font-size: 9px;
    padding: 3px 6px; z-index: 5; letter-spacing: 0.1em;
}

/* CONTENT */
.ab-related-content {
  padding: 24px;
  background: rgba(255,255,255,0.02);
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Stretch to fill space */
  transition: background 0.3s ease;
}

.ab-related-card:hover .ab-related-content { background: rgba(255,255,255,0.05); }

.ab-card-meta-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }

.ab-related-meta {
  font-family: monospace; font-size: 9px; text-transform: uppercase;
  letter-spacing: 0.15em; padding: 4px 8px; border-radius: 2px; font-weight: 700;
}

.ab-card-date { font-family: monospace; font-size: 10px; color: #666; }

.ab-related-title {
  font-size: 18px; line-height: 1.3; color: #fff; margin: 0 0 12px 0;
  text-transform: uppercase; font-weight: 500; letter-spacing: -0.01em;
}

.ab-related-summary {
  font-size: 14px; line-height: 1.6; color: #999; margin-bottom: 24px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* FOOTER */
.ab-related-footer {
  margin-top: auto; /* Push to bottom */
  display: flex; align-items: center; gap: 8px;
  opacity: 0.5; transition: all 0.3s ease;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 16px;
}

.ab-related-card:hover .ab-related-footer { opacity: 1; }

.ab-related-cta { font-size: 10px; text-transform: uppercase; letter-spacing: 0.15em; font-weight: 700; color: #fff; }
.ab-related-arrow { color: var(--ab-accent); font-size: 14px; }

/* DOTS */
.ab-scroll-dots {
  display: none; justify-content: center; gap: 8px; margin-top: 32px; padding-bottom: 20px;
}

.ab-scroll-dot {
  width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.2);
  transition: background 0.3s ease, transform 0.3s ease;
}

.ab-scroll-dot.is-active { background: var(--ab-accent); transform: scale(1.5); }

/* MOBILE RESPONSIVE GRID */
@media (max-width: 1024px) {
  .ab-related-grid { grid-template-columns: 1fr; gap: 32px; }
  .ab-related-visual { height: 200px; }
  
  /* FORCE ACTIVE STATE ON TABLET/MOBILE - NO HOVER NEEDED */
  /* Higher specificity to ensure override */
  .ab-related-grid .ab-related-card .ab-related-visual img {
      filter: grayscale(0%) contrast(1.0) !important;
      opacity: 1 !important;
  }
  .ab-related-grid .ab-related-card .ab-related-footer { opacity: 1 !important; }
  .ab-related-grid .ab-related-card .ab-related-content { background: rgba(255,255,255,0.05) !important; }
}

@media (max-width: 768px) {
  /* HORIZONTAL SCROLL */
  .ab-related-grid {
      display: flex;
      flex-wrap: nowrap;
      overflow-x: auto;
      gap: 16px;
      scroll-snap-type: x mandatory;
      padding-bottom: 24px;
      margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px;
      scrollbar-width: none; -ms-overflow-style: none;
      margin-top: 24px;
      /* Crucial for equal height */
      align-items: stretch; 
  }
  
  .ab-related-grid::-webkit-scrollbar { display: none; }

  .ab-related-card {
      flex: 0 0 85vw; width: 85vw;
      scroll-snap-align: center; margin-bottom: 0;
      border-color: rgba(255, 255, 255, 0.2); 
      height: auto; /* Allow stretch */
  }
  
  .ab-scroll-dots { display: flex; }
}