/* ── Keyframes ── */

@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(6,182,212,0.6); }
  50%       { opacity: 0.8; transform: scale(1.15); box-shadow: 0 0 0 6px rgba(6,182,212,0); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@keyframes float-orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(30px, -20px) scale(1.05); }
  66%       { transform: translate(-20px, 15px) scale(0.97); }
}

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

@keyframes bar-grow {
  from { width: 0; }
  to   { width: var(--pct); }
}

/* ── Orb animation ── */
.hero-orb-1 {
  animation: float-orb 12s ease-in-out infinite;
}

.hero-orb-2 {
  animation: float-orb 16s ease-in-out infinite reverse;
}

/* ── Gradient text animation on hero ── */
.hero-gradient {
  background-size: 200% auto;
  animation: grad-shift 5s ease-in-out infinite;
}

/* ── Nav hover underline effect ── */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  right: 50%;
  height: 1px;
  background: var(--grad-brand);
  transition: left var(--ease-base), right var(--ease-base);
  border-radius: 1px;
}

.nav-link:hover::after,
.nav-link.active::after {
  left: var(--sp-3);
  right: var(--sp-3);
}

/* ── Card glow on hover (service, about) ── */
.service-card,
.about-card {
  transition:
    border-color var(--ease-base),
    box-shadow var(--ease-base),
    transform var(--ease-slow);
}

/* ── Stat bar entrance ── */
.stat-block.visible .stat-bar-fill {
  animation: bar-grow 1.2s cubic-bezier(0.4,0,0.2,1) 0.3s both;
}

/* ── Scroll-triggered section reveal ── */
.section-header {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.section-header.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Button shine effect ── */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::after {
  left: 150%;
}

/* ── Mega menu item hover ── */
.mega-item {
  position: relative;
  overflow: hidden;
}

.mega-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-brand);
  opacity: 0;
  transition: opacity var(--ease-fast);
  pointer-events: none;
  z-index: -1;
}

/* ── Terminal body line reveal ── */
.contact-terminal-wrap .terminal-body .t-line {
  opacity: 0;
}

.contact-terminal-wrap.visible .terminal-body .t-line {
  animation: line-reveal 0.3s ease forwards;
}

.contact-terminal-wrap.visible .terminal-body .t-line:nth-child(1)  { animation-delay: 0.1s; }
.contact-terminal-wrap.visible .terminal-body .t-line:nth-child(2)  { animation-delay: 0.35s; }
.contact-terminal-wrap.visible .terminal-body .t-line:nth-child(3)  { animation-delay: 0.6s; }
.contact-terminal-wrap.visible .terminal-body .t-line:nth-child(4)  { animation-delay: 0.85s; }
.contact-terminal-wrap.visible .terminal-body .t-line:nth-child(5)  { animation-delay: 1.1s; }
.contact-terminal-wrap.visible .terminal-body .t-line:nth-child(6)  { animation-delay: 1.35s; }
.contact-terminal-wrap.visible .terminal-body .t-line:nth-child(7)  { animation-delay: 1.6s; }
.contact-terminal-wrap.visible .terminal-body .t-line:nth-child(8)  { animation-delay: 1.85s; }
.contact-terminal-wrap.visible .terminal-body .t-line:nth-child(9)  { animation-delay: 2.1s; }

@keyframes line-reveal {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Footer links hover ── */
.footer-links a {
  position: relative;
  display: inline-block;
}

.footer-links a::before {
  content: '› ';
  opacity: 0;
  transition: opacity var(--ease-fast);
  color: var(--clr-cyan);
}

.footer-links a:hover::before {
  opacity: 1;
}
