/* ============================================================
   POETIC ADS — Premium Animations
   ============================================================ */

/* ── Custom Cursor ── */
.cursor-dot,
.cursor-ring {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}
.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--orange);
}
.cursor-ring {
  width: 34px;
  height: 34px;
  border: 1.5px solid rgba(255, 140, 0, 0.55);
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease, transform 0.08s linear;
}
.cursor-ring.hovered {
  width: 52px;
  height: 52px;
  border-color: var(--orange);
  background: rgba(255, 140, 0, 0.08);
}
@media (hover: none) { .cursor-dot, .cursor-ring { display: none; } }

/* ── Page Transition Overlay ── */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 8000;
  transform: scaleY(0);
  transform-origin: top;
  pointer-events: none;
}

/* ── Keyframe Library ── */

/* Float */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-14px); }
}

/* Slow drift for orbs */
@keyframes orbDrift {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(30px, -20px) scale(1.05); }
  66%  { transform: translate(-20px, 15px) scale(0.97); }
  100% { transform: translate(0, 0) scale(1); }
}

/* Gradient text shift */
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Shimmer sweep */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* Pulse glow */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0px rgba(255, 140, 0, 0); }
  50%       { box-shadow: 0 0 28px rgba(255, 140, 0, 0.45); }
}

/* Pulse glow (text) */
@keyframes pulseGlowText {
  0%, 100% { text-shadow: 0 0 0px rgba(255,140,0,0); }
  50%       { text-shadow: 0 0 24px rgba(255,140,0,0.7); }
}

/* Border rotate */
@keyframes borderRotate {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Ticker scroll */
@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Draw underline */
@keyframes drawLine {
  from { width: 0; }
  to   { width: 100%; }
}

/* Count up (triggered via JS) */
@keyframes countUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Fade in up */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Fade in left */
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Fade in right */
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Scale in */
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}

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

/* Spin slow (decorative rings) */
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Animated Gradient Orbs ── */
.orb { animation: orbDrift 18s ease-in-out infinite; }
.orb:nth-child(2) { animation-duration: 22s; animation-delay: -6s; }

/* ── Hero Glass Card — Floating ── */
.hero-glass {
  animation: float 7s ease-in-out infinite;
}

/* ── Gradient Animated Text ── */
.gradient-text {
  background: linear-gradient(270deg, var(--orange), #ff6b00, #ffb347, var(--orange));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 5s ease infinite;
}

/* ── Shimmer Button ── */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 200%; height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.18) 40%,
    rgba(255,255,255,0.30) 50%,
    rgba(255,255,255,0.18) 60%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer 3.5s ease-in-out infinite;
  pointer-events: none;
}

/* ── Nav Link Hover — Underline Draw ── */
.nav-links a::after {
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Card 3D Tilt (JS-driven via CSS vars) ── */
.glass[data-tilt] {
  transform: perspective(800px)
    rotateX(var(--tilt-x, 0deg))
    rotateY(var(--tilt-y, 0deg))
    translateZ(0);
  transition: transform 0.15s ease, box-shadow 0.3s ease;
  will-change: transform;
}

/* ── Reveal variants ── */
.reveal-left {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-right {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-left.visible,
.reveal-right.visible,
.reveal-scale.visible {
  opacity: 1;
  transform: none;
}

/* ── Hover Glow on all .glass cards ── */
.glass {
  transition: transform var(--transition),
              box-shadow var(--transition),
              border-color var(--transition);
}

/* ── Stat number pulse on enter ── */
.stat-num.counted {
  animation: pulseGlowText 1.2s ease forwards;
}

/* ── Process Step — connector line animate ── */
.process-step .step-line {
  transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Navbar — glass blur strengthens on scroll ── */
.navbar { transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease; }

/* ── Ticker / Marquee Band ── */
.ticker-wrap {
  overflow: hidden;
  padding: 1.2rem 0;
  background: rgba(255,140,0,0.07);
  border-top: 1px solid rgba(255,140,0,0.12);
  border-bottom: 1px solid rgba(255,140,0,0.12);
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 28s linear infinite;
  gap: 0;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-item {
  white-space: nowrap;
  padding: 0 3rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--orange);
  opacity: 0.7;
}
.ticker-item::after {
  content: '✦';
  margin-left: 3rem;
  opacity: 0.4;
}

/* ── Decorative Spinning Ring (hero background) ── */
.spin-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,140,0,0.08);
  pointer-events: none;
  animation: spinSlow linear infinite;
}
.spin-ring-1 {
  width: 520px; height: 520px;
  top: 50%; left: 50%;
  transform-origin: center;
  margin-left: -260px;
  margin-top: -260px;
  animation-duration: 35s;
}
.spin-ring-2 {
  width: 720px; height: 720px;
  top: 50%; left: 50%;
  margin-left: -360px;
  margin-top: -360px;
  animation-duration: 55s;
  animation-direction: reverse;
}

/* ── Portfolio card — orange accent line on hover ── */
.port-card::after,
.preview-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--orange), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border-radius: 0 0 var(--radius) var(--radius);
}
.port-card:hover::after,
.preview-card:hover::after { transform: scaleX(1); }

/* ── Form field — animated focus border ── */
.form-group input,
.form-group select,
.form-group textarea {
  transition: border-color 0.3s ease,
              box-shadow 0.3s ease,
              background 0.3s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  background: rgba(255,255,255,0.07);
}

/* ── FAQ smooth open ── */
.faq-item {
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.faq-item[open] {
  border-color: rgba(255,140,0,0.25);
  box-shadow: 0 0 24px rgba(255,140,0,0.12);
}
details summary { transition: color 0.25s ease; }

/* ── CTA band — pulse ring behind button ── */
.cta-inner .btn-primary {
  animation: pulseGlow 3s ease-in-out infinite;
}
.cta-inner .btn-primary:hover {
  animation: none;
}

/* ── Blog card — title color shift on hover ── */
.blog-card:hover .blog-title,
.preview-card:hover .card-title {
  color: var(--orange);
  transition: color 0.3s ease;
}

/* ── Service row — number glow on hover ── */
.service-row:hover .service-number {
  opacity: 0.55;
  transition: opacity 0.4s ease;
}

/* ── Why / Service tile — icon float ── */
.why-card:hover .why-icon,
.service-tile:hover .service-icon {
  display: inline-block;
  animation: float 2.5s ease-in-out infinite;
}

/* ── Scroll progress bar ── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: linear-gradient(to right, var(--orange), #ff6b00);
  z-index: 9000;
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px var(--orange-glow);
}

/* ── Smooth page load fade-in ── */
body {
  animation: fadeInUp 0.5s ease both;
}
