/* ==========================================================================
   Futuristic Sections — front page only (enqueued via is_front_page()).
   Reskins the existing section markup with a 2030 "AI lab" aesthetic:
   continuous deep-space background, drifting aurora, glass cards with
   cursor-tracked glow, scan-line section headers, glowing chips & forms.
   All selectors are scoped under body.is-hero-page so nothing leaks.
   ========================================================================== */

html {
  background: #090c0f;
}

body.is-hero-page {
  background: transparent;
}

/* Drifting aurora blobs behind everything */
body.is-hero-page::before {
  content: '';
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(640px circle at 18% 28%, rgba(0, 230, 118, 0.07), transparent 60%),
    radial-gradient(860px circle at 82% 72%, rgba(0, 190, 230, 0.055), transparent 60%),
    radial-gradient(500px circle at 60% 10%, rgba(0, 230, 118, 0.04), transparent 60%);
  animation: auroraDrift 38s ease-in-out infinite alternate;
}

/* Faint holographic grid over the whole page */
body.is-hero-page::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 96px);
}

@keyframes auroraDrift {
  0% { transform: translate3d(-2%, -1%, 0) scale(1); }
  50% { transform: translate3d(2%, 2%, 0) scale(1.06); }
  100% { transform: translate3d(-1%, 3%, 0) scale(1.02); }
}

/* Sections become transparent panes over the shared backdrop */
body.is-hero-page .about,
body.is-hero-page .services,
body.is-hero-page .expertise,
body.is-hero-page .why-us,
body.is-hero-page .portfolio,
body.is-hero-page .blog,
body.is-hero-page .industries,
body.is-hero-page .testimonials,
body.is-hero-page .contact {
  position: relative;
  background: transparent;
}

/* Data-stream line along the top of each section */
body.is-hero-page .about::before,
body.is-hero-page .services::before,
body.is-hero-page .expertise::before,
body.is-hero-page .why-us::before,
body.is-hero-page .portfolio::before,
body.is-hero-page .blog::before,
body.is-hero-page .industries::before,
body.is-hero-page .testimonials::before,
body.is-hero-page .contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(0, 230, 118, 0.5) 30%,
    rgba(0, 190, 230, 0.5) 55%,
    transparent 100%);
  background-size: 220% 100%;
  animation: dataStream 7s linear infinite;
  opacity: 0.55;
}

@keyframes dataStream {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

/* --- Section headers: terminal tag + scan underline ----------------------- */

body.is-hero-page .section-header {
  position: relative;
}

body.is-hero-page .section-header h2 {
  letter-spacing: -0.02em;
}

body.is-hero-page .section-header h2::after {
  content: '';
  display: block;
  width: 72px;
  height: 3px;
  margin: 0.9rem auto 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary-color), rgba(0, 190, 230, 0.9));
  box-shadow: 0 0 14px rgba(0, 230, 118, 0.6);
  animation: scanPulse 2.6s ease-in-out infinite;
}

@keyframes scanPulse {
  0%, 100% { transform: scaleX(1); opacity: 1; }
  50% { transform: scaleX(1.7); opacity: 0.75; }
}

body.is-hero-page .section-header p {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(0, 230, 118, 0.75);
  margin-top: 1.1rem;
}

body.is-hero-page .section-header p::before {
  content: '// ';
  color: rgba(255, 255, 255, 0.35);
}

/* --- Unified glass card treatment ------------------------------------------ */

body.is-hero-page .service-card,
body.is-hero-page .why-us-card,
body.is-hero-page .portfolio-item,
body.is-hero-page .blog-card,
body.is-hero-page .industry-card,
body.is-hero-page .testimonial-card,
body.is-hero-page .contact-card,
body.is-hero-page .contact-form,
body.is-hero-page .tech-item,
body.is-hero-page .about-icon-item,
body.is-hero-page .stat-item {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.45s ease,
              box-shadow 0.45s ease;
}

/* Cursor-tracked interior glow (JS sets --mx / --my per card) */
body.is-hero-page .service-card::after,
body.is-hero-page .why-us-card::after,
body.is-hero-page .portfolio-item::after,
body.is-hero-page .blog-card::after,
body.is-hero-page .industry-card::after,
body.is-hero-page .testimonial-card::after,
body.is-hero-page .contact-card::after,
body.is-hero-page .contact-form::after,
body.is-hero-page .tech-item::after,
body.is-hero-page .about-icon-item::after,
body.is-hero-page .stat-item::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%),
    rgba(0, 230, 118, 0.12), transparent 65%);
}

body.is-hero-page .service-card:hover::after,
body.is-hero-page .why-us-card:hover::after,
body.is-hero-page .portfolio-item:hover::after,
body.is-hero-page .blog-card:hover::after,
body.is-hero-page .industry-card:hover::after,
body.is-hero-page .testimonial-card:hover::after,
body.is-hero-page .contact-card:hover::after,
body.is-hero-page .contact-form:hover::after,
body.is-hero-page .tech-item:hover::after,
body.is-hero-page .about-icon-item:hover::after,
body.is-hero-page .stat-item:hover::after {
  opacity: 1;
}

body.is-hero-page .service-card:hover,
body.is-hero-page .why-us-card:hover,
body.is-hero-page .portfolio-item:hover,
body.is-hero-page .blog-card:hover,
body.is-hero-page .industry-card:hover,
body.is-hero-page .testimonial-card:hover,
body.is-hero-page .contact-card:hover,
body.is-hero-page .tech-item:hover,
body.is-hero-page .about-icon-item:hover,
body.is-hero-page .stat-item:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 230, 118, 0.4);
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.5),
    0 0 42px rgba(0, 230, 118, 0.09);
}

/* Card content above the glow layer */
/* Repurpose the legacy sliding-sheen overlay as a full-card layer: it now
   anchors the ghost number (style.css parks it at left:-100% and slides it
   on hover, which would carry the number offscreen — pin it instead; the
   glossy ::before sheen already covers the hover shine). */
body.is-hero-page .service-card > .service-hover-effect {
  position: absolute !important;
  top: 0;
  left: 0 !important;
  width: 100%;
  height: 100%;
  background: none;
  transform: none !important;
  transition: none;
}

body.is-hero-page .service-card > *,
body.is-hero-page .why-us-card > *,
body.is-hero-page .portfolio-item > *,
body.is-hero-page .blog-card > *,
body.is-hero-page .industry-card > *,
body.is-hero-page .testimonial-card > *,
body.is-hero-page .contact-card > *,
body.is-hero-page .contact-form > *,
body.is-hero-page .tech-item > *,
body.is-hero-page .about-icon-item > *,
body.is-hero-page .stat-item > * {
  position: relative;
  z-index: 1;
}

/* --- Icon tiles -------------------------------------------------------------- */

body.is-hero-page .service-icon,
body.is-hero-page .why-us-icon,
body.is-hero-page .industry-icon,
body.is-hero-page .contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(0, 230, 118, 0.14), rgba(0, 190, 230, 0.07));
  border: 1px solid rgba(0, 230, 118, 0.3);
  color: var(--primary-color);
  font-size: 1.5rem;
  box-shadow: inset 0 0 18px rgba(0, 230, 118, 0.08);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.45s ease;
}

body.is-hero-page .service-card:hover .service-icon,
body.is-hero-page .why-us-card:hover .why-us-icon,
body.is-hero-page .industry-card:hover .industry-icon,
body.is-hero-page .contact-card:hover .contact-icon {
  transform: translateY(-3px) scale(1.08) rotate(-4deg);
  box-shadow:
    inset 0 0 18px rgba(0, 230, 118, 0.16),
    0 0 26px rgba(0, 230, 118, 0.35);
}

body.is-hero-page .service-icon i,
body.is-hero-page .why-us-icon i,
body.is-hero-page .industry-icon i,
body.is-hero-page .contact-icon i {
  filter: drop-shadow(0 0 8px rgba(0, 230, 118, 0.6));
}

/* Service checklist ticks */
body.is-hero-page .service-card ul li i.fa-check {
  color: var(--primary-color);
  filter: drop-shadow(0 0 5px rgba(0, 230, 118, 0.55));
}

/* --- Stats: gradient numerals (JS counts them up) --------------------------- */

body.is-hero-page .stat-item {
  text-align: center;
  padding: 1.4rem 1rem;
}

body.is-hero-page .stat-number {
  background: linear-gradient(120deg, #7dffb8, var(--primary-color) 45%, #00becc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(0, 230, 118, 0.35));
  font-variant-numeric: tabular-nums;
}

/* --- Expertise tabs: segmented holo-pill ------------------------------------ */

body.is-hero-page .expertise-tabs .tab {
  border-radius: 9999px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

body.is-hero-page .expertise-tabs .tab:hover {
  border-color: rgba(0, 230, 118, 0.35);
  color: #fff;
}

body.is-hero-page .expertise-tabs .tab.active {
  background: var(--primary-color);
  color: #041c10;
  box-shadow: 0 0 22px rgba(0, 230, 118, 0.45);
}

/* --- Tech chips --------------------------------------------------------------- */

body.is-hero-page .portfolio-tech span {
  background: rgba(0, 230, 118, 0.08);
  border: 1px solid rgba(0, 230, 118, 0.3);
  color: #9fffcd;
  border-radius: 9999px;
  transition: all 0.3s ease;
}

body.is-hero-page .portfolio-item:hover .portfolio-tech span {
  background: rgba(0, 230, 118, 0.16);
  box-shadow: 0 0 14px rgba(0, 230, 118, 0.25);
}

/* --- Buttons: pill + light sweep ---------------------------------------------- */

body.is-hero-page .btn {
  position: relative;
  overflow: hidden;
  border-radius: 9999px;
}

body.is-hero-page .btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 55%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

body.is-hero-page .btn:hover::after {
  left: 130%;
}

body.is-hero-page .btn-primary {
  box-shadow: 0 0 24px rgba(0, 230, 118, 0.35);
}

/* --- Blog cards ----------------------------------------------------------------- */

body.is-hero-page .read-more {
  color: var(--primary-color);
  transition: text-shadow 0.3s ease, letter-spacing 0.3s ease;
}

body.is-hero-page .blog-card:hover .read-more {
  text-shadow: 0 0 12px rgba(0, 230, 118, 0.7);
  letter-spacing: 0.03em;
}

/* --- Testimonials ------------------------------------------------------------------ */

body.is-hero-page .testimonial-text {
  position: relative;
}

body.is-hero-page .testimonial-text::before {
  content: '\201C';
  position: absolute;
  top: -1.4rem;
  left: -0.4rem;
  font-family: 'Playfair Display', serif;
  font-size: 4.5rem;
  line-height: 1;
  color: rgba(0, 230, 118, 0.25);
  pointer-events: none;
}

/* Client names were h4 before the heading-order fix; keep the same look */
body.is-hero-page .client-info h3.client-name {
  font-size: 1.8rem;
  margin: 0 0 0.3rem;
  color: var(--text-color, #fff);
  font-weight: 600;
}

/* --- Contact form: glowing focus ---------------------------------------------------- */

body.is-hero-page .contact-form input,
body.is-hero-page .contact-form textarea,
body.is-hero-page .contact-form select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #fff;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

body.is-hero-page .contact-form input:focus,
body.is-hero-page .contact-form textarea:focus,
body.is-hero-page .contact-form select:focus {
  outline: none;
  border-color: rgba(0, 230, 118, 0.65);
  box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.14), 0 0 24px rgba(0, 230, 118, 0.12);
}

/* --- Social icons --------------------------------------------------------------------- */

body.is-hero-page .social-icons a {
  border-radius: 12px;
  transition: all 0.3s ease;
}

body.is-hero-page .social-icons a:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 20px rgba(0, 230, 118, 0.4);
}

/* --- Richer scroll-in reveal (upgrades the base .reveal-on-scroll) -------------------- */

body.is-hero-page .reveal-on-scroll {
  opacity: 0;
  transform: translateY(36px) scale(0.985);
  filter: blur(6px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

body.is-hero-page .reveal-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

/* ==========================================================================
   Per-section identity + ambient motion
   ========================================================================== */

/* --- AI capabilities ticker (below hero) ----------------------------------- */

body.is-hero-page .ai-ticker {
  position: relative;
  overflow: hidden;
  padding: 1.1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

body.is-hero-page .ai-ticker__track {
  display: flex;
  width: max-content;
  animation: tickerScroll 34s linear infinite;
}

body.is-hero-page .ai-ticker:hover .ai-ticker__track {
  animation-play-state: paused;
}

body.is-hero-page .ai-ticker__group {
  display: flex;
  align-items: center;
  gap: 2.4rem;
  padding-right: 2.4rem;
}

body.is-hero-page .ai-ticker span {
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 1.15rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
}

body.is-hero-page .ai-ticker .tick-sep {
  color: rgba(0, 230, 118, 0.75);
  font-size: 0.8rem;
  text-shadow: 0 0 8px rgba(0, 230, 118, 0.6);
}

@keyframes tickerScroll {
  to { transform: translateX(-50%); }
}

/* --- Services: editorial ghost numbers (01–06) ------------------------------ */

body.is-hero-page .services-grid {
  counter-reset: svc;
}

body.is-hero-page .service-card {
  counter-increment: svc;
}

body.is-hero-page .service-card .service-hover-effect::before {
  content: '0' counter(svc);
  position: absolute;
  top: 1rem;
  right: 1.6rem;
  font-size: 4.4rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  color: rgba(255, 255, 255, 0.06);
  transition: color 0.4s ease;
}

body.is-hero-page .service-card:hover .service-hover-effect::before {
  color: rgba(0, 230, 118, 0.18);
}

/* --- Portfolio: periodic AI scan-line over each project visual --------------- */

body.is-hero-page .portfolio-img {
  position: relative;
  overflow: hidden;
}

body.is-hero-page .portfolio-img::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -22%;
  height: 20%;
  background: linear-gradient(180deg,
    transparent,
    rgba(0, 230, 118, 0.16) 45%,
    rgba(0, 230, 118, 0.28) 50%,
    rgba(0, 230, 118, 0.16) 55%,
    transparent);
  animation: aiScan 4.6s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  pointer-events: none;
}

body.is-hero-page .portfolio-item:nth-child(2n) .portfolio-img::after {
  animation-delay: 1.4s;
}

body.is-hero-page .portfolio-item:nth-child(3n) .portfolio-img::after {
  animation-delay: 2.6s;
}

@keyframes aiScan {
  0% { top: -22%; opacity: 0; }
  12% { opacity: 1; }
  55% { top: 102%; opacity: 1; }
  62%, 100% { top: 102%; opacity: 0; }
}

/* --- About: tiles gently float once revealed --------------------------------- */

body.is-hero-page .about-icon-item.in-view {
  animation: gentleFloat 6s ease-in-out 1.2s infinite;
}

body.is-hero-page .about-icon-item:nth-child(2).in-view { animation-delay: 1.9s; }
body.is-hero-page .about-icon-item:nth-child(3).in-view { animation-delay: 2.6s; }
body.is-hero-page .about-icon-item:nth-child(4).in-view { animation-delay: 3.3s; }
body.is-hero-page .about-icon-item:nth-child(5).in-view { animation-delay: 4s; }
body.is-hero-page .about-icon-item:nth-child(6).in-view { animation-delay: 4.7s; }

@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

/* --- Idle "breathing" glow on icon tiles -------------------------------------- */

body.is-hero-page .service-icon,
body.is-hero-page .why-us-icon,
body.is-hero-page .industry-icon,
body.is-hero-page .contact-icon {
  animation: iconBreathe 3.8s ease-in-out infinite alternate;
}

body.is-hero-page .service-card:nth-child(2n) .service-icon,
body.is-hero-page .why-us-card:nth-child(2n) .why-us-icon,
body.is-hero-page .industry-card:nth-child(2n) .industry-icon {
  animation-delay: 1.6s;
}

@keyframes iconBreathe {
  from {
    box-shadow: inset 0 0 18px rgba(0, 230, 118, 0.08);
  }
  to {
    box-shadow:
      inset 0 0 18px rgba(0, 230, 118, 0.14),
      0 0 22px rgba(0, 230, 118, 0.28);
  }
}

/* --- Section shape identities --------------------------------------------------- */

/* Why-us: energized left rail */
body.is-hero-page .why-us-card {
  border-left: 2px solid rgba(0, 230, 118, 0.35);
  border-radius: 8px 18px 18px 8px;
}

body.is-hero-page .why-us-card:hover {
  border-left-color: var(--primary-color);
  box-shadow:
    -6px 0 24px rgba(0, 230, 118, 0.12),
    0 22px 60px rgba(0, 0, 0, 0.5);
}

/* Industries: circular icon pods */
body.is-hero-page .industry-icon {
  border-radius: 50%;
}

/* Neural-net particle canvas (injected by JS) */
.neural-net-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  body.is-hero-page .ai-ticker__track,
  body.is-hero-page .portfolio-img::after,
  body.is-hero-page .about-icon-item.in-view,
  body.is-hero-page .service-icon,
  body.is-hero-page .why-us-icon,
  body.is-hero-page .industry-icon,
  body.is-hero-page .contact-icon {
    animation: none;
  }
  body.is-hero-page .portfolio-img::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.is-hero-page::before,
  body.is-hero-page .about::before,
  body.is-hero-page .services::before,
  body.is-hero-page .expertise::before,
  body.is-hero-page .why-us::before,
  body.is-hero-page .portfolio::before,
  body.is-hero-page .blog::before,
  body.is-hero-page .industries::before,
  body.is-hero-page .testimonials::before,
  body.is-hero-page .contact::before,
  body.is-hero-page .section-header h2::after {
    animation: none;
  }
  body.is-hero-page .reveal-on-scroll {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}
