/* ==========================================================================
   BA ITC — "Fiber & Signal" 3D theme
   One shared layer loaded after each page's own <style>, so it restyles every
   page without touching page logic. Pairs with js/ba3d.js (WebGL scene,
   3D card tilt, depth reveals).
   ========================================================================== */

:root {
  /* Core palette */
  --void:   #050A18;   /* deep network-night base */
  --deck:   #0B1630;   /* raised surface */
  --fiber:  #35E0D5;   /* fiber-optic cyan: links, focus, highlights */
  --signal: #FF4655;   /* BA ITC brand red, brightened from #C52127 */
  --amber:  #FFB547;   /* status-LED amber: ticks and small markers */
  --lumen:  #EAF2FF;   /* primary text */
  --haze:   #93A4C3;   /* secondary text */

  --glass:        rgba(14, 28, 58, .56);
  --glass-strong: rgba(10, 20, 44, .86);
  --edge:         rgba(120, 170, 255, .16);
  --edge-hot:     rgba(53, 224, 213, .55);
  --depth:        0 30px 60px -20px rgba(0, 0, 0, .65), 0 12px 24px -12px rgba(0, 0, 0, .5);

  --font-display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --font-body:    "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;

  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;

  /* Re-map every page's own variables onto this palette */
  --bg-primary: transparent;
  --bg-secondary: rgba(11, 22, 48, .35);
  --bg-tertiary: rgba(16, 30, 62, .55);
  --text-primary: var(--lumen);
  --text-secondary: var(--haze);
  --accent-primary: var(--fiber);
  --accent-secondary: var(--signal);
  --accent-gold: var(--amber);
  --border-color: var(--edge);
  --shadow: rgba(53, 224, 213, .12);

  --bg: transparent;
  --surface: var(--glass);
  --card: var(--glass);
  --border: var(--edge);
  --border-strong: rgba(120, 170, 255, .28);
  --accent: var(--fiber);
  --accent-hover: #6BEDE4;
  --brand: var(--fiber);
  --brand-light: rgba(53, 224, 213, .1);
  --text: var(--lumen);
  --text-light: var(--haze);
  --text-muted: var(--haze);
  --text-dim: #5E6F90;
  --muted: var(--haze);
  --line: var(--edge);
  --line-soft: rgba(120, 170, 255, .08);

  color-scheme: dark;
}

/* ---------- Base ---------- */
html {
  background: radial-gradient(120% 80% at 50% 110%, #0E1F45 0%, var(--void) 55%) fixed, var(--void);
  scroll-behavior: smooth;
}
html body {
  background: transparent !important;
  color: var(--lumen) !important;
  font-family: var(--font-body) !important;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
#ba3d-scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  display: block;
}
/* Soft vignette so text stays readable over the scene */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 50% 30%, transparent 0%, rgba(5, 10, 24, .55) 100%),
    linear-gradient(180deg, rgba(5, 10, 24, 0) 60%, rgba(5, 10, 24, .6) 100%);
}

::selection { background: var(--fiber); color: var(--void); }

html body h1, html body h2, html body h3, html body h4, html body h5, html body h6 {
  color: var(--lumen) !important;
  -webkit-text-fill-color: currentColor !important;
  background: none !important;
  letter-spacing: -0.01em;
}
html body h1, html body h2 {
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  line-height: 1.12 !important;
}
html body h3, html body h4 { font-family: var(--font-body) !important; font-weight: 600 !important; }
html body p, html body li { color: var(--haze) !important; }
html body strong, html body b { color: var(--lumen); }
html body a { color: var(--fiber); }
html body a:hover { color: #8FF3EC; }
html body :focus-visible {
  outline: 2px solid var(--fiber) !important;
  outline-offset: 3px !important;
  border-radius: 6px;
}

/* Scrollbar */
html { scrollbar-color: #1E3566 var(--void); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: #1E3566; border-radius: 10px; border: 2px solid var(--void); }

/* All sections become transparent so the 3D scene runs through the page */
html body section,
html body section[style],
html body .hero,
html body .hero[style],
html body .page-header,
html body .services, html body .featured-products, html body .ai-services,
html body .contact, html body .policies, html body .services-overview,
html body .industries, html body .why-choose, html body .apps-section,
html body .cta-section {
  background: transparent !important;
}
html body .hero::before, html body .hero::after,
html body .page-header::before, html body .page-header::after,
html body .ai-services::before, html body .cta-section::before {
  background: none !important;
  animation: none !important;
}

/* ---------- Header: floating glass bar ---------- */
html body header,
html body header.nav {
  top: 14px !important;
  left: 50% !important;
  right: auto !important;
  width: min(1320px, calc(100% - 28px)) !important;
  transform: translateX(-50%);
  background: rgba(8, 16, 36, .62) !important;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--edge) !important;
  border-radius: 18px !important;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06) !important;
  padding: 0 !important;
  position: fixed !important;
  z-index: 1000 !important;
}
html body header.scrolled { background: rgba(6, 12, 28, .86) !important; }
html body header .container { max-width: none !important; padding: 0 22px !important; }
html body .header-content { padding-top: 12px !important; padding-bottom: 12px !important; }
html body header .logo,
html body header .brand {
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  font-size: 1.15rem !important;
  color: var(--lumen) !important;
  letter-spacing: .01em;
  display: flex; align-items: center; gap: 12px;
}
html body header .logo i {
  width: 38px; height: 38px;
  display: inline-grid; place-items: center;
  font-size: 1rem !important;
  margin: 0 !important;
  border-radius: 11px;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: linear-gradient(145deg, #FF6B77, #C52127) !important;
  box-shadow: 0 4px 0 #7A0F18, 0 10px 18px -4px rgba(255, 70, 85, .55), inset 0 1px 0 rgba(255,255,255,.35);
  transform: perspective(200px) rotateX(12deg);
}
html body nav a,
html body .nav-links a {
  color: var(--haze) !important;
  font-weight: 500 !important;
  font-size: .95rem;
  padding: 6px 2px;
}
html body nav a:hover,
html body .nav-links a:hover { color: var(--lumen) !important; transform: none !important; }
html body nav a::after { background: var(--fiber) !important; height: 2px !important; box-shadow: 0 0 10px var(--fiber); }
html body nav ul { gap: 1.6rem !important; }
html body nav ul li { margin-left: 0 !important; }
html body .hamburger span { background: var(--lumen) !important; }

@media (max-width: 768px) {
  html body nav#nav {
    top: 0 !important;
    height: 100vh !important;
    background: rgba(6, 12, 28, .97) !important;
    border-left: 1px solid var(--edge) !important;
    border-radius: 0 !important;
  }
  html body nav#nav a { font-size: 1.15rem; color: var(--lumen) !important; }
  html body header { top: 10px !important; width: calc(100% - 20px) !important; border-radius: 16px !important; }
}
html body .menu-overlay { background: rgba(3, 6, 16, .7) !important; backdrop-filter: blur(6px); }

/* ---------- Hero / page headers ---------- */
html body .hero,
html body .page-header {
  min-height: min(92vh, 900px);
  padding: clamp(140px, 22vh, 210px) 0 110px !important;
  overflow: visible !important;
  perspective: 1200px;
}
html body .page-header { min-height: 62vh; padding-left: 20px !important; padding-right: 20px !important; }

html body .hero h1,
html body .page-header h1 {
  font-size: clamp(2.6rem, 7.2vw, 6.2rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.035em !important;
  line-height: 1.02 !important;
  margin-bottom: 1.4rem !important;
  color: #F4F8FF !important;
  /* extruded, lit-from-above letterforms */
  text-shadow:
    0 1px 0 #B8C6E6,
    0 2px 0 #8C9DC4,
    0 3px 0 #6A7BA6,
    0 4px 0 #4E5E89,
    0 5px 0 #37466F,
    0 6px 0 #263357,
    0 8px 2px rgba(0,0,0,.4),
    0 18px 30px rgba(0, 0, 0, .55),
    0 0 60px rgba(53, 224, 213, .18) !important;
  transform-style: preserve-3d;
  animation: ba3d-rise 1.2s cubic-bezier(.2,.8,.2,1) both !important;
}
html body.ba3d-page-home .hero h1 {
  font-size: clamp(4rem, 15vw, 12rem) !important;
  letter-spacing: -0.05em !important;
  text-shadow:
    0 1px 0 #C9D4EE, 0 2px 0 #A9B7DA, 0 3px 0 #8A9AC4, 0 4px 0 #6F80AE,
    0 5px 0 #5A6B99, 0 6px 0 #475883, 0 7px 0 #36466E, 0 8px 0 #29385C,
    0 9px 0 #1F2C4B, 0 10px 0 #17223D,
    0 14px 6px rgba(0,0,0,.45), 0 30px 50px rgba(0,0,0,.6),
    0 0 90px rgba(255, 70, 85, .22) !important;
}
@keyframes ba3d-rise {
  from { opacity: 0; transform: perspective(900px) rotateX(38deg) translateY(40px) translateZ(-80px); }
  to   { opacity: 1; transform: perspective(900px) rotateX(0) translateY(0) translateZ(0); }
}

html body .hero p,
html body .page-header p {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem) !important;
  max-width: 62ch;
  margin-left: auto; margin-right: auto;
}
html body .hero .hero-subtitle,
html body .page-header .hero-subtitle {
  color: var(--fiber) !important;
  font-weight: 600 !important;
  font-size: clamp(1.1rem, 2vw, 1.45rem) !important;
  text-shadow: 0 0 24px rgba(53, 224, 213, .35);
}

/* Status pills (badges / eyebrows) with a live LED */
html body .hero-badge,
html body .section-badge,
html body .page-badge,
html body .eyebrow {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 14px !important;
  background: rgba(10, 22, 48, .7) !important;
  border: 1px solid var(--edge) !important;
  border-radius: 999px !important;
  color: var(--lumen) !important;
  font-size: .82rem !important;
  font-weight: 600 !important;
  letter-spacing: .02em !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 8px 20px -10px rgba(0,0,0,.6);
  backdrop-filter: blur(10px);
}
html body .hero-badge i,
html body .page-badge i { color: var(--amber) !important; }
html body .section-badge::before,
html body .eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--fiber);
  box-shadow: 0 0 0 3px rgba(53, 224, 213, .18), 0 0 12px var(--fiber);
  animation: ba3d-led 2.4s ease-in-out infinite;
  flex: none;
}
@keyframes ba3d-led { 50% { opacity: .35; } }

/* ---------- Section headings ---------- */
html body section { padding-top: 110px; padding-bottom: 110px; }
html body .section-header,
html body .section-head { margin-bottom: 3.5rem !important; }
html body .section-title,
html body section > .container > h2,
html body .section-head h2,
html body .category-header h2,
html body .cta-content h2 {
  font-size: clamp(1.9rem, 4.2vw, 3.4rem) !important;
  letter-spacing: -0.025em !important;
  text-shadow:
    0 1px 0 #7F90B8, 0 2px 0 #56668F, 0 3px 0 #36446B, 0 4px 0 #222D4C,
    0 10px 22px rgba(0, 0, 0, .55) !important;
}
html body .section-description,
html body .section-subtitle,
html body .category-description { font-size: 1.1rem !important; max-width: 60ch; margin-left: auto; margin-right: auto; }

/* ---------- Glass slabs (cards) ---------- */
html body .card,
html body .product-card,
html body .policy-card,
html body .contact-card,
html body .category-card,
html body .industry-card,
html body .benefit-card,
html body .app-card,
html body .product-category,
html body .cta-content,
html body .hero-card,
html body .mock-box,
html body .mini,
html body .video-card,
html body .credential,
html body .plan-card,
html body .service-info,
html body .service-block,
html body .details-section,
html body .detail-section,
html body .info-box,
html body .info-section,
html body .price-summary,
html body .activation-banner,
html body .demo-wrap > div {
  background:
    linear-gradient(160deg, rgba(255,255,255,.07) 0%, rgba(255,255,255,0) 38%),
    var(--glass) !important;
  border: 1px solid var(--edge) !important;
  border-radius: var(--r-lg) !important;
  box-shadow: var(--depth), inset 0 1px 0 rgba(255, 255, 255, .07) !important;
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  color: var(--lumen) !important;
  transform-style: preserve-3d;
  transition: border-color .35s ease, box-shadow .35s ease;
}
html body .product-category { padding: clamp(1.5rem, 3vw, 2.5rem) !important; }
html body .card::before,
html body .product-card::before { display: none !important; }

/* Hover lift is handled by JS tilt; keep a CSS fallback for no-JS */
html:not(.ba3d-js) body .card:hover,
html:not(.ba3d-js) body .product-card:hover { transform: translateY(-6px) !important; }
html.ba3d-js body [data-tilt]:hover { transform: none; }
html body [data-tilt] {
  will-change: transform;
  position: relative;
}
html body [data-tilt].is-tilting {
  border-color: var(--edge-hot) !important;
  box-shadow:
    0 40px 70px -24px rgba(0, 0, 0, .75),
    0 0 0 1px rgba(53, 224, 213, .2),
    0 20px 60px -20px rgba(53, 224, 213, .25),
    inset 0 1px 0 rgba(255, 255, 255, .1) !important;
}
/* Glare layer injected by JS */
.ba3d-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, .13), transparent 45%);
  opacity: 0;
  transition: opacity .3s ease;
  z-index: 2;
}
[data-tilt].is-tilting > .ba3d-glare { opacity: 1; }

/* Content inside tilted cards floats at different depths */
html.ba3d-js body [data-tilt] h3,
html.ba3d-js body [data-tilt] h4 { transform: translateZ(30px); }
html.ba3d-js body [data-tilt] p,
html.ba3d-js body [data-tilt] ul { transform: translateZ(18px); }
html.ba3d-js body [data-tilt] .btn { transform: translateZ(36px); }

html body .card h3, html body .product-card h3, html body .policy-card h3,
html body .category-card h3, html body .industry-card h3, html body .benefit-card h3,
html body .app-card h3 { font-size: 1.28rem !important; color: var(--lumen) !important; }

/* ---------- Icon keycaps: small 3D cubes ---------- */
html body .card-icon,
html body .product-icon,
html body .category-icon,
html body .industry-icon,
html body .benefit-icon,
html body .app-icon,
html body .contact-icon,
html body .ai-icon,
html body .card .icon,
html body .logo-mark,
html body .logo-badge {
  width: 62px !important;
  height: 62px !important;
  min-width: 62px;
  display: grid !important;
  place-items: center !important;
  border-radius: 16px !important;
  font-size: 1.55rem !important;
  color: var(--void) !important;
  background: linear-gradient(150deg, #7FF5EC 0%, var(--fiber) 45%, #169C95 100%) !important;
  border: none !important;
  box-shadow:
    0 6px 0 #0B5E5A,
    0 7px 0 #073F3C,
    0 18px 26px -8px rgba(53, 224, 213, .45),
    inset 0 2px 0 rgba(255, 255, 255, .55),
    inset 0 -3px 6px rgba(0, 0, 0, .15) !important;
  transform: translateZ(48px) rotateX(10deg);
  margin-bottom: 1.6rem !important;
  line-height: 1;
}
html body .card-icon i, html body .product-icon i, html body .category-icon i,
html body .industry-icon i, html body .benefit-icon i, html body .app-icon i,
html body .contact-icon i, html body .ai-icon i {
  color: var(--void) !important;
  -webkit-text-fill-color: var(--void) !important;
  background: none !important;
  font-size: inherit !important;
}
/* Alternate every other keycap to brand red for rhythm */
html body .grid-3 > :nth-child(3n+2) .card-icon,
html body .products-grid > :nth-child(3n+2) .product-icon,
html body .apps-grid > :nth-child(3n+2) .app-icon,
html body .service-categories > :nth-child(3n+2) .category-icon,
html body .contact-grid > :nth-child(3n+2) .contact-icon {
  color: #fff !important;
  background: linear-gradient(150deg, #FF8C95 0%, var(--signal) 45%, #A8141F 100%) !important;
  box-shadow: 0 6px 0 #6E0A12, 0 7px 0 #4A060C, 0 18px 26px -8px rgba(255, 70, 85, .5),
    inset 0 2px 0 rgba(255, 255, 255, .45), inset 0 -3px 6px rgba(0, 0, 0, .15) !important;
}
html body .grid-3 > :nth-child(3n+2) .card-icon i,
html body .products-grid > :nth-child(3n+2) .product-icon i,
html body .apps-grid > :nth-child(3n+2) .app-icon i,
html body .service-categories > :nth-child(3n+2) .category-icon i,
html body .contact-grid > :nth-child(3n+2) .contact-icon i { color: #fff !important; -webkit-text-fill-color: #fff !important; }
html body .contact-icon { width: 50px !important; height: 50px !important; min-width: 50px; font-size: 1.2rem !important; margin-bottom: 0 !important; }
html body .category-header { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
html body .category-header .category-icon { margin-bottom: 0 !important; }
html body .category-header h2 { font-size: clamp(1.4rem, 2.6vw, 2.1rem) !important; margin: 0 !important; }
html body .category-link {
  display: inline-flex !important; align-items: center; gap: 8px;
  padding: 12px 22px !important; margin-top: 8px; text-decoration: none !important;
}

/* Service card photos: framed like a screen inset into the slab */
html body .card > div[style*="height: 150px"] {
  width: auto !important;
  margin: 0 0 1.4rem !important;
  border-radius: 14px !important;
  border: 1px solid var(--edge);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.4), 0 14px 26px -12px rgba(0,0,0,.7);
  transform: translateZ(24px);
}
html body .card > div[style*="height: 150px"] img { filter: saturate(.8) contrast(1.05) brightness(.85); }

/* Index product tiles: a lit stage with a floating glyph */
html body .product-image {
  height: 190px !important;
  background:
    radial-gradient(60% 70% at 50% 100%, rgba(53, 224, 213, .28), transparent 70%),
    repeating-linear-gradient(90deg, rgba(120,170,255,.08) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(0deg, rgba(120,170,255,.08) 0 1px, transparent 1px 28px),
    rgba(6, 14, 32, .7) !important;
  color: var(--lumen) !important;
  border-bottom: 1px solid var(--edge);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  perspective: 600px;
}
html body .product-image i {
  font-size: 4.4rem !important;
  color: #fff !important;
  text-shadow: 0 2px 0 #9FB1DA, 0 4px 0 #5F709C, 0 6px 0 #34426A, 0 20px 30px rgba(0,0,0,.6), 0 0 40px rgba(53,224,213,.5);
  animation: ba3d-float 5s ease-in-out infinite;
}
html body .grid-4 > :nth-child(2n) .product-image i { animation-delay: -2.5s; }
@keyframes ba3d-float {
  0%, 100% { transform: translateY(0) rotateY(-14deg); }
  50%      { transform: translateY(-10px) rotateY(14deg); }
}
html body .product-content li::before,
html body .product-features li::before,
html body .service-list li::before { color: var(--amber) !important; }
html body .product-features li i,
html body .service-list li i { color: var(--amber) !important; }

/* ---------- 3D keycap buttons ---------- */
html body .btn,
html body .payment-button,
html body .pay-btn,
html body .copy-btn,
html body .category-link,
html body .open-btn,
html body button[type="submit"],
html body .box button {
  font-family: var(--font-body) !important;
  font-weight: 600 !important;
  border-radius: 14px !important;
  border: none !important;
  cursor: pointer;
  position: relative;
  transition: transform .15s ease, box-shadow .15s ease, filter .2s ease !important;
}
html body .btn-primary,
html body .btn-success,
html body .payment-button,
html body .pay-btn,
html body button[type="submit"],
html body .box button,
html body .category-link {
  color: #fff !important;
  background: linear-gradient(180deg, #FF6A76 0%, var(--signal) 55%, #D92A3A 100%) !important;
  box-shadow:
    0 6px 0 #8E1420,
    0 8px 0 #5E0B14,
    0 16px 28px -6px rgba(255, 70, 85, .55),
    inset 0 1px 0 rgba(255, 255, 255, .45) !important;
}
html body .btn-primary:hover,
html body .btn-success:hover,
html body .payment-button:hover,
html body .pay-btn:hover,
html body button[type="submit"]:hover,
html body .category-link:hover {
  transform: translateY(-2px) !important;
  filter: brightness(1.08);
  box-shadow: 0 8px 0 #8E1420, 0 10px 0 #5E0B14, 0 22px 34px -8px rgba(255, 70, 85, .65),
    inset 0 1px 0 rgba(255, 255, 255, .5) !important;
}
html body .btn-primary:active,
html body .btn-success:active,
html body .payment-button:active,
html body .pay-btn:active,
html body button[type="submit"]:active,
html body .category-link:active {
  transform: translateY(6px) !important;
  box-shadow: 0 0 0 #8E1420, 0 2px 0 #5E0B14, 0 6px 12px -4px rgba(255, 70, 85, .5),
    inset 0 1px 0 rgba(255, 255, 255, .3) !important;
}
html body .btn-secondary,
html body .copy-btn,
html body .btn:not(.btn-primary):not(.btn-success) {
  color: var(--lumen) !important;
  background: linear-gradient(180deg, rgba(40, 62, 108, .9), rgba(20, 34, 66, .95)) !important;
  box-shadow:
    0 6px 0 #0A1430,
    0 8px 0 #050B1C,
    0 14px 24px -8px rgba(0, 0, 0, .7),
    inset 0 1px 0 rgba(255, 255, 255, .14),
    inset 0 0 0 1px rgba(120, 170, 255, .18) !important;
}
html body .btn-secondary:hover,
html body .copy-btn:hover,
html body .btn:not(.btn-primary):not(.btn-success):hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 0 #0A1430, 0 10px 0 #050B1C, 0 20px 30px -10px rgba(0, 0, 0, .8),
    inset 0 1px 0 rgba(255, 255, 255, .18), inset 0 0 0 1px rgba(53, 224, 213, .5) !important;
}
html body .btn-secondary:active,
html body .copy-btn:active,
html body .btn:not(.btn-primary):not(.btn-success):active {
  transform: translateY(6px) !important;
  box-shadow: 0 0 0 #0A1430, 0 2px 0 #050B1C, inset 0 1px 0 rgba(255,255,255,.1), inset 0 0 0 1px rgba(53,224,213,.4) !important;
}
html body .cta-buttons { gap: 1.1rem 1rem !important; padding-bottom: 10px; }

/* ---------- Contact, policy, footer ---------- */
html body .contact-card { align-items: center !important; }
html body .contact-info h4 { color: var(--lumen) !important; }
html body .contact-info a,
html body footer a { color: var(--fiber) !important; }
html body .policy-card h3 i { color: var(--amber) !important; }

html body footer {
  background: rgba(5, 10, 24, .75) !important;
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--edge) !important;
  position: relative;
  padding: 3.5rem 0 !important;
}
html body footer::before {
  content: "";
  position: absolute;
  left: 10%; right: 10%; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--fiber), var(--signal), transparent);
  box-shadow: 0 0 18px var(--fiber);
}
html body footer p { color: var(--haze) !important; }

/* ---------- WhatsApp: glossy 3D orb ---------- */
html body .whatsapp-btn,
html body .whatsapp-float > a {
  background: radial-gradient(circle at 32% 28%, #8CF5B5 0%, #25D366 38%, #0E7A45 100%) !important;
  box-shadow:
    0 8px 0 #0A5230,
    0 18px 30px -6px rgba(37, 211, 102, .55),
    inset 0 -6px 12px rgba(0, 0, 0, .25),
    inset 0 3px 6px rgba(255, 255, 255, .45) !important;
  animation: ba3d-bob 3.2s ease-in-out infinite !important;
}
html body .whatsapp-btn i { color: #fff !important; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
@keyframes ba3d-bob { 50% { transform: translateY(-6px); } }
html body .whatsapp-tooltip { background: var(--glass-strong) !important; color: var(--lumen) !important; border: 1px solid var(--edge); }

/* ---------- Modals (tools, blog articles) ---------- */
html body .modal { background: rgba(3, 6, 16, .8) !important; backdrop-filter: blur(10px); perspective: 1400px; }
html body .modal-content {
  background: linear-gradient(160deg, rgba(255,255,255,.06), transparent 30%), var(--glass-strong) !important;
  border: 1px solid var(--edge) !important;
  border-radius: var(--r-lg) !important;
  box-shadow: 0 50px 100px -30px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255,255,255,.08) !important;
  color: var(--lumen) !important;
}
html body .modal.active .modal-content,
html body .modal[style*="block"] .modal-content,
html body .modal[style*="flex"] .modal-content { animation: ba3d-modal .5s cubic-bezier(.2, .9, .25, 1) both; }
@keyframes ba3d-modal {
  from { opacity: 0; transform: rotateX(-18deg) translateY(40px) scale(.94); }
  to   { opacity: 1; transform: none; }
}
html body .modal-header {
  background: linear-gradient(90deg, rgba(255, 70, 85, .22), rgba(53, 224, 213, .16)) !important;
  border-bottom: 1px solid var(--edge) !important;
  color: var(--lumen) !important;
}
html body .modal-header h2 i { color: var(--fiber) !important; }
html body .close-modal, html body .modal-close { color: var(--lumen) !important; }
html body .modal-body h2 { font-size: 1.35rem !important; text-shadow: none !important; margin-top: 1.8rem; }
html body .modal-meta, html body .modal-meta span { color: var(--haze) !important; }
html body .output-area, html body .result-text {
  background: rgba(3, 8, 20, .7) !important;
  border: 1px solid var(--edge) !important;
  color: var(--lumen) !important;
  border-radius: var(--r-md) !important;
}

/* ---------- Forms ---------- */
html body input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]),
html body select,
html body textarea {
  background: rgba(3, 8, 20, .72) !important;
  color: var(--lumen) !important;
  border: 1px solid rgba(120, 170, 255, .2) !important;
  border-radius: var(--r-sm) !important;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, .5), 0 1px 0 rgba(255, 255, 255, .04) !important;
  font-family: var(--font-body) !important;
  transition: border-color .2s ease, box-shadow .2s ease;
}
html body input:focus, html body select:focus, html body textarea:focus {
  border-color: var(--fiber) !important;
  outline: none !important;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, .5), 0 0 0 3px rgba(53, 224, 213, .2) !important;
}
html body input::placeholder, html body textarea::placeholder { color: #56688C !important; }
html body input[readonly] { color: var(--haze) !important; }
html body select option { background: var(--deck); color: var(--lumen); }
html body label, html body .label, html body .field-label { color: var(--lumen) !important; font-weight: 600; }
html body .info-text, html body .small-note, html body .secure-note, html body .secure-badge { color: var(--haze) !important; }
html body input[type="range"] { accent-color: var(--fiber); }
html body .currency-symbol, html body .price-cur { color: var(--fiber) !important; }

/* ---------- Payment & result pages: a floating slab on the scene ---------- */
html body .payment-container,
html body .response-container,
html body .cancel-container,
html body .wrapper > .card,
html body .box,
html body .loader {
  background:
    linear-gradient(165deg, rgba(255,255,255,.08) 0%, rgba(255,255,255,0) 30%),
    var(--glass-strong) !important;
  border: 1px solid var(--edge) !important;
  border-radius: 26px !important;
  color: var(--lumen) !important;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow:
    0 2px 0 rgba(120,170,255,.18),
    0 14px 0 -6px rgba(14, 28, 58, .9),
    0 26px 0 -12px rgba(14, 28, 58, .55),
    0 60px 90px -30px rgba(0, 0, 0, .9),
    inset 0 1px 0 rgba(255, 255, 255, .08) !important;
  animation: ba3d-slab 1s cubic-bezier(.2, .85, .25, 1) both;
}
html body .box { margin: 40px auto !important; }
@keyframes ba3d-slab {
  from { opacity: 0; transform: perspective(1200px) rotateX(24deg) translateY(60px); }
  to   { opacity: 1; transform: perspective(1200px) rotateX(0) translateY(0); }
}
html body .logo h1, html body .payment-container h1, html body .response-container h1 {
  font-size: clamp(1.5rem, 3.4vw, 2.1rem) !important;
  text-shadow: 0 1px 0 #7F90B8, 0 2px 0 #56668F, 0 3px 0 #36446B, 0 10px 20px rgba(0,0,0,.5) !important;
}
html body .logo p { color: var(--haze) !important; }
html body .price-display, html body .price-wrap, html body .total {
  background: rgba(3, 8, 20, .6) !important;
  border: 1px solid var(--edge) !important;
  border-radius: var(--r-md) !important;
  color: var(--lumen) !important;
}
html body .amount, html body .price-amount, html body .plan-price {
  color: var(--lumen) !important;
  font-family: var(--font-display) !important;
  text-shadow: 0 2px 0 #36446B, 0 0 24px rgba(53, 224, 213, .3);
}
html body .plan-card.selected { border-color: var(--fiber) !important; box-shadow: 0 0 0 2px rgba(53,224,213,.35), var(--depth) !important; }
html body .badge { background: var(--signal) !important; color: #fff !important; }
html body .divider { background: var(--edge) !important; border-color: var(--edge) !important; }
html body .tag, html body .chip { background: rgba(53, 224, 213, .1) !important; color: var(--fiber) !important; border: 1px solid rgba(53,224,213,.25) !important; }

html body .detail-row, html body .info-row { border-color: var(--edge) !important; }
html body .detail-label, html body .dl { color: var(--haze) !important; }
html body .detail-value, html body .dv { color: var(--lumen) !important; }

html body .status-icon,
html body .cancel-icon {
  width: 92px !important; height: 92px !important;
  margin-left: auto !important; margin-right: auto !important;
  display: grid !important; place-items: center !important;
  border-radius: 50% !important;
  font-size: 2.6rem !important;
  color: #fff !important;
  background: radial-gradient(circle at 32% 28%, #FFD08A, var(--amber) 45%, #B06E10 100%) !important;
  box-shadow: 0 8px 0 #6B420A, 0 24px 40px -10px rgba(255, 181, 71, .5), inset 0 3px 6px rgba(255,255,255,.5) !important;
  animation: ba3d-spin-in 1.1s cubic-bezier(.2, .9, .25, 1) both;
}
html body .status-icon.success-icon {
  background: radial-gradient(circle at 32% 28%, #9BFFF6, var(--fiber) 45%, #0E7D77 100%) !important;
  box-shadow: 0 8px 0 #07504C, 0 24px 40px -10px rgba(53, 224, 213, .55), inset 0 3px 6px rgba(255,255,255,.5) !important;
}
html body .status-icon.failure-icon {
  background: radial-gradient(circle at 32% 28%, #FF9CA4, var(--signal) 45%, #9A111C 100%) !important;
  box-shadow: 0 8px 0 #5E0A12, 0 24px 40px -10px rgba(255, 70, 85, .55), inset 0 3px 6px rgba(255,255,255,.5) !important;
}
@keyframes ba3d-spin-in {
  from { opacity: 0; transform: perspective(500px) rotateY(-180deg) scale(.6); }
  to   { opacity: 1; transform: perspective(500px) rotateY(0) scale(1); }
}
html body .success-title { color: var(--fiber) !important; }
html body .failure-title { color: var(--signal) !important; }
html body .failure-message, html body .fail-box {
  background: rgba(255, 70, 85, .08) !important;
  border: 1px solid rgba(255, 70, 85, .3) !important;
  color: #FFC2C7 !important;
  border-radius: var(--r-md) !important;
}
html body .spinner {
  border-color: rgba(120, 170, 255, .15) !important;
  border-top-color: var(--fiber) !important;
  box-shadow: 0 0 24px rgba(53, 224, 213, .3);
}
html body code { background: rgba(3, 8, 20, .7) !important; color: var(--fiber) !important; }
html body .note { color: var(--haze) !important; }

/* ---------- HR demo specifics ---------- */
html body .hero-grid { perspective: 1400px; }
html body .hero-card { transform: rotateY(-14deg) rotateX(6deg); }
html body .bar { background: rgba(3, 8, 20, .7) !important; }
html body .bar span { background: linear-gradient(90deg, var(--fiber), var(--signal)) !important; box-shadow: 0 0 12px rgba(53,224,213,.5); }
html body .hero-grid h1 { font-size: clamp(2.2rem, 5vw, 4.2rem) !important; text-align: left; }

/* ---------- Depth reveal (added by JS, so content is never hidden without it) ---------- */
html.ba3d-js .ba3d-reveal {
  opacity: 0;
  transform: perspective(1000px) rotateX(-22deg) translateY(50px) translateZ(-120px);
  transition: opacity .9s cubic-bezier(.2, .8, .2, 1), transform 1s cubic-bezier(.2, .8, .2, 1);
  transition-delay: var(--ba3d-delay, 0s);
}
html.ba3d-js .ba3d-reveal.is-in {
  opacity: 1;
  transform: perspective(1000px) rotateX(0) translateY(0) translateZ(0);
}

/* ---------- Responsive + reduced motion ---------- */
@media (max-width: 768px) {
  html body .hero, html body .page-header { min-height: auto; padding: 130px 0 80px !important; }
  html body section { padding-top: 80px; padding-bottom: 80px; }
  html body .hero-card { transform: none; }
  html body .hero-grid h1 { text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.ba3d-js .ba3d-reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* Room for the "AED" prefix inside the amount field */
html body .price-input input { padding-left: 60px !important; }

/* Development cards on products.html: button sits at the bottom of every card */
html body .product-card--dev { display: flex !important; flex-direction: column; }
html body .product-card--dev .product-features { margin-bottom: 1.6rem; }
html body .product-card--dev .btn {
  margin-top: auto;
  justify-content: center;
  width: 100%;
  padding: 14px 18px !important;
  text-align: center;
  white-space: nowrap;
}
html body .products-grid--dev { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 1.5rem !important; }
@media (min-width: 1200px) { html body .products-grid--dev { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; } }
@media (max-width: 700px)  { html body .products-grid--dev { grid-template-columns: 1fr !important; } }

/* ---------- Homepage: AI / Software / Hardware pillars ---------- */
html body .pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
  perspective: 1600px;
}
html body .pillar {
  display: flex !important;
  flex-direction: column;
  padding: 0 1.9rem 1.9rem !important;
  overflow: hidden;
}
html body .pillar-stage {
  height: 170px;
  margin: 0 -1.9rem 0;
  display: grid;
  place-items: center;
  perspective: 600px;
  border-bottom: 1px solid var(--edge);
  background:
    radial-gradient(55% 75% at 50% 100%, var(--stage-glow), transparent 70%),
    repeating-linear-gradient(90deg, rgba(120,170,255,.08) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(0deg, rgba(120,170,255,.08) 0 1px, transparent 1px 26px),
    rgba(5, 12, 30, .75);
}
html body .pillar-stage i {
  font-size: 4.6rem;
  color: #fff;
  text-shadow: 0 2px 0 #9FB1DA, 0 4px 0 #5F709C, 0 6px 0 #34426A, 0 20px 30px rgba(0,0,0,.6), 0 0 44px var(--stage-glow);
  animation: ba3d-float 6s ease-in-out infinite;
}
html body .pillar--ai       { --stage-glow: rgba(53, 224, 213, .38); }
html body .pillar--software { --stage-glow: rgba(255, 70, 85, .36); }
html body .pillar--hardware { --stage-glow: rgba(255, 181, 71, .32); }
html body .pillar--software .pillar-stage i { animation-delay: -2s; }
html body .pillar--hardware .pillar-stage i { animation-delay: -4s; }

/* Keycap overlaps the stage edge */
html body .pillar .card-icon { margin: -31px 0 1.2rem !important; position: relative; z-index: 3; }
html body .pillars > .pillar--software .card-icon {
  color: #fff !important;
  background: linear-gradient(150deg, #FF8C95 0%, var(--signal) 45%, #A8141F 100%) !important;
  box-shadow: 0 6px 0 #6E0A12, 0 7px 0 #4A060C, 0 18px 26px -8px rgba(255, 70, 85, .5),
    inset 0 2px 0 rgba(255, 255, 255, .45), inset 0 -3px 6px rgba(0, 0, 0, .15) !important;
}
html body .pillars > .pillar--hardware .card-icon {
  background: linear-gradient(150deg, #FFE0A8 0%, var(--amber) 45%, #B87510 100%) !important;
  box-shadow: 0 6px 0 #6B420A, 0 7px 0 #4A2D06, 0 18px 26px -8px rgba(255, 181, 71, .45),
    inset 0 2px 0 rgba(255, 255, 255, .5), inset 0 -3px 6px rgba(0, 0, 0, .15) !important;
}
html body .pillars > .pillar--software .card-icon i { color: #fff !important; -webkit-text-fill-color: #fff !important; }

html body .pillar h3 { font-family: var(--font-display) !important; font-size: 1.45rem !important; margin-bottom: .75rem !important; }
html body .pillar > p { margin-bottom: 1.2rem; }
html body .pillar-list { list-style: none; padding: 0; margin: 0 0 1.8rem; }
html body .pillar-list li {
  display: flex; gap: .7rem; align-items: baseline;
  padding: .55rem 0;
  border-top: 1px solid var(--line-soft);
  color: var(--lumen) !important;
  font-size: .97rem;
}
html body .pillar-list li::before { content: "✓"; color: var(--amber); font-weight: 700; flex: none; }
html body .pillar .btn { margin-top: auto; justify-content: center; width: 100%; }

html body .pillar-support {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
html body .pillar-support-item {
  display: flex; align-items: center; justify-content: center; gap: .7rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--edge);
  border-radius: var(--r-md);
  background: rgba(10, 22, 48, .55);
  backdrop-filter: blur(10px);
  color: var(--lumen);
  font-weight: 600;
}
html body .pillar-support-item i { color: var(--fiber); font-size: 1.1rem; }

@media (max-width: 1024px) {
  html body .pillars { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
  html body .pillar-support { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  html body .pillar-support { grid-template-columns: 1fr; }
}
