/* ============================================================
   animations.css — motion layer for Pinovio
   All animations use only opacity + transform (GPU composited)
   ============================================================ */

/* ── Keyframes ── */

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

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

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

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.92) translateY(-18px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes modalExit {
  from { opacity: 1; transform: scale(1) translateY(0); }
  to   { opacity: 0; transform: scale(0.94) translateY(-10px); }
}

@keyframes shimmer {
  from { left: -100%; }
  to   { left: 220%; }
}

@keyframes cardShimmer {
  from { left: -100%; }
  to   { left: 160%; }
}

@keyframes statPulse {
  0%   { color: var(--accent-strong, #60a5fa); }
  100% { color: var(--text, #f9fafb); }
}

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

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

/* ── Cursor spotlight ── */

.cursor-spotlight {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(
    350px circle at var(--cx, -9999px) var(--cy, -9999px),
    rgba(59, 130, 246, 0.04),
    transparent 40%
  );
}

/* ── Scroll progress bar ── */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #818cf8, var(--accent-strong));
  transform-origin: left center;
  transform: scaleX(0);
  z-index: 200;
  pointer-events: none;
}

/* ── Hero staggered entrance ── */

.hero-copy {
  animation: heroFadeUp 0.28s ease both;
}

.hero-copy > *:nth-child(1) {
  opacity: 0;
  animation: heroFadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 220ms both;
}
.hero-copy > *:nth-child(2) {
  opacity: 0;
  animation: heroFadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 330ms both;
}
.hero-copy > *:nth-child(3) {
  opacity: 0;
  animation: heroFadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 440ms both;
}
.hero-copy > *:nth-child(4) {
  opacity: 0;
  animation: heroFadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 550ms both;
}
.hero-copy > *:nth-child(5) {
  opacity: 0;
  animation: heroFadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 660ms both;
}

.hero-panel {
  animation: heroFadeUp 0.7s ease 180ms both;
}

/* ── Animated gradient hero h1 ── */

.hero-copy h1 {
  background: linear-gradient(
    135deg,
    #f9fafb 0%,
    #93c5fd 25%,
    #60a5fa 45%,
    #f9fafb 65%,
    #bfdbfe 85%,
    #f9fafb 100%
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 8s ease infinite;
  padding-bottom: 0.12em;
  display: block;
}

/* ── Eyebrow accent ── */

.eyebrow {
  position: relative;
  display: inline-block;
  padding-left: 18px;
}

.eyebrow::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-strong);
  box-shadow: 0 0 10px 3px rgba(96, 165, 250, 0.55);
  animation: eyebrowPulse 2.4s ease-in-out infinite;
}

/* ── Section heading accent line ── */

.section h2::after {
  content: '';
  display: block;
  width: 44px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  margin-top: 10px;
}

/* ── Nav link hover underline sweep ── */

.site-nav a {
  position: relative;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transform: scaleX(0);
  transition: transform 0.22s ease;
}

.site-nav a:hover::after,
.site-nav a[aria-current='page']::after {
  transform: scaleX(1);
}

/* ── Button enhancements ── */

.button-primary {
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.22s ease;
}

.button-primary::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 0%, rgba(96, 165, 250, 0.35), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.button-primary:hover::after {
  opacity: 1;
}

.button-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 55%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.18),
    transparent
  );
  transform: skewX(-18deg);
  pointer-events: none;
}

.button-primary:hover::before {
  animation: shimmer 0.55s ease;
}

.button-primary:hover {
  box-shadow: 0 20px 44px rgba(37, 99, 235, 0.38), 0 0 0 1px rgba(96, 165, 250, 0.3);
}

.button-secondary:hover {
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.18);
}

/* ── Card hover lift + spotlight border ── */

.card,
.tool-card,
.publication-card {
  position: relative;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

/* Spotlight border — glows where the cursor is */
.card::before,
.tool-card::before,
.publication-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: radial-gradient(
    180px circle at var(--mx, 50%) var(--my, 50%),
    rgba(96, 165, 250, 0.15),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
  z-index: 0;
}

.card:hover::before,
.tool-card:hover::before,
.publication-card:hover::before {
  opacity: 1;
}

/* Keep card content above the spotlight pseudo-element */
.card > *,
.tool-card > *,
.publication-card > * {
  position: relative;
  z-index: 1;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 68px rgba(3, 7, 18, 0.44), 0 0 0 1px rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.15);
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, 0.15);
  box-shadow: 0 28px 68px rgba(3, 7, 18, 0.44), 0 0 16px rgba(59, 130, 246, 0.05);
}

.publication-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 68px rgba(3, 7, 18, 0.44), 0 0 0 1px rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.15);
}

/* Shimmer sweep on card hover */
.card::after,
.tool-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 55%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.045),
    transparent
  );
  transform: skewX(-15deg);
  pointer-events: none;
  z-index: 2;
}

.card:hover::after,
.tool-card:hover::after {
  animation: cardShimmer 0.65s ease;
}

/* card needs overflow hidden to clip the shimmer */
.card,
.tool-card {
  overflow: hidden;
}

/* ── Update item hover ── */

.update-item {
  position: relative;
  padding-right: 28px;
  transition: padding-left 0.2s ease;
}

.update-item::after {
  content: '→';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  opacity: 0;
  color: var(--accent-strong);
  font-size: 0.95rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.update-item:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.update-item .update-title {
  transition: color 0.2s ease;
}

.update-item:hover .update-title {
  color: var(--accent-strong);
}

/* ── Tag hover ── */

.tag {
  transition: background 0.2s ease, border-color 0.2s ease;
}

.tag:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(96, 165, 250, 0.4);
}

/* ── Stat count-up color pulse ── */

.stat-number.counting {
  animation: statPulse 0.9s ease forwards;
}

/* ── Modal entrance / exit ── */

.email-modal {
  transition: background-color 0.3s ease;
}

.email-modal.show .modal-card {
  animation: modalEnter 0.38s cubic-bezier(0.34, 1.46, 0.64, 1) both;
}

.email-modal.modal-closing .modal-card {
  animation: modalExit 0.22s ease-in both;
}

/* ── Input focus glow ── */

#modal-email {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#modal-email:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

/* ── Mobile ── */

@media (max-width: 760px) {
  .aurora-blob {
    filter: blur(70px);
    opacity: 0.10;
  }

  .eyebrow::before {
    display: none;
  }
}

/* ── Published articles grid ── */

.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 8px;
}

.article-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.article-num {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.7;
}

.article-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.article-card h3 a {
  color: var(--text);
  transition: color 0.2s ease;
}

.article-card h3 a:hover {
  color: var(--accent-strong);
}

.article-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  flex: 1;
}

@media (max-width: 760px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Scroll reveal ── */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal[data-reveal-delay="1"] { transition-delay: 60ms; }
.reveal[data-reveal-delay="2"] { transition-delay: 120ms; }
.reveal[data-reveal-delay="3"] { transition-delay: 180ms; }
.reveal[data-reveal-delay="4"] { transition-delay: 240ms; }

/* ── Featured pricing card ── */

.decision-card-featured {
  border-color: rgba(96, 165, 250, 0.4);
  background:
    radial-gradient(420px 200px at 50% -10%, rgba(96, 165, 250, 0.18), transparent 70%),
    linear-gradient(180deg, rgba(20, 27, 45, 0.98) 0%, rgba(16, 24, 42, 0.98) 100%);
  box-shadow: 0 28px 68px rgba(3, 7, 18, 0.42), 0 0 0 1px rgba(96, 165, 250, 0.18);
}

.decision-card-featured::before {
  background: radial-gradient(
    220px circle at var(--mx, 50%) var(--my, 50%),
    rgba(96, 165, 250, 0.22),
    transparent 60%
  ) !important;
}

.decision-card-featured .eyebrow {
  color: #bfdbfe;
}

.decision-card-featured:hover {
  border-color: rgba(147, 197, 253, 0.55);
  box-shadow: 0 32px 80px rgba(3, 7, 18, 0.5),
              0 0 0 1px rgba(147, 197, 253, 0.32),
              0 0 36px rgba(59, 130, 246, 0.18);
}

/* ── Section heading subtle accent glow ── */

.section h2 {
  position: relative;
}

.section h2::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 0;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  box-shadow: 0 0 14px rgba(96, 165, 250, 0.55);
  transition: height 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
}

.section h2.is-visible::before,
.reveal.is-visible.section-h2::before {
  height: 1.1em;
}

/* Suppress the left accent bar on centered headings */
[style*="text-align:center"] h2::before,
[style*="text-align: center"] h2::before {
  display: none;
}

/* ── Stat number subtle hover lift ── */

.stat-item {
  transition: transform 0.25s ease;
}

.stat-item:hover {
  transform: translateY(-2px);
}

.stat-item:hover .stat-number {
  color: var(--accent-strong);
  text-shadow: 0 0 18px rgba(96, 165, 250, 0.35);
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

/* ── Reduced motion: disable everything ── */

@media (prefers-reduced-motion: reduce) {
  .hero-copy,
  .hero-copy > *,
  .hero-panel,
  .reveal {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .section h2::before {
    display: none;
  }

  /* Restore visible text when gradient animation is disabled */
  .hero-copy h1 {
    background: none !important;
    -webkit-text-fill-color: var(--text) !important;
    animation: none !important;
  }

  .eyebrow::before {
    animation: none;
  }

  .button-primary:hover,
  .button-secondary:hover,
  .card:hover,
  .tool-card:hover,
  .publication-card:hover {
    transform: none;
  }

  .button-primary::before,
  .button-primary::after {
    display: none;
  }

  .card::after,
  .tool-card::after {
    display: none;
  }

  .scroll-progress {
    display: none;
  }
}
