/* Fonts loaded via <link> in head.ejs for performance */

/* === shadcn/ui CSS Variables === */
:root {
    --background: 210 40% 98%;
    --foreground: 217 33% 17%;
    --card: 0 0% 100%;
    --card-foreground: 217 33% 17%;
    --popover: 0 0% 100%;
    --popover-foreground: 217 33% 17%;
    --primary: 221 83% 58%;
    --primary-foreground: 210 40% 98%;
    --secondary: 217 91% 60%;
    --secondary-foreground: 210 40% 98%;
    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 217 91% 70%;
    --accent-foreground: 0 0% 100%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 221 83% 58%;
    --radius: 0.5rem;
}

/* === Base Reset === */
*, *::before, *::after {
    border-color: hsl(var(--border));
}

html { scroll-behavior: smooth; }

body {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
}

/* === Scrollbar === */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* === Animations === */
@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fade-in 0.8s ease-out forwards;
}

.animate-fade-in-up {
    animation: fade-in-up 0.8s ease-out forwards;
    opacity: 0;
}

/* Grid background */
.bg-grid-white\/\[0\.03\],
.bg-grid-white\/\[0\.025\],
.bg-grid-white\/\[0\.02\] {
    background-image:
        linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* Header dropdown item animation */
.dropdown-item {
    animation: item-in 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--i) * 50ms + 30ms);
}

@keyframes item-in {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Mobile menu transitions */
.mobile-menu-enter { max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.25s ease, opacity 0.2s ease; }
.mobile-menu-active { max-height: 600px; opacity: 1; }

/* Integrations strip */
.logo-tile { position: relative; }
.logo-tile::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.logo-tile:hover::after { opacity: 1; }

@keyframes scan {
    0% { transform: translateX(-100%) }
    100% { transform: translateX(calc(100vw + 100%)) }
}
.scan-shimmer { animation: scan 6s linear infinite; }

/* Flow Showcase */
@keyframes step-progress {
    from { width: 0%; }
    to { width: 100%; }
}
.step-progress { animation: step-progress 6s linear forwards; }

.product-card {
    opacity: 0;
    animation: slide-in-right 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes slide-in-right {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.shimmer { position: relative; overflow: hidden; }
.shimmer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
    animation: shimmer 2s infinite;
}
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.import-pulse { animation: import-pulse 1.5s ease-in-out infinite; }
@keyframes import-pulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.15); opacity: 1; }
}

.typing-dot { animation: typing-bounce 1s ease-in-out infinite; }
@keyframes typing-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}

.typewriter-line {
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    animation: typewriter 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes typewriter {
    from { opacity: 0; transform: scaleX(0); }
    to { opacity: 1; transform: scaleX(1); }
}

.platform-badge {
    opacity: 0;
    animation: badge-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes badge-pop {
    from { opacity: 0; transform: scale(0.7); }
    to { opacity: 1; transform: scale(1); }
}

.publish-card {
    opacity: 0;
    animation: slide-in-left 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes slide-in-left {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.publish-status {
    opacity: 0;
    animation: status-appear 0.3s ease forwards;
}
@keyframes status-appear {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.stat-card {
    opacity: 0;
    animation: stat-pop 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes stat-pop {
    from { opacity: 0; transform: translateY(10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.chart-bar {
    opacity: 0;
    animation: chart-grow 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes chart-grow {
    from { opacity: 0; height: 0% !important; }
    to { opacity: 1; }
}

.bullet-item {
    opacity: 0;
    animation: bullet-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes bullet-in {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Features Section */
@keyframes progress {
    from { width: 0%; }
    to { width: 100%; }
}
.progress-bar { animation: progress 4s linear forwards; }

/* Integration Flow */
.flow-card {
    opacity: 0;
    animation: card-enter 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes card-enter {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.flow-card-inner {
    display: flex;
    align-items: center;
    border-radius: 1rem;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--card));
    backdrop-filter: blur(12px);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.flow-card-inner:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.hub-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 200px;
}

.hub-card {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 140px;
    border-radius: 1.75rem;
    background: white;
    border: 1px solid rgba(59,130,246,0.15);
    box-shadow: 0 0 60px rgba(59,130,246,0.1), 0 8px 32px rgba(0,0,0,0.06);
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid rgba(59,130,246,0.15);
    width: 150px;
    height: 150px;
}
.pulse-ring-1 { animation: pulse-expand 3s ease-out infinite; }
.pulse-ring-2 { animation: pulse-expand 3s ease-out infinite 1s; }
.pulse-ring-3 { animation: pulse-expand 3s ease-out infinite 2s; }

@keyframes pulse-expand {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(2.2); opacity: 0; }
}

.flow-path {
    stroke-dasharray: 6 4;
    animation: dash-flow 1.5s linear infinite;
}
@keyframes dash-flow {
    to { stroke-dashoffset: -20; }
}

/* Social icon color filters */
.icon-telegram { filter: brightness(0) saturate(100%) invert(68%) sepia(52%) saturate(1000%) hue-rotate(170deg) brightness(1.05); }
.icon-whatsapp { filter: brightness(0) saturate(100%) invert(75%) sepia(30%) saturate(800%) hue-rotate(100deg) brightness(1.05); }
.icon-facebook { filter: brightness(0) saturate(100%) invert(55%) sepia(60%) saturate(700%) hue-rotate(200deg) brightness(1.1); }
.icon-instagram { filter: brightness(0) saturate(100%) invert(55%) sepia(70%) saturate(600%) hue-rotate(290deg) brightness(1.1); }
.icon-pinterest { filter: brightness(0) saturate(100%) invert(35%) sepia(90%) saturate(2000%) hue-rotate(340deg) brightness(1.05); }

/* Pricing toggle pill */
.billing-toggle { position: relative; }
.billing-toggle-pill {
    position: absolute;
    border-radius: 0.75rem;
    background: hsl(var(--foreground));
    transition: all 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Comparison table expand */
.comparison-table { max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.4s ease, opacity 0.3s ease; }
.comparison-table.expanded { max-height: 1200px; opacity: 1; }

/* RTL support */
[dir="rtl"] .dropdown-item {
    animation-name: item-in-rtl;
}
@keyframes item-in-rtl {
    from { opacity: 0; transform: translateX(12px); }
    to { opacity: 1; transform: translateX(0); }
}

[dir="rtl"] .typewriter-line {
    transform-origin: right;
}

[dir="rtl"] .bullet-item {
    animation-name: bullet-in-rtl;
}
@keyframes bullet-in-rtl {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Chrome Extension Page */
.ext-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.ext-reveal.ext-visible {
    opacity: 1;
    transform: translateY(0);
}

.ext-feature-card {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.ext-feature-card.ext-visible {
    opacity: 1;
    transform: translateY(0);
}
.ext-feature-card:nth-child(1) { transition-delay: 0s; }
.ext-feature-card:nth-child(2) { transition-delay: 0.1s; }
.ext-feature-card:nth-child(3) { transition-delay: 0.2s; }
.ext-feature-card:nth-child(4) { transition-delay: 0.3s; }

.ext-step {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.ext-step.ext-visible {
    opacity: 1;
    transform: translateY(0);
}
.ext-step:nth-child(1) { transition-delay: 0s; }
.ext-step:nth-child(2) { transition-delay: 0.15s; }
.ext-step:nth-child(3) { transition-delay: 0.3s; }
.ext-step:nth-child(4) { transition-delay: 0.45s; }

.ext-popup {
    animation: ext-popup-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.8s both;
}
@keyframes ext-popup-in {
    from { opacity: 0; transform: translateY(-8px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.ext-icon-pulse {
    animation: ext-icon-glow 2s ease-in-out infinite;
}
@keyframes ext-icon-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
    50% { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .product-card, .publish-card, .stat-card, .chart-bar, .bullet-item,
    .typewriter-line, .platform-badge, .publish-status, .flow-card, .dropdown-item {
        animation-duration: 0.01ms !important;
    }
    .shimmer::after, .import-pulse, .typing-dot, .step-progress, .progress-bar,
    .pulse-ring, .flow-path, .scan-shimmer, .ext-icon-pulse, .ext-popup {
        animation: none;
    }
    .ext-reveal, .ext-feature-card, .ext-step {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* AliExpress Affiliate Tool Page */
.ali-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.ali-reveal.ali-visible {
    opacity: 1;
    transform: translateY(0);
}

.ali-feature-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.ali-feature-card.ali-visible {
    opacity: 1;
    transform: translateY(0);
}
.ali-feature-card:nth-child(1) { transition-delay: 0s; }
.ali-feature-card:nth-child(2) { transition-delay: 0.06s; }
.ali-feature-card:nth-child(3) { transition-delay: 0.12s; }
.ali-feature-card:nth-child(4) { transition-delay: 0.18s; }
.ali-feature-card:nth-child(5) { transition-delay: 0.24s; }
.ali-feature-card:nth-child(6) { transition-delay: 0.30s; }

.ali-step {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.ali-step.ali-visible {
    opacity: 1;
    transform: translateY(0);
}
.ali-step:nth-child(1) { transition-delay: 0s; }
.ali-step:nth-child(2) { transition-delay: 0.15s; }
.ali-step:nth-child(3) { transition-delay: 0.3s; }
.ali-step:nth-child(4) { transition-delay: 0.45s; }

@keyframes ali-orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(15px, -20px) scale(1.05); }
    66% { transform: translate(-10px, 10px) scale(0.97); }
}
.ali-orb-float {
    animation: ali-orb-float 8s ease-in-out infinite;
}
.ali-orb-float-delay {
    animation: ali-orb-float 10s ease-in-out infinite 2s;
}

@keyframes ali-hub-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.2); }
    50% { box-shadow: 0 0 0 20px rgba(37, 99, 235, 0); }
}
.ali-hub-pulse {
    animation: ali-hub-pulse 2.5s ease-in-out infinite;
}

@keyframes ali-dot-flow {
    0% { stroke-dashoffset: 20; }
    100% { stroke-dashoffset: 0; }
}
.ali-dot-flow {
    stroke-dasharray: 4 6;
    animation: ali-dot-flow 1.5s linear infinite;
}

/* Hero animated flow steps */
.ali-hero-step {
    opacity: 0;
    transform: translateY(12px);
    animation: ali-hero-step-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: var(--step-delay, 0s);
}
@keyframes ali-hero-step-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.ali-hero-check {
    opacity: 0;
    transform: scale(0.5);
    animation: ali-hero-check-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: var(--check-delay, 0.6s);
}
@keyframes ali-hero-check-in {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

.ali-hero-card {
    opacity: 0;
    transform: translateY(8px) scale(0.95);
    animation: ali-hero-card-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: var(--card-delay, 0.9s);
}
@keyframes ali-hero-card-in {
    from { opacity: 0; transform: translateY(8px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.ali-hero-typing {
    animation: ali-typing-blink 1.2s ease-in-out infinite 1s;
}
@keyframes ali-typing-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.ali-connector-line {
    transform: scaleY(0);
    transform-origin: top;
    animation: ali-connector-grow 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: inherit;
}
@keyframes ali-connector-grow {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

@keyframes ali-connector-pulse-anim {
    0% { transform: translateY(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(100%); opacity: 0; }
}
.ali-connector-pulse {
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.3), transparent);
    animation: ali-connector-pulse-anim 1.5s ease-in-out infinite 1.5s;
}

/* Reduced motion for AliExpress page */
@media (prefers-reduced-motion: reduce) {
    .ali-reveal, .ali-feature-card, .ali-step {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .ali-orb-float, .ali-orb-float-delay, .ali-hub-pulse {
        animation: none;
    }
    .ali-dot-flow {
        animation: none;
    }
    .ali-hero-step, .ali-hero-check, .ali-hero-card, .ali-connector-line {
        opacity: 1;
        transform: none;
        animation: none;
    }
    .ali-hero-typing, .ali-connector-pulse {
        animation: none;
    }
}

/* Headline font — all h1, h2, h3 */
h1, h2, h3, .amz-hero-headline {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] .amz-hero-headline {
    font-family: 'Heebo', system-ui, sans-serif;
}
.amz-accent-text {
    background: linear-gradient(90deg, #60a5fa, #93c5fd, #bfdbfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.ali-accent-text {
    background: linear-gradient(90deg, #fb923c, #fbbf24, #fde68a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Amazon × Afflow partnership badge */
.amz-partner-badge {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.amz-partner-badge:hover {
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.1);
}

.amz-badge-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.08), transparent);
    animation: amz-shimmer 3s ease-in-out infinite 1s;
    z-index: 1;
}
@keyframes amz-shimmer {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

.amz-badge-logo-left {
    animation: amz-logo-slide-left 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateX(-8px);
}
@keyframes amz-logo-slide-left {
    from { opacity: 0; transform: translateX(-8px); }
    to { opacity: 0.9; transform: translateX(0); }
}

.amz-badge-x {
    animation: amz-x-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 0.3s;
    opacity: 0;
    transform: scale(0.5);
}
@keyframes amz-x-pop {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

.amz-badge-logo-right {
    animation: amz-logo-slide-right 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.15s;
    opacity: 0;
    transform: translateX(8px);
}
@keyframes amz-logo-slide-right {
    from { opacity: 0; transform: translateX(8px); }
    to { opacity: 0.9; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
    .amz-badge-shimmer { animation: none; }
    .amz-badge-logo-left, .amz-badge-x, .amz-badge-logo-right {
        opacity: 0.9;
        transform: none;
        animation: none;
    }
}

/* Amazon × Afflow collaboration hero visual */
.amz-collab-visual {
    min-height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.amz-orbit-container {
    position: relative;
    width: 380px;
    height: 380px;
    overflow: visible;
}

@media (min-width: 768px) {
    .amz-orbit-container {
        width: 480px;
        height: 480px;
    }
    .amz-collab-visual {
        min-height: 500px;
    }
}

/* Orbital rings */
.amz-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(148, 163, 184, 0.08);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.amz-ring-1 {
    width: 65%;
    height: 65%;
    border-color: rgba(245, 158, 11, 0.12);
}
.amz-ring-2 {
    width: 85%;
    height: 85%;
    border-style: dashed;
    border-color: rgba(59, 130, 246, 0.08);
    animation: amz-ring-rotate 60s linear infinite;
}
.amz-ring-3 {
    width: 100%;
    height: 100%;
    border-color: rgba(148, 163, 184, 0.06);
}
@keyframes amz-ring-rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Center hub — two connected cards */
.amz-hub {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.amz-hub-glow {
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.12) 0%, rgba(59, 130, 246, 0.08) 40%, transparent 70%);
    animation: amz-hub-breathe 4s ease-in-out infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
@keyframes amz-hub-breathe {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}
.amz-hub-cards {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    position: relative;
    z-index: 2;
    animation: amz-hub-entrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: scale(0.8);
}
@keyframes amz-hub-entrance {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}
.amz-hub-card {
    padding: 20px 36px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 18px;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.amz-hub-card-amazon {
    border-color: rgba(245, 158, 11, 0.2);
}
.amz-hub-card-amazon:hover {
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 8px 32px rgba(245, 158, 11, 0.1);
}
.amz-hub-card-afflow {
    border-color: rgba(59, 130, 246, 0.2);
}
.amz-hub-card-afflow:hover {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.1);
}
.amz-card-logo {
    height: 40px;
    width: auto;
}
/* Connector between cards */
.amz-hub-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin: -2px 0;
    z-index: 3;
}
.amz-hub-connector-line {
    width: 2px;
    height: 12px;
    border-left: 2px dashed rgba(148, 163, 184, 0.2);
}
.amz-hub-connector-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.9);
    color: white;
    font-size: 16px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
    animation: amz-connector-pulse-glow 2.5s ease-in-out infinite;
}
@keyframes amz-connector-pulse-glow {
    0%, 100% { box-shadow: 0 0 12px rgba(245, 158, 11, 0.3); }
    50% { box-shadow: 0 0 24px rgba(245, 158, 11, 0.5); }
}
.amz-hub-label {
    margin-top: 10px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.6);
    position: relative;
    z-index: 2;
    animation: amz-hub-entrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.4s;
    opacity: 0;
}

/* Orbiting channel nodes */
.amz-orbit-node {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    animation: amz-orbit 16s linear infinite;
    animation-delay: var(--orbit-delay, 0s);
}
@keyframes amz-orbit {
    from { transform: rotate(0deg) translateX(var(--orbit-radius, 150px)) rotate(0deg); }
    to { transform: rotate(360deg) translateX(var(--orbit-radius, 150px)) rotate(-360deg); }
}
.amz-node-telegram { --orbit-radius: 160px; }
.amz-node-whatsapp { --orbit-radius: 160px; }
.amz-node-facebook { --orbit-radius: 160px; }
.amz-node-instagram { --orbit-radius: 160px; }
.amz-node-pinterest { --orbit-radius: 160px; }

@media (min-width: 768px) {
    .amz-node-telegram { --orbit-radius: 210px; }
    .amz-node-whatsapp { --orbit-radius: 210px; }
    .amz-node-facebook { --orbit-radius: 210px; }
    .amz-node-instagram { --orbit-radius: 210px; }
    .amz-node-pinterest { --orbit-radius: 210px; }
}

.amz-node-card {
    position: absolute;
    top: -24px;
    left: -24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.amz-node-card:hover {
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 4px 24px rgba(245, 158, 11, 0.1);
}

/* Flowing data particles */
.amz-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    pointer-events: none;
}
.amz-particle-1 {
    background: rgba(245, 158, 11, 0.6);
    animation: amz-particle-orbit 8s linear infinite;
    --p-radius: 90px;
    --p-delay: 0s;
    animation-delay: var(--p-delay);
}
.amz-particle-2 {
    background: rgba(59, 130, 246, 0.5);
    animation: amz-particle-orbit 10s linear infinite;
    --p-radius: 110px;
    --p-delay: -2s;
    animation-delay: var(--p-delay);
}
.amz-particle-3 {
    background: rgba(245, 158, 11, 0.4);
    animation: amz-particle-orbit 12s linear infinite reverse;
    --p-radius: 140px;
    --p-delay: -4s;
    animation-delay: var(--p-delay);
    width: 3px;
    height: 3px;
}
.amz-particle-4 {
    background: rgba(59, 130, 246, 0.4);
    animation: amz-particle-orbit 9s linear infinite;
    --p-radius: 100px;
    --p-delay: -3s;
    animation-delay: var(--p-delay);
    width: 3px;
    height: 3px;
}
.amz-particle-5 {
    background: rgba(16, 185, 129, 0.4);
    animation: amz-particle-orbit 11s linear infinite reverse;
    --p-radius: 120px;
    --p-delay: -5s;
    animation-delay: var(--p-delay);
    width: 2px;
    height: 2px;
}
.amz-particle-6 {
    background: rgba(245, 158, 11, 0.3);
    animation: amz-particle-orbit 14s linear infinite;
    --p-radius: 155px;
    --p-delay: -1s;
    animation-delay: var(--p-delay);
    width: 2px;
    height: 2px;
}
@keyframes amz-particle-orbit {
    from { transform: rotate(0deg) translateX(var(--p-radius)) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    to { transform: rotate(360deg) translateX(var(--p-radius)) rotate(-360deg); opacity: 0; }
}

/* Hero screenshot float animation */
.hero-screenshot-float {
    animation: hero-screenshot-float 6s ease-in-out infinite;
}
@keyframes hero-screenshot-float {
    0%, 100% { transform: translateY(0) rotate(1deg); }
    50% { transform: translateY(-10px) rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) {
    .hero-screenshot-float { animation: none; }
}

/* Floating stat cards */
.amz-float-card {
    animation: amz-float-bob 5s ease-in-out infinite;
    z-index: 20;
}
.amz-float-card:nth-child(2) {
    animation-delay: -2.5s;
}
@keyframes amz-float-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .amz-orbit-node,
    .amz-particle,
    .amz-ring-2,
    .amz-float-card {
        animation: none;
    }
    .amz-orbit-node { transform: translateX(var(--orbit-radius, 150px)); }
    .amz-hub-glow { animation: none; }
    .amz-hub-inner, .amz-hub-label { opacity: 1; transform: none; animation: none; }
}

/* Amazon Affiliate Tool Page — mirrors AliExpress animations with amz- prefix */
.amz-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.amz-reveal.amz-visible {
    opacity: 1;
    transform: translateY(0);
}

.amz-feature-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}
.amz-feature-card.amz-visible {
    opacity: 1;
    transform: translateY(0);
}
.amz-feature-card:nth-child(1) { transition-delay: 0s; }
.amz-feature-card:nth-child(2) { transition-delay: 0.06s; }
.amz-feature-card:nth-child(3) { transition-delay: 0.12s; }
.amz-feature-card:nth-child(4) { transition-delay: 0.18s; }
.amz-feature-card:nth-child(5) { transition-delay: 0.24s; }
.amz-feature-card:nth-child(6) { transition-delay: 0.30s; }

.amz-step {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.amz-step.amz-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes amz-orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(15px, -20px) scale(1.05); }
    66% { transform: translate(-10px, 10px) scale(0.97); }
}
.amz-orb-float {
    animation: amz-orb-float 8s ease-in-out infinite;
}
.amz-orb-float-delay {
    animation: amz-orb-float 10s ease-in-out infinite 2s;
}

@keyframes amz-hub-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.2); }
    50% { box-shadow: 0 0 0 20px rgba(37, 99, 235, 0); }
}
.amz-hub-pulse {
    animation: amz-hub-pulse 2.5s ease-in-out infinite;
}

.amz-hero-step {
    opacity: 0;
    transform: translateY(12px);
    animation: amz-hero-step-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: var(--step-delay, 0s);
}
@keyframes amz-hero-step-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.amz-hero-check {
    opacity: 0;
    transform: scale(0.5);
    animation: amz-hero-check-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: var(--check-delay, 0.6s);
}
@keyframes amz-hero-check-in {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

.amz-hero-card {
    opacity: 0;
    transform: translateY(8px) scale(0.95);
    animation: amz-hero-card-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: var(--card-delay, 0.9s);
}
@keyframes amz-hero-card-in {
    from { opacity: 0; transform: translateY(8px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.amz-hero-typing {
    animation: amz-typing-blink 1.2s ease-in-out infinite 1s;
}
@keyframes amz-typing-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.amz-connector-line {
    transform: scaleY(0);
    transform-origin: top;
    animation: amz-connector-grow 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: inherit;
}
@keyframes amz-connector-grow {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

@keyframes amz-connector-pulse-anim {
    0% { transform: translateY(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(100%); opacity: 0; }
}
.amz-connector-pulse {
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.3), transparent);
    animation: amz-connector-pulse-anim 1.5s ease-in-out infinite 1.5s;
}

@media (prefers-reduced-motion: reduce) {
    .amz-reveal, .amz-feature-card, .amz-step {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .amz-orb-float, .amz-orb-float-delay, .amz-hub-pulse {
        animation: none;
    }
    .amz-hero-step, .amz-hero-check, .amz-hero-card, .amz-connector-line {
        opacity: 1;
        transform: none;
        animation: none;
    }
    .amz-hero-typing, .amz-connector-pulse {
        animation: none;
    }
}

/* Before/After section hero dot pattern */
section::before {
    pointer-events: none;
    z-index: 0;
}

/* Credits info tooltip */
.credits-tooltip-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.credits-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
    background: hsl(var(--foreground));
    color: hsl(var(--background));
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    pointer-events: none;
    z-index: 50;
}
.credits-tooltip-wrap:hover .credits-tooltip {
    display: block;
}

/* Blog post page */
.bp-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.bp-reveal.bp-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .bp-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Focus-visible styles for accessibility */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible {
    outline: 2px solid hsl(var(--primary));
    outline-offset: 2px;
    border-radius: 4px;
}

/* Animation fallback: ensure content visible if JS/animations fail */
@media (prefers-reduced-motion: reduce) {
    .animate-fade-in-up,
    .animate-fade-in {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
}
