/* ============================================
   ACCTI Animations
   ============================================ */

/* --- Keyframes --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

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

@keyframes floatSlow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(2deg); }
}

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

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(10, 110, 110, 0.3); }
  50% { box-shadow: 0 0 0 20px rgba(10, 110, 110, 0); }
}

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

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

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

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

@keyframes typewriter {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  0%, 50% { border-color: var(--primary); }
  51%, 100% { border-color: transparent; }
}

@keyframes morphBlob {
  0%, 100% { border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%; }
  25% { border-radius: 58% 42% 30% 70% / 55% 30% 70% 45%; }
  50% { border-radius: 30% 70% 55% 45% / 70% 58% 42% 58%; }
  75% { border-radius: 70% 30% 45% 55% / 42% 70% 30% 58%; }
}

@keyframes ripple {
  0% { transform: scale(0); opacity: 0.5; }
  100% { transform: scale(4); opacity: 0; }
}

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

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- Scroll-triggered animation classes --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays for children */
.stagger > *:nth-child(1) { transition-delay: 0.05s; }
.stagger > *:nth-child(2) { transition-delay: 0.12s; }
.stagger > *:nth-child(3) { transition-delay: 0.19s; }
.stagger > *:nth-child(4) { transition-delay: 0.26s; }
.stagger > *:nth-child(5) { transition-delay: 0.33s; }
.stagger > *:nth-child(6) { transition-delay: 0.4s; }
.stagger > *:nth-child(7) { transition-delay: 0.47s; }
.stagger > *:nth-child(8) { transition-delay: 0.54s; }

/* --- Particle canvas --- */
#particle-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* --- Hero section specific --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  padding-top: 160px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0A2E2E 0%, #0A4E4E 30%, #0A6E6E 60%, #0E8A8A 100%);
  background-size: 300% 300%;
  animation: gradientShift 12s ease infinite;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(212, 168, 67, 0.12) 0%, transparent 70%);
  animation: floatSlow 8s ease-in-out infinite;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(232, 131, 107, 0.1) 0%, transparent 70%);
  animation: floatSlow 10s ease-in-out infinite reverse;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: transparent;
  border-radius: var(--radius-full);
  color: var(--secondary-light);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 28px;
  animation: fadeInDown 0.8s ease-out;
}

.hero-badge-dot {
  width: 7px;
  height: 7px;
  background: var(--secondary);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 24px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 560px;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.hero-visual {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 45%;
  max-width: 600px;
  z-index: 1;
}

.hero-blob {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, rgba(212, 168, 67, 0.2), rgba(232, 131, 107, 0.15));
  animation: morphBlob 12s ease-in-out infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-blob img {
  width: 80%;
  height: 80%;
  object-fit: cover;
  border-radius: 50%;
}

/* Floating elements around hero */
.hero-float {
  position: absolute;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.06);
  border: 0;
  padding: 10px 14px;
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  z-index: 3;
}

.hero-float-1 {
  top: 25%;
  right: 8%;
  animation: float 4s ease-in-out infinite;
}

.hero-float-2 {
  bottom: 25%;
  right: 15%;
  animation: float 5s ease-in-out infinite 1s;
}

.hero-float-3 {
  bottom: 35%;
  right: 5%;
  animation: float 6s ease-in-out infinite 2s;
}

/* --- Decorative shapes --- */
.shape-circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.shape-dots {
  position: absolute;
  width: 120px;
  height: 120px;
  background-image: radial-gradient(circle, var(--primary-glow) 1.5px, transparent 1.5px);
  background-size: 16px 16px;
  pointer-events: none;
  opacity: 0.5;
}

/* --- Section backgrounds --- */
.section-dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

.section-dark h2,
.section-dark h3,
.section-dark h4 { color: var(--white); }
.section-dark p { color: var(--text-on-dark-secondary); }
.section-dark .section-label { color: var(--secondary); }

.section-warm { background: var(--bg-warm); }

.section-gradient {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--white);
}

.section-gradient h2,
.section-gradient h3 { color: var(--white); }
.section-gradient p { color: rgba(255,255,255,0.8); }

/* --- Ripple button effect --- */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple .ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  width: 20px;
  height: 20px;
  animation: ripple 0.6s ease-out forwards;
  pointer-events: none;
}

/* --- Scroll indicator --- */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 3;
  animation: fadeIn 1s ease-out 1.5s both;
}

.scroll-mouse {
  width: 26px;
  height: 40px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 13px;
  position: relative;
}

.scroll-mouse::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  background: var(--white);
  border-radius: 2px;
  animation: slideUp 1.5s ease-in-out infinite;
}

.scroll-text {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.4);
  font-family: var(--font-heading);
  font-weight: 600;
}

@media (max-width: 1024px) {
  .hero-visual { display: none; }
  .hero-float { display: none; }
  .hero-content { max-width: 100%; }
}

@media (max-width: 768px) {
  .hero { min-height: 90vh; padding-top: 140px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .scroll-indicator { display: none; }
}
