/* =============================================
   OSES IT — Animations CSS
   Scroll Reveal, Micro-interactions, Page FX
   ============================================= */

/* ─── Scroll Reveal Base States ─── */
.reveal-up       { opacity: 0; transform: translateY(40px); }
.reveal-down     { opacity: 0; transform: translateY(-40px); }
.reveal-left     { opacity: 0; transform: translateX(-40px); }
.reveal-right    { opacity: 0; transform: translateX(40px); }
.reveal-scale    { opacity: 0; transform: scale(0.92); }
.reveal-fade     { opacity: 0; }

.reveal-up.in,
.reveal-down.in,
.reveal-left.in,
.reveal-right.in,
.reveal-scale.in,
.reveal-fade.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.75s cubic-bezier(0.25, 0.1, 0.25, 1),
              transform 0.75s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* ─── Stagger Delays ─── */
.stagger-1  { transition-delay: 0.05s !important; }
.stagger-2  { transition-delay: 0.12s !important; }
.stagger-3  { transition-delay: 0.19s !important; }
.stagger-4  { transition-delay: 0.26s !important; }
.stagger-5  { transition-delay: 0.33s !important; }
.stagger-6  { transition-delay: 0.40s !important; }

/* ─── Hero Entrance Animations ─── */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes heroFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-60px); }
  to   { opacity: 1; transform: translateX(0); }
}

.hero-tagline   { animation: heroFadeUp 0.8s ease 0.1s both; }
.hero-title     { animation: heroFadeUp 0.8s ease 0.25s both; }
.hero-subtitle  { animation: heroFadeUp 0.8s ease 0.4s both; }
.hero-actions   { animation: heroFadeUp 0.8s ease 0.55s both; }
.hero-scroll    { animation: heroFadeIn 1s ease 0.8s both; }

/* ─── Floating Elements ─── */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33%       { transform: translateY(-18px) rotate(2deg); }
  66%       { transform: translateY(-10px) rotate(-1deg); }
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-24px); }
}

@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Decorative geometric shapes */
.geo-shape {
  position: absolute;
  pointer-events: none;
  opacity: 0.06;
  z-index: 0;
}

.geo-shape--circle {
  border-radius: 50%;
  border: 1px solid var(--orange);
}

.geo-shape--ring {
  border-radius: 50%;
  border: 1.5px solid rgba(255, 107, 43, 0.4);
  animation: rotateSlow 20s linear infinite;
}

.geo-shape--dot-grid {
  background-image: radial-gradient(circle, rgba(255,107,43,0.4) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ─── Stat Counter Animation ─── */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.stat-number.counting {
  animation: countUp 0.4s ease;
}

/* ─── Card Hover Glow ─── */
.card-glow {
  position: relative;
}

.card-glow::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: var(--gradient-cta);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
  filter: blur(12px);
}

.card-glow:hover::after {
  opacity: 0.2;
}

/* ─── Process Step Connector Animation ─── */
@keyframes lineGrow {
  from { transform: scaleX(0); transform-origin: left; }
  to   { transform: scaleX(1); transform-origin: left; }
}

.process-connector {
  height: 2px;
  background: linear-gradient(to right, var(--orange), var(--orange-glow));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.process-connector.in {
  transform: scaleX(1);
}

/* ─── Navbar Link Underline ─── */
@keyframes navUnderline {
  from { width: 0; }
  to   { width: 100%; }
}

/* ─── Button Ripple ─── */
@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.btn-ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  background: rgba(255,255,255,0.2);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

/* ─── Loading Spinner ─── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

/* ─── Page Transition ─── */
@keyframes pageIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

main {
  animation: pageIn 0.5s ease both;
}

/* ─── Typing Cursor ─── */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--orange);
  vertical-align: middle;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

/* ─── Number Ticker ─── */
.ticker-wrap {
  overflow: hidden;
  display: inline-block;
  vertical-align: bottom;
}

/* ─── Gradient Border Animation ─── */
@keyframes borderRotate {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.animated-border {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(270deg, #FF6B2B, #0D1B4B, #FF6B2B);
  background-size: 300% 300%;
  animation: borderRotate 4s ease infinite;
}

.animated-border-inner {
  background: var(--navy-card);
  border-radius: calc(var(--radius-lg) - 1px);
  padding: 2.5rem;
}

/* ─── Skill / Progress Bar ─── */
@keyframes progressFill {
  from { width: 0; }
}

.progress-bar-track {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-bar-fill {
  height: 100%;
  background: var(--gradient-cta);
  border-radius: 4px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Orange Pulse Ring ─── */
@keyframes pulseRing {
  0% {
    transform: scale(0.85);
    box-shadow: 0 0 0 0 rgba(255, 107, 43, 0.5);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 12px rgba(255, 107, 43, 0);
  }
  100% {
    transform: scale(0.85);
    box-shadow: 0 0 0 0 rgba(255, 107, 43, 0);
  }
}

.pulse-ring {
  animation: pulseRing 2s infinite;
}

/* ─── Slide In from Bottom (for mobile nav) ─── */
@keyframes slideInUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.nav-mobile.open {
  animation: slideInUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Orbit Animation for Hero Graphic ─── */
@keyframes orbit {
  from { transform: rotate(0deg) translateX(120px) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(120px) rotate(-360deg); }
}

@keyframes orbit2 {
  from { transform: rotate(180deg) translateX(80px) rotate(-180deg); }
  to   { transform: rotate(540deg) translateX(80px) rotate(-540deg); }
}
