/* =====================================================================
   SolavexTech — Premium 3D layer (loads after style.css)
   Lightweight: only transform/opacity animations (GPU), no JS libraries,
   no WebGL. All motion is disabled for prefers-reduced-motion users and
   tilt is disabled on touch devices.
   ===================================================================== */

:root {
  --glow-brand: rgba(108, 124, 255, 0.55);
  --glow-accent: rgba(242, 169, 59, 0.45);
  --ease-out: cubic-bezier(.22, .8, .24, 1);
}

body { background: radial-gradient(1200px 600px at 85% -10%, rgba(108,124,255,.10), transparent 60%), var(--bg); }

/* ---------- Navbar: glass ---------- */
.navbar { background: rgba(255,255,255,.78); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); }
.nav-links a { position: relative; }
.nav-links a:not(.btn-demo)::after {
  content: ""; position: absolute; left: 50%; bottom: 4px; width: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--accent)); transition: width .3s var(--ease-out), left .3s var(--ease-out);
}
.nav-links a:not(.btn-demo):hover::after, .nav-links a.active::after { width: 40%; left: 30%; }
.logo-icon { transition: transform .5s var(--ease-out); transform-style: preserve-3d; }
.logo:hover .logo-icon { transform: rotateY(180deg); }

/* ---------- Buttons: depth + shine ---------- */
.btn-demo, .btn-primary, .btn-outline { position: relative; overflow: hidden; will-change: transform; }
.btn-demo::before, .btn-primary::before {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg); transition: left .7s var(--ease-out);
}
.btn-demo:hover::before, .btn-primary:hover::before { left: 140%; }
.btn-sm { padding: .6rem 1.1rem; font-size: .85rem; }

/* ---------- Hero: dark stage with 3D scene ---------- */
.hero:not(.has-video) {
  background:
    radial-gradient(700px 420px at 12% 20%, rgba(52,84,209,.55), transparent 65%),
    radial-gradient(600px 400px at 90% 80%, rgba(242,169,59,.22), transparent 65%),
    linear-gradient(160deg, #070C18 0%, #0E1630 55%, #141F45 100%);
  color: var(--text-on-dark);
}
.hero:not(.has-video) .hero-content h1,
.hero:not(.has-video) .hero-content h1 * { color: #fff; }
.hero:not(.has-video) .hero-content p { color: var(--text-on-dark); }
.hero:not(.has-video) .hero-badge { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(8px); }
.hero:not(.has-video) .hero-stats h4 { color: #fff; }
.hero:not(.has-video) .hero-stats p { color: var(--text-on-dark); }
.hero:not(.has-video) .btn-outline { color: #fff; border-color: rgba(255,255,255,.35); }
.hero:not(.has-video) .btn-outline:hover { background: rgba(255,255,255,.1); color: #fff; border-color: #fff; }

/* animated grid floor + orbs (pure CSS, GPU) */
.hero::before {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -35%; height: 80%; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(108,124,255,.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108,124,255,.22) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: perspective(500px) rotateX(62deg);
  -webkit-mask-image: linear-gradient(to top, #000 10%, transparent 80%); mask-image: linear-gradient(to top, #000 10%, transparent 80%);
  animation: gridMove 14s linear infinite;
}
@keyframes gridMove { to { background-position: 0 56px, 56px 0; } }
.hero-glow { position: absolute; width: 520px; height: 520px; top: -160px; right: -120px; border-radius: 50%;
  background: radial-gradient(circle, var(--glow-brand), transparent 65%); filter: blur(20px); animation: orb 12s ease-in-out infinite alternate; z-index: 0; }
@keyframes orb { to { transform: translate3d(-80px, 60px, 0) scale(1.15); } }
.hero-grid, .hero.has-video .hero-grid { position: relative; z-index: 2; }

.hero-content h1 { font-size: clamp(2.2rem, 4.6vw, 4rem); letter-spacing: -0.02em; }
.hero-content h1 span, .hero-content h1 em {
  background: linear-gradient(120deg, var(--accent-2), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent !important;
}
.hero-content > * { animation: riseIn .9s var(--ease-out) both; }
.hero-content > *:nth-child(2) { animation-delay: .08s; } .hero-content > *:nth-child(3) { animation-delay: .16s; }
.hero-content > *:nth-child(4) { animation-delay: .24s; } .hero-content > *:nth-child(5) { animation-delay: .32s; }
@keyframes riseIn { from { opacity: 0; transform: translate3d(0, 28px, 0); } to { opacity: 1; transform: none; } }

/* 3D dashboard mockup */
.hero-visual { perspective: 1400px; transform-style: preserve-3d; }
.mockup-window {
  transform-style: preserve-3d;
  transform: rotateY(calc(-16deg + var(--ry, 0deg))) rotateX(calc(8deg + var(--rx, 0deg)));
  transition: transform .25s ease-out;
  box-shadow: -40px 50px 90px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08), 0 0 80px rgba(108,124,255,.25);
  animation: floatY 7s ease-in-out infinite;
  border-radius: 18px;
}
@keyframes floatY { 0%,100% { translate: 0 0; } 50% { translate: 0 -16px; } }
.mockup-kpi { transform: translateZ(40px); }
.mockup-chart { transform: translateZ(30px); }
.mockup-chart span { transform-origin: bottom; animation: barGrow 1.4s var(--ease-out) both; }
.mockup-chart span:nth-child(2){animation-delay:.1s}.mockup-chart span:nth-child(3){animation-delay:.2s}.mockup-chart span:nth-child(4){animation-delay:.3s}
.mockup-chart span:nth-child(5){animation-delay:.4s}.mockup-chart span:nth-child(6){animation-delay:.5s}.mockup-chart span:nth-child(7){animation-delay:.6s}
@keyframes barGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.floating-chip { transform: translateZ(90px); backdrop-filter: blur(10px); animation: floatY 5s ease-in-out infinite; }
.chip-support { animation-delay: -2.5s; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background:
    radial-gradient(600px 300px at 15% 0%, rgba(52,84,209,.55), transparent 65%),
    radial-gradient(500px 300px at 95% 100%, rgba(242,169,59,.2), transparent 65%),
    linear-gradient(160deg, #070C18, #121C3C);
  overflow: hidden;
}
.page-hero h1, .page-hero h2 { color: #fff; }
.page-hero p { color: var(--text-on-dark); }
.page-hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-2), var(--accent), transparent);
}

/* ---------- Section headings ---------- */
.services-header h2, .section-header h2 { position: relative; display: inline-block; letter-spacing: -0.01em; }
.services-header h2::after, .section-header h2::after {
  content: ""; display: block; width: 64px; height: 4px; margin: .7rem auto 0; border-radius: 4px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

/* ---------- 3D cards ---------- */
[data-tilt], .service-card, .industry-card-page, .team-card, .testimonial-card, .feature, .stat-card, .value-item, .info-card {
  transform-style: preserve-3d;
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .35s ease;
  will-change: transform;
}
.service-card, .industry-card-page, .team-card, .testimonial-card, .feature, .stat-card, .value-item {
  border: 1px solid var(--border); background: var(--surface); position: relative; overflow: hidden;
}
/* moving light highlight following the cursor */
.service-card::before, .industry-card-page::before, .team-card::before, .testimonial-card::before, .feature::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s ease;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(108,124,255,.16), transparent 45%);
}
.is-tilting::before { opacity: 1 !important; }
.is-tilting { box-shadow: 0 28px 60px rgba(11,18,32,.22), 0 0 0 1px rgba(108,124,255,.35) !important; transition: transform .08s linear, box-shadow .3s ease !important; }

/* depth for inner items */
.service-icon, .industry-icon, .feature-icon, .client-avatar, .value-icon { transform: translateZ(36px); transition: transform .35s var(--ease-out); }
.service-card h3 h3, .team-card h3 { transform: translateZ(22px); }
.service-icon, .industry-icon, .feature-icon, .value-icon {
  background: linear-gradient(135deg, #EEF1FC, #DDE3FB); box-shadow: 0 10px 24px rgba(52,84,209,.22), inset 0 1px 0 #fff;
}

/* gradient top accent */
.service-card::after, .industry-card-page::after, .team-card::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--accent)); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease-out);
}
.service-card:hover::after, .industry-card-page:hover::after, .team-card:hover::after { transform: scaleX(1); }

/* sector chips on homepage */
.sectors-list span { transition: transform .3s var(--ease-out), box-shadow .3s ease, background .3s ease; }
.sectors-list span:hover { transform: translateY(-4px) scale(1.04); box-shadow: 0 12px 24px rgba(52,84,209,.2); }

/* CEO quote card */
.ceo-card { background: linear-gradient(160deg, #0B1220, #16224A); color: var(--text-on-dark); box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.ceo-card::before { content:""; position:absolute; width:380px; height:380px; right:-120px; top:-140px; border-radius:50%; background: radial-gradient(circle, var(--glow-brand), transparent 65%); }
.ceo-card p, .ceo-card h4 { color: #fff; position: relative; }

/* ---------- Product demo credentials ---------- */
.demo-creds {
  margin: 1rem 0 .4rem; padding: .85rem 1rem; border-radius: 14px;
  background: linear-gradient(135deg, rgba(52,84,209,.08), rgba(242,169,59,.10));
  border: 1px dashed rgba(52,84,209,.4); transform: translateZ(18px);
}
.demo-creds-title { font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); margin-bottom: .5rem; }
.demo-creds-title i { margin-right: 6px; color: var(--accent); }
.demo-cred-row { display: flex; align-items: center; gap: .6rem; padding: .3rem 0; font-size: .86rem; }
.demo-cred-row span { width: 72px; color: var(--text-muted); font-weight: 600; flex-shrink: 0; }
.demo-cred-row code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86rem; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: .25rem .55rem; color: var(--ink); user-select: all; }
.copy-btn { border: 1px solid var(--border); background: #fff; width: 32px; height: 32px; border-radius: 8px; color: var(--text-muted); transition: all .2s ease; flex-shrink: 0; }
.copy-btn:hover { color: var(--brand); border-color: var(--brand); transform: translateY(-2px); }
.copy-btn.copied { color: #fff; background: var(--good); border-color: var(--good); }
.product-footer { gap: .8rem; flex-wrap: wrap; }
.product-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translate3d(0, 34px, 0) scale(.98); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }
/* JS removes .reveal/.in after the entrance finishes so the tilt transform takes over */

/* Footer / CTA */
.cta-band { background: linear-gradient(120deg, #1F3AA8, var(--brand) 45%, #6C7CFF); position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; width: 420px; height: 420px; left: -100px; top: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.25), transparent 65%); animation: orb 10s ease-in-out infinite alternate; }
.footer { background: linear-gradient(180deg, #0B1220, #070C18); }
.back-to-top { box-shadow: 0 10px 24px rgba(52,84,209,.4); }

/* ---------- Performance helpers ---------- */
.service-card, .industry-card-page, .testimonial-card, .team-card { content-visibility: auto; contain-intrinsic-size: 320px; }
img { height: auto; }

/* ---------- Safety: touch devices & reduced motion ---------- */
@media (hover: none), (pointer: coarse) {
  [data-tilt], .service-card, .industry-card-page, .team-card, .testimonial-card, .feature, .stat-card, .value-item { transform: none !important; }
  .mockup-window { transform: rotateY(-8deg) rotateX(4deg); }
}
@media (max-width: 900px) {
  .hero::before { opacity: .5; }
  .mockup-window { transform: none; animation: none; }
  .floating-chip { transform: none; }
  .hero-glow { width: 320px; height: 320px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero::before, .hero-glow, .mockup-window, .floating-chip, .cta-band::before, .hero-content > *, .mockup-chart span { animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  [data-tilt], .service-card, .industry-card-page, .team-card, .testimonial-card, .feature { transform: none !important; }
}

/* hero video fades in once it can play (no flash, no layout shift) */
.hero-bg-video { opacity: 0; transition: opacity .8s ease; }
.hero-bg-video.ready { opacity: 1; }

/* ---------- fixes: badge must overflow card; hover lift must keep tilt ---------- */
.service-card::before, .industry-card-page::before, .team-card::before, .testimonial-card::before, .feature::before { border-radius: inherit; }
.service-card::after, .industry-card-page::after, .team-card::after { border-radius: var(--radius) var(--radius) 0 0; }
.service-card:hover, .industry-card-page:hover, .team-card:hover, .testimonial-card:hover, .feature:hover, .value-item:hover, .stat-card:hover {
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-6px);
}
@media (hover: none), (pointer: coarse) {
  .service-card:hover, .industry-card-page:hover, .team-card:hover, .testimonial-card:hover, .feature:hover { transform: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .service-card:hover, .industry-card-page:hover, .team-card:hover, .testimonial-card:hover, .feature:hover { transform: none !important; }
}


/* =====================================================================
   Product cards — calm, professional (no tilt, no clipping)
   ===================================================================== */
.products-grid { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 1.6rem; align-items: stretch; }
.product-card {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--border); border-radius: 20px;
  padding: 1.8rem 1.7rem 1.5rem;
  box-shadow: 0 1px 2px rgba(11,18,32,.04), 0 8px 24px rgba(11,18,32,.05);
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), border-color .3s ease;
  overflow: hidden; content-visibility: visible;
}
.product-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--accent));
  opacity: 0; transition: opacity .3s ease;
}
.product-card:hover { transform: translateY(-5px); border-color: rgba(52,84,209,.35); box-shadow: 0 2px 4px rgba(11,18,32,.04), 0 22px 44px rgba(52,84,209,.14); }
.product-card:hover::before { opacity: 1; }

.product-badge {
  position: absolute; top: 1.2rem; right: 1.2rem; transform: none;
  background: #FFF4DD; color: #9A5B00; border: 1px solid #F6DDA7;
  font-size: .72rem; font-weight: 700; padding: .3rem .75rem; border-radius: 100px; box-shadow: none;
}
.product-header { margin-bottom: 1.1rem; }
.product-icon {
  width: 60px; height: 60px; border-radius: 16px; font-size: 1.7rem; transform: none;
  background: linear-gradient(145deg, #F1F4FF, #DEE5FF);
  box-shadow: inset 0 1px 0 #fff, 0 6px 14px rgba(52,84,209,.16);
}
.product-card h3 { font-size: 1.2rem; margin-bottom: .45rem; letter-spacing: -.01em; transform: none; }
.product-category { margin-bottom: .8rem; }
.product-description { color: var(--text-muted); font-size: .9rem; line-height: 1.65; margin-bottom: 1.1rem; }

.product-features { display: grid; grid-template-columns: 1fr; align-content: start; gap: .1rem; margin-bottom: 1.3rem; }
.product-features li { margin: 0; padding: .4rem 0; border-bottom: 1px dashed var(--border); font-size: .86rem; color: var(--text); }
.product-features li:last-child { border-bottom: 0; }
.product-features i { color: var(--good); }

.demo-creds { transform: none; margin: 0 0 1.2rem; background: #F6F8FF; border: 1px solid #DDE4FF; border-radius: 14px; }

.product-footer { margin-top: auto; padding-top: 1.1rem; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.product-price { font-size: .92rem; color: var(--ink); }
.product-actions { display: flex; gap: .5rem; }
.product-actions .btn-primary, .product-actions .btn-outline { padding: .6rem 1.1rem; font-size: .84rem; }

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .product-footer { flex-direction: column; align-items: stretch; }
  .product-actions { justify-content: stretch; } .product-actions > * { flex: 1; justify-content: center; }
}
