/* ═══ KORSHOM MERGE — Animation Layer ═══ */

/* Cursor & Particles */
.cursor-glow {
  position: fixed;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--gold-rgb), 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.4s;
}

html:not([data-theme="dark"]) .cursor-glow {
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.1) 0%, transparent 70%);
}

body.loaded .cursor-glow,
body.fm-ready .cursor-glow {
  opacity: 1;
}

#particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* Scroll Progress */
.scroll-progress {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(to inline-end, var(--gold), var(--gold-light));
  z-index: 10001;
  transition: width 0.1s linear;
}

/* Marquee */
.marquee-section {
  background: var(--maroon-dark);
  padding: 18px 0;
  overflow: hidden;
  border-top: 1px solid rgba(var(--gold-rgb), 0.2);
  border-bottom: 1px solid rgba(var(--gold-rgb), 0.2);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 40s linear infinite;
  will-change: transform;
}

.marquee-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.marquee-segment {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
  line-height: 1;
}

.marquee-sep {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gold);
  font-size: 0.55rem;
  line-height: 1;
  padding-inline: 1rem;
}

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

[dir="rtl"] .marquee-track {
  animation-name: marquee-rtl;
}

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

/* Hero Enhanced */
.hero-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 2;
  padding:  40px 0 80px;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  color: rgba(255,255,255,0.9);
  font-size: 0.88rem;
  margin-bottom: 24px;
  animation: fadeUp 0.8s var(--ease) both;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
  50% { opacity: 0.5; box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}

.hero-title .line {
  display: block;
  overflow: hidden;
}

.hero-title .line > span {
  display: inline-block;
  animation: slideUp 0.85s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  transform: translateY(110%);
}

.hero-title .line:nth-child(1) > span { animation-delay: 0.15s; }
.hero-title .line:nth-child(2) > span { animation-delay: 0.35s; }
.hero-title .line:nth-child(3) > span { animation-delay: 0.55s; }

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

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

.typing-text::after {
  content: '|';
  -webkit-text-fill-color: var(--gold);
  animation: cursor-blink 0.8s step-end infinite;
  margin-inline-start: 2px;
}

@keyframes cursor-blink { 50% { opacity: 0; } }

.hero-desc {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
  line-height: 1.9;
  margin-bottom: 28px;
  max-width: 520px;
  animation: fadeUp 0.8s 0.65s var(--ease) both;
}

.hero-stats {
  display: flex;
  gap: 36px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  animation: fadeUp 0.8s 0.9s var(--ease) both;
}

.hero-stat .num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
}

.hero-stat .lbl {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.72);
  margin-top: 6px;
}

/* Hero Orbit Visual */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeUp 1s 0.4s var(--ease) both;
}

.hero-orbit {
  position: relative;
  width: 340px;
  height: 340px;
}

.orbit-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(var(--gold-rgb), 0.25);
  border-radius: 50%;
  animation: orbit-spin 20s linear infinite;
}

.orbit-ring:nth-child(2) {
  inset: 30px;
  animation-duration: 15s;
  animation-direction: reverse;
  border-color: rgba(255,255,255,0.15);
}

.orbit-ring:nth-child(3) {
  inset: 60px;
  animation-duration: 10s;
  border-color: rgba(var(--gold-rgb), 0.35);
}

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

.orbit-center {
  position: absolute;
  inset: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, var(--maroon), var(--maroon-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 60px rgba(var(--gold-rgb), 0.35);
  border: 3px solid var(--gold-light);
}

.orbit-center svg { width: 56px; height: 56px; }

.orbit-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--gold);
  border-radius: 50%;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 12px var(--gold);
}

.orbit-dot:nth-child(5) {
  top: auto;
  bottom: 20px;
  left: 20px;
  animation: orbit-pulse 2s infinite;
}

.orbit-dot:nth-child(6) {
  top: 40px;
  right: 10px;
  left: auto;
  animation: orbit-pulse 2s 0.5s infinite;
}

@keyframes orbit-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.hero-layout .hero-content {
  padding: 0;
  max-width: none;
  margin: 0;
}

.hero-layout .hero-title {
  animation: none;
  border-inline-start: none;
  padding-inline-start: 0;
  margin-bottom: 15px;
}

.hero-layout .hero-title .line--accent > span {
  animation: slideUp 0.85s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  transform: translateY(110%);
}

.hero-layout .hero-title .line--accent > span:nth-child(1) { animation-delay: 0.35s; }
.hero-layout .hero-title .line--accent > span:nth-child(2) { animation-delay: 0.45s; }
.hero-layout .hero-title .line--accent > span:nth-child(3) { animation-delay: 0.55s; }

.hero-layout .hero-actions {
  animation: fadeUp 0.8s 0.75s var(--ease) both;
}

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

.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

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

.btn-shine::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: translateX(-100%);
  transition: 0.6s;
}

.btn-shine:hover::after { transform: translateX(100%); }

/* Stagger reveal */
.stagger-children > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.12s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.19s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.26s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.33s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.4s; }

.stagger-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Tilt cards */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.15s ease, box-shadow 0.3s ease;
}

/* Reveal variants */
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

[dir="rtl"] .reveal-left {
  transform: translateX(40px);
}

[dir="rtl"] .reveal-right {
  transform: translateX(-40px);
}

.reveal-left.in, .reveal-right.in {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

/* Floating animation */
.float-y {
  animation: float-y 4s ease-in-out infinite;
}

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

.about-img-main { animation: float-y 5s ease-in-out infinite; }
.about-img-sub { animation: float-y 5s 1s ease-in-out infinite; }

/* Feature hover glow */
.feature-item {
  position: relative;
  overflow: hidden;
}

.feature-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) rgba(201,164,76,0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.feature-item:hover::after { opacity: 1; }

@media (max-width: 1024px) {
  .hero-layout { grid-template-columns: 1fr; }
  .hero-showcase { display: none; }
  .cursor-glow { display: none; }
}

@media (max-width: 768px) {
  .hero-stats { flex-wrap: wrap; gap: 24px; }
  .marquee-segment { font-size: 0.88rem; }
  .marquee-sep { padding-inline: 0.75rem; }
}
