/* ================================================================
   IJUSECA – animations.css
   Futuristic effects: canvas network, scan beam, HUD brackets,
   glitch text, hex grid, scan lines, data counters, card glow pulses
   ================================================================ */

/* ----------------------------------------------------------------
   HERO CANVAS (particle network – drawn by animations.js)
---------------------------------------------------------------- */
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ----------------------------------------------------------------
   SCAN LINES
   Thin horizontal CRT-style lines across the whole hero
---------------------------------------------------------------- */
.scan-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0, 0, 0, 0.07) 3px,
    rgba(0, 0, 0, 0.07) 4px
  );
  animation: scanFlicker 8s linear infinite;
}

@keyframes scanFlicker {
  0%,100% { opacity: 0.5; }
  50%      { opacity: 0.7; }
  75%      { opacity: 0.4; }
}

/* ----------------------------------------------------------------
   HORIZONTAL SCAN BEAM
   A single glowing line sweeping top → bottom
---------------------------------------------------------------- */
.scan-beam {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0,170,255,0.0) 10%,
    rgba(0,170,255,0.6) 50%,
    rgba(0,170,255,0.0) 90%,
    transparent 100%
  );
  box-shadow: 0 0 12px 4px rgba(0,170,255,0.3);
  z-index: 2;
  pointer-events: none;
  animation: scanBeam 6s linear infinite;
  top: 0;
}

@keyframes scanBeam {
  0%   { top: 0%;   opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* ----------------------------------------------------------------
   HUD CORNER BRACKETS
   Tactical UI corners at hero edges
---------------------------------------------------------------- */
.hud-corner {
  position: absolute;
  width: 40px;
  height: 40px;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  animation: hudFadeIn 1.2s ease forwards;
}

.hud-tl { top: 88px;  left: 20px;  border-top: 2px solid rgba(0,170,255,0.7); border-left: 2px solid rgba(0,170,255,0.7); animation-delay: 0.8s; }
.hud-tr { top: 88px;  right: 20px; border-top: 2px solid rgba(0,170,255,0.7); border-right: 2px solid rgba(0,170,255,0.7); animation-delay: 1.0s; }
.hud-bl { bottom: 100px; left: 20px;  border-bottom: 2px solid rgba(0,170,255,0.7); border-left: 2px solid rgba(0,170,255,0.7); animation-delay: 1.1s; }
.hud-br { bottom: 100px; right: 20px; border-bottom: 2px solid rgba(0,170,255,0.7); border-right: 2px solid rgba(0,170,255,0.7); animation-delay: 1.2s; }

@keyframes hudFadeIn {
  from { opacity: 0; transform: scale(0.6); }
  to   { opacity: 1; transform: scale(1); }
}

/* Corner pulse */
.hud-corner::after {
  content: '';
  position: absolute;
  width: 5px; height: 5px;
  background: var(--clr-accent-light, #00aaff);
  border-radius: 50%;
  box-shadow: 0 0 8px 2px rgba(0,170,255,0.8);
  animation: cornerPulse 2s ease-in-out infinite;
}
.hud-tl::after { top: -3px;  left: -3px; }
.hud-tr::after { top: -3px;  right: -3px; }
.hud-bl::after { bottom: -3px; left: -3px; }
.hud-br::after { bottom: -3px; right: -3px; }

@keyframes cornerPulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%     { opacity: 0.3; transform: scale(1.8); }
}

/* ----------------------------------------------------------------
   GLITCH TEXT EFFECT
   Applied to .glitch-text elements via data-text attribute
---------------------------------------------------------------- */
.glitch-text {
  position: relative;
  display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  overflow: hidden;
}

.glitch-text::before {
  color: rgba(0,170,255,0.8);
  animation: glitchTop 4s infinite linear;
  clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
  transform: translate(-2px, 0);
}

.glitch-text::after {
  color: rgba(255,80,80,0.6);
  animation: glitchBottom 4s infinite linear;
  clip-path: polygon(0 66%, 100% 66%, 100% 100%, 0 100%);
  transform: translate(2px, 0);
}

@keyframes glitchTop {
  0%,90%,100% { transform: translate(0); opacity: 0; }
  91% { transform: translate(-3px, -1px); opacity: 1; }
  92% { transform: translate(3px,  1px); opacity: 1; }
  93% { transform: translate(0);  opacity: 0; }
  96% { transform: translate(-2px, 0); opacity: 1; }
  97% { transform: translate(0); opacity: 0; }
}

@keyframes glitchBottom {
  0%,88%,100% { transform: translate(0); opacity: 0; }
  89% { transform: translate(3px, 1px);  opacity: 1; }
  90% { transform: translate(-3px,-1px); opacity: 1; }
  91% { transform: translate(0); opacity: 0; }
  94% { transform: translate(2px, 0); opacity: 1; }
  95% { transform: translate(0); opacity: 0; }
}

/* ----------------------------------------------------------------
   DATA TICKER STRIP (stat counters)
---------------------------------------------------------------- */
.data-ticker {
  background: linear-gradient(90deg, #020c1e 0%, #040f25 50%, #020c1e 100%);
  border-top: 1px solid rgba(0,119,255,0.3);
  border-bottom: 1px solid rgba(0,119,255,0.3);
  padding: 22px 0;
  position: relative;
  overflow: hidden;
}

/* Subtle animated glow sweep on the strip */
.data-ticker::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 200px;
  background: linear-gradient(90deg, transparent, rgba(0,119,255,0.08), transparent);
  animation: tickerSweep 5s linear infinite;
}
@keyframes tickerSweep {
  from { left: -200px; }
  to   { left: 100%; }
}

.data-ticker-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.ticker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}

.ticker-item .ticker-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.04em;
  line-height: 1;
  /* monospaced counter look */
  font-variant-numeric: tabular-nums;
}

.ticker-item .ticker-unit {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #00aaff;
  margin-left: 2px;
}

.ticker-label {
  font-family: 'Barlow', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: rgba(122,154,192,0.9);
  text-transform: uppercase;
}

.ticker-divider {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, transparent, rgba(0,119,255,0.5), transparent);
}

/* ----------------------------------------------------------------
   CARD GLOW PULSE
   Subtle animated border glow on cap-cards and ps-cards
---------------------------------------------------------------- */
.cap-card,
.ps-card,
.industry-card {
  position: relative;
}

/* Animated border-glow pseudo-element */
.cap-card::after,
.ps-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    rgba(0,119,255,0) 0%,
    rgba(0,170,255,0.35) 40%,
    rgba(0,119,255,0) 60%,
    rgba(0,119,255,0) 100%
  );
  background-size: 300% 300%;
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease;
  animation: borderSweep 4s linear infinite;
  pointer-events: none;
}

.cap-card:hover::after,
.ps-card:hover::after {
  opacity: 1;
}

@keyframes borderSweep {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ----------------------------------------------------------------
   SECTION-TITLE – typed underline reveal
---------------------------------------------------------------- */
.section-title {
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #0077ff, #00aaff, transparent);
  margin: 10px auto 0;
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}
.section-title.in-view::after {
  width: 80px;
}

/* ----------------------------------------------------------------
   STACK PYRAMID – pulsing ring on each layer
---------------------------------------------------------------- */
.pyramid-layer {
  position: relative;
  overflow: visible;
}
.pyramid-layer.l6 {
  animation: pyramidTopPulse 2.5s ease-in-out infinite;
}
@keyframes pyramidTopPulse {
  0%,100% { box-shadow: 0 0 14px rgba(0,119,255,0.5), 0 0 30px rgba(0,119,255,0.2); }
  50%     { box-shadow: 0 0 24px rgba(0,170,255,0.8), 0 0 50px rgba(0,119,255,0.35); }
}

/* ----------------------------------------------------------------
   HERO CONTENT – staggered type-in reveal
   (works together with CSS animation-delay already on eyebrow/title)
---------------------------------------------------------------- */
.hero-title .accent {
  display: inline-block;
  background: linear-gradient(90deg, #0077ff, #00d4ff, #0077ff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s linear infinite;
}
@keyframes gradientShift {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* ----------------------------------------------------------------
   BADGE ITEM – icon orbit ring
---------------------------------------------------------------- */
.badge-icon {
  position: relative;
}
.badge-item .badge-icon::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(0,170,255,0.4);
  animation: orbitRing 3s linear infinite;
}
@keyframes orbitRing {
  from { transform: rotate(0deg) scale(1);   opacity: 0.6; }
  50%  { transform: rotate(180deg) scale(1.1); opacity: 1; }
  to   { transform: rotate(360deg) scale(1);  opacity: 0.6; }
}

/* ----------------------------------------------------------------
   HEX GRID BACKGROUND on .section-stack
   Pure CSS hex pattern overlay
---------------------------------------------------------------- */
.section-stack {
  position: relative;
  overflow: hidden;
}
.section-stack::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(0,119,255,0.12) 1px, transparent 0);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
  animation: hexDrift 20s linear infinite;
}
@keyframes hexDrift {
  from { background-position: 0 0; }
  to   { background-position: 64px 64px; }
}
.section-stack .container { position: relative; z-index: 1; }

/* ----------------------------------------------------------------
   LOADING / PAGE ENTRY – initial page wipe
---------------------------------------------------------------- */
.page-loader {
  position: fixed;
  inset: 0;
  background: #020b17;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: #fff;
  animation: loaderPulse 1.2s ease-in-out infinite;
}
@keyframes loaderPulse {
  0%,100% { opacity: 1; }
  50%     { opacity: 0.3; }
}
.loader-bar-wrap {
  width: 200px;
  height: 2px;
  background: rgba(0,119,255,0.2);
  border-radius: 2px;
  overflow: hidden;
}
.loader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0077ff, #00aaff);
  border-radius: 2px;
  animation: loaderFill 1.4s cubic-bezier(0.4,0,0.2,1) forwards;
  box-shadow: 0 0 12px rgba(0,170,255,0.6);
}
@keyframes loaderFill {
  from { width: 0%; }
  to   { width: 100%; }
}
.loader-text {
  font-family: 'Barlow', sans-serif;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: rgba(0,170,255,0.7);
  text-transform: uppercase;
  animation: loaderPulse 1.2s ease-in-out infinite;
  animation-delay: 0.2s;
}

/* ----------------------------------------------------------------
   FLOATING DATA BLIPS  (abs-positioned mini labels on hero)
---------------------------------------------------------------- */
.data-blip {
  position: absolute;
  z-index: 3;
  font-family: 'Barlow', sans-serif;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(0,170,255,0.65);
  text-transform: uppercase;
  pointer-events: none;
  white-space: nowrap;
  animation: blipFloat 6s ease-in-out infinite;
}
.data-blip::before {
  content: '■ ';
  color: rgba(0,119,255,0.8);
  font-size: 7px;
}

.blip-1 { top: 22%; right: 18%; animation-delay: 0s; }
.blip-2 { top: 38%; right: 12%; animation-delay: 1.5s; }
.blip-3 { top: 55%; right: 22%; animation-delay: 3s; }
.blip-4 { top: 68%; right: 8%;  animation-delay: 4.5s; }

@keyframes blipFloat {
  0%,100% { transform: translateY(0px);  opacity: 0.65; }
  50%     { transform: translateY(-8px); opacity: 1; }
}

/* ----------------------------------------------------------------
   RESPONSIVE
---------------------------------------------------------------- */
@media (max-width: 768px) {
  .hud-tl, .hud-tr, .hud-bl, .hud-br { display: none; }
  .data-blip { display: none; }
  .ticker-divider { display: none; }
  .data-ticker-inner { justify-content: center; gap: 24px; }
}
