/* ==========================================================================
   TechPulseCodeZone — Extra Animation Keyframes
   ========================================================================== */

@keyframes dashFlow {
  to { stroke-dashoffset: 0; }
}

@keyframes glitch {
  0%, 100% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(-2px, -2px); }
  60% { transform: translate(2px, 2px); }
  80% { transform: translate(2px, -2px); }
}

@keyframes glitch-anim {
  0% { clip-path: inset(40% 0 61% 0); }
  20% { clip-path: inset(92% 0 1% 0); }
  40% { clip-path: inset(43% 0 1% 0); }
  60% { clip-path: inset(25% 0 58% 0); }
  80% { clip-path: inset(54% 0 7% 0); }
  100% { clip-path: inset(58% 0 43% 0); }
}

@keyframes orbit {
  from { transform: rotate(0deg) translateX(60px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(60px) rotate(-360deg); }
}

@keyframes morph {
  0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  41.99% { opacity: 1; }
  42% { opacity: 0; }
  43% { opacity: 1; }
  47.99% { opacity: 1; }
  48% { opacity: 0; }
  49% { opacity: 1; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes draw-line {
  to { stroke-dashoffset: 0; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 255, 200, 0.4); }
  50% { box-shadow: 0 0 30px 5px rgba(0, 255, 200, 0); }
}

@keyframes terminal-cursor {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ---------- Glitch Text ---------- */
.glitch {
  position: relative;
  display: inline-block;
}

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

.glitch::before {
  color: var(--accent-cyan);
  animation: glitch-anim 2s infinite linear alternate-reverse;
  clip-path: inset(0 0 0 0);
}

.glitch::after {
  color: var(--accent-purple);
  animation: glitch-anim 3s infinite linear alternate-reverse;
}

/* ---------- Shimmer Border ---------- */
.shimmer-border {
  position: relative;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 200, 0.4), transparent);
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
  height: 1px;
}

/* ---------- Morph Blob ---------- */
.morph-blob {
  animation: morph 8s ease-in-out infinite;
}

/* ---------- Glow Pulse ---------- */
.glow-pulse {
  animation: glow-pulse 2s ease-in-out infinite;
}

/* ---------- Terminal Cursor ---------- */
.term-cursor {
  display: inline-block;
  width: 10px;
  height: 18px;
  background: var(--accent-cyan);
  vertical-align: middle;
  margin-left: 4px;
  animation: terminal-cursor 1s steps(1) infinite;
}

/* ---------- Loading Dots ---------- */
.loading-dots span {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent-cyan);
  border-radius: 50%;
  margin: 0 2px;
  animation: loading-dot 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes loading-dot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* ---------- Aurora background ---------- */
.aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  mix-blend-mode: screen;
}

.aurora-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, #00ffc8 0%, transparent 70%);
  top: 20%;
  left: 10%;
  animation: auroraMove 20s ease-in-out infinite;
}

.aurora-2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #b46cff 0%, transparent 70%);
  bottom: 10%;
  right: 15%;
  animation: auroraMove 25s ease-in-out infinite -5s;
}

.aurora-3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, #4d8bff 0%, transparent 70%);
  top: 50%;
  right: 30%;
  animation: auroraMove 22s ease-in-out infinite -10s;
}

@keyframes auroraMove {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(80px, -50px) scale(1.1); }
  50% { transform: translate(-40px, 80px) scale(0.95); }
  75% { transform: translate(60px, 40px) scale(1.05); }
}

/* ---------- Back-to-top button ---------- */
.back-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-primary);
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(0, 255, 200, 0.3);
  border: none;
}

.back-top.show {
  opacity: 1;
  transform: translateY(0);
}

.back-top:hover {
  transform: translateY(-4px);
}

.back-top svg {
  width: 22px;
  height: 22px;
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  max-width: 420px;
  padding: 20px 24px;
  background: rgba(20, 26, 46, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  z-index: 998;
  transform: translateY(120%);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.cookie-banner.show {
  transform: translateY(0);
  opacity: 1;
}

.cookie-banner p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.6;
}

.cookie-banner a {
  color: var(--accent-cyan);
  text-decoration: underline;
}

.cookie-banner-actions {
  display: flex;
  gap: 8px;
}

.cookie-banner-actions button {
  flex: 1;
  padding: 8px 16px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cookie-accept {
  background: var(--gradient-1);
  color: var(--bg-primary);
  font-weight: 600;
  border: none;
}

.cookie-decline {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
}

.cookie-accept:hover { transform: translateY(-1px); }
.cookie-decline:hover { background: rgba(0, 255, 200, 0.05); color: var(--accent-cyan); }

/* ---------- Brand strip logo wall ---------- */
.logo-wall {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
  align-items: center;
  padding: 32px 0;
}

@media (max-width: 768px) {
  .logo-wall { grid-template-columns: repeat(3, 1fr); }
}

.logo-wall-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(20, 26, 46, 0.3);
  transition: all var(--transition-base);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  min-height: 70px;
  text-align: center;
}

.logo-wall-item:hover {
  border-color: var(--border-strong);
  color: var(--accent-cyan);
  background: rgba(0, 255, 200, 0.04);
  transform: translateY(-2px);
}

/* ---------- Glow border cards ---------- */
.glow-card {
  position: relative;
  background: linear-gradient(180deg, rgba(20, 26, 46, 0.7) 0%, rgba(10, 14, 26, 0.7) 100%);
  border-radius: 16px;
  padding: 32px;
  overflow: hidden;
}

.glow-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, transparent, var(--accent-cyan), transparent);
  -webkit-mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.4;
  transition: opacity var(--transition-base);
}

.glow-card:hover::before {
  opacity: 1;
}

/* ---------- Spinner ---------- */
.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2px solid rgba(0, 255, 200, 0.2);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Tooltip ---------- */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  padding: 6px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-primary);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
  z-index: 100;
}

[data-tooltip]:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* ---------- Bar chart animation ---------- */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 120px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(20, 26, 46, 0.3);
}

.bar {
  flex: 1;
  background: linear-gradient(180deg, var(--accent-cyan), var(--accent-blue));
  border-radius: 4px 4px 0 0;
  min-height: 8px;
  transform-origin: bottom;
  animation: barGrow 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  transform: scaleY(0);
}

@keyframes barGrow {
  to { transform: scaleY(1); }
}

.bar:nth-child(2) { animation-delay: 0.1s; }
.bar:nth-child(3) { animation-delay: 0.2s; }
.bar:nth-child(4) { animation-delay: 0.3s; }
.bar:nth-child(5) { animation-delay: 0.4s; }
.bar:nth-child(6) { animation-delay: 0.5s; }
.bar:nth-child(7) { animation-delay: 0.6s; }
.bar:nth-child(8) { animation-delay: 0.7s; }
